Open alot of questions

Discussion in 'Quest / Script Help' started by Irobot45, Dec 1, 2013.

  1. Irobot45 Starting Out

    ok so I'm verry new to this plugin. And I'm having alot of questions about it that I can't find.
    first this is my code.
    http://www.theminequest.com/questhelper.php?q=529b1c8e57533
    basicly. you should walk in a certain area. you get automaticly teleported (Is this possible?) and automaticly start the quest. Then there is some text that appears (which works atm). and then you find a woodensword + leather chestplate near a chest.
    But now there must spawn 1 or 2 zombies that the person must kill (I have no clue how to do this)
    And after that a stronger zombie must spawn.
    after he killed the stronger zombie the person will go to an area and teleports away from the dungeon.

    at the moment, zombies spawn but eitherway the next task immediatly starts, or it doesn't start. I don't know how to spawn a stronger zombie. I can only get a woodensword out of the chest not a leather chestplate. I must start the quest with a sign (not sure if there is a possible other way). none of the teleport works
    pls help :(
  2. Urchint Becoming a Quester

    Paste your code and I will help you out to the best of my ability, once we get the quest working we can discus about other possible ways to start the quest other then with a sign.
  3. Irobot45 Starting Out

  4. Urchint Becoming a Quester

    I see the code, gonna take me a sec to go through it though as it's very jumbled and unorganized. Though I see some missing tasks and events which may be some of your problems. Try to keep your coding more organized and it will make your life easier when trying to go through the code and find errors.
  5. Urchint Becoming a Quester

  6. robxu9 Head Developer

    Thanks for the support so far, Urchint! I'd like to also point out one thing (which is sadly a deficiency with our old quest helper):

    In the old days, we used to use the Event:#:T:EventName syntax, as you can see with TeleportEvent. We've switched over to using the following:

    TargetEvent:#:EventName:<the rest is the same>

    So for the Teleport Events:
    Code:
    Event:12:T:TeleportEvent:1:1:-425:4:1164
    Event:25:T:TeleportEvent:3000:2:-423:6:1147
    These should be changed to:

    Code:
    TargetEvent:12:TeleportEvent:1:1:-425:4:1164
    TargetEvent:25:TeleportEvent:3000:2:-423:6:1147
    Sorry for the inconvenience; I'm thinking of restoring the old syntax while we're waiting for the new quest helper to arrive, but that will be very hacky and I'm hesitant to break things.
    Urchint likes this.
  7. Urchint Becoming a Quester

    Here's the code just pasted as things got messed up when it converted to a html link so here's the code written out, and it includes the new teleport events so it should work now.

    Code:
    Name:tutorial
    Repeatable:false
    Description:finish the tutorial of question
    Spawn:-425:4:1164
    EditMessage:you are currently on a quest and cant edit anything
    QuestArea:-364:14:1138:-432:12:1177
    #Deleted World data as you should only have either world or loadworld, not both.
    LoadWorld:spawn:spawn2
    #To have the player wait 2 seconds before starting we up the delay of the area event to 2000 milliseconds
    Event:11:SingleAreaEvent:2000:7:-383:4:1159:4
    Event:10:MessageEvent:1:wait here 2 seconds to start the quest
    TargetEvent:12:TeleportEvent:1:1:-425:4:1164
    #Added delay to prevent lag from two events trying to run at one time.
    Event:29:QuestEvent:50:1
    Event:1:MessageEvent:2000:This was all a bad idea
    Event:2:MessageEvent:4000:We locked ourself in.
    Event:3:MessageEvent:6000:We thought the wall would protect us.
    Event:4:MessageEvent:8000:But... today it failed, now all we knew is over
    Event:5:MessageEvent:10000:My only hope is that there are other villages.
    Event:6:MessageEvent:12000:Lets try to find a way out
    #Increased delay to ensure the messages all run through before the next task starts
    Event:7:QuestEvent:15000:2
    Event:8:SingleAreaEvent:1:8:-431:8:1168:2
    Event:9:MessageEvent:1:Hmm lemme check this chest
    #Ok, the reason only one item was given was because you accidently used a semi-colon instead of a colon, so we changed that to the proper code.
    Event:14:MessageEvent:2:Not really what I expected, but better then nothing
    Event:13:RewardItemEvent:3:268,1:299,1
    #Event:30:QuestEvent:1:3 - This is not needed, rewards start the next event so we remove this.
    Event:15:MessageEvent:5000:What was that sound? O no monsters in the inn
    Event:16:EntitySpawnNumberEvent:5:x:y:z:Zombie:2
    #Event:17:EntitySpawnerCompleteEvent:1000:4:16 - This is not the event you want here, this just waits a certain time then removes the spawned mobs and starts the next task, at least from what I understand.
    #Add this to wait for 2 zombies to be killed, though honestly I have not been able to get this to work it may work for you because my quest isn't looking for quest spawned zombies so maybe this will work for you.
    Event:17:KillEvent:4:Zombie:2
    Event:19:MessageEvent:1000:Ooof I survived that..., wait SOMETHING STRONGER IS COMMING
    #This is the event to spawn a health entity, set the health value to how much health you wish it to have.
    Event:20:HealthEntitySpawn:5:5:x:y:z:Zombie::f
    #Event:21:KillEvent:5:Zombie:1 - this is not needed as health entities automaticly start a new task once defeated.
    Event:22:MessageEvent:1000:Glad thats all over... Lets search for an exit
    Event:23:SingleAreaEvent:1000:5:-431:4:1176:2
    Event:24:MessageEvent:1000:What is this? A secret passage? Lets go
    TargetEvent:25:TeleportEvent:3000:2:-423:6:1147
    #Added this to check if all party members have tp'd out and then will start the task to end the quest.
    Event:31:AreaEvent:1000:10:-423:6:1147:3
    Event:32:QuestEvent:5000:-1
    Target:1:PartyTarget
    #Changed the cords to match that of the area event that triggers the port, this may also be why the teleport wasn't working. Now any party members in range of the area event will tp.
    Target:2:AreaTarget:-431:4:1176:20
    #Target:3 - Removed as you were not using it.
    Task:0:11,10
    Task:7:12,29
    Task:1:1,2,3,4,5,6,7
    Task:2:8
    #Removed event 30 and also rearranged though that may not be necessary.
    Task:8:9,14,13
    Task:3:15,16,17
    Task:4:19,20,21
    Task:5:22,23
    Task:9:24,25,31
    #Made a new task for the quest completion, which runs an area check and once all party members have tp'd out will finish the quest.
    Task:10:32
  8. Irobot45 Starting Out

    thank you for the help ^^
  9. Irobot45 Starting Out

    it doesn't work, when I try the quest I get this error in the log
    2013-12-05 15:48:44 [SEVERE] java.lang.NullPointerException
    2013-12-05 15:48:44 [SEVERE]at com.theminequest.bukkit.platform.entity.BukkitPlayer.getLocation(BukkitPlayer.java:86)
    2013-12-05 15:48:44 [SEVERE]at com.theminequest.events.area.SingleAreaEvent.delayedConditions(SingleAreaEvent.java:53)
    2013-12-05 15:48:44 [SEVERE]at com.theminequest.api.quest.event.DelayedQuestEvent.conditions(DelayedQuestEvent.java:50)
    2013-12-05 15:48:44 [SEVERE]at com.theminequest.api.quest.event.QuestEvent.check(QuestEvent.java:74)
    2013-12-05 15:48:44 [SEVERE]at com.theminequest.common.quest.v1.V1EventManager.checkAllEvents(V1EventManager.java:141)
    2013-12-05 15:48:44 [SEVERE]at com.theminequest.common.quest.v1.V1EventManager$1.run(V1EventManager.java:62)
    2013-12-05 15:48:44 [SEVERE]at java.lang.Thread.run(Unknown Source)
  10. Irobot45 Starting Out

    it keeps on spamming that, the farest I can go with the quest is when it sais wait 2 seconds here to start the quest
  11. robxu9 Head Developer

    I don't have time to look at it right now, but check the quest to make sure that none of the parameters are wrong - those can cause exceptions like the ones you posted.
  12. Irobot45 Starting Out

    I've tried to remake the whole quest, now I understand a little bit more about the plugin, but still it wont work, and I'm having the same teleportation problems etc., not sure where the cause is because it doesn't even start the second task...
    here is my code, hope you can help me :(, and I also changed the TargetEvent thingy for teleportation.
    http://www.theminequest.com/questhelper.php?q=52b303c6b41776b4177
  13. Urchint Becoming a Quester

    Well you keep reverting stuff bud, first off you need to just stop using the quest helper, it's outdated. You never changed the teleports to the new function, they are still the old one that the helper places so of course the tellys still aren't gonna work. I tried the code I gave you earlier in a new local world (of course editing some cords and such) and it worked fine for me so I dunno bud. I will mention I did not use the single area events (just used regular) either when I originally re-wrote it but changed it when I realized that's what you were trying to use so maybe just trying using regular area events in the code I gave you? I dunno bud, all I know is the ones you keep doing on the helper have errors and old coding so when I say it's outdated and not to use it, take that advice don't keep trying to use it. You should be using notepad++ with any coding anyways, I would never recommend things like the quest helper because then you never truly understand the coding and how it works.
  14. Irobot45 Starting Out

    is there some way I can come on to your server so I can ask you this instead of here on the forum? Because I still have alot of questions about this plugin,