Rika2007-07-25 06:10:34
A forging script for Nexus I made. It's in XML, so just need to import and merge with your triggers. Has worked for me, but if there are any problems with it, let me know. A few aliases in there to get it working:
forgerepeat - toggles the reforging function on and off (for smelting and reforging for stats). Should only be used for all-metal designs.
forgedesign (# of design) - sets the design number of the item to be forged
forgeitem (noun of item) - sets the noun of the item (rapier, plate, hammer etc.)
minstat (# of stats) - sets the minimum combined stats of the forged item to be kept when reforging function is on.
weastat (damage precision speed) - sets minimum individual stats of the forged weapon to be kept when reforging function is on
armstat (cutting blunt) - sets minimum individual stats of the forged armour to be kept when reforging function is on
    off
    0
    0
    100
    4377
    shofa
    100
    off
    100
    300
    0
    0
    95
    100
    100
    300
    on
   Â#set mincut $1
#set minblu $2
   Âforge for $forgedesign
#set nextforge on
   Â#set forgedesign $1
   Â#set forgeitem $1
   Â#if $forgerepeat = on {
#set forgerepeat off
#echo FORGE REPEATING OFF
} else {
#set forgerepeat on
#echo FORGE REPEATING ON
}
   Â#set minstat $1
   Âtake iron from forge
take steel from forge
take silver from forge
take gold from forge
take platinum from forge
   Â#set mindam $1
#set minpre $2
#set minspe $3
   Â#set forgedamage $1
#set forgeprec $2
#set forgespeed $3
#math forgingnumber $forgingnumber+$1+$2+$3
#wait 1000
#echo TOTAL FORGING ITEM STATS: $forgingnumber
#if $forgingnumber<$minstat or $forgedamage<$mindam or $forgeprec<$minpre or $forgespeed<$minspe and $forgerepeat = on {
put $forgeitem in forge
smelt $forgeitem
takemetals
ff
}
   Â#set forgeblunt $1
#math forgingnumber $forgingnumber+$1
#wait 1000
#echo TOTAL FORGING ITEM STATS: $forgingnumber
#if $forgingnumber<$minstat or $forgeblunt<$minblu or $forgecut<$mincut and $forgerepeat = on {
put $forgeitem in forge
smelt $forgeitem
takemetals
ff
}
   Â#math forgingnumber $forgingnumber+$1
#set forgecut $1
   Â#set nextforge on
   Â#if $nextforge = on {
forge
} elsif $finishforge = on {
#set forgingnumber 0
take $forgeitem from forge
wp $forgeitem
#set finishforge off
}
   Â#set nextforge off
#set finishforge on
 Â
forgerepeat - toggles the reforging function on and off (for smelting and reforging for stats). Should only be used for all-metal designs.
forgedesign (# of design) - sets the design number of the item to be forged
forgeitem (noun of item) - sets the noun of the item (rapier, plate, hammer etc.)
minstat (# of stats) - sets the minimum combined stats of the forged item to be kept when reforging function is on.
weastat (damage precision speed) - sets minimum individual stats of the forged weapon to be kept when reforging function is on
armstat (cutting blunt) - sets minimum individual stats of the forged armour to be kept when reforging function is on
CODE
    off
    0
    0
    100
    4377
    shofa
    100
    off
    100
    300
    0
    0
    95
    100
    100
    300
    on
   Â
#set minblu $2
   Â
#set nextforge on
   Â
   Â
   Â
#set forgerepeat off
#echo FORGE REPEATING OFF
} else {
#set forgerepeat on
#echo FORGE REPEATING ON
}
   Â
   Â
take steel from forge
take silver from forge
take gold from forge
take platinum from forge
   Â
#set minpre $2
#set minspe $3
   Â
#set forgeprec $2
#set forgespeed $3
#math forgingnumber $forgingnumber+$1+$2+$3
#wait 1000
#echo TOTAL FORGING ITEM STATS: $forgingnumber
#if $forgingnumber<$minstat or $forgedamage<$mindam or $forgeprec<$minpre or $forgespeed<$minspe and $forgerepeat = on {
put $forgeitem in forge
smelt $forgeitem
takemetals
ff
}
   Â
