EOSERV Forum > Programming > Odd quest error *fixed*
Topic is locked.
Page: << 1 >>
Odd quest error *fixed*
Author Message
Post #195799 Odd quest error *fixed*

I was testing out a quest when I came across a problem with it, and when I fixed the problem I tried signing back into my account but I disconnected before I even logged in fully. I can't undo the change I did, otherwise the quest won't work right. Can someone tell me what happened/how to fix it?

Here's the error:

[ERR] Runtime Error: Quest action recursion too deep

It's probably not that odd of an error, but I'm as thick as a plank when it comes to most of this stuff..

---
"Nurd, you're like a fucking swiss army knife" - Necrosis
10 years, 23 weeks ago
Post #195800 Re: Odd quest error

How about posting your quest file?

---
Remember when is not an organization nor a fucking group , it's simply an idea that we believe in
and live for.
The priority of Remember when should come before oxygen , as oxygen is cosmetic even life itself is
cosmetic,that's why offer our worthless lives to The "Remember when"
10 years, 23 weeks ago
Post #195801 Re: Odd quest error

All it is is an edited version of the Money Island quest. Nothing special, I've only added a state or two, and made a few smaller changes.


Main

{

    questname  "Hell Island"

    version    1.0

}

State Begin

{

    desc    "Talk to the Young Pirate"

    action  AddNpcText(28, "Arrrr, I discovered a new island!");

    action  AddNpcChat(28, "Arrrr, I discoveerd a new island!");

    action  AddNpcInput(28,1,"I don\'t believe you");

    action  AddNpcInput(28,2,"Not interested");

    rule    InputNpc(1) goto Begin0

    rule    InputNpc(2) goto Begin

}

State Begin0

{

    desc    "Talk to the Young Pirate"

    action  AddNpcText(28, "Arrr you think I making this up? Well I could show you the island myself, matey! But first you would need to prove that you are a real pirate.");

    action  AddNpcText(28, "Are you wiling to take the pirate test?");

    action  AddNpcText(28, "Arrrr!");

    action  AddNpcInput(28,1,"I\'ll prove it");

    action  AddNpcInput(28,2,"No thanks");

    rule    InputNpc(1) goto Begin1

    rule    InputNpc(2) goto Begin0

}

State Begin1

{

    desc    "Talk to the Pirate Captain"

    action  AddNpcText(28, "Hahaha.. Don\'t make me laugh now, you are no pirate, you don\'t look like a pirate at all..");

    action  AddNpcText(28, "Go talk to the Pirate Captain, he will teach you how to become a real pirate!");

    action  AddNpcText(29, "So, arhh Pirate Test?!.. You want to become a real pirate and take the pirate test, arhhhhh har har har.. *gulp*");

    action  AddNpcText(29, "Okay then.. If you can defeat 3 of me crew members, I\'ll consider it!");

    action  AddNpcInput(29,1,"Fear me, crew members!");

    action  AddNpcInput(29,2,"Maybe piracy isn\'t for me");

    rule    InputNpc(1) goto KillCrew

    rule    InputNpc(2) goto Begin1

}

State KillCrew

{

    desc    "Defeat 3 Pirate Crew Members"

    action  ShowHint("Show them who\'s the boss!");

    action  AddNpcText(29, "Okay what are you waiting for? Get off my boat and defeat three elites of me crew!");

    action  AddNpcText(28, "Nawh, I will only share this pirate secret with REAL PIRATES.");

    rule    KilledNpcs(128,3) goto DoneCrew

}

State DoneCrew

{

    desc    "Talk to the Pirate Captain again"

    action  ShowHint("Talk to the Pirate Captain!");

    action  AddNpcText(28, "Nawh, I will only share this pirate secret with REAL PIRATES.");

    action  AddNpcText(29, "Yeah yeah, my crew members are weak anyways...");

    action  AddNpcText(29, "But that doesn\'t make you a pirate. In fact...");

    action  AddNpcText(29, "You\'ll never become one! Har har har!");

    action  AddNpcInput(29,1,"I know about a treasure...");

    action  AddNpcInput(29,2,"I\'ll report you for software piracy");

    action  AddNpcInput(29,3,"Ok, I\'ll drink all this Bu Ale myself...");

    rule    InputNpc(1) goto AnsTreasure

    rule    InputNpc(2) goto AnsSoft

    rule    InputNpc(3) goto AnsAle

}

