Code: Select all
"on_start" = [
"item_1" = 0
"item_2" = 0
"item_3" = 0
"item_4" = 0
"item_5" = 0
"quest" = 0
"quest_1_comeplete" = 0
"money" = 20
newgui main [
guibutton "Game Status" "showgui Status"
guibutton "Unload UI" "newgui main [ @main ]"
guibar
@main
]
]
newgui "Status" [
if ( = $quest 0 ) [
guitext "You have obtained no tasks."
guitext "Go talk to some workers."
]
if ( = $quest 1 ) [
guitext "A worker needs help charging their console."
guitext "Find an energy capsule to charge it with."
]
guibar
guitext ( format "You have $%1 in your wallet." $money )
guitab "Items"
if ( > $item_1 0 ) [
guitext ( format "You have %1 energy capsule(s)." $item_1 )
]
if ( > $item_2 0 ) [
guitext ( format "You have %1 marshmallow(s)." $item_2 )
]
if ( > $item_3 0 ) [
guitext ( format "You have %1 footlong sub(s)." $item_3 )
]
if ( > $item_4 0 ) [
guitext ( format "You have %1 nothing(s)." $item_4 )
]
if ( > $item_5 0 ) [
guitext ( format "You have %1 item(s)." $item_5 )
]
]
newgui "Worker (Quest 1)" [
if ( = $quest 0 ) [
guitext "This console is out of order." chat
guitext "I can't work like this." chat
guitext "Could you help me fix it?" chat
guibutton "Yes" "quest = ( + $quest 1 )"
guibutton "No" "cleargui"
]
if ( = $quest 1 ) [
guitext "The console should respond if we give it a charge." chat
guitext "Perhaps an energy capsule would do the trick?" chat
]
]
newgui "Vending Machine" [
guitext "WHAT DO YOU WANT TO BUY?"
guibar
guibutton "ENERGY CAPSULE: $10" [
if ( > $money 9 ) [
money = ( - $money 10 )
item_1 = ( + $item_1 1 )
]
]
guibutton "FOOTLONG SUB: $5" [
if ( > $money 4 ) [
money = ( - $money 5 )
item_3 = ( + $item_3 1 )
]
]
guibutton "NOTHING: FREE" [ item_4 = ( + $item_4 1 ) ]
guibutton "I don't want anything." [ cleargui ]
]
"level_trigger_1" = [
echo "What are you thinking?"
echo "There's nowhere to go out there."
]
"level_trigger_2" = [
newgui "Worker" [
guitext "BOOM! HEADSHOT!" chat
guitext "Wait! Um, I mean... The power circuit is clear, sir." chat
]
showgui "Worker"
]
"level_trigger_3" = [
newgui "Worker" [
guitext "That guy over there really needs to get to work." chat
]
showgui "Worker"
]
"level_trigger_4" = [
newgui "Worker" [
guitext "Mmm... marshmallows..." chat
]
showgui "Worker"
sleep 3000 [
echo "<Obtained a marshmellow.>"
item_2 = ( + $item_2 1 )
newgui "Worker" [
guitext "Here. You can have this one." chat
]
showgui "Worker"
]
]
"level_trigger_5" = [
showgui "Worker (Quest 1)"
]
"level_trigger_6" = [
showgui "Vending Machine"
]
"level_trigger_7" = [
newgui "Sarge" [
guitext "HELLO! I AM MR. FREDRICKSON!" chat
guitext "I'M HERE TO MAKE SURE YOU MAGGOTS STAY ON TASK!" chat
guitext "I WONDER WHY EVERYONE CALLS ME SARGE!" chat
]
showgui "Sarge"
]
Code: Select all
newgui "Worker (Quest 1)" [
if ( = $quest 0 ) [
guitext "This console is out of order." chat
guitext "I can't work like this." chat
guitext "Could you help me fix it?" chat
guibutton "Yes" "quest = ( + $quest 1 )"
guibutton "No" "cleargui"
]
if ( = $quest 1 ) [
guitext "The console should respond if we give it a charge." chat
guitext "Perhaps an energy capsule would do the trick?" chat
]
]
1.) I want the second textbox to show up if you click yes. It's annoying having to go backward and forward just to see what he has to say next.
2.) I want to be able to finish the quest. The worker will say "Thank you. Here's a little something for helping me." and then he'll give you some money. This will also set $quest back to 0 and set $quest_1_comeplete to 1.
3.) I want the previous to also affect what the NPC says to you, since $quest will equal 0 again. Who wants to do the same thing over and over?
Any help would be appreciated. Thanks.