ScriptUO

Official ScriptUO EasyUO Scripts => Submit your Script => Inactive Submissions => Topic started by: Coragin on November 04, 2009, 04:30:21 PM

Title: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Coragin on November 04, 2009, 04:30:21 PM
Introducing the SUO AIO (All in ONE) Weapon Crafting Tool!

CURRENT PROBLEMS:
NONE

Current Version v1.6 (Paulonious Update)

Update Notes:

1. The script doesn't have a failsafe if the weapon you make doesn't have a high enough intensity to allow you to unravel it.  As written it drops into an endless loop if you make one. I added in a journal check for the message and have it trashing the item if this happens.

2. I modded your trash sub to find the trash barrel so that it won't require setup.

3. The Item ID for composite bow was wrong. I corrected it.

4. I substituted the straight clicks in the make item sub for gump clicks.

5. I added in hard-coded property checks for 100 luck weapons and bows with both channeling and balance.  Comment these out if you don't care for them, I didn't add them to your menu setup.

Please Test!

Purpose & Features:

This script setup is simple:

THIS SCRIPT WILL USE ALL INGOTS, WOOD AND RUNICS ON THE TOP LEVEL OF YOUR SECURE!  SO DO NOT WALK AWAY AFTER SETTING IT UP UNLESS YOU WANT TO USE ALL THE RESOURCES IN YOUR SECURE! YOU HAVE BEEN WARNED AND INFORMED!

THIS SCRIPT NEEDS GOOD TESTING!

TODO List:

Special Thanks and Credits: Twinkle McNugget && Endless Night for all their help.  TM for his help and patience. Mass for his waitforgump sub (if it was someone else correct me).  Everyone who worked on the Relic Machine code as that is what truly helped me learn a TON!  The SUO Guild Members for having the patience with me while I learn scripting and am not devoting time to guild right now.  And ALL the people helping test.
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Coragin on November 04, 2009, 05:17:35 PM
Having a problem with it getting to the correct weapon type to make.  If anyone who knows can look at the setup and let me know.  Im trying, but failing, but not so bad.
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Scrripty on November 04, 2009, 05:35:13 PM
Having a problem with it getting to the correct weapon type to make.  If anyone who knows can look at the setup and let me know.  Im trying, but failing, but not so bad.

Nice job Cor.  You finally figuring out just how easy scripting is eh? :)
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Coragin on November 04, 2009, 05:48:29 PM
Having a problem with it getting to the correct weapon type to make.  If anyone who knows can look at the setup and let me know.  Im trying, but failing, but not so bad.

Nice job Cor.  You finally figuring out just how easy scripting is eh? :)

Yea, I didnt forget about testing yours, as a matter of fact, thats the reason I started this, didnt have a good weapon to test with for the specific tests I wanted.

On another note, I think I narrowed down the problem, its in the setup and has to do with the dropdown list.

It dont matter what you pick from the dropdown list, its setting the runic as the LAST item in the drop down list.  I dont know why though so if anyone can help...

Code: [Select]
;--------- EasyUO Menu Designer Code Begin ---------
sub showEUOMenu1
menu Clear
menu Window Title SUO Elemental Weapon Maker
menu Window Color BtnFace
menu Window Size 301 268
menu Font Transparent #true
menu Font Align Right
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Font Transparent #false
menu Font Align Left
menu Text EUOLabel2 4 4 Please select weapon type
menu Text EUOLabel3 4 96 Slayers
menu Text EUOLabe20 4 46 Swing Speed Increase
menu Text EUOLabel4 152 96 Damage Types
menu Text EUOLabel5 152 4 Destroy Method
menu Font BGColor Window
menu Combo Create weaponlist  4 16 141
menu Combo Add  weaponlist Bow
menu Combo Add  weaponlist Crossbow
menu Combo Add  weaponlist Heavy Crossbow
menu Combo Add  weaponlist Composite Bow
menu Combo Add  weaponlist Repeating Crossbow
menu Combo Add  weaponlist Yumi
menu Combo Add  weaponlist Elven Composite Shortbow
menu Combo Add  weaponlist Magical Shortbow           ;8
menu Combo Add  weaponlist Shepherds Crook
menu Combo Add  weaponlist Quarter Staff
menu Combo Add  weaponlist Gnarled Staff
menu Combo Add  weaponlist Bokuto
menu Combo Add  weaponlist Tetsubo
menu Combo Add  weaponlist Club                      ;14
menu Combo Add  weaponlist Crescent Blade
menu Combo Add  weaponlist Cutlass
menu Combo Add  weaponlist Dagger
menu Combo Add  weaponlist Katana
menu Combo Add  weaponlist Kryss
menu Combo Add  weaponlist Scimitar
menu Combo Add  weaponlist No-Dachi
menu Combo Add  weaponlist Wakizashi
menu Combo Add  weaponlist Daisho
menu Combo Add  weaponlist Tekagi
menu Combo Add  weaponlist Kama
menu Combo Add  weaponlist Sai
menu Combo Add  weaponlist Radiant Scimitar
menu Combo Add  weaponlist War Cleaver
menu Combo Add  weaponlist Elven Spellblade
menu Combo Add  weaponlist Assassin Spike
menu Combo Add  weaponlist Leafblade
menu Combo Add  weaponlist Rune Blade
menu Combo Add  weaponlist Axe
menu Combo Add  weaponlist Battle Axe
menu Combo Add  weaponlist Double Axe
menu Combo Add  weaponlist War Axe
menu Combo Add  weaponlist Ornate Axe
menu Combo Add  weaponlist Double Bladed Staff
menu Combo Add  weaponlist Short Spear
menu Combo Add  weaponlist Spear
menu Combo Add  weaponlist War Fork
menu Combo Add  weaponlist Mace
menu Combo Add  weaponlist War Mace
menu Combo Add  weaponlist Tessen (NOT IMPLIMENTED)
menu Combo Add  weaponlist Diamond Mace
menu Font BGColor BtnFace
menu Check SSI25 4 60 69 17 #false 25%
menu Check SSI30 4 75 69 17 #false 30%
menu Check Arachnid 4 116 69 17 #false Arachnid
menu Check Demon 4 132 97 17 #false Demon
menu Check Elemental 4 148 97 17 #false Elemental
menu Check Repond 4 164 97 17 #false Repond
menu Check Reptile 4 180 69 17 #false Reptile
menu Check Undead 4 196 65 17 #false Undead
menu Font BGColor Window
menu Font BGColor BtnFace
menu Check Fire 156 116 97 17 #false Fire
menu Check Cold 156 132 97 17 #false Cold
menu Check Poison 156 148 97 17 #false Poison
menu Check Energy 156 164 97 17 #false Energy
menu Font BGColor Window
menu Combo Create DestroyMethod 152 16 137
menu Combo Add  DestroyMethod Unravel
menu Combo Add  DestroyMethod Smelt
menu Combo Add  DestroyMethod Axe
menu Combo Add  DestroyMethod Trash
menu Font BGColor BtnFace
menu Check Multiple 156 180 97 17 #false Multiple (All)
menu Button Begin 8 224 65 33 Begin
menu Show 420 270
  set #menubutton N/A
  repeat
  until #menubutton <> N/A
  menu delete begin
  menu hide
return
;--------- EasyUO Menu Designer Code End ---------
sub setup
;Runics
;fletch UFG
;smith TLH
;carp ZFG
menu get weaponlist         ;Weaponlist
if #menures = 1
   {
   set %Bow = #true
   set %Weapon WOH               ;Bow
   set %wood TLK
   set %runic UFG
   goto setup1
   }
if #menures = 2
   {
   set %Weapon USF               ;Crossbow
   set %wood TLK
   set %crossbow = #true
   set %runic UFG
   goto setup1
   }
if #menures = 3
   {
   set %Weapon LMH                 ;Heavy Crossbow
   set %wood TLK
   set %HeavyCrossbow = #true
   set %runic UFG
   goto setup1
   }
if #menures = 4
   {
   set %Weapon SPO                 ;Composite Bow
   set %wood TLK
   set %compositeBow = #true
   set %runic UFG
   goto setup1
   }
if #menures = 5
   {
   set %Weapon PPO               ;Repeating Crossbow
   set %wood TLK
   set %RepeatingCrossbow = #true
   set %runic UFG
   goto setup1
   }
if #menures = 6
   {
   set %Weapon XCP                ;Yumi
   set %wood TLK
   set %Yumi = #true
   set %runic UFG
   goto setup1
   }
if #menures = 7
   {
   set %Weapon WER                ;Elven Composite Shortbow
   set %wood TLK
   set %ElvenCompositeShortBow = #true
   set %runic UFG
   goto setup1
   }
if #menures = 8
   {
   set %Weapon PFR                ;Magical Shortbow
   set %wood TLK
   set %MagicalShortBow = #true
   set %runic UFG
   goto setup1
   }
if #menures = 9
   set %Weapon RPF                ;Shepheards Crook
   set %wood TLK
   set %Crook = #true
   set %runic ZFG
if #menures = 10
   set %Weapon ZPF                 ;Quarter Staff
   set %wood TLK
   set %QuarterStaff = #true
   set %runic ZFG
if #menures = 11
   set %Weapon QMH                  ;Gnarled Staff
   set %wood TLK
   set %GnarledStaff = #true
   set %runic ZFG
if #menures = 12
   set %Weapon KDP                  ;Bokuto
   set %wood TLK
   set %Bokuto = #true
   set %runic ZFG
if #menures = 13
   set %Weapon ADP                  ;Tetsubo
   set %wood TLK
   set %Tetsubo = #true
   set %runic ZFG
if #menures = 14
   set %Weapon QOH                  ;Club
   set %wood TLK
   set %Club = #true
   set %runic ZFG
if #menures = 15
   set %Weapon NPO                  ;Crescent Blade
   set %wood ENK
   set %CrescentBlade = #true
   set %runic TLH
if #menures = 16
   set %Weapon JPH                  ;Cutlass
   set %wood ENK
   set %Cutlass = #true
   set %runic TLH
if #menures = 17
   set %Weapon WSF                  ;Dagger
   set %wood ENK
   set %Dagger = #true
   set %runic TLH
if #menures = 18
   set %Weapon NMH                   ;Katana
   set %wood ENK
   set %Katana = #true
   set %runic TLH
if #menures = 19
   set %Weapon VRH                   ;Kryss
   set %wood ENK
   set %Kryss = #true
   set %runic TLH
if #menures = 20
   set %Weapon SOH                   ;Scimitar
   set %wood ENK
   set %Scimitar = #true
   set %runic TLH
if #menures = 21
   set %Weapon YCP                   ;No-Dachi
   set %wood ENK
   set %NoDachi = #true
   set %runic TLH
if #menures = 22
   set %Weapon                   ;Waka
   set %wood ENK
   set %Waka = %true
   set %runic TLH
if #menures = 23
   set %Weapon JDP                   ;Daisho
   set %wood ENK
   set %Daisho = #True
   set %runic TLH
if #menures = 24
   set %Weapon LDP                  ;Tekagi
   set %wood ENK
   set %Tekagi = #true
   set %runic TLH
if #menures = 25
   set %Weapon FDP                   ;Kama
   set %wood ENK
   set %Kama = #true
   set %runic TLH
if #menures = 26
   set %Weapon HDP                   ;Sai
   set %wood ENK
   set %Sai = #true
   set %runic TLH
if #menures = 27
   set %Weapon XFR                   ;Radiant Scimitar
   set %wood ENK
   set %RadiantScimitar = #true
   set %runic TLH
if #menures = 28
   set %Weapon HFR                   ;War Cleaver
   set %wood ENK
   set %WarCleaver = #true
   set %runic TLH
if #menures = 29
   set %Weapon GFR                   ;Elven Spellblade
   set %wood ENK
   set %ElvenSpellBlade = #true
   set %runic TLH
if #menures = 30
   set %Weapon FFR                    ;Assassins Spike
   set %wood ENK
   set %AssassinsSpike = #true
   set %runic TLH
if #menures = 31
   set %Weapon IFR                    ;Leafblade
   set %wood ENK
   set %Leafblade = #true
   set %runic TLH
if #menures = 32
   set %Weapon EFR                    ;Runeblade
   set %wood ENK
   set %Runeblade = #true
   set %runic TLH
if #menures = 33
   set %Weapon OSF                    ;Axe
   set %wood ENK
   set %Axe = #true
   set %runic TLH
if #menures = 34
   set %Weapon MSF                    ;Battleaxe
   set %wood ENK
   set %BattleAxe = #true
   set %runic TLH
if #menures = 35
   set %Weapon NSF                    ;Double Axe
   set %wood ENK
   set %DoubleAxe = #true
   set %runic TLH
if #menures = 36
   set %Weapon UOH                    ;War Axe
   set %wood ENK
   set %WarAxe = #true
   set %runic TLH
if #menures = 37
   set %Weapon OFR                    ;Ornate Axe
   set %wood ENK
   set %OrnateAxe = #true
   set %runic TLH
if #menures = 38
   set %Weapon VPO                    ;Double Bladed Staff
   set %wood ENK
   set %DoubleBladedStaff = #true
   set %runic TLH
if #menures = 39
   set %Weapon XRH                       ;Short Spear
   set %wood ENK
   set %ShortSpear = #true
   set %runic TLH
if #menures = 40
   set %Weapon MTF                        ;Spear
   set %wood ENK
   set %Spear = #true
   set %runic TLH
if #menures = 41
   set %Weapon SRH                        ;War Fork
   set %wood ENK
   set %WarFork = #true
   set %runic TLH
if #menures = 42
   set %Weapon YSF                        ;Mace
   set %wood ENK
   set %Mace = #true
   set %runic TLH
if #menures = 43
   set %Weapon URH                        ;War Mace
   set %wood ENK
   set %WarMace = #true
   set %runic TLH
if #menures = 44
   set %Weapon DDP                       ;Tessin
   set %usecloth = #true
   set %wood ENK
   set %Tessin = #true
   set %runic TLH
if #menures = 45
   set %Weapon WFR                       ;Diamond Mace
   set %wood ENK
   set %DiamondMace = #true
   set %runic TLH
setup1:
;menu get destroymethod            ;Destroy Method
;if #menures = 1
;   set %unravel = #true
;   goto setup2
;if #menures = 2
;   set %smelt = #true
;   goto setup2
;if #menures = 3
;   set %destroy = #true
;   goto setup2
;if #menures = 4
   gosub SetUpTrash
   set %trash = #true
   goto setup2
setup2:
menu get Arachnid                   ;slayers
if #menures = #true
   set %ArachnidSlayer #true
if #menures = #false
   set %ArachnidSlayer #false
menu get Demon
if #menures = #true
   set %DemonSlayer #true
if #menures = #false
   set %DemonSlayer #false
menu get Elemental
if #menures = #true
   set %ElementalSlayer #true
if #menures = #false
   set %ElementalSlayer #false
menu get Repond
if #menures = #true
   set %RepondSlayer #true
if #menures = #false
   set %RepondSlayer #false
menu get Reptile
if #menures = #true
   set %ReptileSlayer #true
if #menures = #false
   set %ReptileSlayer #false
menu get Undead
if #menures = #true
   set %UndeadSlayer #true
if #menures = #false
   set %UndeadSlayer #false
menu get Fire                           ;damage types
if #menures = #true
   set %FireDmg #true
if #menures = #false
   set %FireDmg #false
menu get Cold
if #menures = #true
   set %ColdDmg #true
if #menures = #false
   set %ColdDmg #false
menu get Poison
if #menures = #true
   set %PoisonDmg #true
if #menures = #false
   set %PoisonDmg #false
menu get Energy
if #menures = #true
   set %EnergyDmg #true
if #menures = #false
   set %EnergyDmg #false
menu get Multiple
if #menures = #true
   set %Multiple #true
if #menures = #false
   set %Multiple #false
menu get SSI25
if #Menures = #true
   set %SSI25 #true
if #menures = #false
   set %SSI25 #false
menu get SSI30
if #Menures = #true
   set %SSI30 #true
