• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Quests System

Status
Not open for further replies.
Level 10
Joined
Mar 23, 2007
Messages
261
Allright, here is another request.
I need a quest system, that seems as much as possible as the quests from the Warcraft Campaings.
It should completely be created in GUI, as i dont know JASS.
There should be some examples in it:
Example one. You get a quest. It should look like this:

Slay 8 Gnolls (0 / 8) --> Slay 8 Gnolls (1 / 8)

And when it is completed:

Slay 8 Gnolls (Completed)


I should also be able to make the Gnolls count, no matter if it is Gnoll Poachers or Gnoll Wardens.
Or example 2:

Deliver a message to some guy

Completed:

Deliver a message to some guy (Completed)


This is what i request. Credits + ? will be given.
 
Level 2
Joined
Jan 10, 2009
Messages
30
This is rather easy, copy this:

  • Quest Status 1
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- 1) --------
      • Quest - Create a Required quest titled Slay 8 Gnolls - Not... with the description (You must slay 8 Gnolls. You have killed: + ((String(Gnolls_Killed)) + /8 Gnolls - |cffff0000Not completed!|r)), using icon path ReplaceableTextures\CommandButtons\BTNGnollKing.blp
      • -------- 2) --------
      • Set Gnolls_Quest = (Last created quest)
-------- 1) --------
* This will create the wanted Quest
-------- 2) --------
* This will set the Quest, this is required!

  • Quest Status 2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Gnoll
    • Actions
      • -------- 3) --------
      • Set Gnolls_Killed = (Gnolls_Killed + 1)
      • -------- 4) --------
      • Quest - Change the description of Gnolls_Quest to (You must slay 8 Gnolls. You have killed: + ((String(Gnolls_Killed)) + /8 Gnolls - |cffff0000Not completed!|r))
      • -------- 5) --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Gnolls_Killed Equal to 8
        • Then - Actions
          • -------- 6) --------
          • Quest - Change the description of Gnolls_Quest to (You must slay 8 Gnolls. You have killed: + ((String(Gnolls_Killed)) + /8 Gnolls - |cff7cfc00Quest Completed!|r You can go and get your Reward now!))
          • -------- 7) --------
          • Quest - Mark Gnolls_Quest as Completed
          • -------- 8) --------
          • Quest - Change the title of Gnolls_Quest to Slay 8 Gnolls - Com...
          • -------- 9) --------
          • Trigger - Turn off (This trigger)
        • Else - Actions
The Event here is that a Unit dies, the Condition makes sure that it
is a Gnoll that you are killing!

-------- 3) --------
* This will make this system check how many Gnolls you have killed
-------- 4) --------
* When you kill an Gnoll, the text in the Quest will change to "Gnolls killed:
1/8" 2/8, 3/8 and so on, each gnoll you kill will be shown here!
-------- 5) --------
* When you have killed 8 Gnolls, this is what will be done...:
-------- 6) --------
* The Quest Description will be changed to "Complete!" instead of "Not Complete" and it will say that you can go and get your reward now.
-------- 7) --------
* This is kinda not required, but just keep it any way
-------- 8) --------
* This will change the Title to "Slay 8 Gnolls - Complete!" and not "Not done"
-------- 9) --------
* It is REALLY important that the Trigger gets turned off, else it will keep counting gnolls killed, and can become 20/8, 21/8 and so on...
That would not look too nice!


HOPE IT HELPED!
Need more help, just PM me or reply :wink:
 
Level 3
Joined
Apr 13, 2009
Messages
49
Well heres what I made, it's an example but you just gotta edit it to the units that you want/ quest name.

I used the Variables: Gnoll(Integer) and Kill(Quest)

  • Untitled Trigger 004
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Quest - Create a Required quest titled Kill with the description Kill 8 Gnolls , using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
      • Set Kill = (Last created quest)
This is your first trigger which creates the quest.


  • Untitled Trigger 003
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Gnoll Warden
    • Actions
      • Set Gnoll = (Gnoll + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Gnoll Equal to 8
        • Then - Actions
          • Quest - Mark Kill as Completed
          • Quest - Display to (All players) the Quest Update message: You completed the q...
        • Else - Actions
          • Do nothing
This is your second trigger which will check what you kill, and if you killed enough


Enjoy :)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
If you have multiple of these quests, you can use this:


  • Quest
  • Events
    • Unit - A unit Dies
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • QuestOn[1] Equal to True
        • Or - Any (Conditions) are true
          • Conditions
            • (Unit-type of (Dying unit)) Equal to Gnoll Poacher
            • (Unit-type of (Dying unit)) Equal to Gnoll Assassin
            • (Unit-type of (Dying unit)) Equal to Other Gnolls
      • Then - Actions
        • Set Kills[1] = (Kills[1] + 1)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Kills[1] Greater than or equal to 8
          • Then - Actions
            • Set QuestOn[1] = False
            • Quest - Display to (All players) the Quest Update message: |c00ff8800Quest Com...
            • Quest - Mark [Gnoll-quest] as Completed
            • Trigger - Turn on [Complete GnollQuest]
          • Else - Actions
      • Else - Actions
        • Game - Display to (All players) for 7.00 seconds the text: (Gnolls killed: + (|c00ffcc00 + ((String(Kills[1])) + |r)))
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • QuestOn[2] Equal to True
            • (Unit-type of (Dying unit)) Equal to Forest Troll Warlord
            • (Unit-type of (Dying unit)) Equal to Forest Troll Berserker
            • (Unit-type of (Dying unit)) Equal to Forest Other Trolls
      • Then - Actions
        • Set Kills[2] = (Kills[2] + 1)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Kills[2] Greater than or equal to 12
          • Then - Actions
            • Set QuestOn[2] = False
            • Quest - Display to (All players) the Quest Update message: |c00ff8800Quest Com...
            • Quest - Mark [Troll-Quest] as Completed
            • Trigger - Turn on [Complete TrollQuest]
          • Else - Actions
      • Else - Actions
        • Game - Display to (All players) for 7.00 seconds the text: (Trolls killed: + (|c00ffcc00 + ((String(Kills[2])) + |r)))
The above trigger will calculate several quests at the same time, as long as the quest is on.
If you need help with the trigger to set this quest up, lowkey 12 said it, you only need to set the Boolean "QuestOn[X]" to true.


Set up Quest:
  • Init Messenger
  • Events
    • Unit - A unit comes within 250.00 of [QuestGiver]
  • Conditions
    • ((Triggering unit) is A Hero) Equal to True
  • Events
    • Quest - Create a Required quest titled The Messenger with the description Description, using icon path ReplaceableTextures\CommandButtons\BTNScrollOfProtection.blp
    • Set Quest = (Last created quest)
    • Set QuestOn[3] is true
    • Trigger - Turn on Messenger <gen>
    • Game - Display to (All players) for 8.00 seconds the text: |c00ff8800Quest Dis...
Complete Quest:
  • Messenger
  • Events
    • Unit - A unit comes within 250.00 of [QuestCompleter]
  • Conditions
    • ((Triggering unit) is A Hero) Equal to True
    • QuestOn[3] equal to true
  • Events
    • Quest - Mark [Messenger-Quest] as Completed
    • Quest - Display to (All players) the Quest Completed message: |c00ff8800Quest Com...
    • Hero - Give Reward (xp)
    • Player - Give Reward (gold/lumber)
It should work, but I might have forgotten something.
If you need anything else, or something isn't working properly, feel free to ask.
 
Status
Not open for further replies.
Top