State AnsTreasure

{

    desc    "Talk to the Pirate Captain again"

    action  ShowHint("We hope he doesn\'t find out you don\'t know about a treasure...");

    action  AddNpcText(28, "Nawh, I will only share this pirate secret with REAL PIRATES.");

    action  AddNpcText(29, "Huh? Err... You mean the Legendary Hell Island Treasure!?");

    action  AddNpcInput(29,1,"Hell Island Treasure?");

    action  AddNpcInput(29,2,"Yeah... That one...");

    rule    InputNpc(1) goto PirateTest

    rule    InputNpc(2) goto PirateTest

}

State AnsSoft

{

    desc    "Talk to the Pirate Captain again"

    action  AddNpcText(28, "Nawh, I will only share this pirate secret with REAL PIRATES.");

    action  AddNpcText(29, "What! Er.. I was only kidding.. Can\'t you take a joke?");

    action  AddNpcText(29, "Of course I\'m going to let you take my brave Pirate Test!");

    action  AddNpcInput(29,1,"Sure, pal");

    action  AddNpcInput(29,2,"I\'m not good at math");

    rule    InputNpc(1) goto PirateTest

    rule    InputNpc(2) goto AnsSoft

}

State AnsAle

{

    desc    "Talk to the Pirate Captain again"

    action  ShowHint("Cheers!");

    action  AddNpcText(28, "Nawh, I will only share this pirate secret with REAL PIRATES.");

    action  AddNpcText(29, "Huh? You said.. Bu Ale?");

    action  AddNpcText(29, "Alright! Maybe you are a good pirate after all!");

    action  AddNpcInput(29,1,"Let\'s drink, matey!");

    action  AddNpcInput(29,2,"Tell me about the test...");

    rule    InputNpc(1) goto PirateTest

    rule    InputNpc(2) goto PirateTest

}

State PirateTest

{

    desc    "Talk with the Pirate Captain"

    action  AddNpcText(28, "Nawh, I will only share this pirate secret with REAL PIRATES.");

    action  AddNpcText(29, "Oh well, lets begin the test then.. This is really easy.");

    action  AddNpcText(29, "At least for us, the real pirates, har har har.");

    action  AddNpcInput(29,1,"I want to prove my fighting skills");

    action  AddNpcInput(29,2,"Lets go treasure hunting!");

    action  AddNpcInput(29,3,"I\'m good at getting information");

    rule    InputNpc(1) goto FightQuest

    rule    InputNpc(2) goto NotTreasure

    rule    InputNpc(3) goto InfoQuest

}

State NotTreasure

{

    desc    "Talk to the Pirate Captain"

    action  AddNpcText(28, "Nawh, I will only share this pirate secret with REAL PIRATES.");

    action  AddNpcText(29, "Don\'t be silly, you can\'t go treasure hunting without proving your strength and abilities.");

    action  AddNpcInput(29,1,"I\'ll show you I\'m strong!");

    action  AddNpcInput(29,2,"I\'m the best pirate of the world!");

    rule    InputNpc(1) goto FightQuest

    rule    InputNpc(2) goto InfoQuest

}

State FightQuest

{

    desc    "Fight the Barbarian"

    action  AddNpcText(28, "Nawh, I will only share this pirate secret with REAL PIRATES.");

    action  AddNpcText(29, "Ok then... You have to find two giant barbarians and defeat them.");

    action  AddNpcText(29, "Good luck killing those giant Barbarians, har har. They should be at the Barbarian Stronghold.");

    action  AddNpcInput(29,1,"Okay I got it");

    action  AddNpcInput(29,2,"Isn\'t there another way to prove it?");

    rule    KilledNpcs(89,2) goto NextTest

    rule    InputNpc(2) goto InfoQuest

}

State InfoQuest