if #menures = #false
   set %SSI30 #false
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
;====================Next Page X/Y=======================================
set %nextpagex 435
set %nextpagey 320
;====================Change Wood X/Y=====================================
set %changewoodx 80
set %changewoody 420
;====================Smelt X/Y===========================================
set %smeltx 80
set %smelty 400
;====================Make Last X/Y=======================================
set %makelastx 330
set %makelasty 500
;====================Exit Craft Gump X/Y=================================
set %exitx 80
set %exity 500
;=====================Weapon Selection Menus (Left Pane)================
set %menu1x 80
set %menu1y 140
set %menu2x 80
set %menu2y 160
set %menu3x 80
set %menu3y 180
set %menu4x 80
set %menu4y 200
set %menu5x 80
set %menu5y 200
set %menu6x 80
set %menu6y 220
set %menu7x 80
set %menu7y 240
set %menu8x 80
set %menu8y 260
set %menu9x 80
set %menu9y 280
set %menu10x 80
set %menu10y 300
set %menu11x 80
set %menu11y 320
;======================Make Menus (Right Pane)=========================
set %wmenu1x 285
set %wmenu1y 120
set %wmenu2x 285
set %wmenu2y 140
set %wmenu3x 285
set %wmenu3y 160
set %wmenu4x 285
set %wmenu4y 180
set %wmenu5x 285
set %wmenu5y 200
set %wmenu6x 285
set %wmenu6y 220
set %wmenu7x 285
set %wmenu7y 240
set %wmenu8x 285
set %wmenu8y 260
set %wmenu9x 285
set %wmenu9y 280
set %wmenu10x 285
set %wmenu10y 300
set #nextcposx 0
set #nextcposy 0
set %hatchet FSF
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.
if %Trash = #true
   gosub SetupTrash
gosub SetWood
return

Now I tried two different things here with each section of the menu for the weapons...

Attempt 1:

As you can see below I tried to wrap the set part of the code.  That didnt work.
Code: [Select]
menu get weaponlist         ;Weaponlist
if #menures = 1
   {
   set %Bow = #true
   set %Weapon WOH               ;Bow
   set %wood TLK
   set %runic UFG
   goto setup1
   }

Attempt 2:
As you can see below, I tried to add in moving to a different area of the setup sub, bypassing the rest of the weapons if it gets a #true variable.  That didnt work as it recognised only the first weapon in the list (Bow).  But it did find the runics and everything just fine.  But it didnt matter what weapon I would choose it would always do bow a fletching tools.
Code: [Select]
menu get weaponlist         ;Weaponlist
if #menures = 1
   set %Bow = #true
   set %Weapon WOH               ;Bow
   set %wood TLK
   set %runic UFG
   goto setup1
   

And it would always skip over doing the trash barrel.  Any help would be greatly appreciated.  Please.
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Coragin on November 04, 2009, 06:10:49 PM
Doing some more thinking, I could just put in check boxes for what kind of tool and a yes/no for wood or ingots.

Maybe pulling from a menu there are too many variables there?

Have the script start....

Display Yes/No Click Yes for Wood No for Ingots.

if yes.

set %Wood TLK
Display Yes/No Click Yes for Fletching No for Carpentry

if Yes set %runic UFG

Therefor leaving the final setup sub without all the extras to look like this

Code: [Select]
menu get weaponlist         ;Weaponlist
if #menures = 1
   set %Bow = #true

The putting  set %weapon WOH in the MakeBow subroutine...

Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Scrripty on November 04, 2009, 06:27:14 PM
You do understand how an if statement works in EUO right?  With the "if" statement, if you only have one line after it, you don't need brackets.  But if you have more than one line in the "if" statement, you need to use brackets like this:

Code: [Select]
IF !Coragin = newb
  gosub FixHimUp

IF !Coragin = newb
{
  gosub FixHimUp
  gosub MakeHimSoup
  gosub HisMomDressesHimFunny
}

Both of those examples are good.  In this code snippet from you you had this posted:

Code: [Select]
if #menures = 8
   {
   set %Weapon PFR                ;Magical Shortbow
   set %wood TLK
   set %MagicalShortBow = #true
   set %runic UFG
   goto setup1
   }
if #menures = 9
   set %Weapon RPF                ;Shepheards Crook
   set %wood TLK
   set %Crook = #true
   set %runic ZFG

The top portion is correct, in that if menu option number 8 is true, it will set all those things.  Menu option number 9 tho, it will come back as false and STILL set all those things after it because they aren't in brackets.  So menu option number 9 will override anything you have selected under it.  1-8 basically.
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Coragin on November 04, 2009, 06:33:43 PM
So all I need to do is put in brackets around every one of them huh?
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Scrripty on November 04, 2009, 06:38:12 PM
So all I need to do is put in brackets around every one of them huh?

You need to put brackets in the CORRECT LOCATIONS yes. :)  I'll give you an example you can run.

Code: [Select]
start:
set !coragin noob
if !coragin = booya
  display Coragin is a noob.
goto start

In this code snippet, if you run it, it wont do a thing.  Because it will hit the if statement, and check to see if !coragin = booya, and since we set !coragin to = noob, it will be #false right?  So it wont display anything, it will skip displaying that line and goto the VERY NEXT LINE and execute it.  Unless we use brackets and add more lines, then it will check to see if it the if statement is true, and execute EVERYTHING in the brackets if it is #true.  Understand better?  Even one bracket out of place and stuff will go all wonky. :)
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Coragin on November 04, 2009, 06:49:10 PM
Okay well I put the brackets in.  Its now only doing bows, no matter what I choose but ALSO is setting up trash barrel.  So thats good, but there is somethign wrong here lol.

Take a look...I tried to cut it shorter so its easier to read.  Bow is number one, then all other bows, then Carpentry and then smithing.  If that will help you look.

Code: [Select]
;--------- EasyUO Menu Designer Code Begin ---------
sub showEUOMenu1
menu Clear
menu Window Title SUO Elemental Weapon Maker
menu Window Color BtnFace
menu Window Size 301 268
menu Font Transparent #true
menu Font Align Right
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Font Transparent #false
menu Font Align Left
menu Text EUOLabel2 4 4 Please select weapon type
menu Text EUOLabel3 4 96 Slayers
menu Text EUOLabe20 4 46 Swing Speed Increase
menu Text EUOLabel4 152 96 Damage Types
menu Text EUOLabel5 152 4 Destroy Method
menu Font BGColor Window
menu Combo Create weaponlist  4 16 141
menu Combo Add  weaponlist Bow
menu Combo Add  weaponlist Crossbow
menu Combo Add  weaponlist Heavy Crossbow
menu Combo Add  weaponlist Composite Bow
menu Combo Add  weaponlist Repeating Crossbow
menu Combo Add  weaponlist Yumi
menu Combo Add  weaponlist Elven Composite Shortbow
menu Combo Add  weaponlist Magical Shortbow           ;8
menu Combo Add  weaponlist Shepherds Crook
menu Combo Add  weaponlist Quarter Staff
menu Combo Add  weaponlist Gnarled Staff
menu Combo Add  weaponlist Bokuto
menu Combo Add  weaponlist Tetsubo
menu Combo Add  weaponlist Club                      ;14
menu Combo Add  weaponlist Crescent Blade
menu Combo Add  weaponlist Cutlass
menu Combo Add  weaponlist Dagger
menu Combo Add  weaponlist Katana
menu Combo Add  weaponlist Kryss
menu Combo Add  weaponlist Scimitar
menu Combo Add  weaponlist No-Dachi
menu Combo Add  weaponlist Wakizashi
menu Combo Add  weaponlist Daisho
menu Combo Add  weaponlist Tekagi
menu Combo Add  weaponlist Kama
menu Combo Add  weaponlist Sai
menu Combo Add  weaponlist Radiant Scimitar
menu Combo Add  weaponlist War Cleaver
menu Combo Add  weaponlist Elven Spellblade
menu Combo Add  weaponlist Assassin Spike
menu Combo Add  weaponlist Leafblade
menu Combo Add  weaponlist Rune Blade
menu Combo Add  weaponlist Axe
menu Combo Add  weaponlist Battle Axe
menu Combo Add  weaponlist Double Axe
menu Combo Add  weaponlist War Axe
menu Combo Add  weaponlist Ornate Axe
menu Combo Add  weaponlist Double Bladed Staff
menu Combo Add  weaponlist Short Spear
menu Combo Add  weaponlist Spear
menu Combo Add  weaponlist War Fork
menu Combo Add  weaponlist Mace
menu Combo Add  weaponlist War Mace
menu Combo Add  weaponlist Tessen (NOT IMPLIMENTED)
menu Combo Add  weaponlist Diamond Mace
menu Font BGColor BtnFace
menu Check SSI25 4 60 69 17 #false 25%
menu Check SSI30 4 75 69 17 #false 30%
menu Check Arachnid 4 116 69 17 #false Arachnid
menu Check Demon 4 132 97 17 #false Demon
menu Check Elemental 4 148 97 17 #false Elemental
menu Check Repond 4 164 97 17 #false Repond
menu Check Reptile 4 180 69 17 #false Reptile
menu Check Undead 4 196 65 17 #false Undead
menu Font BGColor Window
menu Font BGColor BtnFace
menu Check Fire 156 116 97 17 #false Fire
menu Check Cold 156 132 97 17 #false Cold
menu Check Poison 156 148 97 17 #false Poison
menu Check Energy 156 164 97 17 #false Energy
menu Font BGColor Window
menu Combo Create DestroyMethod 152 16 137
menu Combo Add  DestroyMethod Unravel
menu Combo Add  DestroyMethod Smelt
menu Combo Add  DestroyMethod Axe
menu Combo Add  DestroyMethod Trash
menu Font BGColor BtnFace
menu Check Multiple 156 180 97 17 #false Multiple (All)
menu Button Begin 8 224 65 33 Begin
menu Show 420 270
  set #menubutton N/A
  repeat
  until #menubutton <> N/A
  menu delete begin
  menu hide
return
;--------- EasyUO Menu Designer Code End ---------
sub setup
;Runics
;fletch UFG
;smith TLH
;carp ZFG
menu get weaponlist         ;Weaponlist
if #menures = 1
   {
   set %Bow = #true
   set %Weapon WOH               ;Bow
   set %wood TLK
   set %runic UFG
   goto setup1
   }
if #menures = 2
   {
   set %Weapon USF               ;Crossbow
   set %wood TLK
   set %crossbow = #true
   set %runic UFG
   goto setup1
   }
if #menures = 3
   {
   set %Weapon LMH                 ;Heavy Crossbow
   set %wood TLK
   set %HeavyCrossbow = #true
   set %runic UFG
   goto setup1
   }
if #menures = 4
   {
   set %Weapon SPO                 ;Composite Bow
   set %wood TLK
   set %compositeBow = #true
   set %runic UFG
   goto setup1
   }
if #menures = 5
   {
   set %Weapon PPO               ;Repeating Crossbow
   set %wood TLK
   set %RepeatingCrossbow = #true
   set %runic UFG
   goto setup1
   }
if #menures = 6
   {
   set %Weapon XCP                ;Yumi
   set %wood TLK
   set %Yumi = #true
   set %runic UFG
   goto setup1
   }
if #menures = 7
   {
   set %Weapon WER                ;Elven Composite Shortbow
   set %wood TLK
   set %ElvenCompositeShortBow = #true
   set %runic UFG
   goto setup1
   }
if #menures = 8
   {
   set %Weapon PFR                ;Magical Shortbow
   set %wood TLK
   set %MagicalShortBow = #true
   set %runic UFG
   goto setup1
   }
if #menures = 9
   {
   set %Weapon RPF                ;Shepheards Crook
   set %wood TLK
   set %Crook = #true
   set %runic ZFG
   goto setup1
   }
if #menures = 10
   {
   set %Weapon ZPF                 ;Quarter Staff
   set %wood TLK
   set %QuarterStaff = #true
   set %runic ZFG
   goto setup1
   }
if #menures = 11
   {
   set %Weapon QMH                  ;Gnarled Staff
   set %wood TLK
   set %GnarledStaff = #true
   set %runic ZFG
   goto setup1
   }
if #menures = 12
   {
   set %Weapon KDP                  ;Bokuto
   set %wood TLK
   set %Bokuto = #true
   set %runic ZFG
   goto setup1
   }
if #menures = 13
   {
   set %Weapon ADP                  ;Tetsubo
   set %wood TLK
   set %Tetsubo = #true
   set %runic ZFG
   goto setup1
   }
if #menures = 14
   {
   set %Weapon QOH                  ;Club
   set %wood TLK
   set %Club = #true
   set %runic ZFG
   goto setup1
   }
if #menures = 15
   {
   set %Weapon NPO                  ;Crescent Blade
   set %wood ENK
   set %CrescentBlade = #true
   set %runic TLH
   goto setup1
   }
if #menures = 16
   {
   set %Weapon JPH                  ;Cutlass
   set %wood ENK
   set %Cutlass = #true
   set %runic TLH
   goto setup1
   }
if #menures = 17
   {
   set %Weapon WSF                  ;Dagger
   set %wood ENK
   set %Dagger = #true
   set %runic TLH
   goto setup1
   }
if #menures = 18
   {
   set %Weapon NMH                   ;Katana
   set %wood ENK
   set %Katana = #true
   set %runic TLH
   goto setup1
   }
if #menures = 19
   {
   set %Weapon VRH                   ;Kryss
   set %wood ENK
   set %Kryss = #true
   set %runic TLH
   goto setup1
   }
if #menures = 20
   {
   set %Weapon SOH                   ;Scimitar
   set %wood ENK
   set %Scimitar = #true
   set %runic TLH
   goto setup1
   }
if #menures = 21
   {
   set %Weapon YCP                   ;No-Dachi
   set %wood ENK
   set %NoDachi = #true
   set %runic TLH
   goto setup1
   }
if #menures = 22
   {
   set %Weapon                   ;Waka
   set %wood ENK
   set %Waka = %true
   set %runic TLH
   goto setup1
   }
if #menures = 23
   {
   set %Weapon JDP                   ;Daisho
   set %wood ENK
   set %Daisho = #True
   set %runic TLH
   goto setup1
   }
if #menures = 24
   {
   set %Weapon LDP                  ;Tekagi
   set %wood ENK
   set %Tekagi = #true
   set %runic TLH
   goto setup1
   }
if #menures = 25
   {
   set %Weapon FDP                   ;Kama
   set %wood ENK
   set %Kama = #true
   set %runic TLH
   goto setup1
   }
if #menures = 26
   {
   set %Weapon HDP                   ;Sai
   set %wood ENK
   set %Sai = #true
   set %runic TLH
   goto setup1
   }
if #menures = 27
   {
   set %Weapon XFR                   ;Radiant Scimitar
   set %wood ENK
   set %RadiantScimitar = #true
   set %runic TLH
   goto setup1
   }
if #menures = 28
   {
   set %Weapon HFR                   ;War Cleaver
   set %wood ENK
   set %WarCleaver = #true
   set %runic TLH
   goto setup1
   }
if #menures = 29
   {
   set %Weapon GFR                   ;Elven Spellblade
   set %wood ENK
   set %ElvenSpellBlade = #true
   set %runic TLH
   goto setup1
   }
if #menures = 30
   {
   set %Weapon FFR                    ;Assassins Spike
   set %wood ENK
   set %AssassinsSpike = #true
   set %runic TLH
   goto setup1
   }
if #menures = 31
   {
   set %Weapon IFR                    ;Leafblade
   set %wood ENK
   set %Leafblade = #true
   set %runic TLH
   goto setup1
   }
if #menures = 32
   {
   set %Weapon EFR                    ;Runeblade
   set %wood ENK
   set %Runeblade = #true
   set %runic TLH
   goto setup1
   }
if #menures = 33
   {
   set %Weapon OSF                    ;Axe
   set %wood ENK
   set %Axe = #true
   set %runic TLH
   goto setup1
   }
