Soll2006-09-03 18:50:49
--- Updated as of 13:32, 5th April, 2007 to work with the updates ---
Simple forging script.
FORGE
FORGETAR # (IE, FORGETAR CUTTING > 80 for reforges if the result is below 80 cutting resistance, or FORGETAR PRECISION = 235 SPEED > 150 if you're aiming for max precision and a speed over 150. Can take any of damage/precision/speed, two of them, or all three, and cutting/blunt.)
FORGEOFF when you're finished to reset your variables and turn off the forger.
CODE
#CLASS {Forging}
#CLASS 0
#ALIAS forgetar {#if (%1=%null) {#var forgetargetdamage 0;#var forgetargetmodifierdamage 0;#var forgetargetprecision 0;#var forgetargetmodifierprecision 0;#var forgetargetspeed 0;#var forgetargetmodifierspeed 0} {#if (%4=%null) {#var forgetarget%1 %3;#var forgetargetmodifier%1 %2;#var forgespecifics {%1};#echo %null;#echo %ansi( 7)You have set your forging target to be %ansi( 10)%proper( %1: %2%3)} {#if (%7=%null) {#var forgetarget%1 %3;#var forgetargetmodifier%1 %2;#var forgetarget%4 %6;#var forgetargetmodifier%4 %5;#var forgespecifics {%1|%4};#echo %null;#echo %ansi( 7)You have set your forging target to be %ansi( 10)%proper( %1: %2%3) ~ %proper( %4: %5%6)} {#var forgetarget%1 %3;#var forgetargetmodifier%1 %2;#var forgetarget%4 %6;#var forgetargetmodifier%4 %5;#var forgetarget%7 %9;#var forgetargetmodifier%7 %8;#var forgespecifics {%1|%4|%7};#echo %null;#echo %ansi( 7)You have set your forging target to be %ansi( 10)%proper( %1: %2%3) ~ %proper( %4: %5%6) ~ %proper( %7: %8%9)}}}} "Forging"
#ALIAS forgeoff {#var forgespecifics "";#var forgedamage "";#var forgeprecision "";#var forgespeed "";#var forgecutting "";#var forgeblunt "";#var forgetotalstats "";#var forgenumber "";#var forgedesign "";#var forging 0;#var forgemetals 5;#t- {Forging}} "Forging"
#ALIAS forgeon {#t+ {Forging};#echo %cr~You have turned your forging script on.}
#ALIAS forge {#if (%1!=%null and %2!=%null) {#t+ {Forging};#var forgedesign %1;#send {Forge for @forgedesign};#var forgemetals %2;#var forging 1;#echo %null;#echo Remember to set your targets with FORGETAR.;#echo ~-~> E.g. FORGETAR PRECISION ~> 230 DAMAGE ~> 50, or FORGETAR CUTTING ~> 80.} {#echo %null;#echo The syntax is FORGE ~ ~;#echo Remember to set your targets with FORGETAR.;#echo ~-~> E.g. FORGETAR PRECISION ~> 230 DAMAGE ~> 50, or FORGETAR CUTTING ~> 80.}} "Forging"
#VAR forgedesign {1717} {_nodef} "Forging"
#VAR forgemetals {2} {_nodef} "Forging"
#VAR forgespecifics {damage|precision|speed} {_nodef} "Forging"
#VAR forgedamage {64} {_nodef} "Forging"
#VAR forgeprecision {151} {_nodef} "Forging"
#VAR forgespeed {171} {_nodef} "Forging"
#VAR forgecutting {} {_nodef} "Forging"
#VAR forgeblunt {} {_nodef} "Forging"
#VAR forgetotalstats {386} {_nodef} "Forging"
#VAR forgenumber {15964} {_nodef} "Forging"
#VAR forging {0} {_nodef} "Forging"
#TRIGGER {^You lay the commodities out before you on the forge} {} "Forging"
#COND {workmanship.$} {#var forging 1} {within|param=2}
#TRIGGER {^You have recovered balance on all limbs.$} {#if (@forging) {#if (@forgefinished) {#send {Get @forgenumber from Forge};#send {Wp @forgenumber};#var forgefinished 0;#var forgedone 1;#var forging 0} {#send {Forge}}}} "Forging"
#TRIGGER {^Your eye for detail tells you that} {} "Forging"
#COND {it.$} {#var forgefinished 1} {within|param=2}
#TRIGGER {^The formerly shapeless mass of commodities} {#send {P Forge}} "Forging"
#TRIGGER {^{The Raven's Head forge|The dragons head forge|A sturdy iron forge} is holding~:$} {} "Forging"
#COND {~"(%w)(%d)~"(%s)(*)} {#var forgenumber %2} {within|param=1}
#TRIGGER {^Damage: (%d)Â Â Precision: (%d)Â Â Speed: (%d)$} {#var forgedamage %1;#var forgeprecision %2;#var forgespeed %3;#math forgetotalstats (@forgedamage+@forgeprecision+@forgespeed);#forall @forgespecifics {#if (@forgetargetmodifier%i=">") {#if (@forge%i<=@forgetarget%i) {#var forgemustreforge 1}} {#if (@forgetargetmodifier%i="<") {#if (@forge%i>=@forgetarget%i) {#var forgemustreforge 1}} {#if (@forgetargetmodifier%i="=") {#if (@forge%i!=@forgetarget%i) {#var forgemustreforge 1}}}}};#if (@forgemustreforge) {#var forgemustreforge 0;#send {Put @forgenumber in forge};#send {Smelt @forgenumber};#loop @forgemetals {#send {Get commodity from forge}};#send {Forge for @forgedesign}}} "Forging"
#TRIGGER {Physical cutting:(%s)(%d)} {#var forgecutting %2} "Forging"
#TRIGGER {Physical blunt:(%s)(%d)} {#var forgeblunt %2;#math forgetotalstats (@forgeblunt+@forgecutting);#forall @forgespecifics {#if (@forgetargetmodifier%i=">") {#if (@forge%i<=@forgetarget%i) {#var forgemustreforge 1}} {#if (@forgetargetmodifier%i="<") {#if (@forge%i>=@forgetarget%i) {#var forgemustreforge 1}} {#if (@forgetargetmodifier%i="=") {#if (@forge%i!=@forgetarget%i) {#var forgemustreforge 1}}}}};#if (@forgemustreforge) {#var forgemustreforge 0;#send {Put @forgenumber in forge};#send {Smelt @forgenumber};#loop @forgemetals {#send {Get commodity from forge}};#send {Forge for @forgedesign}}} "Forging"
#CLASS 0
#ALIAS forgetar {#if (%1=%null) {#var forgetargetdamage 0;#var forgetargetmodifierdamage 0;#var forgetargetprecision 0;#var forgetargetmodifierprecision 0;#var forgetargetspeed 0;#var forgetargetmodifierspeed 0} {#if (%4=%null) {#var forgetarget%1 %3;#var forgetargetmodifier%1 %2;#var forgespecifics {%1};#echo %null;#echo %ansi( 7)You have set your forging target to be %ansi( 10)%proper( %1: %2%3)} {#if (%7=%null) {#var forgetarget%1 %3;#var forgetargetmodifier%1 %2;#var forgetarget%4 %6;#var forgetargetmodifier%4 %5;#var forgespecifics {%1|%4};#echo %null;#echo %ansi( 7)You have set your forging target to be %ansi( 10)%proper( %1: %2%3) ~ %proper( %4: %5%6)} {#var forgetarget%1 %3;#var forgetargetmodifier%1 %2;#var forgetarget%4 %6;#var forgetargetmodifier%4 %5;#var forgetarget%7 %9;#var forgetargetmodifier%7 %8;#var forgespecifics {%1|%4|%7};#echo %null;#echo %ansi( 7)You have set your forging target to be %ansi( 10)%proper( %1: %2%3) ~ %proper( %4: %5%6) ~ %proper( %7: %8%9)}}}} "Forging"
#ALIAS forgeoff {#var forgespecifics "";#var forgedamage "";#var forgeprecision "";#var forgespeed "";#var forgecutting "";#var forgeblunt "";#var forgetotalstats "";#var forgenumber "";#var forgedesign "";#var forging 0;#var forgemetals 5;#t- {Forging}} "Forging"
#ALIAS forgeon {#t+ {Forging};#echo %cr~You have turned your forging script on.}
#ALIAS forge {#if (%1!=%null and %2!=%null) {#t+ {Forging};#var forgedesign %1;#send {Forge for @forgedesign};#var forgemetals %2;#var forging 1;#echo %null;#echo Remember to set your targets with FORGETAR.;#echo ~-~> E.g. FORGETAR PRECISION ~> 230 DAMAGE ~> 50, or FORGETAR CUTTING ~> 80.} {#echo %null;#echo The syntax is FORGE ~
#VAR forgedesign {1717} {_nodef} "Forging"
#VAR forgemetals {2} {_nodef} "Forging"
#VAR forgespecifics {damage|precision|speed} {_nodef} "Forging"
#VAR forgedamage {64} {_nodef} "Forging"
#VAR forgeprecision {151} {_nodef} "Forging"
#VAR forgespeed {171} {_nodef} "Forging"
#VAR forgecutting {} {_nodef} "Forging"
#VAR forgeblunt {} {_nodef} "Forging"
#VAR forgetotalstats {386} {_nodef} "Forging"
#VAR forgenumber {15964} {_nodef} "Forging"
#VAR forging {0} {_nodef} "Forging"
#TRIGGER {^You lay the commodities out before you on the forge} {} "Forging"
#COND {workmanship.$} {#var forging 1} {within|param=2}
#TRIGGER {^You have recovered balance on all limbs.$} {#if (@forging) {#if (@forgefinished) {#send {Get @forgenumber from Forge};#send {Wp @forgenumber};#var forgefinished 0;#var forgedone 1;#var forging 0} {#send {Forge}}}} "Forging"
#TRIGGER {^Your eye for detail tells you that} {} "Forging"
#COND {it.$} {#var forgefinished 1} {within|param=2}
#TRIGGER {^The formerly shapeless mass of commodities} {#send {P Forge}} "Forging"
#TRIGGER {^{The Raven's Head forge|The dragons head forge|A sturdy iron forge} is holding~:$} {} "Forging"
#COND {~"(%w)(%d)~"(%s)(*)} {#var forgenumber %2} {within|param=1}
#TRIGGER {^Damage: (%d)Â Â Precision: (%d)Â Â Speed: (%d)$} {#var forgedamage %1;#var forgeprecision %2;#var forgespeed %3;#math forgetotalstats (@forgedamage+@forgeprecision+@forgespeed);#forall @forgespecifics {#if (@forgetargetmodifier%i=">") {#if (@forge%i<=@forgetarget%i) {#var forgemustreforge 1}} {#if (@forgetargetmodifier%i="<") {#if (@forge%i>=@forgetarget%i) {#var forgemustreforge 1}} {#if (@forgetargetmodifier%i="=") {#if (@forge%i!=@forgetarget%i) {#var forgemustreforge 1}}}}};#if (@forgemustreforge) {#var forgemustreforge 0;#send {Put @forgenumber in forge};#send {Smelt @forgenumber};#loop @forgemetals {#send {Get commodity from forge}};#send {Forge for @forgedesign}}} "Forging"
#TRIGGER {Physical cutting:(%s)(%d)} {#var forgecutting %2} "Forging"
#TRIGGER {Physical blunt:(%s)(%d)} {#var forgeblunt %2;#math forgetotalstats (@forgeblunt+@forgecutting);#forall @forgespecifics {#if (@forgetargetmodifier%i=">") {#if (@forge%i<=@forgetarget%i) {#var forgemustreforge 1}} {#if (@forgetargetmodifier%i="<") {#if (@forge%i>=@forgetarget%i) {#var forgemustreforge 1}} {#if (@forgetargetmodifier%i="=") {#if (@forge%i!=@forgetarget%i) {#var forgemustreforge 1}}}}};#if (@forgemustreforge) {#var forgemustreforge 0;#send {Put @forgenumber in forge};#send {Smelt @forgenumber};#loop @forgemetals {#send {Get commodity from forge}};#send {Forge for @forgedesign}}} "Forging"
Simple forging script.
FORGE
FORGETAR
FORGEOFF when you're finished to reset your variables and turn off the forger.
Unknown2006-10-09 10:22:23
Wow! This would be incredibly useful to me. Problem is:
I'm not entirely sure (as I'm not very knowledgable about this stuff) but I think this script is for zMud? I use MUSH, and am not entirely sure how to translate.
I typically use VBScript, but if anyone can make it work, or atleast give me some pointers on doing so myself, for any of the script options on MUSH I would be MOST grateful!
And props to you Soll, cuz if it works on whatever you use (and I'm sure it does, or else you wouldnt have bothered posting it) , it looks to be pretty handy!
Thanks!
I'm not entirely sure (as I'm not very knowledgable about this stuff) but I think this script is for zMud? I use MUSH, and am not entirely sure how to translate.
I typically use VBScript, but if anyone can make it work, or atleast give me some pointers on doing so myself, for any of the script options on MUSH I would be MOST grateful!
And props to you Soll, cuz if it works on whatever you use (and I'm sure it does, or else you wouldnt have bothered posting it) , it looks to be pretty handy!
Thanks!
Soll2006-10-09 11:18:07
I'm afraid it's for zMUD, not MUSH. I haven't ever really used MUSH for long enough to start scripting in it.
Ashteru2007-04-05 11:38:51
Much love to Soll/Aryidion for this script.
EDIT: Okay, it does seem bugged if I try to forge for 3 stats. <.< Help? >.>
EDIT: Okay, it does seem bugged if I try to forge for 3 stats. <.< Help? >.>
Ayridion2007-04-05 13:00:04
Found and fixed. I also added a basic 'FORGEON' to counter the 'FORGEOFF' feature.
Ashteru2007-04-05 13:08:44
<3
Ilyarin2008-09-24 19:45:52
Since I've switched to MUSHClient I've had to redo a lot of things. This is one of them. So I've developed it into an adorable little plug-in. After installing it via File -> Plugins, type "Forging:help" (case sensitive) into the command line to see the syntaxes.
Mushclient 4.37
Mushclient 4.37
Shaddus2008-09-24 20:42:37
QUOTE(Ilyarin @ Sep 24 2008, 02:45 PM) 562052
Since I've switched to MUSHClient I've had to redo a lot of things. This is one of them. So I've developed it into an adorable little plug-in. After installing it via File -> Plugins, type "Forging:help" (case sensitive) into the command line to see the syntaxes.
Wow, he necro'd his own thread
Ardmore2008-09-24 20:46:09
QUOTE(Shaddus Mes @ Sep 24 2008, 04:42 PM) 562064
Wow, he necro'd his own thread
What does that even mean...
Ilyarin2008-09-24 20:50:23
It's basically works the same so I figured I'd stick it in the same place. Unity!
Shaddus2008-11-01 23:53:02
Trying to use this, but failing miserably. I can set stats, but after it starts the item, it doesn't keep forging. Any ideas?
Unknown2008-11-02 00:37:25
Well, your first mistake was picking forging in the first place, other than that I have no idea.
Ilyarin2008-11-02 00:54:32
I've just uploaded a new script that's fixed a few bugs that've been reported. One possible outstanding issue is a lack of reforging. Let me know if this happens to you. (MUSHclient version only.)