Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
JerleMin
Novice


Joined: 17 Oct 2000
Posts: 38

PostPosted: Fri Feb 22, 2002 1:42 am   

Need some coding help
 
Hi.. I'm trying to get a system setup for Achaea.. I need to be able to accept a tell from someone, check their name against a list of acceptable people, and then execute commands based on that name.

right now i've got..
Trigger:
pattern: (%w) tells you, ~"Summon.~"
commands:
#var incsummon %1

#if %ismember( @incsummon, @validsummons) {rescuesummon @incsummon} {
tell @incsummon I'm afraid you're not permitted to use Puppet Summoning.
#unvar incsummon
}


Variable:
Name: Validsummons
Value: Olath

Variable:
Name: Olath
Value: 74315

Alias:
Name: rescuesummon
Commands:
tell @incsummon Standby for Puppetry Summon

get @%1 from backpack


The rescue summon alias is evaluating to @Olath when activated via the trigger, yet "rescuesummon Olath" evaluates correctly.. Anybody? :)

Jerle Minara,
zMUD 6.22 Win98
Aetolia and Achaea Addict!
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Feb 22, 2002 2:08 am   
 
"The rescue summon alias is evaluating to @Olath"

It is for the get line:

get @%1 from backpack

As %1 is the value of @incsummon..

get @{@incsummon} from backpack


In this case @incsummon is Olath

get @{Olath} from backpack

Olath has a value of 74315

get 74315 from backpack

//

You #unvar incsummon in the trigger then
try and reference it in the alias.

You need to refer to %1 in the alias.

//

I'm not sure what you are trying to do with
the backpack and rescue summon.

It appears your troubles might be just
what you want to resolve to a value.

TonDiening
Beta Upgrading to 6.26
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Feb 22, 2002 2:14 am   
 
#TRIGGER {(%w) tells you, ~"Summon.~"} {#IF %ismember(%1,@validsummons) {rescuesummon %1} {#NOOP Ignore illegal request}}

#ALIAS rescuesummon {cast summon %1}

That should work.


TonDiening
Beta Upgrading to 6.26
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Feb 22, 2002 3:49 pm   
 
In the trigger, change the #IF line to:
#if %ismember( %1, @validsummons) {rescuesummon %1} {tell %1 I'm afraid you're not permitted to use Puppet Summoning.;#unvar incsummon}
See if that helps.

LightBulb
All scripts untested unless otherwise noted
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net