|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Tue Jan 31, 2006 8:46 am
Healer Bot Trigger |
Ok, first off this was designed for a mud called Eternal Darkness. Second, it will work with little or no mods for my mud that will be opening soon called Caer Dubrin, which happens to have some ideas taken from what I learned mudding at Eternal Darkness. Now, this SHOULD!! be bug free as it has been tested by myself and a few friends. However if you do find bugs simply PM me and I'll update it and repost new version here :)
You may or may not need to edit things here for your mud, probably will :)
the clanchecker is the biggest hooking problem on most muds, PLEASE THINK before you ask for help on editing this to fit your mud, most likely you just need to add a tilde ( ~ ) to your pattern as I did so that zMUD ignores any special characters in the pattern line. Also please note that there are several variables used in this script that are not included in this post, zMUD will CREATE them the first time they are called, so they aren't needed here.
Remember, paste this to your command line... OR to a text file which you then import.
Enjoy!
[edit]
Please note there is foul language in this script, if you dislike foul language do not read it please. I forgot about the language in the group triggers when I posted this!
[/edit]
[edit 2]
Realized I was missing stuff in this one (some aliases for the clan checker) and I also made an improvement to the clan checker that removes a person who is no longer IN your clan if you manually turn on the class and who -n them (who -n Player, -n is a CLA to take an argument of the player's name).
Also in this edit I cleaned up the language so the forum mod's don't rip me a new one :D
Lastly I fixed a few bugs someone pointed out to me in the blindness triggers, for instance the incorrect spell was being cast and in some places the incorrect variable was being referenced.
[/edit]
Healer Bot 2.2 (Was 2.1)
Code: |
#CLASS {healer}
#TRIGGER {(%w) reports: (%d)/(%d)H, (%d)/(%d)M, (%d)/(%d)V} {#IF (%ismember( %1, @groupbanlist)) {gt Damn you %1, fuck off asshole. You know very well I don't work for people on the ban list!;#ABORT 1};gt Sorry, mana report trigger is currently out of order due to my pathetic lack of a Manastone!;#ABORT 1;#math mananeed (%5-%4)/200;#math mananeed2 {@mananeed * 70 / 100};gt ~&GRefilling Mana To: ~&W%1~&n;gt ~&GEngaging: ~&W@mananeed ~&GCasts.~&n;gt ~&GRecharge Estimate: ~&W@mananeed2 ~&GCasts.~&n;#if (%3 / %2)>1 {gt ~&GCritical Status: ~&WHealing~&n;c 'comp' %1};rem @orb;wea manastone;#loop @mananeed {ca 'mana' %1};c 'comp';#loop @mananeed2 {ca 'mana'};#t+ compself;rem manastone;wea @orb;c 'comp';gt ~&GStatus: ~&WReported Status Complete~&n}
#TRIGGER {(%w) tells the group, '(%d)rwibi'} {#IF (%ismember( %1, @groupbanlist)) {gt Damn you %1, fuck off asshole. You know very well I don't work for people on the ban list!;#ABORT 1};#if (%2)<21 {gt %2 mana's for %1;#loop %2 {ca 'mana' %1};#loop {%2*2/3} {ca 'mana'};#t+ compself;ca 'comp'} {gt Sorry %1, you've asked for too many wibi! Please keep it 20 or less.}}
#TRIGGER {(%w) tells the group, 'rots'} {#IF (%ismember( %1, @groupbanlist)) {gt Damn you %1, fuck off asshole. You know very well I don't work for people on the ban list!;#ABORT 1};#VA hots1 %1;#T+ hot;gt ~&GHealing Upgrade To: ~&W%1~&n;c 'h o t' %1}
#TRIGGER {(%w) tells the group, 'romp'} {#IF (%ismember( %1, @groupbanlist)) {gt Damn you %1, fuck off asshole. You know very well I don't work for people on the ban list!;#ABORT 1};#VA comp1 %1;#t+ comp;gt ~&GHealing Upgrade To: ~&W%1~&n;c 'comp' %1}
#TRIGGER {(%w) tells the group, 'blind'} {#IF (%ismember( %1, @groupbanlist)) {gt Damn you %1, fuck off asshole. You know very well I don't work for people on the ban list!;#ABORT 1};#VA cureblind1 %1;#t+ cureblind;gt ~&GHealing Upgrade To: ~&W%1~&n;c 'cure blind' %1}
#TRIGGER {(%w) tells the group, 'rrp'} {#IF (%ismember( %1, @groupbanlist)) {gt Damn you %1, fuck off asshole. You know very well I don't work for people on the ban list!;#ABORT 1};#VA rempoi1 %1;#t+ rempoi;gt ~&GHealing Upgrade To: ~&W%1~&n;c 'rem poi' %1}
#TRIGGER {(%w) tells the group, 'rcd'} {#IF (%ismember( %1, @groupbanlist)) {gt Damn you %1, fuck off asshole. You know very well I don't work for people on the ban list!;#ABORT 1};#VA curedis1 %1;#t+ curedis;gt ~&GHealing Upgrade To: ~&W%1~&n;c 'cure dis' %1}
#TRIGGER {(%w) tells the group, 'trigs'} {#IF (%ismember( %1, @groupbanlist)) {gt Damn you %1, fuck off asshole. You know very well I don't work for people on the ban list!;#ABORT 1};gt Hiya, %1.;gt My triggers are:;gt 'gt Xwibi' gets you X manas, is any number less ~<= 20.;gt 'gt romp' gets you complete healing.;gt 'gt rots' gets you heal over time.;gt 'gt blind' gets you cure blind.;gt 'gt rcd' gets you cure disease.;gt 'gt rrp gets you remove poison.}
#CLASS 0
#CLASS {healer|hot} {disable}
#TRIGGER {A flush of colour appears on (%w)'s face.} {#IF (@hots1 == %1) {gt ~&GStatus Character ~&W%1~&G: ~&WUpgraded~&n};#T- hot}
#TRIGGER {You lost your concentration trying to cast heal over time!} {c 'h o t' @hots1}
#TRIGGER {Cannot find the target of your spell!} {gt ~&GStatus Character ~&W@hots1~&G: ~&WNot Found~&n}
#CLASS 0
#CLASS {healer|comp} {disable}
#TRIGGER {You have completely healed (%w).} {#IF (@comp1 == %1) {gt ~&GStatus Character ~&W%1~&G: ~&MCompletely Healed~&n};#T- comp}
#TRIGGER {You lost your concentration trying to cast complete healing!} {c 'comp' @comp1}
#TRIGGER {Cannot find the target of your spell!} {say ~&GStatus Character ~&W@comp1~&G: ~&MNot Found~&n;#t- comp}
#CLASS 0
#CLASS {healer|mana} {disable}
#TRIGGER {(%w) feels energized and your health is diminished.} {#IF (@rana1 == %1) {#ADD rana.count 1;#IF (@rana.count = @rana.need) {c 'comp';say ~&GStatus Character ~&W@rana1~&G: ~&MMana Casted Upon @rana.need times~&n;rana.need = 0;rana.count = 0;#T- clanmana}}}
#TRIGGER {Cannot find the target of your spell!} {say ~&GStatus Character ~&W@rana1~&G: ~&MNot Found~&n;rana.need = 0;rana.count = 0;#t+ compself;c 'comp';#t- mana;#ABORT 1}
#TRIGGER {You lost your concentration trying to cast mana!} {c 'mana' @rana1}
#CLASS 0
#CLASS {healer|rempoi} {disable}
#TRIGGER {(%w) looks better.} {#IF (@rempoi1 == %1) {gt ~&GStatus Character ~&W%1~&G: ~&MPoison Removed~&n};#T- rempoi}
#TRIGGER {You lost your concentration trying to cast remove poison!} {c 'rem poi' @rempoi1}
#TRIGGER {Cannot find the target of your spell!} {gt ~&GStatus Character ~&W@rempoi1~&G: ~&MNot Found~&n;#t- rempoi}
#TRIGGER {That didn't seem to do anything.} {gt ~&Y@rempoi1, please do not waste my time! You were not diseased. Adding you to the warning list, or if you're already on warning list moving to ban list!;#IF (%ismember( @rempoi1, @groupwarnlist)) {#ADDITEM groupbanlist @rempoi1;#DELITEM groupwarnlist @rempoi1} {#ADDITEM groupwarnlist @rempoi1};#t- rempoi}
#CLASS 0
#CLASS {healer|curedis} {disable}
#TRIGGER {(%w) looks much better.} {#IF (@curedis1 == %1) {gt ~&GStatus Character ~&W%1~&G: ~&MDisease Removed~&n};#T- curedis}
#TRIGGER {You lost your concentration trying to cast cure disease!} {c 'cure dis' @curedis1}
#TRIGGER {Cannot find the target of your spell!} {gt ~&GStatus Character ~&W@curedis1~&G: ~&MNot Found~&n;#t- curedis}
#TRIGGER {That didn't seem to do anything.} {gt ~&Y@curedis1, please do not waste my time! You were not diseased. Adding you to the warning list, or if you're already on warning list moving to ban list!;#IF (%ismember( @curedis1, @groupwarnlist)) {#ADDITEM groupbanlist @curedis1;#DELITEM groupwarnlist @rempoi1} {#ADDITEM groupwarnlist @curedis1};#t- curedis}
#CLASS 0
#CLASS {healer|cureblind} {disable}
#TRIGGER {There's a momentary gleam in (%w)'s eyes.} {#IF (@cureblind1 == %1) {gt ~&GStatus Character ~&W%1~&G: ~&MBlindness Removed~&n};#T- cureblind}
#TRIGGER {You lost your concentration trying to cast cure blindness!} {c 'cure blind' @cureblind1}
#TRIGGER {Cannot find the target of your spell!} {gt ~&GStatus Character ~&W@cureblind1~&G: ~&MNot Found~&n;#t- ccureblind}
#TRIGGER {That didn't seem to do anything.} {gt ~&Y@cureblind1, please do not waste my time! You were not diseased. Adding you to the warning list, or if you're already on warning list moving to ban list!;#IF (%ismember( @cureblind1, @groupwarnlist)) {#ADDITEM groupbanlist @cureblind1;#DELITEM groupwarnlist @rempoi1} {#ADDITEM groupwarnlist @cureblind1};#t- cureblind}
#CLASS 0
#CLASS {healer|compself} {disable}
#TRIGGER {You are completely healed.} {#T- compself}
#TRIGGER {You lost your concentration trying to cast complete healing!} {c 'comp'}
#CLASS 0
#CLASS {clancheck} {disable}
#TRIGGER {] (%w) (*)~[(%w)~]} {#IF (%1 = @askedcheck & %3 = @clan) {say ~&COk @askedcheck, adding you to clan list :)~&n;addclan @askedcheck} {say ~&wSorry %1, I checked and you are not a member of @clan! ~&GYou are in clan: ~&M%3~&n;#IF (%ismember( %1, @clanmembers)) {say ~&MSince you ~&YWERE ~&Mon clan list, removing you now!~&n;delclan %1}};#t- clancheck}
#TRIGGER {No-one at all!} {'~&WErm, sorry, ~&G@askedcheck, ~&MIsn't around...~&n;#T- clancheck}
#CLASS 0
#CLASS {clanhealer}
#TRIGGER {(%w) says, '(%d)rwibi'} {#IF (%ismember( %1, @clanbanlist)) {say %1, go away. You know very well I don't work for people on the ban list!;#ABORT 1};#IF (%ismember( %1, @clanmembers)) {#if (%2)<21 {say %2 mana's for %1;#loop %2 {ca 'mana' %1};#loop {%2*2/3} {ca 'mana'};#T+ clancompself;c 'comp'} {say Sorry %1, you've asked for too many wibi! Please keep it 20 or less.}} {say Sorry %1, you're not on the list! If you are a member of my clan, simply say checkclan and I will autoadd you to the list.}}
#TRIGGER {(%w) says, 'rots'} {#IF (%ismember( %1, @clanbanlist)) {say %1, go away. You know very well I don't work for people on the ban list!;#ABORT 1};#IF (%ismember( %1, @clanmembers)) {#VA hots1 %1;#T+ hotclan;say ~&GHealing Upgrade To: ~&W%1~&n;c 'h o t' %1} {say ~&WSorry %1, you're not on the list! If you are a member of my clan, simply say checkclan and I will autoadd you to the list.~&n}}
#TRIGGER {(%w) says, '(%d)rana'} {say ~&WAborting due to low status! ~&MThis is a permanent condition because Rhia is now storage!~&n;#ABORT 1;#IF (%ismember( %1, @clanbanlist)) {say %1, go away. You know very well I don't work for people on the ban list!;#ABORT 1};#IF (%ismember( %1, @clanmembers)) {#IF (%ismember( %2, 5|10|15)) {rana1 = %1;rana.need = %2;rana.count = 0;say ~&GHealing Upgrade To: ~&W%1~&n;#t+ clanmana;#loop %2 {c 'mana' %1}} {say ~&GSorry, %1, but %2 is not an allowed number of Manas. Please use 5, 10, or 15!~&n}} {say ~&WSorry %1, you're not on the list! If you are a member of my clan, simply say checkclan and I will autoadd you to the list.~&n}}
#TRIGGER {(%w) says, 'romp'} {#IF (%ismember( %1, @clanbanlist)) {say %1, go away. You know very well I don't work for people on the ban list!;#ABORT 1};#IF (%ismember( %1, @clanmembers)) {#VA comp1 %1;#t+ clancomp;say ~&GHealing Upgrade To: ~&W%1~&n;c 'comp' %1} {say ~&WSorry %1, you're not on the list! If you are a member of my clan, simply say checkclan and I will autoadd you to the list.~&n}}
#TRIGGER {(%w) says, 'blind'} {#IF (%ismember( %1, @clanbanlist)) {say %1, go away. You know very well I don't work for people on the ban list!;#ABORT 1};#IF (%ismember( %1, @clanmembers)) {#VA cureblind1 %1;#t+ clancureblind;gt ~&GHealing Upgrade To: ~&W%1~&n;c 'cure blindness' %1} {say ~&WSorry %1, you're not on the list! If you are a member of my clan, simply say checkclan and I will autoadd you to the list.~&n}}
#TRIGGER {(%w) says, 'rana'} {#IF (%ismember( %1, @clanbanlist)) {say %1, go away. You know very well I don't work for people on the ban list!;#ABORT 1};say ~&MPlease check 'say trigs' for the new mana trigger format! Thanks!~&n}
#TRIGGER {(%w) says, 'rrp'} {#IF (%ismember( %1, @clanbanlist)) {say %1, go away. You know very well I don't work for people on the ban list!;#ABORT 1};#IF (%ismember( %1, @clanmembers)) {#VA rempoi1 %1;#t+ clanrempoi;say ~&GHealing Upgrade To: ~&W%1~&n;c 'rem poi' %1} {say ~&WSorry %1, you're not on the list! If you are a member of my clan, simply say checkclan and I will autoadd you to the list.~&n}}
#TRIGGER {(%w) says, 'rcd'} {#IF (%ismember( %1, @clanbanlist)) {say %1, go away. You know very well I don't work for people on the ban list!;#ABORT 1};#IF (%ismember( %1, @clanmembers)) {#VA curedis1 %1;#t+ clancuredis;say ~&GHealing Upgrade To: ~&W%1~&n;c 'cure dis' %1} {say ~&WSorry %1, you're not on the list! If you are a member of my clan, simply say checkclan and I will autoadd you to the list.~&n}}
#TRIGGER {(%w) says, 'checkclan'} {#IF (%ismember( %1, @clanbanlist)) {say %1, go away. You know very well I don't work for people on the ban list!;#ABORT 1};#t+ clancheck;askedcheck = %1;who -n %1}
#TRIGGER {(%w) says, 'trigs'} {#IF (%ismember( %1, @clanbanlist)) {say %1, go away. You know very well I don't work for people on the ban list!;#ABORT 1};say Hiya, %1.;say My triggers are:;say 'say Xrana' gets you X manas, where X ~= 5, 10, or 15.;say 'say romp' gets you complete healing.;say 'say blind' gets you cure blind.;say 'say rrp' gets you remove poison.;say 'say rcd' gets you cure disease.;say 'say rots' gets you a heal over time.}
#TRIGGER {(%d)hp (%d)m (%d)mv>} {manacheck = %2;hitcheck = %1} "" {nocr|prompt}
#CLASS 0
#CLASS {clanhealer|hotclan} {disable}
#TRIGGER {A flush of colour appears on (%w)'s face.} {#IF (@hots1 == %1) {say ~&GStatus Character ~&W%1~&G: ~&WUpgraded~&n};#T- hotclan}
#TRIGGER {You lost your concentration trying to cast heal over time!} {c 'h o t' @hots1}
#TRIGGER {Cannot find the target of your spell!} {say ~&GStatus Character ~&W@hots1~&G: ~&WNot Found~&n;#t- hotclan}
#CLASS 0
#CLASS {clanhealer|clancomp} {disable}
#TRIGGER {You have completely healed (%w).} {#IF (@comp1 == %1) {say ~&GStatus Character ~&W%1~&G: ~&MCompletely Healed~&n};#T- clancomp}
#TRIGGER {You lost your concentration trying to cast complete healing!} {c 'comp' @comp1}
#TRIGGER {Cannot find the target of your spell!} {say ~&GStatus Character ~&W@comp1~&G: ~&MNot Found~&n;#t- clancomp}
#CLASS 0
#CLASS {clanhealer|clanmana} {disable}
#TRIGGER {(%w) feels energized and your health is diminished.} {#IF (@rana1 == %1) {#ADD rana.count 1;#IF (@rana.count = @rana.need) {#T+ clancompself;c 'comp';say ~&GStatus Character ~&W@rana1~&G: ~&MMana Casted Upon @rana.need times~&n;rana.need = 0;rana.count = 0;#T- clanmana}}}
#TRIGGER {Cannot find the target of your spell!} {say ~&GStatus Character ~&W@rana1~&G: ~&MNot Found~&n;rana.need = 0;rana.count = 0;#T+ clancompself;c 'comp';#t- clanmana;#ABORT 1}
#TRIGGER {You lost your concentration trying to cast mana!} {c 'mana' @rana1}
#CLASS 0
#CLASS {clanhealer|clanrempoi} {disable}
#TRIGGER {(%w) looks better.} {#IF (@rempoi1 == %1) {say ~&GStatus Character ~&W%1~&G: ~&MPoison Removed~&n};#T- clanrempoi}
#TRIGGER {You lost your concentration trying to cast remove poison!} {c 'rem poi' @rempoi1}
#TRIGGER {Cannot find the target of your spell!} {say ~&GStatus Character ~&W@comp1~&G: ~&MNot Found~&n;#t- clanrempoi}
#TRIGGER {That didn't seem to do anything.} {say ~&Y@rempoi1, please do not waste my time! You were not poisoned. Adding you to the warning list, or if you're already on warning list moving to ban list!;#IF (%ismember( @rempoi1, @clanwarnlist)) {#ADDITEM clanbanlist @rempoi1;#DELITEM clanwarnlist @rempoi1} {#ADDITEM clanwarnlist @rempoi1};#t- clanrempoi}
#CLASS 0
#CLASS {clanhealer|clancuredis} {disable}
#TRIGGER {(%w) looks much better.} {#IF (@curedis1 == %1) {say ~&GStatus Character ~&W%1~&G: ~&MDisease Removed~&n};#T- clancuredis}
#TRIGGER {You lost your concentration trying to cast cure disease!} {c 'cure dis' @curedis1}
#TRIGGER {Cannot find the target of your spell!} {say ~&GStatus Character ~&W@curedis1~&G: ~&MNot Found~&n;#t- clancuredis}
#TRIGGER {That didn't seem to do anything.} {say ~&Y@curedis1, please do not waste my time! You were not diseased. Adding you to the warning list, or if you're already on warning list moving to ban list!;#IF (%ismember( @curedis1, @clanwarnlist)) {#ADDITEM clanbanlist @curedis1;#DELITEM clanwarnlist @curedis1} {#ADDITEM clanwarnlist @curedis1};#t- clancuredis}
#CLASS 0
#CLASS {clanhealer|clancureblind} {disable}
#TRIGGER {There's a momentary gleam in (%w)'s eyes.} {#IF (@cureblind1 == %1) {say ~&GStatus Character ~&W%1~&G: ~&MBlindness Removed~&n};#T- clancureblind}
#TRIGGER {You lost your concentration trying to cast cure blindness!} {c 'cure blind' @cureblind1}
#TRIGGER {Cannot find the target of your spell!} {say ~&GStatus Character ~&W@cureblind1~&G: ~&MNot Found~&n;#t- clanccureblind}
#TRIGGER {That didn't seem to do anything.} {say ~&Y@cureblind1, please do not waste my time! You were not blinded. Adding you to the warning list, or if you're already on warning list moving to ban list!;#IF (%ismember( @cureblind1, @clanwarnlist)) {#ADDITEM clanbanlist @cureblind1;#DELITEM clanwarnlist @cureblind1} {#ADDITEM clanwarnlist @cureblind1};#t- clancureblind}
#CLASS 0
#CLASS {clanhealer|clancompself} {disable}
#TRIGGER {You are completely healed.} {#T- clancompself}
#TRIGGER {You lost your concentration trying to cast complete healing!} {c 'comp'}
#CLASS 0
#ALIAS setclan {@clan = %1}
#ALIAS addclan {#ADDITEM clanmembers %1}
#ALIAS delclan {#DELITEM clanmembers %1}
#ALIAS healsoff {healoff;chealoff}
#ALIAS chealon {#t+ clanhealer;ct ~&MTurning Clan Triggers on!~&n;title say trigs for a list of my triggers! {Clan Triggers On}}
#ALIAS chealoff {#t- clanhealer;ct ~&MTurning Clan Triggers off!~&n;title {Clan Triggers Off}}
#ALIAS healon {#t+ healer;gt Turning Group based Heal Triggers On!}
#ALIAS healoff {#t- healer;gt Turning Group based Heal Triggers Off!}
#ALIAS addban {#additem clanbanlist %1;#additem groupbanlist %1}
#ALIAS delban {#delitem clanbanlist %1;#delitem groupbanlist %1}
|
|
|
Last edited by ralgith on Tue Jan 31, 2006 6:05 pm; edited 4 times in total |
|
|
|
perenico Beginner
Joined: 07 Jun 2005 Posts: 23 Location: France
|
Posted: Tue Jan 31, 2006 9:03 am |
even if I'm not playing your mud, having the list of commands would be nice
how does it work, what do people have to say, tell or whatever to get the heal and so on
thanks |
|
_________________ -=-=-=-=-=-=-=-=-=-=-=-=
astaria3.com : 5000
character name : Vandemar
-=-=-=-=-=-=-=-=-=-=-=-=
Zmud : 7.21
-=-=-=-=-=-=-=-=-=-=-=-= |
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Tue Jan 31, 2006 9:14 am |
perenico wrote: |
even if I'm not playing your mud, having the list of commands would be nice
how does it work, what do people have to say, tell or whatever to get the heal and so on
thanks |
Pere, read through the code. All the commands are included there in a trigger (say trigs for the clanhealer and gsay/gtell trigs for the healer, which is group based only, but abusable using emotes on most muds)
Howver, for a brief synopsis of the commands:
'say Xrana' gets you X manas, where X ~= 5, 10, or 15.
'say romp' gets you complete healing.
'say blind' gets you cure blind.
'say rrp' gets you remove poison.
'say rcd' gets you cure disease.
'say rots' gets you a heal over time.
replacing gt (or whatever your mud uses for a group tell or group say) for say on the group triggers. Also using report gets you a trigger for grouped triggers and there are a few "undocumented" triggers as well that I didn't wish known by the general mud population.
Thanks for the question and the feedback! |
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Tue Jan 31, 2006 6:01 pm Command Synopsis for those not included in reply to Pere |
I updated script to v2.2, thanks to some bug reports. Here is a Synopsis of the current commands (some were added to 2.2 as requests along with the bug reports!)
healsoff - turns both clanhealer and healer classes off.
chealon - turns clanhealer class on and announced it on the clan channel.
chealoff - opposite of chealon.
healon - turns healer class on and announces it on gtell.
healoff - opposite of healon :).
addban - Manually add a player to both clan and group ban lists.
delban - Remove a player from both ban lists.
setclan - lazy mans way of setting the clan variable to whatever your clan is.
addclan - alias to add clan members manually.
delclan - alias to delete clan members, use this if someone leaves your clan. |
|
|
|
|
|
|
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
|
|