{

    desc    "Go to Atlantis and find it's secret"

    action  AddNpcText(28, "Nawh, I will only share this pirate secret with REAL PIRATES.");

    action  AddNpcText(29, "Listen, the legend about Hell Island claims that a long time ago, when villagers from Atlantis became aware that their city was going to sink..");

    action  AddNpcText(29, "They burried some of their major treasures at Hell Island.");

    action  AddNpcText(29, "Maybe they wrote something about it somewhere.");

    action  AddNpcText(29, "Good luck finding the secret of Atlantis.");

    action  AddNpcInput(29,1,"Okay, I got it");

    action  AddNpcInput(29,2,"Isn\'t there another way to prove it?");

    rule    EnterCoord(5,45,45) goto NextTest

    rule    InputNpc(2) goto FightQuest

}

State NextTest

{

    desc    "Talk to the Pirate Captain"

    action  PlaySound(18);

    action  ShowHint("The Pirate Captain wants to talk to you!");

    action  AddNpcText(28, "Nawh, I will only share this pirate secret with REAL PIRATES.");

    action  AddNpcText(29, "Looks like you have some skills, son! Too bad you are not a real pirate yet...");

    action  AddNpcText(29, "Look, these Wabbits in the area are really a problem. At night, they make a terrible noise and I just can\'t sleep, uhrr.");

    action  AddNpcInput(29,1,"I see");

    rule    InputNpc(1) goto WabbitTest

}

State WabbitTest

{

    desc    "Kill 100 Wabbits"

    action  AddNpcText(28, "Nawh, I will only share this pirate secret with REAL PIRATES.");

    action  AddNpcText(29, "Go kill 100 Wabbits for me, and you will be a real pirate... whatever.");

    rule    KilledNpcs(120,100) goto WabbitTest2

}

State WabbitTest2

{

    desc    "Talk to the Pirate Captain"

    action  AddNpcText(29, "Hmm.. Oh it\'s you.. Yeah, yeah you\'re a real pirate now. Yippee. Now leave me alone..");

    action  AddNpcText(28, "Hmm, so the Pirate Captain has declared you a real pirate, I can\'t believe it...");

    action  AddNpcText(28, "But ok, if you can answer this simple PIRATE TEST, I\'ll believe you.");

    rule    TalkedToNpc(28) goto Quiz1

}

State Quiz1

{

    desc    "Talk to the Young Pirate"

    action  AddNpcText(28, "What\'s the special \'nickname\' of our Skull+Bone flag?");

    action  AddNpcInput(28,1,"Jolly Roger");

    action  AddNpcInput(28,2,"Dodger Deadly");

    action  AddNpcInput(28,3,"Black Skull");

    rule    InputNpc(1) goto Quiz2

    rule    InputNpc(2) goto Quiz1

    rule    InputNpc(3) goto Quiz1

}

State Quiz2

{

    desc    "Talk to the Young Pirate"

    action  AddNpcText(28, "Pirates always share their looted treasures equally, except for captain, the pilot, the carpenter and our cook.");

    action  AddNpcText(28, "How much more do they recieve?");

    action  AddNpcInput(28,1,"Half of the entire treasure");

    action  AddNpcInput(28,2,"A double share");

    action  AddNpcInput(28,3,"A triple share");

    rule    InputNpc(1) goto Quiz2

    rule    InputNpc(2) goto Quiz3

    rule    InputNpc(3) goto Quiz2

}

State Quiz3

{

    desc    "Talk to the Young Pirate"

    action  AddNpcText(28, "Is the captain\'s cabin always open for anyone to use?");

    action  AddNpcInput(28,1,"Yes, always open.");

    action  AddNpcInput(28,2,"No, it\'s private.");

    rule    InputNpc(1) goto ReadyToGo

    rule    InputNpc(2) goto Quiz3

}

State ReadyToGo

{

    desc    "Talk to the Young Pirate"

    action  AddNpcText(28, "Hmm... Okay you proved to be a pirate, maybe not.. Let\'s just sail to that island now. The captain doesn\'t believe me and I\'ve been anxious to tell anyone ever since.");

    action  AddNpcText(28, "Do you want to sail to Hell Island?");

    action  AddNpcInput(28,1,"Yes, let\'s go!");

    action  AddNpcInput(28,2,"No, maybe later");

    rule    InputNpc(1) goto GoIsland

}

State GoIsland

{

    desc    "Go to the Treasure Hunter"

    action  SetCoord(271,24,57);

    action  AddNpcText(30, "A treasure, huh?.. ya, I been looking for it for years...");

    action  AddNpcText(30, "Sorry, I can\'t tell you more about the treasure. You see... I haven\'t eaten anything in weeks..");

    action  AddNpcText(30, "Maybe you could go and get me some Golden Pigs I would be willing to share this secret...");

    rule    TalkedToNpc(30) goto GoldenPigs

}

State GoldenPigs

{

    desc    "Collect 25 Golden Pigs"

    rule    GotItems(59,25) goto GoIsland2

    rule    LostItems(59,25) goto GoldenPigs

}

State GoIsland2

{

    desc    "Speak to the Young Pirate"

    action  AddNpcText(28, "Would you like to go to Hell Island?");

    action  AddNpcInput(28,1,"Yes");

    action  AddNpcInput(28,2,"Maybe later");

    rule    InputNpc(1) goto GiveFood

}

State GiveFood

{

    desc    "Return to the Treasure Hunter"

    action  SetCoord(271,24,57);

    action  AddNpcText(30, "Ah! You\'ve returned with the pigs!");

    action  AddNpcText(30, "Thank you so much, please give them here");

    rule    TalkedToNpc(30) goto Bananas

}

State Bananas

{

    desc    "Speak to the Treasure Hunter"

    action  RemoveItem(59,25);

    action  AddNpcText(30, "Now, there is one other thing.");

    action  AddNpcText(30, "Before I tell you more about the treasure, I\'ll need some bananas.");

    action  AddNpcText(30, "I believe that Scarlina has them. Can you get them for me?");

    action  AddNpcInput(30,1,"Yeah, sure");

    action  AddNpcInput(30,2,"No");

    rule    InputNpc(1) goto Bananas2

    rule    InputNpc(2) goto Bananas

}

State Bananas2

{

    desc    "Collect 25 bananas"

    action  AddNpcText(30, "Excellent! You will learn more about the treasure when you return.");

    rule    GotItems(39,25) goto GoIsland3

    rule    LostItems(39,25) goto Bananas

}

State GoIsland3

{

    desc    "Speak to the Young Pirate"

    action  AddNpcText(28, "Would you like to go to Hell Island?");

    action  AddNpcInput(28,1,"Yes");

    action  AddNpcInput(28,2,"Maybe later");

    rule    InputNpc(1) goto GiveFood2

}

State GiveFood2

{

    desc    "Speak to the Treasure Hunter"

    action  SetCoord(271,24,57);

    action  AddNpcText(30, "Ah! You\'ve returned.");

    action  AddNpcText(30, "Have you brought the bananas?");

    rule    TalkedToNpc(30) goto SolveRiddle

}

State SolveRiddle

{

    desc    "Solve the Riddle"

    action  RemoveItem(39,25);

    action  AddNpcText(30, "Ok, the riddle is..");

    action  AddNpcText(30, "Stand right of the one of the unique pairs that stand below the towers which carried the rood of the temple..");

    action  AddNpcText(30, ".. The view on the temple is much better 15 steps east from this spot..");

    action  AddNpcText(30, ".. From this point make 12 steps south, then twice as much to the west..");

    action  AddNpcText(30, ".. You should be able to walk 19 steps into a direction other where you came from.");

    action  AddNpcText(30, "Then walk 14 steps east for my treasure.");

    action  AddNpcText(30, "Good luck.");

    rule    TalkedToNpc(30) goto SearchTreasure

}

State SearchTreasure

{

    desc    "Look for the Hell Island treasure"

    rule    EnterCoord(271,21,17) goto FindTreasure

}

State FindTreasure

{

    desc    "Collect the Treasure"

    action  SetCoord(273,4,4);

    rule    EnterCoord(273,7,3) goto RewardItem

}

State RewardItem

{

    desc    "Speak to the Pirate Captain"

    action  ShowHint("You found the Hell Island Treasure! Now return to the Pirate Captain!");

    action  GiveItem(356,1);

    action  AddNpcText(29, "This whole treasure hunt has probably given you a lot of experience..");

    action  AddNpcText(29, "Welcome aboard, pirate!");

    rule    TalkedToNpc(29) goto ExpReward

}

State ExpReward

{

    action  GiveItem(365,1);

    action  End();

}

---
"Nurd, you're like a fucking swiss army knife" - Necrosis
10 years, 23 weeks ago
Post #195802 Re: Odd quest error

It's possibly this state right here:

State Bananas

{

    desc    "Speak to the Treasure Hunter"

    action  RemoveItem(59,25);

    action  AddNpcText(30, "Now, there is one other thing.");

    action  AddNpcText(30, "Before I tell you more about the treasure, I\'ll need some bananas.");

    action  AddNpcText(30, "I believe that Scarlina has them. Can you get them for me?");

    action  AddNpcInput(30,1,"Yeah, sure");

    action  AddNpcInput(30,2,"No");

    rule    InputNpc(1) goto Bananas2

    rule    InputNpc(2) goto Bananas

}


You shouldn't have it go back to the same state on this part: rule    InputNpc(2) goto Bananas


Also, I just realized it's like that in some other states as well. It's in begin, begin0, begin1, anssoft, quiz1, quiz2, quiz3, and goldenpigs.

There's no point in changing the state to the same one, you might as well just take out the input npc rules that are doing that.

10 years, 23 weeks ago
Post #195803 Re: Odd quest error
Ryouken posted: (29th Jul 2014, 06:23 pm)

It's possibly this state right here:

State Bananas

{

    desc    "Speak to the Treasure Hunter"

    action  RemoveItem(59,25);

    action  AddNpcText(30, "Now, there is one other thing.");

    action  AddNpcText(30, "Before I tell you more about the treasure, I\'ll need some bananas.");

    action  AddNpcText(30, "I believe that Scarlina has them. Can you get them for me?");

    action  AddNpcInput(30,1,"Yeah, sure");

    action  AddNpcInput(30,2,"No");

    rule    InputNpc(1) goto Bananas2

    rule    InputNpc(2) goto Bananas

}


You shouldn't have it go back to the same state on this part: rule    InputNpc(2) goto Bananas


Also, I just realized it's like that in some other states as well. It's in begin, begin0, begin1, anssoft, quiz1, quiz2, quiz3, and goldenpigs.

There's no point in changing the state to the same one, you might as well just take out the input npc rules that are doing that.


I know it's not needed but the person I have made the quest for requested to have them there. I don't think he understands that they're not necessary. I've had that in all of the quests I've sent him and there's never been a problem with it. That's why I'm so confused.
---
"Nurd, you're like a fucking swiss army knife" - Necrosis
10 years, 23 weeks ago
Post #195804 Re: Odd quest error
Nurd posted: (29th Jul 2014, 07:07 pm)

Ryouken posted: (29th Jul 2014, 06:23 pm)

It's possibly this state right here:

State Bananas

{

    desc    "Speak to the Treasure Hunter"

    action  RemoveItem(59,25);

    action  AddNpcText(30, "Now, there is one other thing.");

    action  AddNpcText(30, "Before I tell you more about the treasure, I\'ll need some bananas.");

    action  AddNpcText(30, "I believe that Scarlina has them. Can you get them for me?");

    action  AddNpcInput(30,1,"Yeah, sure");

    action  AddNpcInput(30,2,"No");

    rule    InputNpc(1) goto Bananas2

    rule    InputNpc(2) goto Bananas

}


You shouldn't have it go back to the same state on this part: rule    InputNpc(2) goto Bananas


Also, I just realized it's like that in some other states as well. It's in begin, begin0, begin1, anssoft, quiz1, quiz2, quiz3, and goldenpigs.

There's no point in changing the state to the same one, you might as well just take out the input npc rules that are doing that.


I know it's not needed but the person I have made the quest for requested to have them there. I don't think he understands that they're not necessary. I've had that in all of the quests I've sent him and there's never been a problem with it. That's why I'm so confused.

I doubt that's the problem since all it will do is create a loop in the quest (Not letting you exit it).

I would run it in a newer version of EOserv and see if you get the same errors.

Off-topic -  Is this a edited copy of the Monkey Island quest from main xd??

10 years, 23 weeks ago
Post #195805 Re: Odd quest error

At this time there should be something in the quest system that tells which line does the error,I will see what I can do about it.


---
Remember when is not an organization nor a fucking group , it's simply an idea that we believe in
and live for.
The priority of Remember when should come before oxygen , as oxygen is cosmetic even life itself is
cosmetic,that's why offer our worthless lives to The "Remember when"
10 years, 23 weeks ago
Post #195806 Re: Odd quest error
callum posted: (29th Jul 2014, 08:11 pm)

Nurd posted: (29th Jul 2014, 07:07 pm)

Ryouken posted: (29th Jul 2014, 06:23 pm)

It's possibly this state right here:

State Bananas

{

    desc    "Speak to the Treasure Hunter"

    action  RemoveItem(59,25);

    action  AddNpcText(30, "Now, there is one other thing.");

    action  AddNpcText(30, "Before I tell you more about the treasure, I\'ll need some bananas.");

    action  AddNpcText(30, "I believe that Scarlina has them. Can you get them for me?");

    action  AddNpcInput(30,1,"Yeah, sure");

    action  AddNpcInput(30,2,"No");

    rule    InputNpc(1) goto Bananas2

    rule    InputNpc(2) goto Bananas

}


You shouldn't have it go back to the same state on this part: rule    InputNpc(2) goto Bananas


Also, I just realized it's like that in some other states as well. It's in begin, begin0, begin1, anssoft, quiz1, quiz2, quiz3, and goldenpigs.

There's no point in changing the state to the same one, you might as well just take out the input npc rules that are doing that.


I know it's not needed but the person I have made the quest for requested to have them there. I don't think he understands that they're not necessary. I've had that in all of the quests I've sent him and there's never been a problem with it. That's why I'm so confused.

I doubt that's the problem since all it will do is create a loop in the quest (Not letting you exit it).

I would run it in a newer version of EOserv and see if you get the same errors.

Off-topic -  Is this a edited copy of the Monkey Island quest from main xd??


I have the newest EOSERV rev, and yeah, it is.


weedindeed posted: (29th Jul 2014, 08:19 pm)

At this time there should be something in the quest system that tells which line does the error,I will see what I can do about it.


Normally it does tell me what line it's on, but this time it didn't, so I wan't able to fix it.

---
"Nurd, you're like a fucking swiss army knife" - Necrosis
10 years, 23 weeks ago
Post #195807 Re: Odd quest error

It is because a quest rule passes to the same state. Infinity loops are not allowed as this would crash your server if ignored. Use a zero for the AddNpcInput switch value and don't make a rule for it to continue to the same state.

10 years, 23 weeks ago
Post #195808 Re: Odd quest error
Apollo posted: (30th Jul 2014, 12:01 am)

It is because a quest rule passes to the same state. Infinity loops are not allowed as this would crash your server if ignored. Use a zero for the AddNpcInput switch value and don't make a rule for it to continue to the same state.


So if I were to get rid of every second InputNpc rule, would it fix the problem?
---
"Nurd, you're like a fucking swiss army knife" - Necrosis
10 years, 23 weeks ago
Post #195809 Re: Odd quest error

It's worth a try. That's what it means when it's saying the recursion is too deep. it's looping too much.

10 years, 23 weeks ago
Post #195810 Re: Odd quest error

That is exactly what I meant. Rules should remain active until a state is passed. I have no idea where you got that Monkey Island quest but it is poorly written (Not saying Vult did much better). Also, you don't need the escape character "\" in any quest text. That is something Addison added in to his quest engine before we got rid of that garbage. It was never used in the official quest text files. 

10 years, 23 weeks ago
Post #195812 Re: Odd quest error
Apollo posted: (30th Jul 2014, 02:55 am)

That is exactly what I meant. Rules should remain active until a state is passed. I have no idea where you got that Monkey Island quest but it is poorly written (Not saying Vult did much better). Also, you don't need the escape character "\" in any quest text. That is something Addison added in to his quest engine before we got rid of that garbage. It was never used in the official quest text files. 

I see. Well the server I am working for is running on an old rev, so the \ is required for single quotes. It's a pain, but hey, it's only an extra 3 minutes of editing. Thank you for the help!


Ryouken posted: (30th Jul 2014, 01:27 am)

It's worth a try. That's what it means when it's saying the recursion is too deep. it's looping too much.


Alright, I'll remove them. Thank you for the help!

---
"Nurd, you're like a fucking swiss army knife" - Necrosis
10 years, 23 weeks ago
Page: << 1 >>
Topic is locked.
EOSERV Forum > Programming > Odd quest error *fixed*