• 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.

Quests

Status
Not open for further replies.
Level 5
Joined
Sep 12, 2009
Messages
82
I need some help about quests please.


I want to kill 3 bandits, but i don't know how to set it up like that, i knew that before 8-9 months, and forgot, and i want to know item recovery, so i need to find item and bring it back to unit. But, that quest must be available again, and that item spawn again.
 
Hashtable Setup (MUI purposes)
  • Tr
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Hashtable - Create a hashtable
    • Set Hashtable = (Last created hashtable)
Acquire the quest
  • Tr1
  • Events
    • Unit - A unit comes within range of X <gen>
  • Conditions
    • (Load Key(queston) of (Key(Triggering unit)) from Hashtable) Equal to False
  • Actions
    • Quest - Create a Required quest titled Quest with the description Prove your skills!, using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
    • Quest - Create a quest requirement for (Last created quest) with the description Kill 3 bandits.
    • Hashtable - Save Handle of (Last created quest) as Key(quest) of (Key(Triggering unit)) in Hashtable
    • Hashtable - Save True as Key(queston) of (Key(Triggering unit)) in Hashtable
    • Hashtable - Save 0 as Key(kills) of (Key(Triggering unit)) in Hashtable
Quest Log
  • Trigger
  • Events
    • Unit - A unit dies
  • Conditions
    • (Load Key(queston) of (Key(Killing unit)) from Hashtable Equal to True\
    • (Unit-type of (Triggering unit)) Equal to Bandit
  • Actions
    • Set KillsCount = (Load Key(kills) of (Key(Killing unit)) from Hashtable)
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • (KillsCount) Less than 3
      • Then - Actions
        • Hashtable - Save (KillsCount + 1) as Key(kills) of (Key(Killing unit)) in Hashtable
      • Else - Actions
        • Quest - Mark (Load Key(quest) of (Key(Triggering unit)) in Hashtable) as Completed
        • Hashtable - Clear all child hashtables of (Key(Killing unit)) in Hashtable
        • Game - Display to (Player Group(Owner of (Killing unit))) the text "Quest completed!"
Reference:
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/hashtables-mui-133407/
 
Status
Not open for further replies.
Top