![](templates/Classic/images/spacer.gif) |
AshenToF Newbie
Joined: 03 Dec 2004 Posts: 6 Location: kansas
|
Posted: Wed Dec 08, 2004 9:52 am
spellbot script for Standard ROM |
I play a standard hack'n'slash ROM24b6. Its got standard spells for the most part with a few additions. Plus its a PK option MUD where it is illegal to summon pk set players.
How would I go about making this script. And also included in this script would be summoning non-pk players. And doing a check for pk and non-pk for the summon. Its all done in tells. I.E: Tell Halzir 'spellup'. Or the spells indivually themselves. And also if someone was blind. They would say: gossip 'summon'. And id summon them. and then they'd be able to do a say: say 'remove blind'. And id cast cure blind on them.
This would be much appreciated. Thank you. |
|
|
![](templates/Classic/images/spacer.gif) |
AshenToF Newbie
Joined: 03 Dec 2004 Posts: 6 Location: kansas
|
Posted: Wed Dec 08, 2004 11:38 am |
Okay i found the stoner bot script here. BUT. How do you install it? Quick help PLEASE! hehe
|
|
|
![](templates/Classic/images/spacer.gif) |
AshenToF Newbie
Joined: 03 Dec 2004 Posts: 6 Location: kansas
|
Posted: Thu Dec 09, 2004 7:11 am |
oh yeah..hehe duh...i got it..lmao
|
|
|
![](templates/Classic/images/spacer.gif) |
AshenToF Newbie
Joined: 03 Dec 2004 Posts: 6 Location: kansas
|
Posted: Sat Dec 11, 2004 8:58 am |
Okay i found the Stonerbot script. But I was wondering if someone could tell me how to edit the stonerbot which is as follows:
Code: |
#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.;
|
to do this below:
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 |
|
|
![](templates/Classic/images/spacer.gif) |
AshenToF Newbie
Joined: 03 Dec 2004 Posts: 6 Location: kansas
|
Posted: Thu Jan 20, 2005 2:03 am |
Soooo...if someone could help me with this please? Im still in need of figuring this out..hehe. Im confuzzled.
|
|
|
![](templates/Classic/images/spacer.gif) |
Kjata GURU
![](images/avatars/190086853941eff9946d4cf.jpg)
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Jan 20, 2005 1:58 pm |
You would be better off asking the person who made the script to modify it. I can give you a few pointers for some of the things you want, but you should still ask the person who made it.
For only summoning non-PK players, you first need to keep a list of players who are PK. This depends on your MUD, but most likely you should be able to set up a trigger on the output of the who command to build a string list with the names of al the players who are PK.
Now, in the trigger that summons a person (the last one in the script), after all the checks for the ban list/friend list is done, there needs to be another check to see if the person's name is a member of the PK players list. If they are, you need to send them a message and abort the script.
For disabling spelling up of PK players, the concept is basically the same, except now it has to be done in the trigger that does the actuall spelling up, which is the first one in the script. Again, after the checks for the ban list/friend list, another check has to be done. This time it would check if some variable is set to some value (1 for example), indicating that spelling up of PK players I currently prohibited. If the variable is set, and the person belongs to the list of PK players, a message is sent and the script is aborted.
Changing spell request from says to tells consist of only changing the pattern of the first trigger in the script to use tell instead of say. Detecting if the person has the spell already might be tricky depending on your MUD. You need to find out if the MUD lets you know this in someway or another.
For the full spellup, it might be best to make a separate list of spells that will be used only during the spellup. It might not necessarily make sense to cast all of the available spells to one person during a spellup. As for actually performing the spellup, you would need to create another trigger (like the summon one), that after performing all the necessary checks of the ban list/friend list/PK list, it would do a #FOREACH with the spellup list and cast each spell on the person.
Detecting if a spell hits or if you lose your conectration would be kind of hard because it requires changing a lot of how the whole script works. Since you are not making it from scratch, it would be better to just have a trigger that matches when you lose your concentration and tells the player about it so that the may ask for the spell again.
As for having it use OOC instead of gossip, just change the value of the @announce_method variable to the command for OOC.
If all of this confuses you, then you best option really is to contact he maker of the script. |
|
_________________ Kjata |
|
|
![](templates/Classic/images/spacer.gif) |
|
|
|
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
|
|