| Message |
Greetings once agian.Simple question, hopefully has a simple answer.Im attemping to put a curelist together through scripting, and well, I cant figure out how to get the right cure for a certian affliction.Heres a part of what I have so far
def cureit(name,output,wildcards):
pbal = world.GetVariable("pbal")
anor = world.GetVariable("anorexia")
eq = world.GetVariable("eq")
paralysis = world.GetVariable("paralysis")
pipes = int(world.GetVariable("pipes"))
pipe1 = world.GetVariable("pipe1")
pipe2 = world.GetVariable("pipe2")
pipe3 = world.GetVariable("pipe3")
asleep = world.GetVariable("asleep")
cures1 = {"stupidity":"goldenseal"}
if pbal == "no":
return
if anor == "yes":
world.Send("smoke " + pipe2)
return
else:
cures = {"stupidity":"goldenseal","paralysis":"bloodroot","confusion":"ash"}
for c, v in cures.iteritems():
world.SetVariable("pbal","no")
world.Send("outr %s" % (v))--now here,no matter the affliction, script sends "outr ash" to the world.
world.Send("eat %s" % (v))--and here it always sends "eat ash"
return
What I am trying to do is have a trigger call cureit, and use the approatie cure.Heres is the test trigger I have for it
<triggers>
<trigger
enabled="y"
match="* casts a net of stupidity over your mind."
script="cureit"
send_to="12"
sequence="100"
>
<send>world.ColourTell ("red", "black", "[AFFLICTED]: ")
world.ColourNote ("white", "black", "Stupidity")
world.SetVariable("stupidity", "on")</send>
</trigger>
</triggers>
Thanks. --Rakon
|
Yes, I am a criminal.
My crime is that of curiosity.
My crime is that of judging people by what they say and think, not what they look like.
My crime is that of outsmarting you, something that you will never forgive me for. | top |
|