if #menures = 34
   {
   set %Weapon MSF                    ;Battleaxe
   set %wood ENK
   set %BattleAxe = #true
   set %runic TLH
   goto setup1
   }
if #menures = 35
   {
   set %Weapon NSF                    ;Double Axe
   set %wood ENK
   set %DoubleAxe = #true
   set %runic TLH
   goto setup1
   }
if #menures = 36
   {
   set %Weapon UOH                    ;War Axe
   set %wood ENK
   set %WarAxe = #true
   set %runic TLH
   goto setup1
   }
if #menures = 37
   {
   set %Weapon OFR                    ;Ornate Axe
   set %wood ENK
   set %OrnateAxe = #true
   set %runic TLH
   goto setup1
   }
if #menures = 38
   {
   set %Weapon VPO                    ;Double Bladed Staff
   set %wood ENK
   set %DoubleBladedStaff = #true
   set %runic TLH
   goto setup1
   }
if #menures = 39
   {
   set %Weapon XRH                       ;Short Spear
   set %wood ENK
   set %ShortSpear = #true
   set %runic TLH
   goto setup1
   }
if #menures = 40
   {
   set %Weapon MTF                        ;Spear
   set %wood ENK
   set %Spear = #true
   set %runic TLH
   goto setup1
   }
if #menures = 41
   {
   set %Weapon SRH                        ;War Fork
   set %wood ENK
   set %WarFork = #true
   set %runic TLH
   goto setup1
   }
if #menures = 42
   {
   set %Weapon YSF                        ;Mace
   set %wood ENK
   set %Mace = #true
   set %runic TLH
   goto setup1
   }
if #menures = 43
   {
   set %Weapon URH                        ;War Mace
   set %wood ENK
   set %WarMace = #true
   set %runic TLH
   goto setup1
   }
if #menures = 44
   {
   set %Weapon DDP                       ;Tessin
   set %usecloth = #true
   set %wood ENK
   set %Tessin = #true
   set %runic TLH
   goto setup1
   }
if #menures = 45
   {
   set %Weapon WFR                       ;Diamond Mace
   set %wood ENK
   set %DiamondMace = #true
   set %runic TLH
   goto setup1
   }
setup1:
menu get destroymethod            ;Destroy Method
if #menures = 1
   {
   set %unravel = #true
   goto setup2
   }
if #menures = 2
   {
   set %smelt = #true
   goto setup2
   }
if #menures = 3
   {
   set %destroy = #true
   goto setup2
   }
if #menures = 4
   {
   gosub SetUpTrash
   set %trash = #true
   goto setup2
   }
setup2:
menu get Arachnid                   ;slayers
if #menures = #true
   set %ArachnidSlayer #true
if #menures = #false
   set %ArachnidSlayer #false
menu get Demon
if #menures = #true
   set %DemonSlayer #true
if #menures = #false
   set %DemonSlayer #false
menu get Elemental
if #menures = #true
   set %ElementalSlayer #true
if #menures = #false
   set %ElementalSlayer #false
menu get Repond
if #menures = #true
   set %RepondSlayer #true
if #menures = #false
   set %RepondSlayer #false
menu get Reptile
if #menures = #true
   set %ReptileSlayer #true
if #menures = #false
   set %ReptileSlayer #false
menu get Undead
if #menures = #true
   set %UndeadSlayer #true
if #menures = #false
   set %UndeadSlayer #false
menu get Fire                           ;damage types
if #menures = #true
   set %FireDmg #true
if #menures = #false
   set %FireDmg #false
menu get Cold
if #menures = #true
   set %ColdDmg #true
if #menures = #false
   set %ColdDmg #false
menu get Poison
if #menures = #true
   set %PoisonDmg #true
if #menures = #false
   set %PoisonDmg #false
menu get Energy
if #menures = #true
   set %EnergyDmg #true
if #menures = #false
   set %EnergyDmg #false
menu get Multiple
if #menures = #true
   set %Multiple #true
if #menures = #false
   set %Multiple #false
menu get SSI25
if #Menures = #true
   set %SSI25 #true
if #menures = #false
   set %SSI25 #false
menu get SSI30
if #Menures = #true
   set %SSI30 #true
if #menures = #false
   set %SSI30 #false
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
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Scrripty on November 04, 2009, 06:57:45 PM
Ok, another problem I see is you're using goto's.  Which is fine, gotos work.  But gosub is SO much more powerfull and it makes debugging WAY easier.  Here's the format you should use.  I think SuperSlayer posted a really good example of script format... or maybe TopTwo... if they read this maybe they can find it and post it, but here's a basic format:

Code: [Select]
; script description

; script setup

; main loop
start:

; gosubs and script

goto start
; end main loop

; subs

; menu code

Here's a script I just wrote to help me train ninja.  It's very simple and works great, it might help you see what I'm saying.

Code: [Select]
set !what #systime
gosub setpixel-ls

mainloop:
if !what < #systime
  {
    set !what #systime + 300000
    key b ctrl
  }
if #mana > 18
   gosub exec-ls
else
{
   repeat
   event macro 13 46
   wait 1s
   key c alt
   wait 10
   until #mana = #maxmana
   event macro 52 3
   wait 5
   event macro 53
}
goto mainloop

sub setpixel-ls
    event macro 15 246
    display ok move the mouse to Lightning Strike Button. you have 2 seconds
    wait 2s
    savePix #CURSORX #CURSORY 1
    wait 5
return

sub exec-ls
       cmppix 1 f
       {
       event macro 15 246
       wait 5
       }
return
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Scrripty on November 04, 2009, 07:05:38 PM
Hey, seriously tho, before you go any further, or cut anything else out of that script or change anything, you need to do some reading on each and every command you don't understand FULLY and maybe do some examples.  And I'm saying this not to hurt your feelings because you're doing great, and trying, but to encourage you more... :)  If you don't understand how an IF statement works FULLY, you need to read more.  Seriously!  Getting a larger script to work and making it work correctly can be mind numbing sometimes if you don't fully understand what you're doing.  Make sure and read about every command you're using fully. :)  It helps a TON.  When I'm scripting I reread the docs at easyuo constantly.  I have it on favorites and it's ALWAYS up when I'm doing a script. :)  I still read them 24/7.  And I'm finally getting to where I can script without using it much.  Read read read. :)
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: NObama on November 04, 2009, 07:11:07 PM
You're doing great, Cor - much better than my sad sad little scripts.

Although the Ants fear me now.

 :)
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: TrailMyx on November 04, 2009, 07:13:04 PM
Don't forget about the quick command reference in the ScriptUO program also.  It will take you right to the correct Wiki page on EasyUO.
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Scrripty on November 04, 2009, 07:16:13 PM
I ran your script through TM's ScriptUO and came up with this:

Warning - Gosub checkreptiLSlayer - Line 594 has no matching SUBroutine
Warning - SUBROUTINE checkreptileslayer - Line 760 unused
Warning - SUBROUTINE nextpage - Line 1026 unused

So by that I'd say your spelling on checkretilslayer on line 594 is wrong for one :)  And those other sub nextpage isn't being called at all... be carefull using other peoples scripting in scripts you're going to release also Cor.  People don't like that a lot. :)
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Scrripty on November 04, 2009, 07:16:51 PM
Don't forget about the quick command reference in the ScriptUO program also.  It will take you right to the correct Wiki page on EasyUO.

I was gettin there dagnabit. :)  Also, bookmark any and all reference pages you find.  It's nice not to have to look for them, just jump right back to the page when you need it.  Also, when you change ANYTHING significant... make a BACKUP COPY FIRST.  I've had to redo DAYS of scripting because I messed up something and couldn't remember fully what I did... haha  BACKUPS ROCK. :)
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: TrailMyx on November 04, 2009, 07:21:40 PM
... be carefull using other peoples scripting in scripts you're going to release also Cor.  People don't like that a lot. :)

I agree.  If you pull and use a snippet from another script, please credit the author. 
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Scrripty on November 04, 2009, 07:25:59 PM
Yea, I didnt forget about testing yours, as a matter of fact, THATS THE REASON I STARTED THIS, didnt have a good weapon to test with for the specific tests I wanted.

Hey Coragin?  What weapon are you trying to make to use the PVM Dexer with?  Because seriously you don't need a good weapon.  Anything that's FAST, has medium damage and lower defense is fairly decent.  If it has lower d and hit stamina leech even better.  But fast and lower defense is all you need, and you don't even need lower d if you have it on your suit.
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Coragin on November 04, 2009, 07:34:11 PM
Okay, I cant find the problem...but I got almost ALL the rest fixed....

It is stuck on MAKE LAST, I know my clicks are right, I just re-went through all of them.  It is somewhere in the first make sub but I cant figure out where....lol

Can you guys look at that and see if you see something?

And I will go through the rest of the code for mis-spellings too lol.

Thank you so much Bama!
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Coragin on November 04, 2009, 07:41:00 PM
I ran your script through TM's ScriptUO and came up with this:

Warning - Gosub checkreptiLSlayer - Line 594 has no matching SUBroutine
Warning - SUBROUTINE checkreptileslayer - Line 760 unused
Warning - SUBROUTINE nextpage - Line 1026 unused

So by that I'd say your spelling on checkretilslayer on line 594 is wrong for one :)  And those other sub nextpage isn't being called at all... be carefull using other peoples scripting in scripts you're going to release also Cor.  People don't like that a lot. :)

Fixed = Warning - Gosub checkreptiLSlayer - Line 594 has no matching SUBroutine
Fixed = Warning - SUBROUTINE checkreptileslayer - Line 760 unused
Cant find = Warning - SUBROUTINE nextpage - Line 1026 unused

And yes I know how to find what line I am on :p

I dont know why the click isint working to make the item though.
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Coragin on November 04, 2009, 07:44:23 PM
... be carefull using other peoples scripting in scripts you're going to release also Cor.  People don't like that a lot. :)

I agree.  If you pull and use a snippet from another script, please credit the author. 

The only thing that isint original is the gumpwait sub, which I got it out of MAss's Relic script, and credit was given, not only to Mass but all who have been helping me.  Twinkle McNugget and EN are gonna get their own special area in all my scripts they have helped me so much.  Between posts and PM's...wow, I may be a big contributor after all.  :)
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Coragin on November 04, 2009, 07:51:39 PM
Okay here is an example of the sub to make a bow....I am using this because well, it dont matter which one I use, whatever is the last thing I made is what gets made.

Code: [Select]
Sub FirstMake
if %Bow = #true
   gosub MakeBow

*bleep* I got it in the middle of typing this...

Code: [Select]
if %Bow = #true

Now this is where it defines a bow...

Code: [Select]
if #menures = 1
   {
   set %Bow = #true
   set %Weapon WOH               ;Bow
   set %wood TLK
   set %runic UFG
   ;goto setup1
   }

That is correct, it defines bow as true, however the rest of them....like this for example....

Code: [Select]
if #menures = 2
   {
   set %Weapon USF               ;Crossbow
   set %wood TLK
   set %crossbow = #true
   set %runic UFG
   ;goto setup1
   }

No defining of Crossbow = #true

Finally!!!  I need to change 46 lines, then upload the new version.
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Scrripty on November 04, 2009, 07:55:26 PM
Well congrats. :)  I didn't really help you tho, just pointed you in the right direction bud. :)  It's fun when something starts to really make sense tho huh?  Just wait till EN starts beating on you for using too many lines in your code.   hehe
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Coragin on November 04, 2009, 07:56:26 PM
Ugh nope that wasent it as far as I can tell, they actually are there, just below...

Does that matter?  And would it be Case Sensitive?
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: NObama on November 04, 2009, 08:06:21 PM
Don't believe it's case sensitive...

 :)
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Scrripty on November 04, 2009, 08:08:17 PM
Don't believe it's case sensitive...

 :)

EUO ignores case. :)  Coragin there's some good reading in this thread.  Take a look when you can.

http://www.scriptuo.com/index.php?topic=2619.0
Title: Re: SUO AIO Weapon Crafting Tool v1.0
Post by: Coragin on November 04, 2009, 08:52:36 PM
GOT IT!  New file being uploaded!  Please test.
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: JustAnotherFace on November 05, 2009, 09:25:37 AM
I took a very quick look thru your code, cant test it out here at work, but was just scanning thru to see how it looks.  I have a couple of pointers for you, that some others were nice enough to pass along to me in the past.  These will cut down dramatically on the number of lines of code you have, as well as the number of sub-routines.

1)
Code: [Select]
menu get Arachnid                             ;slayers
if #menures = #true
   set %ArachnidSlayer #true
if #menures = #false
   set %ArachnidSlayer #false
menu get Demon
if #menures = #true
   set %DemonSlayer #true
if #menures = #false
   set %DemonSlayer #false
menu get Elemental
if #menures = #true
   set %ElementalSlayer #true
if #menures = #false
   set %ElementalSlayer #false
menu get Repond
if #menures = #true
   set %RepondSlayer #true
if #menures = #false
   set %RepondSlayer #false
menu get Reptile
if #menures = #true
   set %ReptileSlayer #true
if #menures = #false
   set %ReptileSlayer #false
menu get Undead
if #menures = #true
   set %UndeadSlayer #true
if #menures = #false
   set %UndeadSlayer #false
menu get Fire                                 ;damage types
if #menures = #true
   set %FireDmg #true
if #menures = #false
   set %FireDmg #false
menu get Cold
if #menures = #true
   set %ColdDmg #true
if #menures = #false
   set %ColdDmg #false
menu get Poison
if #menures = #true
   set %PoisonDmg #true
if #menures = #false
   set %PoisonDmg #false
menu get Energy
if #menures = #true
   set %EnergyDmg #true
if #menures = #false
   set %EnergyDmg #false
menu get Multiple
if #menures = #true
   set %Multiple #true
if #menures = #false
   set %Multiple #false
menu get SSI25
if #Menures = #true
   set %SSI25 #true
if #menures = #false
   set %SSI25 #false
menu get SSI30
if #Menures = #true
   set %SSI30 #true
if #menures = #false
   set %SSI30 #false

Ok, someone can feel free to correct me if I am wrong, but I am pretty sure that you do not need all those
Code: [Select]
if#menures = #false statements in there.  In fact you can shorten up your code a lot but simply writing it like this:

Code: [Select]
Menu get Arachnid
If #menures
   Set Arachnid #true
Menu get blahblah
If #menures
   Set blahblah #true
Menu get YouGetThePoint
If #menures
   Set YouGetThePoint #true

2)
Code: [Select]
sub CheckWeapon1
if %ArachnidSlayer = #true
   gosub CheckArachnidSlayer
if %ElementalSlayer = #true
   gosub CheckElementalSlayer
if %ReptileSlayer = #true
   gosub CheckReptileSlayer
if %UndeadSlayer = #true
   gosub CheckUndeadSlayer
if %RepondSlayer = #true
   gosub CheckRepondSlayer
if %DemonSlayer = #true
   gosub CheckDemonSlayer

This could be changed up a little and the resulting subs could also be changed to a single sub:

Code: [Select]
sub CheckWeapon1
if %ArachnidSlayer = #true
   gosub CheckSlayer arachnid
if %ElementalSlayer = #true
   gosub CheckSlayer elemental
if %ReptileSlayer = #true
   gosub CheckSlayer reptile
if %UndeadSlayer = #true
   gosub CheckSlayer undead
if %RepondSlayer = #true
   gosub CheckSlayer repond
if %DemonSlayer = #true
   gosub CheckSlayer demon

The resulting subs could all be captured in one sub like follows:

Code: [Select]
Sub CheckSlayer ; %1 property passed from above sub to check for..E.G. arachnid, demon, etc
         finditem %MadeWeapon C_ , #backpackid
         if #findcnt >= 1
            {
            event property #findid
            if %1 in #property
               {
               wait 5
               Gosub StoreWeapon
               Return
               }
            }
Return

The same can be done for you cold, fire, poison etc damage weapons as well. 

This line may give you some unexpected results:
Code: [Select]
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
The unexpected results will come in when you make an elemental slayer that also has fire or poison damage on the bow.  In other words, if you make an Elemental superslayer with 50 phy damage and 25 fire damage and 25 poison damage, this bow will not get stored.

Again, just some real quick looks thru your code and hopefully something helpful.  Your doing a great job so far, keep up the good work!

JaF
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Coragin on November 05, 2009, 09:31:15 AM
Thanks for the input and advise JaF.  I will use it eventually, but as of right now I am still learning and want to stick with what I do know and make a script that works and do changes at a later time to condense subs and the script.

Try it out when you get home, truely is a wonderful tool for burning down runics for specific things you want on a weapon, but dotn wanna keep clicking make last lol.
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Scrripty on November 05, 2009, 09:38:22 AM
Thanks for the input and advise JaF.  I will use it eventually, but as of right now I am still learning and want to stick with what I do know and make a script that works and do changes at a later time to condense subs and the script.

Try it out when you get home, truely is a wonderful tool for burning down runics for specific things you want on a weapon, but dotn wanna keep clicking make last lol.

Cor, what he said is correct, you do need to work on the fire/poison elemental scanning so it doesn't throw away or burn things you want to keep...  Sounds like he knows what he's sayin... I haven't looked at it so I don't know. :)  I'm sure there's a script out there that uses #property to scan for 100 percent elemental damage you could look at to see how they did it.  No one wants a script that burns runics if it doesn't do exactly what you want and wastes the runic... :)
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: JustAnotherFace on November 05, 2009, 10:23:13 AM
I respect and understand your wanting to learn it in your own time!  Again, was just some pointers to help you out if you wanted to reduce your code.

One other thing I noticed is in this part of the code:

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

You are using the repeat command with no until following.

Also, the
Code: [Select]
if #findcnt =-1 should probably be changed to
Code: [Select]
if #findcnt < 1
You should put an until after the repeat somewhere.... Actually I would change it to totally take out the if #findcnt < 1 and do it like this:

Code: [Select]
Sub Unravel
Repeat
 {
    finditem %MadeWeapon C_ , #BackPackid
    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
 }
Until #findcnt < 1
Return

Again, I am not trying to tell you what to do, just to offer advice and point you in the right direction.  Hope this helps in some way.

The documentation for the Repeat - Until command can be found here http://wiki.easyuo.com/index.php/Repeat..until (http://wiki.easyuo.com/index.php/Repeat..until)

JaF
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Scrripty on November 05, 2009, 10:25:43 AM
90 percent of the problems you'll have learning EUO are syntax problems.  Just learning what to type to get EUO to understand it. :)  And spelling, and bracket errors imo.
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: JustAnotherFace on November 05, 2009, 10:36:34 AM
90 percent of the problems you'll have learning EUO are syntax problems.  Just learning what to type to get EUO to understand it. :)  And spelling, and bracket errors imo.

Agreed!  Scripting isnt hard to learn. I think the best way to learn is to start out by using someone elses code, stepping thru it and watching what happens on each executed line.  Then start making small scripts to do small things you want to do, again stepping thru each line to see how it behaves.... before you know it, your writing large scripts and understand how EUO works, at least for the most part.

JaF
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Paulonius on November 09, 2009, 11:30:53 AM
Here are my thoughts in no particular order:

1. Would help to have offset clicks for the various menus to keep it running if they move.
2. You have really worked your butt off programing each weapon.  You might consider using a string/parse system to put this many weapons in a script next time.  Will make it a ton easier to update if/when the gumps change again.
3. It would be nice if the weapons in the menu were alphabetized to find them more easily.
4. The unravel menu duplicates targets a lot.  I changed the equation on the backpack check for the current weapon from =  -1 to < 1 and it appears to have cleared up the problem.
5. I would add a few properties: 100 luck, 15 HCI/DCI. I plugged these into my version.
6. There are still some false positives with the current logic.  Instead of a conjunctive for Swing Speed Increase and the value you want, I would change it to a single text variable based on what the property will say like "increase , spc# , 30" for speed increase 30, or "luck , spc# , 100" for 100 luck.  This will avoid the script pulling any item with swing speed increase and 30 in a damage category...

All I have for you for today.  Great work so far!
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Coragin on November 09, 2009, 01:54:55 PM
Thanks for al the input guys.  Yes I want to do the gump clicks and actually make them a separate file so I can use it in multiple scripts.  Like the bod one I am making.  As far as string variables, I dont know those yet and any example that would make sense to me would have to be something I would want it to do.  Remember I am still getting my feet wet.  EUO scripts are very similar to MQ2 macros for everquest, almost identical for programming and I Was really good at that.  I made scripts that ran 6 accounts together in a group with heals and buffs and tank and looting and repeat.  Instead of offset clicks though every window had a unique name and all buttons in it had a unique name.  so it was something like this for clicking a gump button...

click EQ_QuestWindow YesButton

or

click EQ_RewardWindow OptionOne

and the gotos were quite different, the : was i nthe beginning...

:loop

goto :loop

for ALL casting you could just type

/cast spell 'Greater Healing'

you could also handle hit points a ton easier.

/if me_PctHPs <50 gosub Heal

And yes it could be one line.

but for the most part, very similar.
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: JustAnotherFace on November 09, 2009, 02:50:45 PM


you could also handle hit points a ton easier.

/if me_PctHPs <50 gosub Heal

Code: [Select]
if #hits < 50
 Gosub Heal

Looks pretty much the same to me other than obviously being on a second line.
Your doing a fine job so far, keep up the learning!!

If you have any questions, feel free to ask, someone here will be glad to help you :)

JaF
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Paulonius on November 09, 2009, 07:35:05 PM
Absolutely nothing negative about my comments, you have clearly put a lot of work into this script and you did a great job to get this far... I would want you to tell me everything you could think of that might improve something I did, so I hope you take my comments in the same light. 
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Coragin on November 09, 2009, 08:17:40 PM
Of coarse
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: JustAnotherFace on November 10, 2009, 08:42:55 AM
Absolutely nothing negative about my comments, you have clearly put a lot of work into this script and you did a great job to get this far... I would want you to tell me everything you could think of that might improve something I did, so I hope you take my comments in the same light. 

Ditto for me as well Cor.  Only offering advice :)

JaF
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Coragin on November 10, 2009, 12:45:33 PM
I love having feedback and having advise too.  Unless its something, "Thats the stupidest idea for a script ever, blah blah you should be blah blah" That kind I dont take so kindly lol.
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Paulonius on January 13, 2010, 02:28:09 PM
Cor,

I updated your script to unravel with the new imbue gumps and also made the following modifications which you may or may not care for:   

Added the offset click sub and used offset click for the imbue process. 

Updated the Radiant Scimitar Sub to run based on Offset rather than straight clicks. I figure you can use this for a template for changing over all of your item subs to offset clicks if you choose to do so.

Added a scan for 100 luck items (I like selling 140 luck stuff).  I didn't make it a menu option, I just coded in the scan as always on.

Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: manwinc on January 13, 2010, 06:31:15 PM
Aww Phooie, I was working on something similar to this for a guildmate. Oh well, I'll just give him yours :)
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Coragin on January 13, 2010, 07:24:43 PM
manwinc, why not work on it with me?  give me a couple days to get all my ducks in a row and i will send you the new version which is for armor but will eventually do weapons too.  And pick your imbue.  :)

Paul, I love when someone improves upon my scripts, usually I dont name them after me for that reason, so improvements can be made and not change the name of the script.  If you want to help on things, check my other post about the armor one, I could use an offset click in that.
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: NObama on January 18, 2010, 10:13:24 AM
Is it possible to make a 100% elemenatl weapon with an oak runic, or am I just burning resources to no effect?

 :)
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Wilk on January 18, 2010, 11:20:06 AM
Yes, may take you a while though. I did it with some bokutos 2 days ago.
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: NObama on January 18, 2010, 12:16:52 PM
Feedback for ya:  I'd put in some sort of journal scan routine that notes when the trash barrel is too full, then waits three minutes.  I ended up with a whole pack of heavy x bows because the script crafts and evals them much faster than the trask bucket empties.

Also - Is anyone else having trouble with the unravel option?  If I try to use unravel, the following steps occur:

1) Makes a bow
2) Evals a bow
3) Makes a second bow
4) Opens imbuing menu.
5) Never recognizes that the menu is open and gets stuck in a loop trying to open the menu

Other than those minor issues (who needs more residue, anyway?), good stuff!

 :)
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Coragin on January 18, 2010, 09:57:10 PM
I did some private updating to the unravel and its running smoother, but then I got to workin on the armor making script.  Gonna have to get this one polished up.
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Paulonius on March 08, 2010, 12:47:45 AM
I did a bit more testing on your script over the weekend and made a couple of additional mods.

1. The script doesn't have a failsafe if the weapon you make doesn't have a high enough intensity to allow you to unravel it.  As written it drops into an endless loop if you make one. I added in a journal check for the message and have it trashing the item if this happens.

2. I modded your trash sub to find the trash barrel so that it won't require setup.

3. The Item ID for composite bow was wrong. I corrected it.

4. I substituted the straight clicks in the make item sub for gump clicks.

5. I added in hard-coded property checks for 100 luck weapons and bows with both channeling and balance.  Comment these out if you don't care for them, I didn't add them to your menu setup.
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Coragin on March 08, 2010, 05:33:34 AM
Thanks Paul!  I hope you added your corrections into the header so you can have credit.  I am now uploading it to the main post.
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Ultima on June 01, 2010, 07:11:48 PM
Does the script only look for weapons with 100% Elemental Damage or can it be edited to store weapons with 60% or greater in a certain element?

Alot of potentially perfect weapons could be tossed out. You could get a 60% Fire Weapon with all the right mods which can be enhanced with bronze up to 100%. Or one with 80% Energy enhanced with copper to 100% Etc...

Is this a simple fix or something that requires alot more coding?
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Ultima on June 07, 2010, 10:25:04 AM
Magical shortbow ID should be set to VER instead of PFR , at least on the OSI production shard I'm playing on.

Being the extremely talented coder that I am I did a quick fix edit and set the slayers to grab  objects containing 50%,60%,80%,90% instead of the actual slayer property. I can easily imbue that property or whatever property I want onto the item. The only real value to me is the elemental damage type.
 
I also had to change the menu for Ornate Axes to menu 6 on the left side as it wasn't on the Axes menu but the bladed items icon menu probably a result of recent gump changes. There was also issues with the script not pulling more ingots when crafting Ornate Axes. I haven't been able to trouble shoot through this yet but will play around with it some more as I do want some Ornate Axes is my tool bag.

I've blown through virtually all of my runics that I've accumulated and getting a 100% Elemental Damage is few and far between. Many times I'm having to settle for an 80% or 90% elemental damage with the desired properties. You would think the 100%'s would come more often but they don't and when they do come it's usually with some mods that seriously detracts from the weapon.

Having the right elemental weapon is probably the best thing you can do for yourself when PVM'ing....it makes all the difference in the world. Probably more than any buff you can put up. Much of the timing I'm maxing out on damage before invoking EoO or honor. I hate having casting consecrate weapon as it usually on last 3-4 seconds and  eats up mana as well as takes up time I could be casting something else beneficial.

This script is a world beater in my opinion. Kudos to Coragin and Paulonious for putting this baby together. I can't believe it's only been downloaded 3 times. It belongs in the Elite section as far as I'm concerned. 8)

Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Paulonius on June 07, 2010, 10:33:03 AM
The ingot pull issue I have seen comes where you have more than one stack of ingots and one has fewer than the minimum.  It doesn't look at more than one stack as coded.

I agree that the 100% elementals should be modified to the minimum that enhancing with an appropriate material will get to 100%, that is a solid observation. 

I have modified a number of weapon recipes and tinkered with the save criteria in my version, but as its Cor's script, I think its up to him to modify the original.  Maybe you could post the code for your changes with an explanation for what you did? 
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Ultima on June 07, 2010, 01:55:16 PM
The ingot pull issue I have seen comes where you have more than one stack of ingots and one has fewer than the minimum.  It doesn't look at more than one stack as coded.
I just tried it again with one stack of ingots and had the same issue...I'm not sure if it's in my ability to decipher where the issue is but I will look at it some more and see if I can find any inconsistencies causing the problem.

I agree that the 100% elementals should be modified to the minimum that enhancing with an appropriate material will get to 100%, that is a solid observation.
For sure I've enhanced quite a few and it pays big dividends. I'd rather have a 90% weapon with the right properties than a 100% with the wrong ones.

The ingot guide:
Iron = Zilch
Dull Copper = +50 Durability, Lower Requirements 20%
Shadow = +20% Cold Damage, +50 Durability
Copper =  +20% Energy Damage, +10% Poison Damage
Bronze = +40% Fire Damage
Golden = +40 Luck, Lower Requirements 50%
Agapite = +30% Cold Damage, +20% Energy Damage
Verite = +20% Energy Damage, +40% Poison Damage
Valorite = +20% Cold Damage, +20% Energy Damage, +10% Fire Damage, +10% Poison Damage
 

To those who haven't experimented with this stuff you can only enhance physical damage. And the materials with two properties such as Copper,Agapite,Verite and Valorite the 2nd property is going to come on the back end only after the first elemental property has been filled. So for example a weapon with 70% Poison and 30% Physical enhanced with Verite will end up with 80% Poison/20% Energy. Unfortunaltely Poison isn't one of elemental damages you can add first. This makes enhancing Posion items very challenging where fire is very easy.
 
I do believe using an Ancient Smithing Hammer helps your chances of enhancing. But I can't confirm 100%. Can't hurt though. 8)

I have modified a number of weapon recipes and tinkered with the save criteria in my version, but as its Cor's script, I think its up to him to modify the original.  Maybe you could post the code for your changes with an explanation for what you did?  
I forgot all the minor changes I did but I know they were just minor because that's all I'm capable of. :P

I just changed the setting of Slayers:
Code: [Select]
set %reptile Reptile
set %undead Undead
set %demon Demon
set %arachnid Arachnid
set %repond Repond
set %elemental Elemental
set %damagepercent 100%
to
Code: [Select]
set %reptile 70%
set %undead 80%
set %demon 90%
set %arachnid 60%
set %repond 50%
set %elemental Elemental
set %damagepercent 100%

Yea it's not pretty I just jimmy'd it to pull the weapons I do want and it's working for the most part just not like if one of the Jedi Master's here looked at the code. I also changed the magical shortbow to VER and the menu on the ornate axe as well as the crafting window to 530_497 from 530_507.
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Paulonius on June 07, 2010, 02:00:56 PM
Maybe when we make the transition to OEUO I will work with Cor to come up with an updated version.

I think the list of things I did is:

Pull bows with channel and balance

Pull 100 luck items

equip a +10 ASH out of a secure

Work out of a variety of containers
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Ultima on June 07, 2010, 02:07:23 PM
I posted an edited version. If this is not kosher someone please say the word or use your Super Powers to fix the issue. 8)

@Paulionius

This is definitely a script near and dear to my heart as it gives you such value on the battlefield. I'll post some pics of some of the weapons I'm proud of and use for spawning and what not.

It be great to see this get some more attention in the future. More containers to store items etc but it's working for all the items I'm crafting with the exception of the ornate axe. So far I've been crafting radiant scimitars, Daisho, Yumi, and magical shortbows.

And I'm about all out of runics and SBOD's. :(

Need to head back to Heartwood! Just when I thought my slaving days for those elves were all over...
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Paulonius on June 29, 2010, 01:59:58 PM
Ultima, per your request.

http://www.scriptuo.com/index.php?topic=5371.msg45332#msg45332

I only did fire and cold so far. I still need to sort out the numbers for the rest...
Title: Re: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL
Post by: Cerveza on July 18, 2010, 04:44:31 AM
Something is broken, it worked a few days (week?) ago, but I redownloaded it and ran it last night.

2 - slayers, and they both had 30 ssi.... so I'm sure they were kept cause of the ssi and not the slayer. actually I'm sure of it because one is a blood ele slayer.

I logged on and burned up the last shadow hammer this morning and watched it unravel a dragon slayer, even though they are checked for keeping.