• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

again help

Status
Not open for further replies.
Level 8
Joined
Sep 2, 2012
Messages
308
no , not only the reward i questioned how make a quest for example

Buzan Should Kill 5 Gnoll To Achive 200 Wood Reward

EDIT: by the way i want to know the spawn system that makes for example Ghouls From Crpyt

Makes 5 Ghouls From A Buliding then these 5 ghouls start attack to a region I need the trigger
 
Last edited by a moderator:
Level 8
Joined
Sep 2, 2012
Messages
308
:( Steel I dont Get it Ok Just I Need how to make quest with reward az i said a paladin should kill 5 gnoul then he finshied the job he should back to Goblin tinker to give his reward i want trigger . please please with screen need i just starting trigger -_-
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
I think it should be something like this:

The first trigger should fire when you want the quest to start, or you can create the quest at map initialization, but mark it as "undiscovered" instead of "discovered" - that way when you press F9, you will see an undiscovered quest slot.

  • Quest Start
    • Events
      • <Your event, or whatever is supposed to start the quest>
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • -------- -------------------------------- --------
      • -------- CREATES QUEST AND QUEST REQUIREMENT --------
      • Quest - Create a Required quest titled <Title> with the description <Description>, using icon path <Icon>
      • Set Your_Quest = (Last created quest)
      • Quest - Enable Your_Quest
      • Quest - Mark Your_Quest as Discovered
      • Quest - Create a quest requirement for Your_Quest with the description Kill 5 gnolls (0/5)
      • Set Quest_Requirement[1] = (Last created quest requirement)
      • Set Quest_Count = 0
      • -------- -------------------------------- --------
      • -------- QUEST MESSAGE --------
      • Quest - Display to (All players) the Quest Discovered message: NEW QUEST <Your qu...
      • -------- -------------------------------- --------
      • Trigger - Turn on Quest Update <gen>

This second trigger may be the most complicated. Whenever a gnoll dies, the quest will be updated.
  • Quest Update
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Gnoll
          • (Unit-type of (Triggering unit)) Equal to Gnoll Brute
          • (Unit-type of (Triggering unit)) Equal to Gnoll Assassin
          • (Unit-type of (Triggering unit)) Equal to Gnoll Poacher
          • (Unit-type of (Triggering unit)) Equal to Gnoll Warden
          • (Unit-type of (Triggering unit)) Equal to Gnoll Overseer
    • Actions
      • Set Quest_Count = (Quest_Count + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Quest_Count Greater than or equal to 1
          • Quest_Count Less than or equal to 4
        • Then - Actions
          • Quest - Change the description of Quest_Requirement[1] to (Kill 5 gnolls ( + ((String(Quest_Count)) + /5)))
          • Quest - Display to (All players) the Quest Update message: (QUEST UPDATE|n<Quest name>|n- Kill 5 gnolls ( + ((String(Quest_Count)) + /5)))
        • Else - Actions
          • Trigger - Turn off (This trigger)
          • Quest - Change the description of Quest_Requirement[1] to (Kill 5 gnolls ( + ((String(Quest_Count)) + /5)))
          • Quest - Mark Quest_Requirement[1] as Completed
          • -------- -------------------------------- --------
          • Quest - Create a quest requirement for Your_Quest with the description Return to Goblin Ti...
          • Set Quest_Requirement[2] = (Last created quest requirement)
          • -------- -------------------------------- --------
          • Quest - Display to (All players) the Quest Requirement message: (QUEST UPDATE|n<Quest name>|n|c007d7d7dKill 5 gnolls (5/5) (Completed)|r|n- Return to Goblin Tinker + ((String(Quest_Count)) + /5)))
          • -------- -------------------------------- --------
          • Trigger - Turn on Quest Complete <gen>
Quest_Count will be increased by 1 and then we check value of Quest_Count. If the value is in interval <1;4>, the quest will be simply updated (updated by quest message and in quest log).
When Quest_Count is 5, the whole trigger will switch off (so no further kills will start this trigger), that quest objective is marked as completed and new objective is add (a "go back to quest giver" objective).


  • Quest Complete
    • Events
      • Unit - A unit comes within 256.00 of Goblin_Tinker
    • Conditions
      • (Triggering unit) Equal to Your_Hero
    • Actions
      • Trigger - Turn off (This trigger)
      • Quest - Display to (All players) the Quest Completed message: QUEST COMPLETED <Q...
      • Quest - Mark Quest_Requirement[2] as Completed
      • Quest - Mark Your_Quest as Completed
      • Hero - Create <Reward> and give it to (Triggering unit)
This trigger will fire only once you have killed 5 gnolls. Then whenever your hero gets back to quest giver, the whole quest will be marked as completed and you will get your reward.

Variables used:
Your_Quest => "Quest" variable, it's needed so you update that quest
Quest_Count => "Integer" variable, it's needed so you can keep check of how many gnolls have been slain.
Quest_Requirement => A "Quest Requirement" array variable (check the "array" box in variable editor). So we can easily edit requirements.

The trigger I made is a quest for 1 player only. If you want this quest to check different players, then it will be a lot more complicated.
Also it misses those final touches like an exclamation mark above quest giver when you can discover/finish the quest.
 
Level 8
Joined
Sep 2, 2012
Messages
308
WoW thanks , thats easy . well my last question . i want this trigger :

when a hero becomes level 50 a unit will be cretead in a region then unit created a message will say : the Demon Has Entered This World something like this .
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
  • Demon Spawn
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • (Hero level of (Triggering unit)) Equal to 50
    • Actions
      • Trigger - Turn off (This trigger)
      • Set p = (Center of Your_Region)
      • Unit - Create 1 Your_Demon for Neutral Hostile at p facing Default building facing degrees
      • Game - Display to (All players) the text: The demon has enter...
      • -------- -------------------------------- --------
      • -------- Remove leaks --------
      • Custom script: call RemoveLocation(udg_p)
      • Custom script: set udg_p = null
"p" is a point variable. Those custom scripts at the end remove memory leaks.
Currently, this trigger will fire only once - when first unit gains level 50. If you want that trigger to fire everytime any hero gains level 50, remove the first action "Trigger - Turn off (this trigger)"
 
Status
Not open for further replies.
Top