my code-
a quest based completely on the apples picking quest-
Code: Select all
//lost key
level_trigger_24 = [
key1 = (+ $key1 1)
echo "You picked up the mayors key! he lives in the large house on the small island in the human village."
]
key1 = 0
Mayorskey1 = 0
level_trigger_25 = [showgui Mayor1]
newgui Mayor1 [
if (= $Mayorskey1 2) [
guitext "thanks for your help Guardian." chat
guitext "you can do as you like in my village." chat
] [
guitext "a Sacred Guardian? well, this is a rare sight." chat
guitext "welcome to my village Guardian. i wish we could give" chat
guitext "you a better welcome and a nice place to stay, but" chat
guitext "most of our village was claimed by the ogres." chat
guitext "guardian, can you do me a favor?" chat
]
guibar
if (< $Mayorskey1 2) [
if (= $Mayorskey1 0) [
guibutton "sure. what do you need?" "showgui Mayor2; Mayorskey1 = 1" chat
] [
if (> $key1 0) [
guibutton "I've found your key" [Mayorskey1 = 2; showgui Mayor4; key1 = (- $key1 1)] chat
] [
guibutton "I've found your key" [showgui Mayor3] chat
]
]
]
guibutton "bye" [echo "The Mayor: goodbye, Guardian."] chat
] "The Mayor"
Mayor2 [
guitext "i was having a smith creat a key for me. it was" chat
guitext "to be a key to get into the castle the ogres took from us." chat
guitext "i believe the key is on a small rock at the side of the river, just beyond" chat
guitext "the wall seperating us from the ogres. if you get it for me," chat
guitext "i will make a copy for you and you can enter the castle whenever you wish." chat
guibar
guibutton "sounds good. i'll get the key then" [echo "The Mayor: thanks Guardian. The key is on a rock beside the river, just beyond the dividing wall."] chat
]
Mayor3 [
guitext "but you do not have the key with you." chat
guitext "The key is on top of a rock that is beside the river just beyond" chat
guitext "the wall seperating us from those ogres." chat
guibar
guibutton "ok, i'll go get it." chat
] "The Mayor"
Mayor4 [
guitext "Perfect! this is the key! thanks Guardian. with this we are" chat
guitext "one step closer to getting our city back from the ogres." chat
guitext "here, have this rare gem. it is very old, said to be part if the" chat
guitext "frozen flame of the dragon god long ago. its small, but worth a small fortune" chat
guibar
guibutton "no problem mayor." [echo "The Mayor: we are so close to reclaiming my castle, i can almost taste that throne!"
treasure = ( + $treasure 5 )
key2 = ( + $key2 1 )
echo "You got 5 treasure and the key to the ogre castle from the mayor."] chat
] "The Mayor"
key2 is the key to open a door. i wanted to make the door open if you have 1 key2, and if you dont nothing happens when you approach the door.
what i have for the door-
Code: Select all
//the ogre castledoor = trigger26
key2 = 0
opened1 = 0
level_trigger_26 = [showgui ogrecastledoor]
newgui ogrecastledoor [ if [ = $opened1 1 ]
[ guitext "the doors are open. you can enter and leave as you like." chat ]
[ if [ key2 = 1 ]
[ guitext "the castle doors opened" chat ; [[b][i][u]code to make door open?[/u][/i][/b]] ]
[ guitext "if you had a key, you could open the door." chat
guitext "you should ask the human mayor about it." chat ]
]
]
if you can tell me how to make the doors triggertype change when you have the key, that would be great
