Page 2 of 2
Re: Help with scripting
Posted: May 18th, 2010, 1:15 pm
by klimyriad
thanks i can not find the shop scripted
Re: Help with scripting
Posted: May 18th, 2010, 1:18 pm
by arcones
In-game? Hmm, lemmy think for a mom't...
Re: Help with scripting
Posted: May 18th, 2010, 1:22 pm
by klimyriad
no on the forums LOL
Re: Help with scripting
Posted: May 18th, 2010, 1:24 pm
by arcones
Re: Help with scripting
Posted: May 18th, 2010, 1:24 pm
by klimyriad
thanks ARC
EDIT:Gobologna's Shop Script
"on_start" = [
money = 0
pie = 0
sword = 0
treasure = 0
]
"level_trigger_1" = [ money = ( + $money 5 )
echo "You got 5 moneys."
]
"level_trigger_2" = "showgui Shopkeeper"
newgui Shopkeeper [
guitext "What're ya buyin, stranger?" chat
guibar
guilist [
guibutton "Pie: 10 moneys" [
if ( > $money 9 ) [
money = ( - $money 10 )
pie = ( + $pie 1 )
]
]
guibar
guibutton "Sword: 20 moneys" [
if ( > $money 19 ) [
money = ( - $money 20 )
sword = ( + $sword 1 )
]
]
guibar
guibutton "Treasure: 40 moneys" [
if ( > $money 39 ) [
money = ( - $money 40 )
treasure = ( + $treasure 1 )
]
]
]
]
newgui Inventory [
guibutton "Back" "cleargui 1"
guibar
guitext ( format "You have %1 moneys in your wallet." $money )
guitext ( format "You have %1 pies. Yum." $pie )
guitext ( format "You have %1 swords. Not that you can use them..." $sword )
guitext ( format "You have %1 treasures. Lucky you!" $treasure )
]
newgui main [
guilist [
guilist [
guibutton "Inventory" "showgui Inventory"
]
]
guibar
@main
]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I just put it here to make it easy this thread could be use full in the future
Re: Help with scripting
Posted: May 18th, 2010, 1:25 pm
by arcones
No problem
Re: Help with scripting
Posted: May 18th, 2010, 1:29 pm
by klimyriad
Right i do that later okay for now that is it
Arcones for all your help