-sellall:
+BagsAssignment:
Type: Assignment
+ Actions:
+ on assignment:
+ - trigger name:click state:true
Interact Scripts:
- - 2 SellallScript
- - 1 SellallYes
+ - 1 BagBuy
+BagBuy:
-SellallScript:
Type: Interact
Steps:
1:
Click Trigger:
+ Script:
+ - chat "<white>Care to purchase a bag or two?"
+ - chat "<white>Large Bags <yellow>500"
+ - chat "<white>Small Bags <yellow>250"
+ - wait 1
+ - chat "<blue>yes or no?"
+ Chat Trigger:
1:
+ Trigger: /yes/
+ Script:
+ - chat "<blue>Large or Small?"
+ - zap 2
+ 2:
+ Trigger: /no/
Script:
- - chat "So Charsi wont buy it and niether will anyone else?"
+ - chat "<white>Maybe next time!"
- - chat "Wou have come to the right place!"
- - chat "Would you like to sell all but the clothes off your back?"
- - chat "<blue>yes or no?"
-SellallYes:
- Type: Interact
- Steps:
2:
Chat Trigger:
1:
- Trigger: /yes/
+ Trigger: /large/
Script:
- - execute as_player "esell all"
- - finish
+ - if 500 > <player.money> {
+ - playsound <player.location> sound:anvil_use
+ - take money qty:500
+ - execute as_server "backpack <player.name> large"
+ - execute as_server "givebpkey <player.name>"
+ - zap 1
+ }
+ else {
+ - chat "<dark_gray>Hey, you do not have enough money! Off you go, rascal!"
+ - zap 1
+ }