ID:261592
Aug 11 2002, 7:31 am
|
|
I need to make a item where you choose which places you want to go to like places you have done visited i dont know how you would go about doing this i thought bout deleting the obj from the usr inventory and replace it but that might take up to much space if you have alot of places to put.. so can you like add on to a switch or something?
|
In response to Scoobert
|
|
hey thanks but i kinda found another way using only one switch you want to know? well ill show you in case ne one wants to use it..
mob var You_Got_Another_Area=0 Got = "" obj Items TimeGate_Key icon = 'Objects.dmi' icon_state = "Teleport Key" verb Use() switch(input("Where do you want to Teleport to? (Costs 2MP)")in list("Beginning","Beginning of forest",usr.Got = "Town Lufito","Cancel")) if("Beginning") if(usr.MP >= 2) usr.MP-=2 usr.Yup=1 usr << sound('TimeGate.wav') flick("Teleport",usr) sleep(21) usr.loc=locate(2,1,1) usr << sound('TimeGate.wav') flick("Teleport",usr) sleep(21) usr.Yup=0 else usr << "Not enough MP" if("Beginning of forest") if(usr.MP >= 2) usr.MP-=2 usr.Yup=1 usr << sound('TimeGate.wav') flick("Teleport",usr) sleep(21) usr.loc=locate(3,1,2) usr << sound('TimeGate.wav') flick("Teleport",usr) sleep(21) usr.Yup=0 else usr << "Not enough MP" if("Town Lufito") if(usr.MP >= 2) usr.MP-=2 usr.Yup=1 usr << sound('TimeGate.wav') flick("Teleport",usr) sleep(21) usr.loc = locate(4,10,3) usr << sound('TimeGate.wav') flick("Teleport",usr) sleep(21) usr.Yup=0 else usr << "Not enough MP" if("Cancel") return turf Town_Lufito icon = 'Density.dmi' icon_state = "NONE" Entered() if(usr.Got == "Town Lufito") ..() else usr.Got = "Town Lufito" you always at the beginning put Got = "" for a var you can change got tho... the Got var is for hidding the "Town Lufito" so it looks like this switch(input("Your message")in list usr.Got = "HUH" that hids it till the Got var is changed to "Town Lufito" then it will be added to the switch.... dunno if i made sence but you can use the above code to hid a switch list till you change it.... ^_^ |
In response to Shy_guy197
|
|
what ever works :)
|
In response to Scoobert
|
|
yeah lol
|
In response to Shy_guy197
|
|
You're using a lot of redundant code in there. A better solution would be to use the switch() only to determine the location; for example, like this:
var/turf/T Lummox JR |
2.make a book in the persons invetory that records a list of places.
3. Be amagitive
4. the all mighty F1 key.