#math forgingnumber $forgingnumber+$1
#wait 1000
#echo TOTAL FORGING ITEM STATS: $forgingnumber
#if $forgingnumber<$minstat or $forgeblunt<$minblu or $forgecut<$mincut and $forgerepeat = on {
put $forgeitem in forge
smelt $forgeitem
takemetals
ff
}
   Â
#set forgecut $1
   Â
   Â
forge
} elsif $finishforge = on {
#set forgingnumber 0
take $forgeitem from forge
wp $forgeitem
#set finishforge off
}
   Â
#set finishforge on
 Â
Amarok2007-07-25 06:37:19
very nice indeed, congrats on getting it working for nexus.
Few point to perhaps optimise:
You can "get commodity from forge" so dont need to send a command for each metal.
Can also set the amount of metals to a var, and have that loop after each smelt for the number of metals in the design.
Can trigger off the message the Item has been formed, probe the forge then, and thereby getting your forging number.
There is a good Zmud forging script on the forums, where you can get some examples for these points.
Happy Boring Forging Hours!
Few point to perhaps optimise:
You can "get commodity from forge" so dont need to send a command for each metal.
Can also set the amount of metals to a var, and have that loop after each smelt for the number of metals in the design.
Can trigger off the message the Item has been formed, probe the forge then, and thereby getting your forging number.
There is a good Zmud forging script on the forums, where you can get some examples for these points.
Happy Boring Forging Hours!
Rika2007-07-25 06:41:16
QUOTE(Amarok @ Jul 25 2007, 06:37 PM) 428370
You can "get commodity from forge" so dont need to send a command for each metal.
Happy Boring Forging Hours!
Happy Boring Forging Hours!
Yay! My new hero. See, one of the many things they should tell us.
And yeah, this script is supposed to make it less boring.
Talnar2007-07-25 14:41:14
Ohh wow! This is really cool! And quite useful! I'll have to copy it when I decide to take up forging!
Rika2007-08-04 03:11:29
Updated!
Now includes tracking of individual stats of the forged item to keep for reforging.
Next, I'm going to work on a script for crafting (multiple) leather armour. Though don't expect it too soon. It'll come when I next find myself having to do this tedious job.
Now includes tracking of individual stats of the forged item to keep for reforging.
Next, I'm going to work on a script for crafting (multiple) leather armour. Though don't expect it too soon. It'll come when I next find myself having to do this tedious job.
Kade2008-01-11 00:49:44
Quite the tool. I'm glad I stumbled across it.
Rika2008-01-11 01:10:32
Glad you like it.
There's a few things wrong with it, and I've learnt a bit more about Nexus since then. So let me know. I'm not a forger anymore, though.
There's a few things wrong with it, and I've learnt a bit more about Nexus since then. So let me know. I'm not a forger anymore, though.
Kade2008-01-11 13:34:40
Ah, ran into a problem. Seems it won't reforge the weapon once it smelts it. I'll look at it and see what I can do, but I am no script writer.
Unknown2008-01-11 21:47:21
Who uses Nexus?! Good work, though
Kade2008-01-12 02:45:24
Think I fixed it, but need to check a few other things before I say it is foolproof.
Kade2008-02-15 15:44:19
Alright, so I have worked with the coding and made a few personal touches, such as a forging countdown (set to 70 if you don't have a mallet or 35 if you do) and an optional FORGEHALT for those times you don't want it to reforge. I also added a FORGESUMMARY alias to display the current values of your forging variables. Thus far, I haven't had a whole lot of trouble with it, except that when you Weapon Probe it runs the reforge script even outside of a forge. I think I'm going to add a command to designate when you are in a forging location. Let me know if you run into problems and I'll see what I can do to fix it.
off
80
70
78
230
4202
off
katana
453
on
156
839
40
40
100
200
265
570
off
#set mincut $1
#set minblu $2
forge for $forgedesign
#set nextforge on
#set forgedesign $1
#if $forgehalt = on {#set forgehalt off
#echo FORGING WILL NO LONGER BE HALTED
} else {
#set forgehalt on
#echo FORGING HALTED AT ITEM COMPLETION}
say forgerepeat - toggles the reforging function on and off (for smelting and reforging for stats). Should only be used for all-metal designs.forgedesign (# of design) - sets the design number of the item to be forged forgeitem (noun of item) - sets the noun of the item (rapier, plate, hammer etc.) minstat (# of stats) - sets the minimum combined stats of the forged item to be kept when reforging function is on. weastat (damage precision speed) - sets minimum individual stats of the forged weapon to be kept when reforging function is on armstat (cutting blunt) - sets minimum individual stats of the forged armour to be kept when reforging function is on
#set forgeitem $1
#set nextforge off
#if $forgerepeat = on {
#set forgerepeat off
#echo FORGE REPEATING OFF
} else {
#set forgerepeat on
#echo FORGE REPEATING ON
}
#set forgingnumber 0
#echo CURRENT FORGE SETTINGS:
#echo ITEM TYPE - $forgeitem
#echo FORGE DESIGN - $forgedesign
#echo STAT TOTAL - $minstat
#echo WEAPON STATS - $mindam / $minpre / $minspe
#echo ARMOUR STATS - $minblu / $mincut
#echo FORGE HALT - $forgehalt
#echo FORGE REPEAT - $forgerepeat
#set minstat $1
outr coal
get tinderbox from pack
put coal in forge
fire forge
put tinderbox in pack
put $forgeitem in forge
smelt $forgeitem
takemetals
fforge
#set forgecountdown 70
take commodity from forge
take commodity from forge
take commodity from forge
take commodity from forge
take commodity from forge
#set mindam $1
#set minpre $2
#set minspe $3
forge
#set forgedamage $1
#set forgeprec $2
#set forgespeed $3
#math forgingnumber $forgedamage+$forgeprec+$forgespeed
#wait 5000
#echo TOTAL FORGING ITEM STATS: $forgingnumber
#set forgerepeat on
#if $forgingnumber < $minstat or $forgedamage < $mindam or $forgeprec < $minpre or $forgespeed < $minspe and $forgerepeat = on {
reforge
#set nextforge on
}
#set forgeblunt $1
#math forgingnumber $forgingnumber+$1
#wait 1000
#echo TOTAL FORGING ITEM STATS: $forgingnumber
#wait 5000
#if $forgehalt = on {
#echo FORGING HALTED
#set forgerepeat off}
#if $forgingnumber<$minstat or $forgeblunt<$minblu or $forgecut<$mincut and $forgerepeat = on {
put $forgeitem in forge
smelt $forgeitem
takemetals
fforge
}
#math forgingnumber $forgingnumber+$1
#set forgecut $1
#set nextforge on
#math forgecountdown $forgecountdown-1
#echo $forgecountdown
#if $nextforge = on {
forge
} elsif $finishforge = on {
#set forgingnumber 0
take $forgeitem from forge
wp $forgeitem
#set finishforge off
}
#set nextforge off
#set finishforge on
off
80
70
78
230
4202
off
katana
453
on
156
839
40
40
100
200
265
570
off
#set minblu $2
#set nextforge on
#echo FORGING WILL NO LONGER BE HALTED
} else {
#set forgehalt on
#echo FORGING HALTED AT ITEM COMPLETION}
#set forgerepeat off
#echo FORGE REPEATING OFF
} else {
#set forgerepeat on
#echo FORGE REPEATING ON
}
#echo ITEM TYPE - $forgeitem
#echo FORGE DESIGN - $forgedesign
#echo STAT TOTAL - $minstat
#echo WEAPON STATS - $mindam / $minpre / $minspe
#echo ARMOUR STATS - $minblu / $mincut
#echo FORGE HALT - $forgehalt
#echo FORGE REPEAT - $forgerepeat
get tinderbox from pack
put coal in forge
fire forge
put tinderbox in pack
smelt $forgeitem
takemetals
fforge
#set forgecountdown 70
take commodity from forge
take commodity from forge
take commodity from forge
take commodity from forge
#set minpre $2
#set minspe $3
#set forgeprec $2
#set forgespeed $3
#math forgingnumber $forgedamage+$forgeprec+$forgespeed
#wait 5000
#echo TOTAL FORGING ITEM STATS: $forgingnumber
#set forgerepeat on
#if $forgingnumber < $minstat or $forgedamage < $mindam or $forgeprec < $minpre or $forgespeed < $minspe and $forgerepeat = on {
reforge
#set nextforge on
}
#math forgingnumber $forgingnumber+$1
#wait 1000
#echo TOTAL FORGING ITEM STATS: $forgingnumber
#wait 5000
#if $forgehalt = on {
#echo FORGING HALTED
#set forgerepeat off}
#if $forgingnumber<$minstat or $forgeblunt<$minblu or $forgecut<$mincut and $forgerepeat = on {
put $forgeitem in forge
smelt $forgeitem
takemetals
fforge
}
#set forgecut $1
#math forgecountdown $forgecountdown-1
#echo $forgecountdown
forge
} elsif $finishforge = on {
#set forgingnumber 0
take $forgeitem from forge
wp $forgeitem
#set finishforge off
}
#set finishforge on
Unknown2009-01-02 18:39:03
Well, I know this is kind of a dead thread. Hopefully somebody will respond.
First of all, thanks to both of you for these. They're a great foundation.
Rika, I'm having a few problems with yours. Kade, I can't get yours to work, but that may be a problem with my computer. For some reason, the Preferences window can't hold the 40-odd reflexes that yours has. They end up getting shunted around and eventually start to disappear. Rika, yours stays, so it's the one I'm using.
However, as Kade mentioned, it doesn't reforge. I made a few adjustments and got it working, but I can't actually remember what I did to it. (I ended up having to reimport it.) Once I got it reforging, it wouldn't stop. Turning forgerepeating off seems to have no effect, and the stat checks don't work. I got a forging job that met the requirements I set and it reforged it anyway. (Obviously, that didn't make me happy... heh.) I don't know what the problem is, and any help you could off would be wonderful. I'm no great shakes with XML, so it's also possible that I'm just not understanding how to use the script properly. I'm a little confused on what the point of a few of the variables are, for example. Forgingnumber? Minstat?
Anything that anyone could contribute would be helpful. Thanks in advance.
First of all, thanks to both of you for these. They're a great foundation.
Rika, I'm having a few problems with yours. Kade, I can't get yours to work, but that may be a problem with my computer. For some reason, the Preferences window can't hold the 40-odd reflexes that yours has. They end up getting shunted around and eventually start to disappear. Rika, yours stays, so it's the one I'm using.
However, as Kade mentioned, it doesn't reforge. I made a few adjustments and got it working, but I can't actually remember what I did to it. (I ended up having to reimport it.) Once I got it reforging, it wouldn't stop. Turning forgerepeating off seems to have no effect, and the stat checks don't work. I got a forging job that met the requirements I set and it reforged it anyway. (Obviously, that didn't make me happy... heh.) I don't know what the problem is, and any help you could off would be wonderful. I'm no great shakes with XML, so it's also possible that I'm just not understanding how to use the script properly. I'm a little confused on what the point of a few of the variables are, for example. Forgingnumber? Minstat?
Anything that anyone could contribute would be helpful. Thanks in advance.
Abethor2009-01-02 18:56:52
QUOTE (Ilaveuse @ Jan 2 2009, 12:39 PM) <{POST_SNAPBACK}>
Well, I know this is kind of a dead thread. Hopefully somebody will respond.
First of all, thanks to both of you for these. They're a great foundation.
Rika, I'm having a few problems with yours. Kade, I can't get yours to work, but that may be a problem with my computer. For some reason, the Preferences window can't hold the 40-odd reflexes that yours has. They end up getting shunted around and eventually start to disappear. Rika, yours stays, so it's the one I'm using.
However, as Kade mentioned, it doesn't reforge. I made a few adjustments and got it working, but I can't actually remember what I did to it. (I ended up having to reimport it.) Once I got it reforging, it wouldn't stop. Turning forgerepeating off seems to have no effect, and the stat checks don't work. I got a forging job that met the requirements I set and it reforged it anyway. (Obviously, that didn't make me happy... heh.) I don't know what the problem is, and any help you could off would be wonderful. I'm no great shakes with XML, so it's also possible that I'm just not understanding how to use the script properly. I'm a little confused on what the point of a few of the variables are, for example. Forgingnumber? Minstat?
Anything that anyone could contribute would be helpful. Thanks in advance.
First of all, thanks to both of you for these. They're a great foundation.
Rika, I'm having a few problems with yours. Kade, I can't get yours to work, but that may be a problem with my computer. For some reason, the Preferences window can't hold the 40-odd reflexes that yours has. They end up getting shunted around and eventually start to disappear. Rika, yours stays, so it's the one I'm using.
However, as Kade mentioned, it doesn't reforge. I made a few adjustments and got it working, but I can't actually remember what I did to it. (I ended up having to reimport it.) Once I got it reforging, it wouldn't stop. Turning forgerepeating off seems to have no effect, and the stat checks don't work. I got a forging job that met the requirements I set and it reforged it anyway. (Obviously, that didn't make me happy... heh.) I don't know what the problem is, and any help you could off would be wonderful. I'm no great shakes with XML, so it's also possible that I'm just not understanding how to use the script properly. I'm a little confused on what the point of a few of the variables are, for example. Forgingnumber? Minstat?
Anything that anyone could contribute would be helpful. Thanks in advance.
Yeah I'm having some troubles too, basically cause I don't know where to put the code in Nexus.
Unknown2009-01-02 20:28:16
Go to the Archives area in the triggers and hit INPUT XML
Abethor2009-01-02 21:39:11
QUOTE (Kialkarkea @ Jan 2 2009, 02:28 PM) <{POST_SNAPBACK}>
Go to the Archives area in the triggers and hit INPUT XML
Ah yes, I see. Thanks! Now to test it out....
EDIT: Alriiight I just lost 90 steel 25 silver and 5 gold....I don't think I'll be using this.
Unknown2009-01-02 22:37:24
How did you lose it? That doesn't make sense. At most you should lose a piece of coal.
Unknown2009-01-03 02:29:53
So, I was tinkering with the script, and I think I have it fixed. It works, at least for me. I'll post the changes as I made them, rather than as XML. Anybody who wants to can make the changes.
Add spaces to the greater than (<) marks. So instead of '#if $forgingnumber<$minstat' it should be '#if $forgingnumber < $minstat'.
Make sure that the Physical blunt trigger has 10 spaces before the {d} (assuming you're on standard wrap width. If you're not, count the spaces and make sure that it's accurate in the scripts- otherwise the trigger won't... um, trigger.) Do the same for Physical cutting. (On standard width, it should be 8.)
I also added #wait 1000 after #set forgingnumber 0 in the 'You have recovered balance' trigger. I suppose that's optional, but it worked for me.
I also removed the line barriers on Damage, Phyiscal blunt, Physical cutting, and Your eye for detail tells you. Also optional, though it seemed to recognize the triggers for me only after I took those out.
I hope that helps. Rika's base script now works for me.
Add spaces to the greater than (<) marks. So instead of '#if $forgingnumber<$minstat' it should be '#if $forgingnumber < $minstat'.
Make sure that the Physical blunt trigger has 10 spaces before the {d} (assuming you're on standard wrap width. If you're not, count the spaces and make sure that it's accurate in the scripts- otherwise the trigger won't... um, trigger.) Do the same for Physical cutting. (On standard width, it should be 8.)
I also added #wait 1000 after #set forgingnumber 0 in the 'You have recovered balance' trigger. I suppose that's optional, but it worked for me.
I also removed the line barriers on Damage, Phyiscal blunt, Physical cutting, and Your eye for detail tells you. Also optional, though it seemed to recognize the triggers for me only after I took those out.
I hope that helps. Rika's base script now works for me.
Abethor2009-01-04 00:54:01
QUOTE (Ilaveuse @ Jan 2 2009, 04:37 PM) <{POST_SNAPBACK}>
How did you lose it? That doesn't make sense. At most you should lose a piece of coal.
The reforging didn't work and so I manually started forging again and after one forge it took it out of the Forge and I lost all the comms.
Unknown2009-01-04 00:57:13
Truly? Odd. It's never done that to me...