I was wondering if you could have a "Password" for a mob.
For Example:
turf
Jeremy
verb
Talk()
set src in oview(1)
switch(input("Would you like to guess my password?","Password")in list("Yes","No"))
if("Yes")
input("Whats the number?")
if("20")
usr.Gold += 10000
else
alert("Thats not right!")
if("No")
alert("K")
If you choose to guess the password, no matter what number you put in, you get 10000 Gold. I tried making a number var, but that didnt work, and i tried using, N as number, but i got an error for number being a bad input type. Can somone plz point me in the right direction?
thanx
Wizard of How
ID:261221
Oct 30 2001, 1:54 pm
|
|
input("Whats the number?") Well, the if statement will always return true because it's being counted as a text string, so that's your problem. Plus, you're not comparing it to anything. Use switch() here. [EDIT: While I'm at it, here. mob/verb/password() |
if("Yes") as far as this chunk goes, try rewriting it like this: if("Yes") |
In response to BurningIce
|
|
Thank you all for your input, I really appreciate it.
The always humble, ~Wizard of How |
use switch(input("Blablabla")) on both inputs