another problem is im trying to make it so you have to collect the 5 keys in order to open one door
(to gain access to the princess), but i dont know how to. the following is my .cfg
Code: Select all
//aliases
"on_start" = [
money = 0
wolf = 0
keys = 0
totalkeys = 0
totalprincess = 0
pickedkey1 = 0
keyquests = 0
doorquest = 0
finishedquests = 0
totalquests = 0
money = 0
finisheddoor1 = 0
]
mmodel "rpg/characters/wolf"
mmodel "rpg/objects/coin/silver"
mmodel "rpg/characters/npcman"
music burn.ogg
loop i 5 [
(format "gotkey%1" (+ $i 1)) = 0
]
mapsound "freesound/FamilyGuy_StewieInsult" 255 32767 // 5
mapsound "freesound/FamilyGuy_StewieSickTwistedFruit" 255 32767 // 6
//aliases
"level_trigger_1" = [ money = ( + $money 5 )
echo "You got 5 money."
]
newgui main [
guilist [
guilist [
guibutton "Quest information" "showgui quests"
guibutton "Inventory" "showgui Inventory"
]
]
guibar
@main
]
newgui Inventory [
guibutton "Back" "cleargui 1"
guibar
guitext ( format "You have %1 moneys in your wallet." $money )
guitext ( format "You have %1 wolf." $wolf)
guitext (format "You currently carry %1 keys" $totalkeys)
guibar
newgui quests [
guibutton "Back" "cleargui 1"
guibar
guitext (format "You've obtained %1 out of 2 quests" $totalquests)
guitext (format "You've finished %1 out of 2 quests" $finishedquests)
guibar
guitext (format "You've obtained %1 out of 5 keys" $totalkeys)
guitext (format "You've obtained %1 out of 1 princess" $totalprincess)
]
]
newgui quest1 [
if ( (> $keys 0) (= $pickedkeys1 2))
guibar
if $pickedkeys1 [
guitext "where could those keys be"
guitext "i still need to collect %1 more keys to save the princess"
]
] "the gods keys"
newgui quest2 [
if (|| (> $princess 1) (= $savetheprincess1 2)) [
guitext "now i must save the princess."
] [
guitext "i have obtained all the keys."
]
guibar
if $pickedkeys1 [
guitext "she must be somewhere in here."
] [
guitext "now i must venture to princess temple."
]
] "a lost princess"
"pickup" = [
if (= (getalias (format "gotkey%1" $arg1)) 0) [
(format "gotkey%1" $arg1) = 1
echo "0You've picked up a key"
key = (+ $key 1)
totalkeys = (+ $totalkeys 1)
] [
]
]
"gotkey1" = [0]
"gotkey3" = [0]
"gotkey2" = [0]
"gotkey5" = [0]
"gotkey4" = [0]
"level_trigger_11" = [showgui rob-zombi]
newgui rob-zombi [
guitext "Hello there, can i ask you a favor?" chat
guibar
guilist [
guibutton "yes"
guibutton "no" "cleargui 1"
][
guitext "you must travel all over this vast land to get the keys of the gods." chat
guitext "it is all in an effort to save the princess." chat
guitext "please hurry and find the keys brave worrier" chat
guibutton "i will go as fast as i can." chat
]
]
level_trigger_3 = [showgui princess-peach]
newgui princess-peach [
guitext "my hero!" chat
guitext "your not mario!" chat
guitext "wrong princess idiot!" chat
]
level_trigger_4 = [showgui zelda]
newgui zelda [
guitext "my hero!" chat
guitext "you win!" chat
]
"level_trigger_10" = [if (= $totalkeys 5)
"level_trigger_9" = [pickup 9]
"level_trigger_8" = [pickup 8]
"level_trigger_7" = [pickup 7]
"level_trigger_6" = [pickup 6]
"level_trigger_5" = [pickup 5]