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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
Manx
Apprentice


Joined: 10 Oct 2000
Posts: 152
Location: USA

PostPosted: Mon Jan 22, 2001 6:43 am   

StonerBot v1.1 (customizable spell-caster bot)
 
Check below for new version. :-D
Reply with quote
randomjohn
Beginner


Joined: 03 Jan 2001
Posts: 13

PostPosted: Wed Jan 24, 2001 5:35 am   
 
How does the ismember variable work in that script?

Also, I'm looking for something that sets my party as automatically members of the "in crowd" and each will respond to the orders of another member. I'd also like to be able to temporarily add friendly people to the crowd with a manual group command.
Reply with quote
Manx
Apprentice


Joined: 10 Oct 2000
Posts: 152
Location: USA

PostPosted: Thu Jan 25, 2001 12:58 am   
 
The %ismember function will search through a list variable (the second argument) for the string that is specified. If it finds it, then it returns TRUE. If it doesn't, it returns FALSE.

If I have understand you correctly, you want to be able to limit the people who can use the bot. I will add that feature and repost.

Reply with quote
Manx
Apprentice


Joined: 10 Oct 2000
Posts: 152
Location: USA

PostPosted: Thu Jan 25, 2001 1:55 am   
 
Okay, this is version 1.1. :-P

All I added was a limited mode.
Now you can specify which users you want to use the bot.

Paste the following into your command line to install:



