Author Topic: SUO Elemental Weapon Maker! V1.0  (Read 4851 times)

0 Members and 1 Guest are viewing this topic.

Offline CoraginTopic starter

  • Wacko in Pajama's
  • Elite
  • *
  • *
  • Posts: 1641
  • Activity:
    0%
  • Reputation Power: 23
  • Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...
  • Gender: Male
  • It Is What It Is.
  • Respect: +57
  • Referrals: 1
    • View Profile
SUO Elemental Weapon Maker! V1.0
« on: November 04, 2009, 01:25:31 AM »
0
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.

Code: [Select]
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....

Code: [Select]
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...

Code: [Select]
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.

Code: [Select]
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


There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
SUO Weapon Maker 1.0.txt
« Last Edit: November 04, 2009, 01:41:20 AM by Coragin »
Coragin

My Facebook
And now I'm better at doing what ever it is Wolverine does!

Offline cgeorgemo

  • Hero Member
  • *
  • Posts: 586
  • Activity:
    0%
  • Reputation Power: 5
  • cgeorgemo has no influence.
  • Gender: Male
  • I'm Brian...cgeorgemo is Curious George Missouri
  • Respect: +19
  • Referrals: 1
    • View Profile
Re: SUO Elemental Weapon Maker! V1.0
« Reply #1 on: November 05, 2009, 08:26:42 AM »
0
Hey if you will post up the properties of the "Useless" weapon that it is saving we might be able to figure out why it got saved.
Sarcasm is your body's natural defense against stupidity.

Offline CoraginTopic starter

  • Wacko in Pajama's
  • Elite
  • *
  • *
  • Posts: 1641
  • Activity:
    0%
  • Reputation Power: 23
  • Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...
  • Gender: Male
  • It Is What It Is.
  • Respect: +57
  • Referrals: 1
    • View Profile
Re: SUO Elemental Weapon Maker! V1.0
« Reply #2 on: November 05, 2009, 08:50:06 AM »
0
Next time I run it I will, however the other script I made does what this one does and so much more ;)
Coragin

My Facebook
And now I'm better at doing what ever it is Wolverine does!

Offline Paulonius

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: SUO Elemental Weapon Maker! V1.0
« Reply #3 on: November 09, 2009, 09:00:39 AM »
0
I like where you are going with this and I see a ton of value in it.  

Couple of thoughts:

1. Why not add another bag opener for runics.  I know that I have a ton of runics stored all over the place in various bags and I don't want to have to move them into my main secure to run the script.  I added this feature after I downloaded the script.

2. There seems to be a signficant potential for false positives.  I wonder what logic we can use to eliminate these. An example is in SSI. If you put in Swing Speed 30 as it currently stands, you are going to save every weapon with SSI and a value of 30 anywhere.  There are not as many false positives with SSI, but it would be nice to come up with a way to eliminate them. I tried plugging in luck and 100 as a value and it saves every weapon with 100 luck, but it also saves every weapon with luck and 100% physical damage -- which is a lot of false positives.

What would really make this script effective would be to replace the current string of checks with a call to the CLAw.  This would allow you to customize the properties you are looking for and easily modify them.
« Last Edit: November 09, 2009, 09:16:41 AM by Paulonius »
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline CoraginTopic starter

  • Wacko in Pajama's
  • Elite
  • *
  • *
  • Posts: 1641
  • Activity:
    0%
  • Reputation Power: 23
  • Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...
  • Gender: Male
  • It Is What It Is.
  • Respect: +57
  • Referrals: 1
    • View Profile
Re: SUO Elemental Weapon Maker! V1.0
« Reply #4 on: November 09, 2009, 09:34:07 AM »
0
Not anymore paul, TM helped me fix that, see the "What is wrong with this is" thread in script debug
Coragin

My Facebook
And now I'm better at doing what ever it is Wolverine does!

Offline Paulonius

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: SUO Elemental Weapon Maker! V1.0
« Reply #5 on: November 09, 2009, 09:43:37 AM »
0
yeah, I realized that you have an updated version of the script now. I will check it out!
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline Ultima

  • Insane Scripter
  • *
  • Posts: 1580
  • Activity:
    0%
  • Reputation Power: 26
  • Ultima is on the verge of being accepted.Ultima is on the verge of being accepted.Ultima is on the verge of being accepted.Ultima is on the verge of being accepted.Ultima is on the verge of being accepted.
  • Gender: Male
  • Respect: +160
  • Referrals: 4
    • View Profile
Re: SUO Elemental Weapon Maker! V1.0
« Reply #6 on: May 22, 2010, 07:46:41 PM »
0
What happened to this gem? Did it die in script debug?

Coragin your a genius for coming up with the idea for this script. This is exactly the kind of script I've been looking for. I've spent a good portion of my time burning low end runics trying to get 100% Elemental Damage weapons that I can imbue/modify for specific spawns/bosses.

Nothing pays dividends like having the right weapon (elemental type). Was this working before and got thrown off by the gump changes? I wasn't able to get it to work.

This would be an Elite script in my book all the way. Nice imbued elemental weapons warrant big monies as far as I'm concerned. They really give you the ability to whoop buttox!

Tags: