Difference between revisions of "User talk:Shalineth"
(One intermediate revision by the same user not shown) | |||
Line 8: | Line 8: | ||
I've updated all my scripts in CMUD v3.32. And I posted a note about the @currmana on the spellbot page. Should be good to go! Please let me know if there are any other issues to fix. I hope my scripts get more people to purchase CMud. I think it's important to support small-time programmers, and there are very few left writing programs for MUDs. | I've updated all my scripts in CMUD v3.32. And I posted a note about the @currmana on the spellbot page. Should be good to go! Please let me know if there are any other issues to fix. I hope my scripts get more people to purchase CMud. I think it's important to support small-time programmers, and there are very few left writing programs for MUDs. | ||
+ | |||
+ | == CMud Autorescue == | ||
+ | |||
+ | I got a few suggestions for the CMud autorescue. It didn't work when I started using it so I modified a few things. One thing is that the triggers don't match the pattern of attacks if you use battleself or battleother. Another is that you stack rescue commands if multiple people on your rescue list get attacked in the same round. Here's the modified code: | ||
+ | <?xml version="1.0" encoding="ISO-8859-1" ?> | ||
+ | <cmud> | ||
+ | <class name="Rescue"> | ||
+ | <var name="rescuelist" type="StringList"> | ||
+ | <value>lollipot|atreyu|renculos|mactabion|seperia|styrr|murugan|druidess|daripper</value> | ||
+ | <json>["lollipot","atreyu","renculos","mactabion","seperia","styrr","murugan","druidess","daripper"]</json> | ||
+ | </var> | ||
+ | <alias name="addresc"> | ||
+ | <value>#ec adding %1 to autorescue; | ||
+ | #var rescuelist %additem(%lower(%1),@rescuelist) | ||
+ | #ec | ||
+ | #ec --- CHARACTERS IN THE RESCUE LIST --- | ||
+ | #ec | ||
+ | #fo @rescuelist {#ec %i}</value> | ||
+ | </alias> | ||
+ | <alias name="clearresc"> | ||
+ | <value>#var rescuelist "" | ||
+ | #var rescwho "" | ||
+ | #echo ---- RESCUE LIST CLEARED ----</value> | ||
+ | </alias> | ||
+ | <alias name="removeresc"> | ||
+ | <value>#ec Removing %1 from rescue list | ||
+ | #var rescuelist %delitem(%lower(%1),@rescuelist) | ||
+ | #ec | ||
+ | #ec --- CHARACTERS IN THE RESCUE LIST --- | ||
+ | #ec | ||
+ | #fo @Rescuelist {#ec %i}</value> | ||
+ | </alias> | ||
+ | <alias name="showresc"> | ||
+ | <value>#ec | ||
+ | #ec --- CHARACTERS IN THE RESCUE LIST --- | ||
+ | #ec | ||
+ | #fo @rescuelist {#ec %i}</value> | ||
+ | </alias> | ||
+ | <alias name="reportresc"> | ||
+ | <value>gt my rescue list is: @rescuelist</value> | ||
+ | </alias> | ||
+ | <menu priority="5530"> | ||
+ | <caption>addrescue</caption> | ||
+ | <value>addresc %selword</value> | ||
+ | </menu> | ||
+ | <menu priority="5540"> | ||
+ | <caption>remove from rescue</caption> | ||
+ | <value>removeresc %selword</value> | ||
+ | </menu> | ||
+ | <menu priority="5550"> | ||
+ | <caption>show rescue</caption> | ||
+ | <value>showresc</value> | ||
+ | </menu> | ||
+ | <menu priority="5560"> | ||
+ | <caption>clear rescue</caption> | ||
+ | <value>clearresc</value> | ||
+ | </menu> | ||
+ | <class name="Resc" initenable="true"> | ||
+ | <trigger priority="5470"> | ||
+ | <pattern>* attack{s|} strike{s|} (%w)[1234567890 times,]with *</pattern> | ||
+ | <value>#if %ismember(%1,@rescuelist) {rescue %1;#var rescwho %1;#class Resc 0} {}</value> | ||
+ | </trigger> | ||
+ | <trigger priority="5570"> | ||
+ | <pattern>* attack{s|} haven't hurt (%w)</pattern> | ||
+ | <value>#if %ismember(%1,@rescuelist) {rescue %1;#var rescwho %1;#class Resc 0} {}</value> | ||
+ | </trigger> | ||
+ | </class> | ||
+ | <var name="rescwho">Seperia</var> | ||
+ | <trigger priority="6040"> | ||
+ | <pattern>^@rescwho doesn't NEED rescuing!$</pattern> | ||
+ | <value>#class Resc 1</value> | ||
+ | </trigger> | ||
+ | <trigger priority="6050"> | ||
+ | <pattern>^You successfully rescue @rescwho from (%*)</pattern> | ||
+ | <value>#class Resc 1</value> | ||
+ | </trigger> | ||
+ | <trigger priority="6060"> | ||
+ | <pattern>^You fail to rescue @rescwho from (%*)</pattern> | ||
+ | <value>#class Resc 1</value> | ||
+ | </trigger> | ||
+ | </class> | ||
+ | </cmud> | ||
+ | Oh, I abbreviated the aliases a bit because I constantly mess up the order in which I type the letters in rescue, particularly the u and e. Modifications to the actual code are simple: | ||
+ | * Rescue triggers placed in a subclass. When someone needs to be rescued it will rescue, and disable the subclass until an attempt to rescue has been processed by the mud, the triggers for this are not in the disabled subclass. | ||
+ | * Trigger for when a person gets hit is expanded to include '%d time[s],' but I figured the easiest way to include this was with a range. | ||
+ | * The rescue triggers included (%*) in them at the start, this makes the mob name the variable %1. Replaced it with just an asterisk so the %1 reference would work. | ||
+ | Let me know what you think. --[[User:MooNFisH|Llanor]] 21:02, 3 February 2011 (UTC) |
Latest revision as of 11:35, 5 February 2011
Shalineth - not a big deal. I did catch that. That's the point of a wiki - share the knowledge. Thanks for the compliment. I do what i can. --Ylem 21:43, 17 November 2008 (UTC)
Your posted XML for the damage counter script no longer works in CMUDv3. If you want I can give you the correct XML for v3. To post along with what you have. I've never posted on a wiki before so I don't want to mess anything up trying to edit it. Let me know if you are still around I'm Cesroc in game. --MtnMan03 11/14/2010 http://pastebin.com/qwGmpiJZ
spellbot trig doesn't seem to check mana first. is it possibly missing a variable? like @currmana? because there is no way to add your current mana to that variable which isn't even created when i load the xml file.. which won't load because of #if @currmana<100.. when the xml loader see's the 1.. it says it is not valid. line 31, col 131 er something like that.
I've updated all my scripts in CMUD v3.32. And I posted a note about the @currmana on the spellbot page. Should be good to go! Please let me know if there are any other issues to fix. I hope my scripts get more people to purchase CMud. I think it's important to support small-time programmers, and there are very few left writing programs for MUDs.
CMud Autorescue
I got a few suggestions for the CMud autorescue. It didn't work when I started using it so I modified a few things. One thing is that the triggers don't match the pattern of attacks if you use battleself or battleother. Another is that you stack rescue commands if multiple people on your rescue list get attacked in the same round. Here's the modified code:
<?xml version="1.0" encoding="ISO-8859-1" ?> <cmud> <class name="Rescue"> <value>lollipot|atreyu|renculos|mactabion|seperia|styrr|murugan|druidess|daripper</value> <json>["lollipot","atreyu","renculos","mactabion","seperia","styrr","murugan","druidess","daripper"]</json> <alias name="addresc"> <value>#ec adding %1 to autorescue; #var rescuelist %additem(%lower(%1),@rescuelist) #ec #ec --- CHARACTERS IN THE RESCUE LIST --- #ec #fo @rescuelist {#ec %i}</value> </alias> <alias name="clearresc"> <value>#var rescuelist "" #var rescwho "" #echo ---- RESCUE LIST CLEARED ----</value> </alias> <alias name="removeresc"> <value>#ec Removing %1 from rescue list #var rescuelist %delitem(%lower(%1),@rescuelist) #ec #ec --- CHARACTERS IN THE RESCUE LIST --- #ec #fo @Rescuelist {#ec %i}</value> </alias> <alias name="showresc"> <value>#ec #ec --- CHARACTERS IN THE RESCUE LIST --- #ec #fo @rescuelist {#ec %i}</value> </alias> <alias name="reportresc"> <value>gt my rescue list is: @rescuelist</value> </alias> <menu priority="5530"> addrescue <value>addresc %selword</value> </menu> <menu priority="5540"> remove from rescue <value>removeresc %selword</value> </menu> <menu priority="5550"> show rescue <value>showresc</value> </menu> <menu priority="5560"> clear rescue <value>clearresc</value> </menu> <class name="Resc" initenable="true"> <trigger priority="5470"> <pattern>* attack{s|} strike{s|} (%w)[1234567890 times,]with *</pattern> <value>#if %ismember(%1,@rescuelist) {rescue %1;#var rescwho %1;#class Resc 0} {}</value> </trigger> <trigger priority="5570"> <pattern>* attack{s|} haven't hurt (%w)</pattern> <value>#if %ismember(%1,@rescuelist) {rescue %1;#var rescwho %1;#class Resc 0} {}</value> </trigger> </class> Seperia <trigger priority="6040"> <pattern>^@rescwho doesn't NEED rescuing!$</pattern> <value>#class Resc 1</value> </trigger> <trigger priority="6050"> <pattern>^You successfully rescue @rescwho from (%*)</pattern> <value>#class Resc 1</value> </trigger> <trigger priority="6060"> <pattern>^You fail to rescue @rescwho from (%*)</pattern> <value>#class Resc 1</value> </trigger> </class> </cmud>
Oh, I abbreviated the aliases a bit because I constantly mess up the order in which I type the letters in rescue, particularly the u and e. Modifications to the actual code are simple:
- Rescue triggers placed in a subclass. When someone needs to be rescued it will rescue, and disable the subclass until an attempt to rescue has been processed by the mud, the triggers for this are not in the disabled subclass.
- Trigger for when a person gets hit is expanded to include '%d time[s],' but I figured the easiest way to include this was with a range.
- The rescue triggers included (%*) in them at the start, this makes the mob name the variable %1. Replaced it with just an asterisk so the %1 reference would work.
Let me know what you think. --Llanor 21:02, 3 February 2011 (UTC)