Author Topic: SUO AIO Weapon Crafting Tool v1.5 WORKING IN FULL  (Read 22293 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 AIO Weapon Crafting Tool v1.5 WORKING IN FULL
« on: November 04, 2009, 04:30:21 PM »
0
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:
  • Creates Weapons you choose from a menu with runic tools
  • Supports Fletching, Blacksmithing and Carpentry
  • Will look for Super Slayer properties YOU specify and store them
  • Will look for 100% Elemental Damage (Fire, Cold, Energy, Poison) and store if the option is checked.
  • Will look for Weapon properties with ALL Elemental Damage but not 100% of any type and store them. (Excluding Physical Completely)
  • Knows what runic and tools to use as well as materials based on your weapon choice.
  • Gives you the option in Unravel, Smelt, Throw Away or destroy via Hatchet and Tongs.

This script setup is simple:
  • Have a secure container with a bag inside to store weapons that you decide to keep
  • Have all resources in the TOP LEVEL of your secure, Wood, Ingots, Runics
  • If you are using DESTROY method, you MUST have a HATCHET in your backpack
  • If you are using the TRASH option, you MUST have a TRASH BARREL Near you/
  • If you are using the UNRAVEL option, you MUST have a SOULFORGE near you
  • If you are crafting with SMITHING RUNICS you MUST have an ANVIL and FORGE near you.
  • Click Play, choose your weapon and options, follow the setup prompts based on your choices and watch your crafter make your weapons.

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:
  • Add More Weapons (If there is any you would like added, please post)
  • Add more mod options

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.

There are 2 attachment(s) in this post. You must register and post an acceptable introduction to download
SUO AIO Weapon Crafter v1.5.txt
SUO_AIO_Weapon_Crafter_v1.6.txt
« Last Edit: March 08, 2010, 05:35:18 AM by Coragin »
Coragin

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

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 AIO Weapon Crafting Tool v1.0
« Reply #1 on: November 04, 2009, 05:17:35 PM »
0
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.
Coragin

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

Scrripty

  • Guest
Re: SUO AIO Weapon Crafting Tool v1.0
« Reply #2 on: November 04, 2009, 05:35:13 PM »
0
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? :)

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 AIO Weapon Crafting Tool v1.0
« Reply #3 on: November 04, 2009, 05:48:29 PM »
0
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.
Coragin

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

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 AIO Weapon Crafting Tool v1.0
« Reply #4 on: November 04, 2009, 06:10:49 PM »
0
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...

« Last Edit: November 04, 2009, 06:12:22 PM by Coragin »
Coragin

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

Scrripty

  • Guest
Re: SUO AIO Weapon Crafting Tool v1.0
« Reply #5 on: November 04, 2009, 06:27:14 PM »
0
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.
« Last Edit: November 04, 2009, 06:34:45 PM by Scripty »

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 AIO Weapon Crafting Tool v1.0
« Reply #6 on: November 04, 2009, 06:33:43 PM »
0
So all I need to do is put in brackets around every one of them huh?
Coragin

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

Scrripty

  • Guest
Re: SUO AIO Weapon Crafting Tool v1.0
« Reply #7 on: November 04, 2009, 06:38:12 PM »
0
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. :)

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 AIO Weapon Crafting Tool v1.0
« Reply #8 on: November 04, 2009, 06:49:10 PM »
0
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
Coragin

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

Scrripty

  • Guest
Re: SUO AIO Weapon Crafting Tool v1.0
« Reply #9 on: November 04, 2009, 06:57:45 PM »
0
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
« Last Edit: November 04, 2009, 07:02:19 PM by Scripty »

Scrripty

  • Guest
Re: SUO AIO Weapon Crafting Tool v1.0
« Reply #10 on: November 04, 2009, 07:05:38 PM »
0
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. :)
« Last Edit: November 04, 2009, 07:08:08 PM by Scripty »

Offline NObama

  • Everything I need to know, I learned from Miffy's Item Finder.
  • Elite
  • *
  • *
  • Posts: 3454
  • Activity:
    0%
  • Reputation Power: 43
  • NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.
  • Respect: +161
  • Referrals: 2
    • View Profile
Re: SUO AIO Weapon Crafting Tool v1.0
« Reply #11 on: November 04, 2009, 07:11:07 PM »
0
You're doing great, Cor - much better than my sad sad little scripts.

Although the Ants fear me now.

 :)

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: SUO AIO Weapon Crafting Tool v1.0
« Reply #12 on: November 04, 2009, 07:13:04 PM »
0
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.
Please read the ScriptUO site RULES
Come play RIFT with me!

Scrripty

  • Guest
Re: SUO AIO Weapon Crafting Tool v1.0
« Reply #13 on: November 04, 2009, 07:16:13 PM »
0
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. :)

Scrripty

  • Guest
Re: SUO AIO Weapon Crafting Tool v1.0
« Reply #14 on: November 04, 2009, 07:16:51 PM »
0
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. :)
« Last Edit: November 04, 2009, 07:20:08 PM by Scripty »

Tags: