EO+ Code Not Working

Know any bugs or problems with EOSource Server? Post them here!
Garsor
Junior
Junior
Posts: 24
Joined: Thu Oct 10, 2013 12:03 pm

EO+ Code Not Working

Postby Garsor » Tue Jul 14, 2015 8:25 pm

There's nothing wrong with my EO+ script:
state Begin
{
desc "Talk to Myrick"
action AddNpcChat ( 2 , "This is just the beginning of a very long journey...");
action AddNpcText ( 2 , "Welcome! I am Myrick; ex archer, and presently a class trainer. I am here to help you!");
action AddNpcText ( 2 , "To begin training your class, please take this equipment...");
if Class(3) goto Shaman
elseif Class(1) goto Explorer
}

I've tried it without the if, with just Class(3), and ive tried it with IfClass, ive tried everything and nothing is working. I'm trying to make quests for certain classes only but it doesn't seem to be working... What's up here?
cloud
Junior
Junior
Posts: 23
Joined: Mon Oct 27, 2014 9:09 pm

RE: EO+ Code Not Working

Postby cloud » Wed Jul 15, 2015 1:52 am

Garsor wrote:There's nothing wrong with my EO+ script:
state Begin
{
desc "Talk to Myrick"
action AddNpcChat ( 2 , "This is just the beginning of a very long journey...");
action AddNpcText ( 2 , "Welcome! I am Myrick; ex archer, and presently a class trainer. I am here to help you!");
action AddNpcText ( 2 , "To begin training your class, please take this equipment...");
if Class(3) goto Shaman
elseif Class(1) goto Explorer
}

I've tried it without the if, with just Class(3), and ive tried it with IfClass, ive tried everything and nothing is working. I'm trying to make quests for certain classes only but it doesn't seem to be working... What's up here?


You should show the full quest script. ^^^ these codes arent gonna help to find out the problem. Also you can see the quest errors in errors.txt of your server folder.


rule IsClass(3) goto Shaman
rule IsClass(1) goto Explorer

Last edited by cloud on Wed Jul 15, 2015 1:54 am, edited 1 time in total.
Garsor
Junior
Junior
Posts: 24
Joined: Thu Oct 10, 2013 12:03 pm

RE: EO+ Code Not Working

Postby Garsor » Wed Jul 15, 2015 1:56 pm

cloud wrote:
Garsor wrote:There's nothing wrong with my EO+ script:
state Begin
{
desc "Talk to Myrick"
action AddNpcChat ( 2 , "This is just the beginning of a very long journey...");
action AddNpcText ( 2 , "Welcome! I am Myrick; ex archer, and presently a class trainer. I am here to help you!");
action AddNpcText ( 2 , "To begin training your class, please take this equipment...");
if Class(3) goto Shaman
elseif Class(1) goto Explorer
}

I've tried it without the if, with just Class(3), and ive tried it with IfClass, ive tried everything and nothing is working. I'm trying to make quests for certain classes only but it doesn't seem to be working... What's up here?


You should show the full quest script. ^^^ these codes arent gonna help to find out the problem. Also you can see the quest errors in errors.txt of your server folder.


rule IsClass(3) goto Shaman
rule IsClass(1) goto Explorer




Yup my error log told me this is the where the error is. No point in posting full quest it would just be a ton to read. But it's alright, I just setup items or "tokens" for each classes that they can't trade, sell, or buy, and they only get it upon picking their class. Then they can only participate in certain quests if they have their class token. Like for example: Warrior token will be required to participate in quests :) . rule gotItems(id, amount) goto WarriorQuest
User avatar
Deaven
Legend
Legend
Posts: 570
Joined: Fri Jul 20, 2012 7:08 am
Location: United States

RE: EO+ Code Not Working

Postby Deaven » Wed Jul 15, 2015 4:20 pm

You should change your setup to something like this.

Code: Select all

state Begin
{
desc "Talk to Myrick"
action AddNpcChat ( 2 , "This is just the beginning of a very long journey...");
action AddNpcText ( 2 , "Welcome! I am Myrick; ex archer, and presently a class trainer. I am here to help you!");
action AddNpcText ( 2 , "To begin training your class, please take this equipment...");
rule TalkedToNpc(2) goto CheckClass
}
state CheckClass
{
if Class(3) goto Shaman
elseif Class(1) goto Explorer
else goto EndReset
}
state EndReset
{
action Reset();
}


Here is some general info about conditionals in quests (if/elseif/else). There are a few exceptions to some of the rules.
  • If/elseif/else statements in quests should only be used in states containing no actions.
  • You should always include an "else" just in case none of the conditions are met (this would result in the player being stuck in the quest state)
  • If/elseif/else statements are only checked once, as soon as the player enters the state.

If you still run into problems post your error log and the full quest (if you feel uncomfortable having your quest on the forum you can remove it afterwards).
Garsor
Junior
Junior
Posts: 24
Joined: Thu Oct 10, 2013 12:03 pm

RE: EO+ Code Not Working

Postby Garsor » Wed Jul 15, 2015 5:59 pm

Deaven wrote:You should change your setup to something like this.

Code: Select all

state Begin
{
desc "Talk to Myrick"
action AddNpcChat ( 2 , "This is just the beginning of a very long journey...");
action AddNpcText ( 2 , "Welcome! I am Myrick; ex archer, and presently a class trainer. I am here to help you!");
action AddNpcText ( 2 , "To begin training your class, please take this equipment...");
rule TalkedToNpc(2) goto CheckClass
}
state CheckClass
{
if Class(3) goto Shaman
elseif Class(1) goto Explorer
else goto EndReset
}
state EndReset
{
action Reset();
}


Here is some general info about conditionals in quests (if/elseif/else). There are a few exceptions to some of the rules.
  • If/elseif/else statements in quests should only be used in states containing no actions.
  • You should always include an "else" just in case none of the conditions are met (this would result in the player being stuck in the quest state)
  • If/elseif/else statements are only checked once, as soon as the player enters the state.
If you still run into problems post your error log and the full quest (if you feel uncomfortable having your quest on the forum you can remove it afterwards).


Wow, thanks!
Garsor
Junior
Junior
Posts: 24
Joined: Thu Oct 10, 2013 12:03 pm

RE: EO+ Code Not Working

Postby Garsor » Fri Jul 17, 2015 5:48 pm

Deaven wrote:You should change your setup to something like this.

Code: Select all

state Begin
{
desc "Talk to Myrick"
action AddNpcChat ( 2 , "This is just the beginning of a very long journey...");
action AddNpcText ( 2 , "Welcome! I am Myrick; ex archer, and presently a class trainer. I am here to help you!");
action AddNpcText ( 2 , "To begin training your class, please take this equipment...");
rule TalkedToNpc(2) goto CheckClass
}
state CheckClass
{
if Class(3) goto Shaman
elseif Class(1) goto Explorer
else goto EndReset
}
state EndReset
{
action Reset();
}


Here is some general info about conditionals in quests (if/elseif/else). There are a few exceptions to some of the rules.
  • If/elseif/else statements in quests should only be used in states containing no actions.
  • You should always include an "else" just in case none of the conditions are met (this would result in the player being stuck in the quest state)
  • If/elseif/else statements are only checked once, as soon as the player enters the state.
If you still run into problems post your error log and the full quest (if you feel uncomfortable having your quest on the forum you can remove it afterwards).


Yours doesn't work either. I'm just assuming EOSOURCE doesnt give a shit about quests and they cant give good examples in rules and actions.txt in quests folder. It said completely different codes for this class thing and none of them work

Return to “Bug Reports / Errors”

Who is online

Users browsing this forum: No registered users and 1 guest