EOSERV Forum > EO Server Building > Problem with class quest. When I click Warrior, I become Wiz
Page: << 1 >>
Problem with class quest. When I click Warrior, I become Wiz
Author Message
Post #204172 Problem with class quest. When I click Warrior, I become Wiz

I select a Warrior and then I become a Wizard. Here is my quest script: 

Edit: my pub is exactly as that. Warrior is class ID 4, and etc.. All correct with the pub. Theres something wrong with the quest script and I don't know what. Not receiving any errors. 

Main

{

        questname       "Karma Quest"

        version         1.0

}

State Begin

{

        desc            "Welcome to the game"


        action          AddNpcChat( 4 , "Hello stranger");

        action          AddNpcText(4, "Choose a class or view the tutorial. (Bonus for viewing the tutorial)");

        action          AddNpcInput( 4 , 1 , "Choose a Class");

        action          AddNpcInput( 4 , 2 , "View the Tutorial");

        rule            InputNpc( 1 ) goto Class

        rule            InputNpc( 2 ) goto Tutorial

}

State Begin2

{

        desc            "Welcome to the game"


        action          AddNpcChat( 4 , "Hello stranger");

        action          AddNpcText(4, "Choose a class or view the tutorial.");

        action          AddNpcInput( 4 , 1 , "Choose a Class");

        action          AddNpcInput( 4 , 2 , "View the Tutorial (no reward)");

        rule            InputNpc( 1 ) goto Class

        rule            InputNpc( 2 ) goto Tutorial2

}

State Tutorial2

{

        desc            "Welcome to the game"


        action          AddNpcChat( 4 , "Hello stranger");

        action          AddNpcText(4, "Welcome to the game. Let\'s start with NPC\'s. Every NPC or person you see in this game can be clicked on and they will provide you with quests, information, and shops to purchase, craft items, and sell items. You can pick up items by clicking on them when they drop. ");

action          AddNpcText(4, "To attack a monster, you press CTRL when facing it. Killing monsters will increase your experience points and therefore your level. Each level you gain 3 stat points. To view your stats, click the button in the bottom left corner.");

action          AddNpcText(4, "STR will increase your hitpoints or strength. CON will increase your HP or health points. AGI will increase your speed and therefore you have lower chances of missing a monster when attacking. AGI will also increase the chances of a monster missing when attacking you.");

action          AddNpcText(4, "Following the storyline will give you more EXP. But killing NPC\'s on the side of doing the storyline will give you better chances of winning the game.");

action          AddNpcText(4, "That\'s the tutorial.");

action          AddNpcInput( 4 , 1 , "Go back");

        rule            InputNpc( 1 ) goto Begin2

}

State Tutorial

{

        desc            "Welcome to the game"


        action          AddNpcChat( 4 , "Hello stranger");

        action          AddNpcText(4, "Welcome to the game. Let\'s start with NPC\'s. Every NPC or person you see in this game can be clicked on and they will provide you with quests, information, and shops to purchase, craft items, and sell items. You can pick up items by clicking on them when they drop. ");

action          AddNpcText(4, "To attack a monster, you press CTRL when facing it. Killing monsters will increase your experience points and therefore your level. Each level you gain 3 stat points. To view your stats, click the button in the bottom left corner.");

action          AddNpcText(4, "STR will increase your hitpoints or strength. CON will increase your HP or health points. AGI will increase your speed and therefore you have lower chances of missing a monster when attacking. AGI will also increase the chances of a monster missing when attacking you.");

action          AddNpcText(4, "Following the storyline will give you more EXP. But killing NPC\'s on the side of doing the storyline will give you better chances of winning the game.");

action          AddNpcText(4, "That\'s the tutorial. You will now receive your reward.");

action          AddNpcInput( 4 , 1 , "Receive reward for viewing tutorial...");

        rule            InputNpc( 1 ) goto Reward

}

State Reward

{

        desc            "Welcome to the game"


        action          AddNpcChat( 4 , "Hello stranger");

        action          GiveExp( 225 );

action          ShowHint("You received 225 EXP!");

action          SetState("Begin2")

}

State Class

{

        desc            "Talk to Wise Man"


        action          ShowHint("Class menu opened");

 

        action          AddNpcText( 4 , "Scroll down and select a class. Read it first to see if it\'s the style you want." );


        action          AddNpcInput( 4 , 1 , "Make me Wizard");

        action          AddNpcInput( 4 , 2 , "Make me Archer");

        action          AddNpcInput( 4 , 3 , "Make me Warrior");

        action          AddNpcInput( 4 , 4 , "Make me Bandit");

        action          AddNpcInput( 4 , 5 , "Make me Nomad");

 

        rule            InputNpc( 1 ) goto Wizard

        rule            InputNpc( 2 ) goto Archer

        rule            InputNpc( 3 ) goto Warrior

        rule            InputNpc( 4 ) goto Bandit

        rule            InputNpc( 5 ) goto Nomad

}

State Wizard

{

        desc            "Talk to Wise Man"


        action          ShowHint("Class menu opened");

 

        action          AddNpcText( 4 , "Wizards are spell based. There are many spells to learn." );


        action          AddNpcInput( 4 , 1 , "I want to be a Wizard");

        action          AddNpcInput( 4 , 2 , "Let me take a look at other classes");

 

        rule            InputNpc( 1 ) goto Wizard2

        rule            InputNpc( 2 ) goto Class

}

State Wizard2

{

        action          SetClass(2);

action          SetCoord(1, 23, 21);

        action          Reset();

}

State Archer

{

        desc            "Talk to Wise Man"


        action          ShowHint("Class menu opened");

 

        action          AddNpcText( 4 , "Archers are bow and crossbow based. There are a variety of bows & crossbows to buy." );


        action          AddNpcInput( 4 , 1 , "I want to be an Archer");

        action          AddNpcInput( 4 , 2 , "Let me take a look at other classes");

 

        rule            InputNpc( 1 ) goto Archer2

        rule            InputNpc( 2 ) goto Class

}

State Archer2

{

        action          SetClass(3);

action          SetCoord(1, 23, 21);

        action          Reset();

}

State Warrior

{

        desc            "Talk to Wise Man"


        action          ShowHint("Class menu opened");

 

        action          AddNpcText( 4 , "Warriors are heavy fighters. Swords, spears, and armor." );


        action          AddNpcInput( 4 , 1 , "I want to be a Warrior");

        action          AddNpcInput( 4 , 2 , "Let me take a look at other classes");

 

        rule            InputNpc( 1 ) goto Wizard2

        rule            InputNpc( 2 ) goto Class

}

state Warrior2

{

        action          SetClass(4);

        action          SetCoord(1, 23, 21);

        action          Reset();

}

State Bandit

{

        desc            "Talk to Wise Man"


        action          ShowHint("Class menu opened");

 

        action          AddNpcText( 4 , "Bandits can use a variety of weapons including bows and swords." );


        action          AddNpcInput( 4 , 1 , "I want to be a Wizard");

        action          AddNpcInput( 4 , 2 , "Let me take a look at other classes");

 

        rule            InputNpc( 1 ) goto Wizard2

        rule            InputNpc( 2 ) goto Class

}

state Bandit2

{

        action          SetClass(5);

        action          SetCoord(1, 23, 21);

        action          Reset();

}

State Nomad

{

        desc            "Talk to Wise Man"


        action          ShowHint("Class menu opened");

 

        action          AddNpcText( 4 , "Nomads are explorers. Picklocking. Swords or small blades." );


        action          AddNpcInput( 4 , 1 , "I want to be a Nomad");

        action          AddNpcInput( 4 , 2 , "Let me take a look at other classes");

 

        rule            InputNpc( 1 ) goto Nomad2

        rule            InputNpc( 2 ) goto Class

}

state Nomad2

{

        action          SetClass(6);

        action          SetCoord(1, 23, 21);

        action          Reset();

}

5 years, 45 weeks ago
Post #204173 Re: Problem with class quest. When I click Warrior, I become Wiz

... I would assume your problem is the "goto Wizard2" in the Warrior state.

---
Want to learn to pixel?
Pixelsource.org
5 years, 45 weeks ago
Post #204174 Re: Problem with class quest. When I click Warrior, I become Wiz
Cirras posted: (18th Jun 2018, 10:24 pm)

... I would assume your problem is the "goto Wizard2" in the Warrior state.


Thank you so much. You were right. 
5 years, 45 weeks ago
Post #204177 Re: Problem with class quest. When I click Warrior, I become Wiz

You've likely already spotted as well, but missing a ; from the end of

action          SetState("Begin2")

---
Host of a blacklisted server...
5 years, 45 weeks ago
Post #204183 Re: Problem with class quest. When I click Warrior, I become Wiz

I hope you realized that your bandit would also "like to be a wizard" be sure to update that as well to ensure you get the right class :D <3 keep up the great work!!

---
"I would rather be in the light looking up to the darkness, than being in the darkness looking up to
the light."
~Tensuki
5 years, 45 weeks ago
Post #204184 Re: Problem with class quest. When I click Warrior, I become Wiz
Tensuki posted: (22nd Jun 2018, 02:40 pm)

I hope you realized that your bandit would also "like to be a wizard" be sure to update that as well to ensure you get the right class :D <3 keep up the great work!!


Thank you. I finished the quest :)
5 years, 45 weeks ago
Post #204186 Re: Problem with class quest. When I click Warrior, I become Wiz

Congratulations! :D To tell you the honest truth it was very refreshing to see you post your quest because it reminded me that i still have yet to set up a classing system npc or quest script yet for it and this was an amazingly wonderful reminder that you have to be creative when setting up your quests, yet you also showed me that you can create a reward within a simple guide walk-through which i thought was very clever and very rewarding for new characters. Thank you for sharing the progress on your script :) <3

---
"I would rather be in the light looking up to the darkness, than being in the darkness looking up to
the light."
~Tensuki
5 years, 45 weeks ago
Page: << 1 >>

EOSERV Forum > EO Server Building > Problem with class quest. When I click Warrior, I become Wiz