Shoptest script
From Platinum Arts Sandbox Free 3D Game Maker
Revision as of 16:50, 20 November 2010 by Chocolatepie33 (Talk | contribs)
on_start = [
gotquest = 0
money = 0
soda = 0
fruit = 0
bread = 0
bags-of-noodles = 0
sauces = 0
vegetables = 0
paintbrushes = 0
sheets-of-paper = 0
crayons = 0
colored-pencils = 0
paints = 0
beginner's_spellbooks = 0
advanced_spellbooks = 0
wands = 0
tractors = 0
seeds = 0
bags-of-fertilizer = 0
shovels = 0
wood-planks = 0
]
newgui main [
guilist [ //start
guilist [ //start 2
guibutton "Log" [showgui The-List]
guilist [ //start 3
guibutton "Unload shoptest's UI" [newgui main [@main]]
] //end 3
] //end 2
] //end
guibar
@main
]
newgui "The-List" [
guitext "10 sodas"
guitext "20 fruits"
guitext "5 loaves of bread"
guitext "10 bags of noodles"
guitext "10 sauce jars"
guitext "20 vegetables"
guitext "15 paintbrushes"
guitext "2000 sheets of paper"
guitext "2000 crayons"
guitext "
]
level_trigger_1 = [showgui YOU]
newgui YOU [
guitext "Oh no! Today's the town meeting! I'm late!"
guibar
guibutton "better get going then" [cleargui]
]
level_trigger_2 = [ if ( = $gotquest 0 ) [ showgui npc1-1 ] ]
newgui npc1-1 [
guitext ( format "Leo: Took you long enough to get here, %1." (getname) )
guitext "Luke: It looks like everyone's here."
guitext "Emily: There's each person from the clans, plus the big three's clan
leaders, and the Secret Service."
guitext "Jon: Mayor Mike's ready, I think."
guibar
guibutton "Well, let's listen then!" [showgui npc2-1]
] "Friends"
newgui npc2-1 [
guitext "As you all know, the entrance to the tunnel leading to our neighboring
town has been blocked. That means that we cannot get the supplies we need."
guitext " (townspeople talk worriedly) "
guibar
guibutton "Well, what do we do then?" [showgui npc2-2]
] "Mayor Mike"
newgui npc2-2 [
guitext "Well, our local inventor Michiel has created a teleporter that can take
one of us to the town. However, he does not know how it will turn out."
guibar
guibutton "Oh great. Let him explain it then." [showgui npc2-3]
] "Mayor Mike"
newgui npc2-3 [
guitext "As has been said, I do not know how the teleporter will work out. It
should take you near the town, no matter what. Would anyone like to be the one to go and get the
supplies?"
guibar
guibutton "I will!" [showgui npc2-4]
guibutton " (Don't volunteer) " [showgui npc2-5]
] "Michiel"
newgui npc2-4 [
guitext ( format "Thank you, %1." (getname) )
guitext " (Applause) "
guitext "You will go in the teleporter here in the back room. Please talk to the "
guitext "people and see what they want. We will give you $5000 to buy stuff with."
guitext "You will also receive our valuable magic pouch to hold everything in."
guibar
guibutton "Alright." [ money = ( + $money 5000 ) ; gotquest = ( + $gotquest 1 ) ; showgui npc2-6]
] "Mayor Mike"
newgui npc2-5 [
guitext "Nobody? Anyone? Then we'll have to pick a person via the lottery."
guibar
guibutton "No, wait! I'll go!" [showgui npc2-4]
guibutton " (Just wait) " [showgui npc2-7]
] "Michiel"
newgui npc2-6 [
guitext "Liam and the Yellow Clan: FOOD!"
guitext "William and the Red Clan: Some new art supplies."
guitext "Tim and the Blue Clan: Spellbooks and wands."
guitext "The Green Clan: Farming tools."
guitext "The Brown Clan: Wood, concrete and building materials."
guitext "The Orange Clan: Bandages, blood tanks, needles and medicines."
guitext "The Purple Clan:
guitext "The White Clan: Oxygen tanks and wheelchairs."
guitext "Mayor Mike: A new walking stick, and maybe spares."
guitext "Secret Service: Some new spy tools and weapons."
guibar
guibutton "If that's all..." [showgui npc2-9]
] "People"
newgui npc2-7 [
guitext "Well, here goes nothing..."
guitext " (Reaches into hat, pulls out a tag) "
guitext ( format "%1! You shall be getting our supplies." (getname) )
guibar
guibutton "Oh, great." [showgui npc2-8]
] "Mayor Mike"
newgui npc2-8 [
guitext "Everybody needs new supplies to do their jobs. Listen to them."
guibar
guibutton "Well? Whaddya need?" [showgui npc2-6]
] "Mayor Mike"
newgui npc2-9 [
guitext "Please step through the portal, if you land in the mountains try to find a tunnel to the other side."
guibar
guibutton "Ok then, I'll be off." [cleargui]
] "Mayor Mike"
level_trigger_2 = [showgui MagicShopMan]
newgui MagicShopMan [
guitext "What would you like to buy?"
guibar
guistayopen [ //Start of guistayopen
guibutton "Beginner's Spellbook- $20" [ beginner's_spellbook = ( + $beginner's_spellbooks 1 ) ; money = ( - $money 20 ) ]
guibutton "Advanced Spellbook- $20" [ advanced_spellbook = ( + $advanced_spellbooks 1 ) ; money = ( - $money 20 )]
guibutton "Wands- $30" [ wands = ( + $wands 1 ) ; money = ( - $money 30 )]
] //end of guistayopen
guibutton "Nothing, thanks." [cleargui]
]
level_trigger_3 = [showgui GroceryShopMan]
newgui GroceryShopMan [
guitext "What would you like to buy?"
guibar //start of guistayopen
guistayopen [
guibutton "Fruit- 2 for $5" [ fruit = ( + $fruit 2 ) ; money = ( - $money 5 ) ]
guibutton "Soda- $2" [ soda = ( + $soda 1 ) ; money = ( - $money 2 ) ]
guibutton "Bread- $3" [ bread = ( + $bread 1 ) ]
guibutton "Noodles- $3" [ bags-of-noodles = ( + $bags-of-noodles 1 ) ; money = ( - $money 3 ) ]
guibutton "Sauces- $2" [ sauces = ( + $sauces 1 ) ; money = ( - $money 2 ) ]
guibutton "Veggies- 3 for $5" [ vegetables = ( + $vegetables 3 ) ; money = ( - $money 5 ) ]
] //end of guistayopen
guibutton "Nothing, thanks." [cleargui]
]
level_trigger_4 = [showgui ArtShopMan]
newgui ArtshopMan [
guitext "What would you like to buy?"
guibar
guistayopen [ //start of guistayopen
guibutton "Paintbrushes- 10 for $10" [ paintbrushes = ( + $paintbrushes 10 ) ; money = ( - $money 10 ) ]
guibutton "Ream of paper- $20" [ sheets-of-paper = ( + $sheets-of-paper 500 ) ; money = ( - $money 20 ) ]
guibutton "Crayons- $25 for a 200 pack" [ crayons = ( + $crayons 200 ) ; money = ( - $money 25 ) ]
guibutton "Colored Pencils- $25 for a 200 pack" [ colored-pencils = ( + $colored-pencils 200 ) ; money = ( - $money 25 ) ]
guibutton "Paints- $5 for 10" [ paints = ( + $paints 10 ) ; money = ( - $money 5 )
] //end of guistayopen
guibutton "Nothing, thanks." [cleargui]
]
level_trigger_5 = [showgui ToolShopMan]
newgui ToolShopMan [
guitext "What would you like to buy?"
guibar
guistayopen [ //start of guistayopen
guibutton "Tractor- $500" [ tractors = ( + $tractors 1 ) ; money = ( - $money 500 ) ]
guibutton "Plant seeds- 100 for $10" [ seeds = ( + $seeds 100 ) ; money = ( - $money 10 ) ]