Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Main
- {
- questname "SHOP NAME"
- version 1.0
- }
- State Begin
- {
- desc "Buy Items?"
- action AddNpcText(#,"Welcome to my store!");
- action AddNpcText(#,"I am the master of items! I can be set to sell you things for money, or trade for items!" );
- action AddNpcInput(#,1,"Continue.");
- action AddNpcInput(#,2,"Exit.");
- rule InputNpc(1) goto Menu1
- rule InputNPC(2) goto Reset
- }
- State Menu1
- {
- desc "Buy Items?"
- action ShowHint("You will be charged if you proceed...");
- action AddNpcText(#,"Item List:" );
- action AddNpcInput(#,1,"Abort! Cancel!");
- action AddNpcInput(#,2,"Item Name - Item Price");
- action AddNpcInput(#,3,"Item Name - Item Price");
- action AddNpcInput(#,4,"Item Name - Item Price");
- action AddNpcInput(#,5,"Item Name - Item Price");
- action AddNpcInput(#,6,"Item Name - Item Price");
- action AddNpcInput(#,7,"Item Name - Item Price");
- action AddNpcInput(#,8,"Item Name - Item Price");
- action AddNpcInput(#,9,"Next Page ->");
- rule InputNpc(1) goto Reset
- rule InputNpc(2) goto Check1
- rule InputNpc(3) goto Check2
- rule InputNpc(4) goto Check3
- rule InputNpc(5) goto Check4
- rule InputNpc(6) goto Check5
- rule InputNpc(7) goto Check6
- rule InputNpc(8) goto Check7
- rule InputNpc(9) goto Menu2
- }
- State Menu2
- {
- desc "Buy Items?"
- action AddNpcText(#,"Item List:" );
- action AddNpcInput(#,1,"Abort! Cancel!");
- action AddNpcInput(#,2,"Item Name - Item Price");
- action AddNpcInput(#,3,"Item Name - Item Price");
- action AddNpcInput(#,4,"Item Name - Item Price");
- action AddNpcInput(#,5,"Item Name - Item Price");
- action AddNpcInput(#,6,"Item Name - Item Price");
- action AddNpcInput(#,7,"Item Name - Item Price");
- action AddNpcInput(#,8,"<- Previous Page");
- action AddNpcInput(#,9,"Next Page ->");
- rule InputNpc(1) goto Reset
- rule InputNpc(2) goto Check8
- rule InputNpc(3) goto Check9
- rule InputNpc(4) goto Check10
- rule InputNpc(5) goto Check11
- rule InputNpc(6) goto Check12
- rule InputNpc(7) goto Check13
- rule InputNpc(8) goto Menu1
- rule InputNpc(9) goto Menu3
- }
- State Menu3
- {
- desc "Buy Items?"
- action AddNpcText(#,"Item List:" );
- action AddNpcInput(#,1,"Abort! Cancel!");
- action AddNpcInput(#,2,"Item Name - Item Price");
- action AddNpcInput(#,3,"Item Name - Item Price");
- action AddNpcInput(#,4,"Item Name - Item Price");
- action AddNpcInput(#,5,"Item Name - Item Price");
- action AddNpcInput(#,6,"Item Name - Item Price");
- action AddNpcInput(#,7,"Item Name - Item Price");
- action AddNpcInput(#,8,"Item Name - Item Price");
- action AddNpcInput(#,9,"<- Previous Page
- rule InputNpc(1) goto Reset
- rule InputNpc(2) goto Check14
- rule InputNpc(3) goto Check15
- rule InputNpc(4) goto Check16
- rule InputNpc(5) goto Check17
- rule InputNpc(6) goto Check18
- rule InputNpc(7) goto Check19
- rule InputNpc(8) goto Check20
- rule InputNpc(9) goto Menu2
- }
- State Check1
- {
- if GotItems(1,100) goto Check1A
- else SetState("SoftReset1");
- }
- State Check1A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check2
- {
- if GotItems(1,100) goto Check2A
- else SetState("SoftReset1");
- }
- State Check2A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check3
- {
- if GotItems(1,100) goto Check3A
- else SetState("SoftReset1");
- }
- State Check3A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check4
- {
- if GotItems(1,100) goto Check4A
- else SetState("SoftReset1");
- }
- State Check4A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check5
- {
- if GotItems(1,100) goto Check5A
- else SetState("SoftReset1");
- }
- State Check5A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check6
- {
- if GotItems(1,100) goto Check6A
- else SetState("SoftReset1");
- }
- State Check6A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check7
- {
- if GotItems(1,100) goto Check7A
- else SetState("SoftReset1");
- }
- State Check7A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check8
- {
- if GotItems(1,100) goto Check8A
- else SetState("SoftReset1");
- }
- State Check8A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check9
- {
- if GotItems(1,100) goto Check9A
- else SetState("SoftReset1");
- }
- State Check9A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check10
- {
- if GotItems(1,100) goto Check10A
- else SetState("SoftReset1");
- }
- State Check10A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check11
- {
- if GotItems(1,100) goto Check11A
- else SetState("SoftReset1");
- }
- State Check11A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check12
- {
- if GotItems(1,100) goto Check12A
- else SetState("SoftReset1");
- }
- State Check12A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check13
- {
- if GotItems(1,100) goto Check13A
- else SetState("SoftReset1");
- }
- State Check13A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check14
- {
- if GotItems(1,100) goto Check14A
- else SetState("SoftReset1");
- }
- State Check14A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check15
- {
- if GotItems(1,100) goto Check15A
- else SetState("SoftReset1");
- }
- State Check15A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check16
- {
- if GotItems(1,100) goto Check16A
- else SetState("SoftReset1");
- }
- State Check16A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check17
- {
- if GotItems(1,100) goto Check17A
- else SetState("SoftReset1");
- }
- State Check17A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check18
- {
- if GotItems(1,100) goto Check18A
- else SetState("SoftReset1");
- }
- State Check18A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check19
- {
- if GotItems(1,100) goto Check19A
- else SetState("SoftReset1");
- }
- State Check19A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State Check20
- {
- if GotItems(1,100) goto Check20A
- else SetState("SoftReset1");
- }
- State Check20A
- {
- action ShowHint("You have purchased ITEM 1");
- action RemoveItem(1,100);
- action GiveItem(CHANGE-ME-ITEM1, 1);
- action PlaySound(5);
- action SetState("SoftReset2");
- }
- State SoftReset1
- {
- action ShowHint("Insufficient funds.");
- action Reset();
- }
- State SoftReset2
- {
- action ShowHint("Transaction completed succesfully!");
- action Reset();
- }
- State Reset
- {
- action Reset();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement