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();
}