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
Tenchi_Masaki
Newbie


Joined: 07 Nov 2002
Posts: 4
Location: USA

PostPosted: Mon Nov 25, 2002 8:55 pm   

Help with a bot problem
 
I run a bot on a mud, it has lots of Multiple functions, but Recently people have been abusing it.

the Trigger

(%w) tells you 'cancel'

what people have been doing to abuse my bot

Gambrum tells you 'magus tells you 'cancel''

I would like to Prevent anyone from doing this, yet i am not sure how of doing so, and also tell the person, For abusing the trigger, maybe if statements or such, as i said im not sure.

Any help would greatly be Appreciated and any suggestions on how to make a "blacklist" that my bot could check before casting spells would be most excellent, thank you very much in advance

Tenchi
Reply with quote
PrestoPimp
Apprentice


Joined: 18 Sep 2001
Posts: 175
Location: USA

PostPosted: Mon Nov 25, 2002 11:15 pm   
 
to get them to quit misuseing your bot put in the line:

^(%w) tells you 'cancel'

as your trigger so that nothing can come before the trigger.
For a "blacklist" then you would do something like this:

#VAR blacklist {name1|name2|name3}
#IF %ismemeber(@blacklist) {say You have been blacklisted} {reg command}

The reg command is the thing that happens to non-blacklisted people.
Now you can make a trigger to see if some1 is abusing your bot and have it add their names like this:

#VAR blacklist %additem(%1,@blacklist)

You would then have the person added to your list, where %1 is the spot where the person's name is stored.

Hope this helps, have a nice day! :)

For tomarrow is another day, and other days come but 6 times a week.
Reply with quote
Tenchi_Masaki
Newbie


Joined: 07 Nov 2002
Posts: 4
Location: USA

PostPosted: Thu Nov 28, 2002 3:37 pm   
 
I have tried this

#IF %ismemeber(@blacklist) {say You have been blacklisted} {reg command}

and all i can get it to output is the Blacklisted part, it doesn't matter whos names are on the "blacklist" it still outputs the same thing, it doesn't ever output the other...

Please I would like to make a working "blacklist" that my bot can check, Thank you for any help

Tenchi
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Nov 28, 2002 6:18 pm   
 
Syntax: %ismember(s,list)
return 0 (false), if s is not a member of the given string list. Otherwise return the item number (position of s in the list)

Not surprising, since you only have one parameter in a function that requires two. That's not even mentioning that you've kept the typo ismemeber. This stuff isn't always hard to figure out, sometimes it just takes spending a minute or two to look up the things you don't know how to use.

#IF %ismember(%1, @blacklist) {say You have been blacklisted} {reg command}


LightBulb
Senior Member
Reply with quote
itsmarty
Novice


Joined: 29 Jan 2002
Posts: 37
Location: USA

PostPosted: Thu Nov 28, 2002 6:24 pm   
 
#IF %ismemeber(@blacklist)

That's a typo in the original suggestion, should be %ismember instead of %ismemeber.

Also, you need to test for something, so you need #IF %ismember(%1, @blacklist), that way you're checking if %1 is a member of the blacklist array.

Martin

Martin

Thanks,
Martin
Reply with quote
itsmarty
Novice


Joined: 29 Jan 2002
Posts: 37
Location: USA

PostPosted: Thu Nov 28, 2002 6:26 pm   
 
If you couldn't tell, that last post was from Martin. Holy runaway sigs.

Thanks,
Martin
Reply with quote
Tenchi_Masaki
Newbie


Joined: 07 Nov 2002
Posts: 4
Location: USA

PostPosted: Thu Nov 28, 2002 8:04 pm   
 
Thank you all so much, it has helped me greatly.
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