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

How to do the job?

Status
Not open for further replies.
Level 1
Joined
Feb 8, 2012
Messages
2
I can not find a forum where I have become aware, so I do a new topic.
How to do a task that, for example
I have to kill such a bandit?
Please either answer or direct me to the forum where I'll find out how.

'advance thanks
 
Level 3
Joined
Dec 30, 2011
Messages
54
Create a quest
Make a condition for your quest (example : you have to kill a boss , so , so check if dies)
Mark quest as completed.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
^ Thats the noob way. Or do the more advanced way! (its a good start for a beginner to jump to the hard stuff)

  • Bounty Kill
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set Temp_UnitGroup = (Units within 2500.00 of (Position of (Dying unit)))
      • Unit Group - Pick every unit in Temp_UnitGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Unit-type of (Picked unit)) Equal to Unprofessional
                  • (Unit-type of (Picked unit)) Equal to Beserker T4
            • Then - Actions
              • Unit Group - Add (Picked unit) to Bounty_Kill_UnitGroup
            • Else - Actions
      • Custom script: call DestroyGroup(udg_Temp_UnitGroup)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Unit-type of (Triggering unit)) Equal to Rat) or (((Unit-type of (Triggering unit)) Equal to Mother Rat) or (((Unit-type of (Triggering unit)) Equal to Infested Rat) or ((Unit-type of (Triggering unit)) Equal to |cff800080[Elite]|r Mouseasourus - Rex)))
        • Then - Actions
          • Unit Group - Pick every unit in Bounty_Kill_UnitGroup and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Bounty_Rats_Doing[(Player number of (Owner of (Picked unit)))] Equal to True
                • Then - Actions
                  • Set Bounty_Rats_Killed[(Player number of (Owner of (Picked unit)))] = (Bounty_Rats_Killed[(Player number of (Owner of (Picked unit)))] + 1)
                  • If (Bounty_Rats_Killed[(Player number of (Owner of (Picked unit)))] Greater than or equal to 10) then do (Game - Display to (Player group((Owner of (Picked unit)))) the text: Your bounty for Rat...) else do (Game - Display to (Player group((Owner of (Picked unit)))) the text: (<Empty String> + ((String((0 + Bounty_Rats_Killed[(Player number of (Owner of (Picked unit)))]))) + /10 Rats)))
                • Else - Actions
      • Unit Group - Remove all units of Bounty_Kill_UnitGroup from Bounty_Kill_UnitGroup
Set Temp_UnitGroup = Selects all the units within 2500 of the dying unut
You can skip the next part (i stole it from my map) but it makes sure that the selected unit is a hero (so, if u have summon, it wont trigger so many times).
Than the next if-then-else checks if the unit killed was a part of the needed units.

Than, it picks every unit in the group. If the unit owner's player is doing the quest, than it will set the number of quest mobs killed to quest mobs killed + 1. Than it checks if the quest mobs killed is whats needed for the quest and it says that its finished. (you can complete the quest, in my map i have it so u have to talk to a guy to complete the quest)

Than it wipes the members of BountyKillUnitGroup so the units that killed the last unit aren't included in the next kill if they're not near the unit.
 
Location leak here:
  • Set Temp_UnitGroup = (Units within 2500.00 of (Position of (Dying unit)))
You can just use: set bj_wantDestroyGroup = true instead Temp_UnitGroup
Instead this:
  • ((Unit-type of (Triggering unit)) Equal to Rat) or (((Unit-type of (Triggering unit)) Equal to Mother Rat) or (((Unit-type of (Triggering unit)) Equal to Infested Rat) or ((Unit-type of (Triggering unit)) Equal to |cff800080[Elite]|r Mouseasourus - Rex)))
You can use OR with list like above.
Last if the else should be split into if then else with more actions.
Player Group leak: Player group((Owner of (Picked unit)))
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Didn't notice that location leak.

and i know about the bj_ and the combined if then else statement, i just wasn't thinking when i did those two.
 
Status
Not open for further replies.
Top