• 🏆 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] Quest Help

Status
Not open for further replies.
Level 19
Joined
Apr 10, 2010
Messages
2,789
Hey everyone,
Im working on an RPG map and I tried making some quests. I actually suck at making them. So please help me. It goes like this: Theres a unit called Troubled Worker. He sells two items, talk and accept/complete quest. When you buy the two items, you wont see it in your inventory. Here are the problems:
-When I buy talk, nothing pops out, or when I do accept/complete quest, no quest appears at the quest menu or any text.

-The Workers Tools are not created, but the Murlocs are.

Heres the quest acceptance/creation trigger:
  • Quest Accept
  • Events
    • Unit - A unit Sells an item(from shop)
  • Conditions
    • (Selling unit) Equal to Troubled Worker 0008 <gen>
    • Boolean_QuestOn[1] Equal to False
  • Actions
  • If (All Conditions are true) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Item type of (Sold item)) Equal to Accept/Complete Quest Workers Tools
    • Then - Actions
      • Set Boolean_QuestOn[1] Equal to True
      • Quest - Create an Optional, undiscovered quest titled Working Tools with the description I lost my tools for... using icon path ReplaceableTextures\CommandButtons\BTNGatherGold.blp
      • Set Quests_Array[1] = (Last created quest)
      • Quest - Enable Quests_Array[1]
      • Quest - Mark Quests_Array[1] as Discovered
      • Quest - Display to (Player Group((Owner of (Buying unit)))) the Quest Discovered message: Check your quests menu!
      • Item - Create Workers Tools at (Center of Workers Tools <gen>)
      • Set Item[1] = (Last created item)
      • Quest - Display to (Player Group((Owner of (Buying unit)))) the Quest Update message: Find the Workers Tools!
      • Unit - Create 5 Murloc at (Random Point in Murloc 1 <gen>) Default facing degrees
    • Else - Actions
  • If (All Conditions are true) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Item type of (Sold Item)) Equal to Talk
    • Then - Actions
      • Game - Display to (Player Group((Owner of (Buying unit)))) for 10.00 seconds the text: Hey, can you do me a favor?
    • Else - Actions
The Update telling you to return:
  • Quest Update
  • Events
    • Unit - A unit Acquires an item
  • Condition
    • (Item being manipulated) Equal to Item[1]
  • Actions
  • If (All Conditions are true) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Boolean_QuestOn[1] Equal to True
    • Then - Actions
      • Game - Display to (Player Group((Owner of (Buying unit)))) for 10.00 seconds the text: Hey, can you do me a favor?
      • Quest - Display to (Player Group((Owner of (Hero manipulating item)))) the Quest Update message: Tools received! Return to the Worker!
    • Else - Actions
The quest completion:
  • Quest Completion
  • Events
    • Unit - A unit Sells an item(from shop)
  • Conditions
    • (Selling Unit) Equal to Troubled Worker 0008 <gen>
  • Actions
  • If (All Conditions are true) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Boolean_QuestOn[1] Equal to True
      • Item[1] Equal to (Item carried by Buying unit)) of type Workers Tools)
      • (Item type of (Sold item)) Equal to Accept/Complete Quest
    • Then - Actions
      • Item - Remove Item[1]
      • Quest - Display to (Player Group((Owner of (Hero manipulating item)))) the Quest Completed Message message: Quest Finished! Reward 200 Gold and 200 XP!
      • Player - Add 200 to (Owner of (Hero manipulating item)) Current Gold
      • Hero - Add 200 experience to (Hero manipulating item), Show level-up graphics
      • Special Effect - Destroy SP_Effect[1]
    • Else - Actions
  • If (All Conditions are true) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Boolean_QuestOn[1] Equal to True
      • Item[1] Equal to (Item carried by Buying unit)) of type Workers Tools)
      • (Item type of (Sold item)) Equal to Accept/Complete Quest
    • Then - Actions
      • Game -Display to (Player Group((Owner of(Buying Unit)))) for 10.00 seconds the text: Hello! How are you doing?
    • Else - Actions
Thanks in advance to anyone.

NOTE: The talk problem is fixed but the quest is not.
 
Last edited:
You could use this:

  • Quest Accept
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Quest 1
        • Then - Actions
          • Game - Display to (All players) the text: ACTIONS HERE
        • Else - Actions
But how to detect the selling unit may be a problem. You could create one Accept/Complete item for each questgiver, I'd recommend that. :)
 
Level 10
Joined
Oct 31, 2009
Messages
352
There are a few odd things in your code but nothing that would cause the errors you described.

For your second problem if the murlocs are being created then that block of code is being ran properly, which means that there is a problem with those individual functions. For the tools make sure that there are no AI-units with inventories around where the item is created that might automatically pick it up (also make sure the region is legit).

Same thing with the quest not showing issue. The triggers are obviously running. I would make it so the quest started out as required, discovered, and enabled and if you see it after you've done that it means theres a problem with one of the functions you would normally use to do that.
 
Level 6
Joined
Oct 10, 2009
Messages
1,425
well the only problem then i can see with that action would be that maybe the region is somehow being blocked off by something in the way, if it is a very small region. if the scaling value is 1.0 and the modelfile is the default for the worker tools then there should be no problem. try [trigger="your trigger"]
Events
//some event
Conditions
//some condition
Actions
Item - Create Workers Tools at (Center of Workers Tools <gen>)
Item - Give (last created item) to SomeUnit
[/trigger]

this will at least give the tools to a unit so that you can see if the tools will at least come up in-game (and if the tools are needed by that unit then speed up that process) let me know if this helps
 
Status
Not open for further replies.
Top