Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Main
- {
- questname "Change Class"
- version 1
- }
- state Begin
- {
- desc "Talk to Wise Man"
- action AddNpcChat( 4 , "Hellow stranger" );
- action AddNpcText( 4 , "Hellow stranger, what can I do for you?" );
- action AddNpcInput( 4 , 1 , "View Classes");
- action AddNpcInput( 4 , 2 , "Exit");
- rule InputNpc( 1 ) goto ClassMenu
- rule InputNpc( 2 ) goto QuestReset
- }
- state ClassMenu
- {
- desc "Talk to Wise Man"
- action ShowHint("Class menu opened");
- action AddNpcText( 4 , "Would you like to buy a class?" );
- action AddNpcInput( 4 , 1 , "Priest Class");
- action AddNpcInput( 4 , 2 , "Magician Class");
- action AddNpcInput( 4 , 3 , "Rogue Class");
- action AddNpcInput( 4 , 4 , "Archer Class");
- action AddNpcInput( 4 , 5 , "Warrior Class");
- rule InputNpc( 1 ) goto PriestSelected
- rule InputNpc( 2 ) goto MagicianSelected
- rule InputNpc( 3 ) goto RogueSelected
- rule InputNpc( 4 ) goto ArcherSelected
- rule InputNpc( 5 ) goto WarriorSelected
- }
- state PriestSelected
- {
- action AddNpcText( 4 , "Priest Cost: 100G");
- action AddNpcInput( 4 , 1 , "Buy Priest");
- action AddNpcInput( 4 , 2 , "View Classes");
- action AddNpcInput( 4 , 3 , "Exit");
- rule InputNpc( 1 ) goto PriestCheck
- rule InputNpc( 2 ) goto ClassMenu
- rule InputNpc( 3 ) goto QuestReset
- }
- state MagicianSelected
- {
- action AddNpcText( 4 , "Magician Cost: 200G");
- action AddNpcInput( 4 , 1 , "Buy Magician");
- action AddNpcInput( 4 , 2 , "View Classes");
- action AddNpcInput( 4 , 3 , "Exit");
- rule InputNpc( 1 ) goto MagicianCheck
- rule InputNpc( 2 ) goto ClassMenu
- rule InputNpc( 3 ) goto QuestReset
- }
- state RogueSelected
- {
- action AddNpcText( 4 , "Rogue Cost: 300G");
- action AddNpcInput( 4 , 1 , "Buy Rogue");
- action AddNpcInput( 4 , 2 , "View Classes");
- action AddNpcInput( 4 , 3 , "Exit");
- rule InputNpc( 1 ) goto RogueCheck
- rule InputNpc( 2 ) goto ClassMenu
- rule InputNpc( 3 ) goto QuestReset
- }
- state ArcherSelected
- {
- action AddNpcText( 4 , "Archer Cost: 400G");
- action AddNpcInput( 4 , 1 , "Buy Archer");
- action AddNpcInput( 4 , 2 , "View Classes");
- action AddNpcInput( 4 , 3 , "Exit");
- rule InputNpc( 1 ) goto ArcherCheck
- rule InputNpc( 2 ) goto ClassMenu
- rule InputNpc( 3 ) goto QuestReset
- }
- state WarriorSelected
- {
- action AddNpcText( 4 , "Warrior Cost: 500G");
- action AddNpcInput( 4 , 1 , "Buy Warrior");
- action AddNpcInput( 4 , 2 , "View Classes");
- action AddNpcInput( 4 , 3 , "Exit");
- rule InputNpc( 1 ) goto WarriorCheck
- rule InputNpc( 2 ) goto ClassMenu
- rule InputNpc( 3 ) goto QuestReset
- }
- state PriestCheck
- {
- rule GotItems(1,100) goto PriestBought
- rule LostItems(1,100) goto PriestNoFunds
- }
- state MagicianCheck
- {
- rule GotItems(1,200) goto MagicianBought
- rule LostItems(1,200) goto MagicianNoFunds
- }
- state RogueCheck
- {
- rule GotItems(1,300) goto RogueBought
- rule LostItems(1,300) goto RogueNoFunds
- }
- state ArcherCheck
- {
- rule GotItems(1,400) goto ArcherBought
- rule LostItems(1,400) goto ArcherNoFunds
- }
- state WarriorCheck
- {
- rule GotItems(1,500) goto WarriorBought
- rule LostItems(1,500) goto WarriorNoFunds
- }
- state PriestBought
- {
- action SetClass(2);
- action RemoveItem( 1 , 100)
- action ShowHint("You bought the Priest Class for: 100 Gold.");
- action Reset();
- }
- state MagicianBought
- {
- action SetClass(3);
- action RemoveItem( 1 , 200)
- action ShowHint("You bought the Magician Class for: 200 Gold.");
- action Reset();
- }
- state RogueBought
- {
- action SetClass(4);
- action RemoveItem( 1 , 300)
- action ShowHint("You bought the Rogue Class for: 300 Gold.");
- action Reset();
- }
- state ArcherBought
- {
- action SetClass(5);
- action RemoveItem( 1 , 400)
- action ShowHint("You bought the Archer Class for: 400 Gold.");
- action Reset();
- }
- state WarriorBought
- {
- action SetClass(6);
- action RemoveItem( 1 , 500)
- action ShowHint("You bought the Warrior Class for: 500 Gold.");
- action Reset();
- }
- state PriestNoFunds
- {
- action ShowHint("You don't have sufficient funds to buy the Priest Class!");
- action goto Begin
- }
- state MagicianNoFunds
- {
- action ShowHint("You don't have sufficient funds to buy the Magician Class!");
- action goto Begin
- }
- state RogueNoFunds
- {
- action ShowHint("You don't have sufficient funds to buy the Rogue Class!");
- action goto Begin
- }
- state ArcherNoFunds
- {
- action ShowHint("You don't have sufficient funds to buy the Archer Class!");
- action goto Begin
- }
- state WarriorNoFunds
- {
- action ShowHint("You don't have sufficient funds to buy the Warrior Class!");
- action goto Begin
- }
- state QuestReset
- {
- action Reset();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement