Resolved Quest Error

Discussion in 'Quest / Script Help' started by Kirstiana, Sep 13, 2013.

  1. robxu9 Head Developer

  2. Kirstiana Starting Out

    Occurs when trying to enter the target Area:


    Code:
    14.10 13:39:33 [Server] INFO at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)
    14.10 13:39:33 [Server] INFO at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421)
    14.10 13:39:33 [Server] INFO at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488)
    14.10 13:39:33 [Server] INFO at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:227)
    14.10 13:39:33 [Server] INFO at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:524)
    14.10 13:39:33 [Server] INFO at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345)
    14.10 13:39:33 [Server] INFO at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftTask.run(CraftTask.java:53)
    14.10 13:39:33 [Server] INFO at com.theminequest.api.quest.event.QuestEvent$1.run(QuestEvent.java:83)
    14.10 13:39:33 [Server] INFO at com.theminequest.api.quest.event.TargetedQuestEvent.action(TargetedQuestEvent.java:56)
    14.10 13:39:33 [Server] INFO at com.theminequest.common.impl.targeted.AreaTarget.getPlayers(AreaTarget.java:54)
    14.10 13:39:33 [Server] INFO at com.theminequest.bukkit.group.BukkitGroupManager.get(BukkitGroupManager.java:93)
    14.10 13:39:33 [Server] INFO at com.theminequest.bukkit.BukkitPlatform.getPlayer(BukkitPlatform.java:532)
    14.10 13:39:33 [Server] INFO at org.bukkit.Bukkit.getPlayerExact(Bukkit.java:417)
    14.10 13:39:33 [Server] INFO at org.bukkit.craftbukkit.v1_6_R3.CraftServer.getPlayerExact(CraftServer.java:344)
    14.10 13:39:33 [Server] INFO at org.apache.commons.lang.Validate.notNull(Validate.java:203)
    14.10 13:39:33 [Server] INFO java.lang.IllegalArgumentException: Name cannot be null
    14.10 13:39:33 [Server] WARNING Task #8427 for MineQuest v3.0.25 generated an exception
  3. robxu9 Head Developer

    I stared at this for a while before I realised the problem:

    You end the quest before the target can execute, so the quest returns null.

    This should work:

    Code:
    Name:Stonewall
    Description:Defend the Castle!
    Repeatable:true
    Event:1:MessageEvent:30:You hear several screams in the distance. You look over to see a Knight waving at you.
    Event:2:SingleAreaEvent:500:1:375:64:-378:2
    Event:3:MessageEvent:1000:Injured Knight: Hey you there! The castle is under attack, please help! I am injured, but take what you need from me!
    Event:4:MessageEvent:7000:Injured Knight: Once you have gotten what you need, please head through the gate!
    Event:5:SingleAreaEvent:500:2:380:64:-380:2
    Event:6:MessageEvent:10:The Gate opens and you run through.
    TargetEvent:7:TeleportEvent:10:1:384:64:-381
    Event:8:CompleteQuestEvent:1000
    Target:1:AreaTarget:380:64:-380:2
    Task:0:1,2
    Task:1:3,4,5
    Task:2:6,7,8
  4. Kirstiana Starting Out

    Oh haha... derp on me. Thank you so much! So far it works! Now to complete more of the quest. I'll let you know if I run into anything else! Thanks for all of your hard work!!! :D
    robxu9 likes this.
  5. Kirstiana Starting Out

    Alright.. I'm not sure what I'm doing wrong.. but so far I'm able to get a zombie to spawn..... then I'll kill it.... a zombie will spawn immediately after, then automatically die for some reason. Did I do something wrong with the code?

    Code:
    Name:Stonewall
    Description:Defend the Castle!
    Repeatable:true
    Event:1:MessageEvent:30:You hear several screams in the distance. You look over to see a Knight waving at you.
    Event:2:SingleAreaEvent:500:1:375:64:-378:2
    Event:3:MessageEvent:1000:Injured Knight: Hey you there! The castle is under attack, please help! I am injured, but take what you need from me!
    Event:4:MessageEvent:7000:Injured Knight: Once you have gotten what you need, please head through the gate!
    Event:5:SingleAreaEvent:500:2:380:64:-380:2
    Event:6:MessageEvent:10:The Gate opens and you run through.
    TargetEvent:7:TeleportEvent:10:1:384:64:-381
    Event:8:SingleAreaEvent:100:3:384:64:-381:2
    Event:9:MessageEvent:200:Defeat each mob wave!
    Event:10:EntitySpawnerEvent:300:392:66:-367:Zombie:f
    Event:11:KillEvent:4:Zombie:10
    Event:12:MessageEvent:300:All waves have been defeated!
    Event:13:CompleteQuestEvent:1000
    Target:1:AreaTarget:380:64:-380:2
    Task:0:1,2
    Task:1:3,4,5
    Task:2:6,7,8
    Task:3:9,10,11
    Task:4:12,13
  6. Kirstiana Starting Out

    Forgot to mention that after the second one dies.... they will stop spawning all together... and the quest never completes. It also doesn't give me any error messages at all.
  7. Kirstiana Starting Out

    So close to getting this to work :( But it's not... and getting no errors... I'm lost on what I'm doing wrong.
  8. robxu9 Head Developer

    I'm sorry that I didn't respond to this quickly :( Life is taking over again. I'll see if I can get this fixed ASAP.

    In the meantime, would EntitySpawnNumberEvent:delayinMS:x:y:z:type:amount work?
  9. Kirstiana Starting Out

    No problem! I'll try out the one you suggested and I'll get back to you :D
  10. robxu9 Head Developer

    Ok... I think I need to clarify the event.

    What the event does is that it spawns one entity to be killed by someone in the party/the quest owner. If it's not killed by a quest owner it's spawned again.

    So if you want 4 zombies, you need 4 entity spawn events.
  11. Kirstiana Starting Out

    Ah okay! I've been following the videos on the front page, so I'm guessing they're outdated, so I'll go through my quest and fix it again :D

    Thank you!!
    robxu9 likes this.