Thanks to EN and TM for their help with the subs for checking weapon damage. Thanks to Mass for his gump wait subs and make item sub (Which I can totally do on my own now! Woot!)
The Purpose of this script is to make weapons with different properties and save them for later use of enhancing or imbuing. Read on to find out more!
This script will make weapons using the MAKE LAST button, scan the weapon for elemental damage and store it if there is no physical damage attached to it. It will scan for Resist to make sure it dont get confused and will also store weapons that have multiple damage types that are NOT physical. It will save super slayers like demon, undead, repond, elemental ect. It will save weapons with SSI on them.
Weapons that it dont need it will
UNRAVEL THEM, you dont need any imbuing to do this, but make sure there is a
SOULFORGE in your house.
Also if you use blacksmithing instead of carpentry dont forget your Forge and Anvil
As of right now it is only setup to do Bokuto's, you can change this easily by finding the following lines and changing them as needed.
set %weapon KDP [color=red];Change to your weapon type you will be making[/color]
If you are not using wood, but rather ingots, you will need to change this line....
set %wood TLK [color=red];Change this to ingots[/color]
Finally for runic type, find this line and change it to the type of runic you are using...
set %runic ZFG_ [color=red];Change this to the type of runic tool that will be used.[/color]
To Setup:
FIRST make
SURE you make the weapon you are running this for at least once!
IT ONLY USES THE MAKE LAST BUTTON!You will need a Soulforge
You will need an Anvil and Forge (If you plan to use blacksmithing)
You will need a secure container in your house with your runics, wood, ingots INSIDE on the TOP and not in a container within.
You will need a container inside your secure to store the weapons.
Hit play and follow the two prompts to setup.
Remember this will use all the resources it has in the secure, so dont put all your runics in there and walk away unless you plan to use them all!Will save all of the following:
- Super Slayers (Reptile, Elemental, Repond, Undead and Demon)
- Any weapon with 100% Elemental Damage (Fire Cold Poison Energy)
- Any weapon with ALL Elemental Damage of ALL types
- Any weapon with Swing Speed Increase 25% - 30%
TO DO LIST:
Make a Menu with a drop down that you can choose weapon type.
Make a menu with a drop down to choose runic type (which will also choose wood or ingots)
Find a way to condense the weapon check subs and make them more accurate. (Any help here would be great)
Remove having to make last before starting the script.
Known bugs so far...
Sometimes it will save a weapon with only 10% SSI on it, this is due to other properties with 25% or 30%
It will from time to time save a weapon that is totally useless, idk why.
So far it keeps running, does a good job, I have had it running this whole time writing this and about 20 minutes before and no problems besides the above bugs.
Event Macro 8 7
Display Ok Select the Resource Container.
set #targcurs 1
while #targcurs = 1
wait 1
set %ResourceBag #ltargetID
set #lobjectID #ltargetID
set #nextcposx 600
set #nextcposy 0
event macro 17
wait 20
Display Ok Select your storage Bag in Resource Container.
set #targcurs 1
while #targcurs = 1
wait 1
set %StorageBag #ltargetID
set #lobjectID #ltargetID
set #nextcposx 800
set #nextcposy 0
event macro 17
wait 20
set %fire Fire Damage
set %cold Cold Damage
set %poison Poison Damage
set %energy Energy Damage
set %reptile Reptile
set %undead Undead
set %demon Demon
set %arachnid Arachnid
set %repond Repond
set %elemental Elemental
set %damagepercent 100%
set %swingpercent30 30%
set %swingpercent25 25%
set %swingspeed Swing Speed Increase
set %residue TKR_WKR
set %weapon KDP
set %Wood TLK
set %runic ZFG_
set #nextcposx 0
set #nextcposy 0
set %imain 520_250 ; Imbuing Main menu size
set %isec 520_440 ; Imbuing secondary menus for properties and value
set %cwin 530_507 ; Crafting window size
set %gumpwait 1 ; Increase number to slow down clicks on menus. 20 = 1 second.
MainLoop:
Gosub GetTools
Gosub MakeWeapon
Gosub CheckWeapon1
Goto MainLoop
sub GetTools
finditem %runic C_ , #backpackid
if #findcnt < 1
{
finditem %runic C_ , %ResourceBag
if #findkind = -1
{
display You are out of runics.
halt
}
exevent drag #findid 1
wait 10
exevent dropc #backpackid
wait 20
}
finditem %Wood C_ , #backpackid
if #findstack < 15
{
set %quantityinpack 50 - #findstack
finditem %Wood C_ , %ResourceBag
if #findstack < %quantityinpack
{
display You need more wood.
halt
}
else
{
exevent drag #findid %quantityinpack
wait 10
exevent dropc #backpackid
wait 20
}
}
Return
Sub MakeWeapon
finditem %Weapon C_ , #BackPackid
If #findcnt = 1
{
set %MadeWeapon #findid
gosub CheckWeapon1
Return
}
finditem %runic C_ , #BackPackid
set #lobjectid #findid
event macro 17
gosub waitforgump %cwin
Click 335 500 f ;Make Last
wait 20
;Click 77 505 f ;exit
wait 20
finditem %Weapon C_ , #BackPackID
set %MadeWeapon #findid
Return
sub CheckWeapon1
finditem %MadeWeapon C_ , #backpackid
if #findcnt >= 1
{
event property #findid
if ( %energy in #property || %poison in #property || %fire in #property || %cold in #property ) && ( Resist notin #property && Physical notin #property )
{
wait 5
Gosub StoreWeapon
Return
}
}
finditem %MadeWeapon C_ , #backpackid
if #findcnt >= 1
{
event property #findid
if %swingspeed in #property && %swingpercent30 in #property
{
wait 5
Gosub StoreWeapon
Return
}
}
finditem %MadeWeapon C_ , #backpackid
if #findcnt >= 1
{
event property #findid
if %swingspeed in #property && %swingpercent25 in #property
{
wait 5
Gosub StoreWeapon
Return
}
}
finditem %MadeWeapon C_ , #backpackid
if #findcnt >= 1
{
event property #findid
if %energy in #property && %damagepercent in #property && Resist notin #property && Physical notin #property
{
wait 5
Gosub StoreWeapon
Return
}
}
finditem %MadeWeapon C_ , #backpackid
if #findcnt >= 1
{
event property #findid
if %poison in #property && %damagepercent in #property && Resist notin #property && Physical notin #property
{
wait 5
Gosub StoreWeapon
Return
}
}
finditem %MadeWeapon C_ , #backpackid
if #findcnt >= 1
{
event property #findid
if %cold in #property && %damagepercent in #property && Resist notin #property && Physical notin #property
{
wait 5
Gosub StoreWeapon
Return
}
}
finditem %MadeWeapon C_ , #backpackid
if #findcnt >= 1
{
event property #findid
if %fire in #property && %damagepercent in #property && Resist notin #property && Physical notin #property && Elemental notin #property
{
wait 5
Gosub StoreWeapon
Return
}
}
finditem %MadeWeapon C_ , #backpackid
if #findcnt >= 1
{
event property #findid
if %demon in #property
{
wait 5
Gosub StoreWeapon
Return
}
}
finditem %MadeWeapon C_ , #backpackid
if #findcnt >= 1
{
event property #findid
if %repond in #property
{
wait 5
Gosub StoreWeapon
Return
}
}
finditem %MadeWeapon C_ , #backpackid
if #findcnt >= 1
{
event property #findid
if %undead in #property
{
wait 5
Gosub StoreWeapon
Return
}
}
finditem %MadeWeapon C_ , #backpackid
if #findcnt >= 1
{
event property #findid
if %reptile in #property
{
wait 5
Gosub StoreWeapon
Return
}
}
finditem %MadeWeapon C_ , #backpackid
if #findcnt >= 1
{
event property #findid
if %elemental in #property && Fire notin #property && Water notin #property && Poison notin #property && Air notin #property && Earth notin #property && Blood notin #property && Snow notin #property && Ice notin #property
{
wait 5
Gosub StoreWeapon
Return
}
}
finditem %MadeWeapon C_ , #backpackid
if #findcnt >= 1
{
event property #findid
if %arachnid in #property
{
wait 5
Gosub StoreWeapon
Return
}
Gosub Unravel
}
Return
Sub StoreWeapon
finditem %Weapon C_ , #backpackid
exevent drag #findid #findstack
wait 10
exevent dropc %StorageBag
wait 20
finditem %MadeWeapon C_ , #backpackid
exevent drag #findid #findstack
wait 10
exevent dropc %StorageBag
wait 20
Return
Sub StoreResidue
finditem %Residue C_ , #backpackid
if #findcnt < 1
return
exevent drag #findid #findstack
wait 10
exevent dropc %ResourceBag
wait 20
Return
Sub Unravel
Repeat
finditem %MadeWeapon C_ , #BackPackid
If #findcnt = -1
{
Return
}
Event Macro 13 56
gosub waitforgump %imain
if ! #result
{
display ok Problems opening the imbue menu. Dble Click fletcher tool and click play
pause
}
Click 228 248 f
wait 30
set #ltargetID %MadeWeapon
event macro 22 0
;gosub waitforgump %imain
if ! #result
{
display ok Problems with imbue unravel menu. Dble Click fletcher tool and click play
pause
}
Click 50 250 f
wait 30
gosub StoreResidue
Return
;================== Wait for gump ======================
sub waitforgump
set %timeout #scnt + 30
while #contsize <> %1
{
wait 1
if #scnt > %timeout
{
return #false
}
}
wait %gumpwait
return #true