#SAY Installing StonerBot v1.1...;
#CLASS {StonerBot};
#CLASS {StonerBot|Config};
#CLASS 0;
#ALIAS stonersay {#SHOW %ansi( red, bold)StonerBot%ansi( blue, bold): %-1} "StonerBot";
#ALIAS stoner {#IF (%1 == on) {#IF (@bot_status = 1) {stonersay Bot is already on.;#ABORT 1};#IF (%numwords( @spells, "|") = 0) {stonersay ERROR: You have no specified any spells that can be cast. To do so, use 'stoner spells add "<spell name>"'.;#ABORT 1};#IF (@announce_method != "") {#IF (@activate_msg == "") {stonersay ERROR: You have specified a way to announce that your bot is active, but you have not specified what to say. Do so by setting the activate_msg variable.;#ABORT 1}};#IF (%2 == limit) {#IF (@limited_users == "") {stonersay "ERROR: You are trying to enter limited mode but you have not specified users which will be allowed to use the bot. Do so with 'stoner users add ~<player name~>'";#ABORT 1};#IF (@bot_status = 2) {stonersay Bot is already in limited mode.;#ABORT 1};stonersay Activated. Only certain players will be allowed to use the bot.;#VAR bot_status 2} {stonersay Activated.;#VAR bot_status 1};#IF (@on_title != "") {title @on_title};#IF (@bot_status = 2) {@announce_method @limit_msg} {@announce_method @activate_msg};#ABORT 1};#IF (%1 == off) {#IF (@bot_status = 0) {stonersay Bot is already off.;#ABORT 1};#IF (@announce_method != "") {#IF (@deactivate_msg == "") {stonersay ERROR: You have specified a way to announce that your bot is no longer active, but you have not specified what to say. To do so, set the deactivate_msg variable.;#ABORT 1};@announce_method @deactivate_msg};stonersay Deactivated.;#IF (@on_title != "") {title @off_title};#VAR bot_status 0;#ABORT 1};#IF (%1 == spells) {#IF (%2 == add) {#IF (%ismember( %-3, @spells)) {stonersay %upper( %-3) is already on the spells list.;#ABORT 1};stonersay Players can now have '%-3' cast on them.;#ADDITEM spells "%-3";#ABORT 1};#IF (%2 == remove) {#IF (!%ismember( %-3, @spells)) {stonersay %upper( %-3) is already not available to players.;#ABORT 1};stonersay Players can no longer have '%-3' cast on them.;#DELITEM spells "%-3";#ABORT 1};#SHOW "";#SHOW "";stonersay "SPELLS AVAILABLE";stonersay "----------------";#FORALL @spells {stonersay %upper( %i)};#SHOW "";#ABORT 1};#IF (%1 == banlist) {stonersay "BANNED PLAYERS";stonersay "--------------";#FORALL @banlist {stonersay %i};#SHOW "";stonersay These players can not access your bot.;#SHOW "";#ABORT 1};#IF (%1 == ban) {#IF (%ismember( %2, @banlist)) {stonersay %2 is already banned from your bot.;#ABORT 1};stonersay %2 is now banned from your bot.;#ADDITEM banlist %2;#ABORT 1};#IF (%1 == unban) {#IF (!%ismember( %2, @banlist)) {stonersay %2 is not banned from your bot.;#ABORT 1};stonersay %2 is no longer banned from your bot.;#DELITEM banlist %2;#ABORT 1};#IF (%1 == users) {#IF (%2 == add) {#IF (%ismember( %3, @limited_users)) {stonersay They are already allowed access in limited mode.;#ABORT 1};#ADDITEM limited_users %3;stonersay %3 is now allowed to use the bot when in limited mode.;#ABORT 1};#IF (%2 == remove) {#IF (!%ismember( %3, @limited_users)) {stonersay %3 can already not access the bot in limited mode.;#ABORT 1};#DELITEM limited_users %3;stonersay %3 can no longer use the bot in limited mode.;#ABORT 1};#SHOW "";#SHOW "";stonersay "LIMITED MODE USERS";stonersay "------------------";#FORALL @limited_users {stonersay %upper( %i)};#SHOW "";#ABORT 1};#SHOW "";#SHOW "";stonersay "COMMAND DESCRIPTION";stonersay "------- -----------";stonersay "stoner on [limit] Activates the bot.";stonersay "stoner off Deactivates the bot.";stonersay "stoner spells Lists the spells able to be cast.";stonersay "stoner spells add <spell name> Adds a spell that can be cast.";stonersay "stoner spells remove <spell name> Removes a spell that can be cast.";stonersay "stoner banlist Shows the people who can not use the bot.";stonersay "stoner ban <player name> Bans a player from the bot.";stonersay "stoner unban <player name> Unbans a player from the bot.";stonersay "stoner users Lists players who can use bot when in limited mode.";stonersay "stoner users add Allows the specified player to use the bot in limited mode.";stonersay "stoner users remove Revokes the specified players limited mode access."} "StonerBot";
#VAR mana {1718};
#VAR maxmana {1718};
#VAR limited_users {};
#VAR bot_status {0} {_nodef} "StonerBot";
#VAR banlist {} {} "StonerBot";
#VAR spells {cure light|sanc|heal|armor|bless|aid|cure blind|cure serious|cure critic|remove curse|wild heal|recall} {_nodef} "StonerBot";
#VAR activate_msg {"&RStonerBot&B is now active. Tell me 'help' for details.&n"} {_nodef} "StonerBot|Config";
#VAR stand_command {stand} {_nodef} "StonerBot|Config";
#VAR rest_command {rest} {_nodef} "StonerBot|Config";
#VAR deactivate_msg {"&RStonerBot&B is now off."} {_nodef} "StonerBot|Config";
#VAR announce_method {gos} {_nodef} "StonerBot|Config";
#VAR on_title {"&Bis &RStonerBot&B. Tell me 'help' for details.&n"} {_nodef} "StonerBot|Config";
#VAR off_title {} {_nodef} "StonerBot|Config";
#VAR limit_msg {"&RStonerBot&B is now running in limit mode. Talk to me to request access.&n"} {_nodef} "StonerBot|Config";
#TRIGGER {(%w) says, '(*)'} {#IF (@bot_status = 0) {#ABORT 1};#IF (%ismember( %1, @banlist)) {#ABORT 1};#IF (!%ismember( %2, @spells)) {#ABORT 1};#IF (@bot_status = 2)and(!%ismember( %1, @limited_users)) {#ABORT 1};@stand_command;#IF (%2 = recall) {cast 'word of recall' %1} {cast '%2' %1};@rest_command} "StonerBot";
#TRIGGER {(%w) says, 'mana'} {#IF (@bot_status = 1) {say My current mana level is at %eval( @mana*100/@maxmana)%.}} "StonerBot";
#TRIGGER {~< %d/%dhp (%d)/(%d)Ma} {#var mana %1;#var maxmana %2} "StonerBot";
#TRIGGER {(%w) tells you, 'help'} {#IF (@bot_status = 0) {#ABORT 1};#IF (%ismember( %1, @banlist)) {tell %1 Sorry, you are banned from my bot.;#ABORT 1};#IF (@bot_status = 2)and(!%ismember( %1, @limited_users)) {tell %1 Sorry, but only certain people are allowed to use my bot right now.;#ABORT 1};#VAR temp @spells;temp = %replace( @temp, "|", ", ");tell %1 I can cast the following spells on you: @temp~. Just say the spell and I will cast it.;tell %1 You can tell me 'summon' to get summoned to my location.;tell %1 Also, say 'mana' to get my current mana level.} "StonerBot";
#TRIGGER {(%w) tells you, 'summon'} {#IF (@bot_status = 0) {#ABORT 1};#IF (%ismember( %1, @banlist)) {tell %1 Sorry, you are banned from my bot.;#ABORT 1};#IF (@bot_status = 2)and(!%ismember( %1, @limited_users)) {tell %1 Sorry, but only certain people are allowed to use my bot right now.;#ABORT 1};@stand_command;cast 'summon' %1;@rest_command} "StonerBot";
#SAY StonerBot v1.1 has been installed.;


Again, please post questions/suggestions/comments here.

Reply with quote
Shira
Beginner


Joined: 14 Feb 2001
Posts: 18
Location: Israel

PostPosted: Wed Feb 14, 2001 2:08 pm   
 
two suggestions:
first, sometimes you want to alias a spell name - like insted of "word of recall" just recall, but when you cast it you need the full "word of recall"

second, it would be nice to add some visual interface to it, like buttons to turn it on and off and such

Shira
Reply with quote
Flipside
Newbie


Joined: 20 Mar 2001
Posts: 1

PostPosted: Tue Mar 20, 2001 4:16 am   
 
bit of a problem...
I just installed the script it seems to work ok
but after i type stoner on and its on
people will tell me help and nothing happens... I have a feelings its something really stupid.. the mud i'm playing on is a SMAUG, Jellybean MuD

- Catch ya on the Flipside....

Check out http://smaug.n3.net for all your smaug/SWR needs.
Reply with quote
Manx
Apprentice


Joined: 10 Oct 2000
Posts: 152
Location: USA

PostPosted: Tue Mar 20, 2001 11:45 pm   
 
You need to make sure that what you receive from the MUD when someone sends you a tell will match with the trigger.

Example:

On most MUDs, tells are displayed this way:

Manx tells you, 'help'

On other MUDs, tells are displayed this way:

Manx tells you: help

If your MUD displays tells differently, then you need to head into the settings editor and change the trigger accordingly. If the MUD you play sends tells to you like the second example, you would change the trigger pattern to
(%w) tells you: (*)
.

I hope this helps. If not, post here again and I'll try harder. :-D

Reply with quote
Evangelist
Adept


Joined: 10 Oct 2000
Posts: 224
Location: USA

PostPosted: Sun Mar 25, 2001 8:26 am   
 
I cut and paste the script exactly, but it isnt seeming to work right. Like i type stoner and the list of commands come up, but I cant type stoner on, stoner off, blah blah, because every time i type stoner, the command list comes up. Im sure if I could get that fixed I could get the bot to work.....any clues why its not working right?

Evangelist
www.phidar.com
Reply with quote
Manx
Apprentice


Joined: 10 Oct 2000
Posts: 152
Location: USA

PostPosted: Sun Mar 25, 2001 9:18 am   
 
I have only tested this script in zMUD 6.15 and above. What version are you using?

Reply with quote
Evangelist
Adept


Joined: 10 Oct 2000
Posts: 224
Location: USA

PostPosted: Sun Mar 25, 2001 10:44 pm   
 
I use 5.55. 4 uses left before it kicks the bucket though. I'll have 6.15 soon, but since that eLiscence thing is on my computer, I haven't been able to see the new zMud. Anyway, I'm not sure if the bot would work under 5.55. I'm upgrading soon though.
Reply with quote
AshenToF
Newbie


Joined: 03 Dec 2004
Posts: 6
Location: kansas

PostPosted: Thu Dec 09, 2004 2:46 am   
 
I love the bot. BUT. I play on a pk-optional mud. How would I set it up so that I can summon non-pk players only, and send them a message like this:

Tell (%w) sorry, Summoning pk set players is against the rules.

And also set it up optionaly to turn on and off to not spellup pk players. Like it sends them a message: And if its set to not spellup pk'ers then it would send out:

Tell (%w) sorry, this bot does not spellup pk set players.

and when they ask for spells...they send it through tells instead of using say.
and also set it up so that I detect if they've already got the spell or not.
and also set it up so that if they've already got the spell. It tells them:
and also set it up to do a full spellup. Like:

(%w) tells you 'spellup'
and it casts all spells upon the person.

and also set it up so that it detects weather or not the spell hits. Like you lose concentration or spell failed.

tell (%w) you're already armored...or you already have sanctuary.

and also how do I set it up to send it out over OOC instead of gossip that its on.

I know that there is alot of stuff here im requesting help with..but hehe...Ive got no idea how to set up bots...

thank you
ashen
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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