soulmaka
New Member
- Reaction score
- 2
okay, i have been making a quest trigger for an hour now, but it seems that making a quest trigger for me is quite hard,.. xD I've been making Spell triggers and Hero taverns, dialogues, etc..
haha, i hate making quest triggers, because ...
1. I always click, (player number(owner of(triggering/buying/attacking unit))), is there anyway to make this simple? man I'm TIRED of clicking.. xD
2. Can I use loops for the no.1? xD
3. Here's my code.. yeah, there might be leaks right now, but the hell I care for that now, i can fix that later, i just want how to make things on making quest trigger simpler..
code for quest finish/claiming rewards ..
Code for Quest inquiry
Code for Quest in action..
haha, i hate making quest triggers, because ...
1. I always click, (player number(owner of(triggering/buying/attacking unit))), is there anyway to make this simple? man I'm TIRED of clicking.. xD
2. Can I use loops for the no.1? xD
3. Here's my code.. yeah, there might be leaks right now, but the hell I care for that now, i can fix that later, i just want how to make things on making quest trigger simpler..
code for quest finish/claiming rewards ..
Trigger:
- Quests Market
- Events
- Unit - A unit comes within 200.00 of |cff00ffffQuest Market|r 0026 <gen>
- Unit - A unit comes within 200.00 of |cff00ffffQuest Market|r 0027 <gen>
- Conditions
- (Triggering unit) Equal to QuestCreepsKill_TU[(Player number of (Owner of (Buying unit)))]
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Triggering unit) Equal to QuestCreepsKill_TU[(Player number of (Owner of (Buying unit)))]
- QuestsCreepsKill[(Player number of (Owner of (Buying unit)))] Equal to 30
- (QuestCreepsKill_TU[(Player number of (Owner of (Buying unit)))] has QuestKillCreeps_Item[(Player number of (Owner of (Buying unit)))]) Equal to True
- Then - Actions
- Set QuestsCreepsKill[(Player number of (Owner of (Buying unit)))] = 0
- Item - Remove QuestKillCreeps_Item[(Player number of (Owner of (Buying unit)))]
- Player - Add 2500 to (Owner of QuestCreepsKill_TU[(Player number of (Owner of (Buying unit)))]) Current gold
- Hero - Add 1000 experience to QuestCreepsKill_TU[(Player number of (Owner of (Buying unit)))], Show level-up graphics
- Game - Display to (Player group((Owner of QuestCreepsKill_TU[(Player number of (Owner of (Buying unit)))]))) for 10.00 seconds the text: Thanks you for help...
- Else - Actions
- Game - Display to (Player group((Owner of QuestCreepsKill_TU[(Player number of (Owner of (Buying unit)))]))) for 10.00 seconds the text: Go !! Fullfil your ...
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
Code for Quest inquiry
Trigger:
- Quest Kill Creeps
- Events
- Unit - A unit Sells an item (from shop)
- Conditions
- (Item-type of (Sold Item)) Equal to Quest: Kill Creeps
- Actions
- Set QuestCreepsKill_TU[(Player number of (Owner of (Buying unit)))] = (Buying unit)
- Set QuestKillCreeps_Item[(Player number of (Owner of (Buying unit)))] = (Sold Item)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Level of QuestCreepsKill_TU[(Player number of (Owner of (Buying unit)))]) Less than or equal to 30
- Then - Actions
- Set QuestsCreepsKill[(Player number of (Owner of (Buying unit)))] = 0
- Else - Actions
- Item - Remove QuestKillCreeps_Item[(Player number of (Owner of (Buying unit)))]
- Player - Add 500 to (Owner of QuestCreepsKill_TU[(Player number of (Owner of (Buying unit)))]) Current gold
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Level of QuestCreepsKill_TU[(Player number of (Owner of (Buying unit)))]) Greater than 30
- Then - Actions
- Else - Actions
- If - Conditions
- Events
Code for Quest in action..
Trigger:
- Quest Kill Creeps p2
- Events
- Unit - A unit Dies
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Owner of (Triggering unit)) Equal to Neutral Hostile
- ((Triggering unit) is A Hero) Equal to False
- (Killing unit) Equal to QuestCreepsKill_TU[(Player number of (Owner of (Buying unit)))]
- QuestsCreepsKill[(Player number of (Owner of (Buying unit)))] Less than 30
- (QuestCreepsKill_TU[(Player number of (Owner of (Buying unit)))] has QuestKillCreeps_Item[(Player number of (Owner of (Buying unit)))]) Equal to True
- Then - Actions
- Set QuestsCreepsKill[(Player number of (Owner of (Buying unit)))] = (QuestsCreepsKill[(Player number of (Owner of (Buying unit)))] + 1)
- Game - Display to (Player group((Owner of QuestCreepsKill_TU[(Player number of (Owner of (Buying unit)))]))) the text: ((Name of QuestCreepsKill_TU[(Player number of (Owner of (Buying unit)))]) + ( has killed + ((String(QuestsCreepsKill[(Player number of (Owner of (Buying unit)))])) + Creeps!)))
- Else - Actions
- Game - Display to (Player group((Owner of QuestCreepsKill_TU[(Player number of (Owner of (Buying unit)))]))) the text: You already have co...
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events