|
gerojeng Newbie
Joined: 06 Nov 2004 Posts: 1
|
Posted: Sat Nov 06, 2004 12:11 pm
How to set a trigger to know wether a cast is succeeded ? |
[Begin]
if Someone ask you 'bless XXX'
cast 'bless' XXX
Set status = cast
if receive 'cast succeeded!' and status = cast
say 'Finished!!'
status = nothing
else if receive 'ohhhh...,cast failed' and status = cast
say 'Sorry , please ask me to cast again :('
status = nothing
[END]
How do I let the logic above write as a trigger ?
Who can help me ? thx :-) |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
|
|
|
misterbalrog Apprentice
Joined: 26 Oct 2004 Posts: 108
|
Posted: Sat Nov 06, 2004 2:46 pm |
I'd recommend that you put the spell you want to cast into a variable, then if the spell fails, you automatically cast the spell again, and if it then succeeds, THEN stop casting it. That way the person won't have to ask you to cast it again.
so basicallyou make a #variable spell {cast 'bless' %1} then use @spell to cast it. And if the spell fails, you do @spell again. Then once it succeeds, it'll automatically stop casting it. (If you use nexela's code...) |
|
|
|
|
|