Having issues not related to a specific Sandbox game mode? Get help here!
Please also read the rules for support when posting support requests. Failure to comply with the forum rules may result in your topic being locked without resolution.
rubbish = 0
movespeed 100
newgui main [
guilist [
guilist [
guibutton "Quest information" "showgui quests"
guibutton "Inventory" "showgui inventory"
]
guibar
guilist [
guibutton "About" "showgui About"
]
]
guibar
@main
]
newgui inventory [
guibutton "Back" "cleargui 1"
guibar
guitext (format "You currently carry %1 rubbish" (+ $rubbish))
]
newgui James [
guitext "Oh My Goodness!" chat
guitext "Who are you and where are you from?" chat
guitext "What is that? It crashed and messed up my garden." chat
guitext "You must be responsible on it." chat
guibar
guibutton "What should for you?" "showgui npc1-1"chat
] "Angry gardener"
"level_trigger_1" = [ showgui James ]
"level_trigger_%1" = [ rubbish = ( + $rubbish 1) ]
newgui quest [
if (> $rubbish 10) [
guitext "No, my garden is still dirty." chat
guitext "Hurry up, or i'll call the police and report you." chat
]
if (= $rubbish 10) [
guitext "Well, now my garden look better ." chat
guitext "But I think there's a strange metal part near the fat tree in my garden." chat
guitext "Go and picked it up and leave my garden away with your airship." chat
guibar
guibutton "Bye."
]
]
newgui npc1-1 [
guitext "Seems that you have messed up my garden." chat
guitext "So help me to clean my garden." chat
guibar
guibutton "I have clean it." "showgui quest" chat
] "James"
on this is my code....
Anyone can help me & teach me how can i set up a quest inside game...
the quest code:
newgui quest [
if (> $rubbish 10) [
guitext "No, my garden is still dirty." chat
guitext "Hurry up, or i'll call the police and report you." chat
]
if (= $rubbish 10) [
guitext "Well, now my garden look better ." chat
guitext "But I think there's a strange metal part near the fat tree in my garden." chat
guitext "Go and picked it up and leave my garden away with your airship." chat
guibar
guibutton "Bye."
]
]
what wrong in the code???
Last edited by arcones on June 8th, 2010, 9:27 am, edited 1 time in total.
Reason:Quick edit. Makes it easier to read.
Alternatively if you want constant feedback, you can try out my CFG editor (links in my signature). It doesn't have all the scripting commands, it knows a considerable number of them.