jeweling.mac |200+ Jeweling Macro!!!|

Macro depository for macros written before the user variable changes that broke all of them.

Moderator: MacroQuest Developers

The_Sage
orc pawn
orc pawn
Posts: 11
Joined: Wed Oct 30, 2002 5:23 am

jeweling.mac |200+ Jeweling Macro!!!|

Post by The_Sage » Mon Dec 16, 2002 12:40 pm

************WARNING**************
USING THIS MACRO WILL TAKE YOU PAST 200 IN JEWELRY MAKING AND POSSIBLY GET YOU BANNED IF YOU ARE AN IDIOT OR JUST CARELESS. THE AUTHOR IN NO WAY CONDONES OR SUPPORTS AND IS NOT RESPONSIBLE FOR ANYTHING THAT MAY/MAY NOT HAPPEN TO YOU WHILE USING THIS MACRO! BY READING FURTHER YOU AGREE THAT THE AUTHOR HAS 0 LIABILITY FOR EVERYTHING/ANYTHING.

That being said =) here it is in all it's icky splendor. (Icky because the coding is pretty cloppy...but it works!)

Code: Select all

| - Jeweling.mac -
|


#include routines.mac

Sub Main
      /if "$invpanel"!="TRUE" /press i
        /call FindCombiner "Jewelry Making"
         /if $return==99 /return
      /varset v80 $return
      /cleanup
      
Sub SkillCheck 
/skill Jewel 
/varset v1 $char(skill,"Jewelry Making") 
/if n $v1<223 /call PlatTurq 
/if n $v1<226 /if n $v1>=223 /call PlatHem 
/if n $v1<231 /if n $v1>=226 /call PlatBlood 
/if n $v1<236 /if n $v1>=231 /call PlatJasp 
/if n $v1<242 /if n $v1>=236 /call PlatRose 
/if n $v1<250 /if n $v1>=242 /call PlatJade
/if n $v1>=250 {
/echo CONGRATULATIONS! YOU HAVE GRANDMASTERED JEWELRY MAKING!
/cleanup
/endmacro
}


Sub PlatTurq
	/cleanup
	/if $invpanel==TRUE /if $pack($v80,open)!=TRUE /click right inv $v80
	/sendkey down ctrl

	/finditem "Platinum Bar"
	/if $find()==FALSE /call Finished
	/click left pack $v80 0

	/finditem "Turquoise"
	/if $find()==FALSE /call Finished
	/click left pack $v80 3
	
	/sendkey up ctrl
	/click left pack $v80 combine

	/if "$cursor()"=="TRUE" /goto :AutoDropPlatTest
	/for v1 1 to 5
	    /delay 11
	    /if "$cursor()"=="TRUE" /goto :AutoDropPlatTest
	/next v1

	:AutoDropPlatTest
	/click left auto
	/delay 2
	/click left auto
	/call SkillCheck

Sub PlatHem
	/cleanup
	/if $invpanel==TRUE /if $pack($v80,open)!=TRUE /click right inv $v80
	/sendkey down ctrl

	/finditem "Platinum Bar"
	/if $find()==FALSE /call Finished
	/click left pack $v80 0

	/finditem "Hematite"
	/if $find()==FALSE /call Finished
	/click left pack $v80 3
	
	/sendkey up ctrl
	/click left pack $v80 combine

	/if "$cursor()"=="TRUE" /goto :AutoDropPlatHem
	/for v1 1 to 5
	    /delay 11
	    /if "$cursor()"=="TRUE" /goto :AutoDropPlatHem
	/next v1

	:AutoDropPlatHem
	/click left auto
	/delay 2
	/click left auto
	/call SkillCheck
Sub PlatBlood
	/cleanup
	/if $invpanel==TRUE /if $pack($v80,open)!=TRUE /click right inv $v80
	/sendkey down ctrl

	/finditem "Platinum Bar"
	/if $find()==FALSE /call Finished
	/click left pack $v80 0

	/finditem "Bloodstone"
	/if $find()==FALSE /call Finished
	/click left pack $v80 3
	
	/sendkey up ctrl
	/click left pack $v80 combine

	/if "$cursor()"=="TRUE" /goto :AutoDropPlatBlood
	/for v1 1 to 5
	    /delay 11
	    /if "$cursor()"=="TRUE" /goto :AutoDropPlatBlood
	/next v1

	:AutoDropPlatBlood
	/click left auto
	/delay 2
	/click left auto
	/call SkillCheck

Sub PlatJasp
	/cleanup
	/if $invpanel==TRUE /if $pack($v80,open)!=TRUE /click right inv $v80
	/sendkey down ctrl

	/finditem "Platinum Bar"
	/if $find()==FALSE /call Finished
	/click left pack $v80 0

	/finditem "Jasper"
	/if $find()==FALSE /call Finished
	/click left pack $v80 3
	
	/sendkey up ctrl
	/click left pack $v80 combine

	/if "$cursor()"=="TRUE" /goto :AutoDropPlatJasp
	/for v1 1 to 5
	    /delay 11
	    /if "$cursor()"=="TRUE" /goto :AutoDropPlatJasp
	/next v1

	:AutoDropPlatTest
	/click left auto
	/delay 2
	/click left auto
	/call SkillCheck

Sub PlatRose
	/cleanup
	/if $invpanel==TRUE /if $pack($v80,open)!=TRUE /click right inv $v80
	/sendkey down ctrl

	/finditem "Platinum Bar"
	/if $find()==FALSE /call Finished
	/click left pack $v80 0

	/finditem "Star Rose Quartz"
	/if $find()==FALSE /call Finished
	/click left pack $v80 3
	
	/sendkey up ctrl
	/click left pack $v80 combine

	/if "$cursor()"=="TRUE" /goto :AutoDropPlatRose
	/for v1 1 to 5
	    /delay 11
	    /if "$cursor()"=="TRUE" /goto :AutoDropPlatRose
	/next v1

	:AutoDropPlatRose
	/click left auto
	/delay 2
	/click left auto
	/call SkillCheck

Sub PlatJade
	/cleanup
	/if $invpanel==TRUE /if $pack($v80,open)!=TRUE /click right inv $v80
	/sendkey down ctrl

	/finditem "Platinum Bar"
	/if $find()==FALSE /call Finished
	/click left pack $v80 0

	/finditem "Jade"
	/if $find()==FALSE /call Finished
	/click left pack $v80 3
	
	/sendkey up ctrl
	/click left pack $v80 combine

	/if "$cursor()"=="TRUE" /goto :AutoDropPlatJade
	/for v1 1 to 5
	    /delay 11
	    /if "$cursor()"=="TRUE" /goto :AutoDropPlatJade
	/next v1

	:AutoDropPlatJade
	/click left auto
	/delay 2
	/click left auto
	/call SkillCheck

Sub Finished
	/endmacro

/return
I worked very hard on this and am still working on it. I am not satisfied with it because it spams you like crazy with skill checks and an error everytime you start the macro. "Can't parse Sub Skillcheck" The macro performs nearly flawlessly, occasionally it misses a combine and starts stacking items in the jeweller's kit. I think this is due to a slight lag that causes it to try before the 1 second limit. Shouldn't be a problem for most ppl but if you DO notice it doing it a lot, try changing the delay from 11 to 20 or something...i've even used one as high as 30...but i generally stay between 11 and 15. Also it seems to pause on failures, not quite sure why yet. This is my FIRST macro and I would REALLY like to know what you guys think of it. Good/Bad/Indifferent/Hatred/Marriage I don't care I want opinions. Thanks
Last edited by The_Sage on Tue Dec 17, 2002 11:20 pm, edited 1 time in total.
...

The_Sage
orc pawn
orc pawn
Posts: 11
Joined: Wed Oct 30, 2002 5:23 am

Post by The_Sage » Tue Dec 17, 2002 11:19 pm

Nobody has anything to say about it?

=(
...

User avatar
SingleServing
a hill giant
a hill giant
Posts: 195
Joined: Tue Dec 17, 2002 11:00 pm

PP

Post by SingleServing » Wed Dec 18, 2002 1:38 am

Question

How much PP should you have on you before starting this macro? (based on best prices available)

I would try it due to the need for JC in shawl quest but I'm not that far along yet =/

Also, I will edit it so it only goes to the skill I need and not 250.

The_Sage
orc pawn
orc pawn
Posts: 11
Joined: Wed Oct 30, 2002 5:23 am

Post by The_Sage » Wed Dec 18, 2002 3:02 am

That depends on your charisma and how many failures you get. Also this goes without enchanting the bars at all...you just buy them, it combines them. Getting my jewelcrafting up to about 190s cost me around 10kpp i believe. Starting this I would say (if yer working with silver) roughly 600pp should be ok...that will take you a ways. Electrum I would have about 1k on me, and gold I would have about 1500-2k. I grandmastered jeweling without a macro and it cost me a fortune. With this it will be easier and more than likely MUCH more cost effective. Just be sure you stair-step the combines so that you are working on your next trivial. I skipped a few, mostly where the metal transitions were because it was rather expensive to buy the same bars but gems that cost 10x more.

One other thing....this macro does NOT like it if there is another tradeskilly combiner in your inventory so...*shrug*

It works. It spams you like crazy with skill checks and keeps giving a "Can't parse Sub SkillCheck" every time you start it up. Only does it once per run. Still haven't figured that out yet. Working on one to do enchanting as well but....no luck as of yet. Keep getting hung up. Oh well, crash course in scripting I suppose.
...

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Re: jeweling.mac |200+ Jeweling Macro!!!|

Post by L124RD » Wed Dec 18, 2002 9:32 am

Salutations,
fixes the parse error... adds a filter on skilling...

Code: Select all

| - Jeweling.mac -
| by: The_Sage
| edited: L124RD

#include routines.mac

Sub Main
      /if "$invpanel"!="TRUE" /press i
        /call FindCombiner "Jewelry Making"
         /if $return==99 /return
      /varset v80 $return
      /cleanup
     /filter skills increase
     /call SkillCheck
/return
  
Sub SkillCheck 
/skill Jewel 
/varset v1 $char(skill,"Jewelry Making") 
/if n $v1<223 /call PlatTurq 
/if n $v1<226 /if n $v1>=223 /call PlatHem 
/if n $v1<231 /if n $v1>=226 /call PlatBlood 
/if n $v1<236 /if n $v1>=231 /call PlatJasp 
/if n $v1<242 /if n $v1>=236 /call PlatRose 
/if n $v1<250 /if n $v1>=242 /call PlatJade
/if n $v1>=250 {
/echo CONGRATULATIONS! YOU HAVE GRANDMASTERED JEWELRY MAKING!
/cleanup
/filter skills all
/endmacro
}


Sub PlatTurq
	/cleanup
	/if $invpanel==TRUE /if $pack($v80,open)!=TRUE /click right inv $v80
	/sendkey down ctrl

	/finditem "Platinum Bar"
	/if $find()==FALSE /call Finished
	/click left pack $v80 0

	/finditem "Turquoise"
	/if $find()==FALSE /call Finished
	/click left pack $v80 3
	
	/sendkey up ctrl
	/click left pack $v80 combine

	/if "$cursor()"=="TRUE" /goto :AutoDropPlatTest
	/for v1 1 to 5
	    /delay 11
	    /if "$cursor()"=="TRUE" /goto :AutoDropPlatTest
	/next v1

	:AutoDropPlatTest
	/click left auto
	/delay 2
	/click left auto
	/call SkillCheck

Sub PlatHem
	/cleanup
	/if $invpanel==TRUE /if $pack($v80,open)!=TRUE /click right inv $v80
	/sendkey down ctrl

	/finditem "Platinum Bar"
	/if $find()==FALSE /call Finished
	/click left pack $v80 0

	/finditem "Hematite"
	/if $find()==FALSE /call Finished
	/click left pack $v80 3
	
	/sendkey up ctrl
	/click left pack $v80 combine

	/if "$cursor()"=="TRUE" /goto :AutoDropPlatHem
	/for v1 1 to 5
	    /delay 11
	    /if "$cursor()"=="TRUE" /goto :AutoDropPlatHem
	/next v1

	:AutoDropPlatHem
	/click left auto
	/delay 2
	/click left auto
	/call SkillCheck
Sub PlatBlood
	/cleanup
	/if $invpanel==TRUE /if $pack($v80,open)!=TRUE /click right inv $v80
	/sendkey down ctrl

	/finditem "Platinum Bar"
	/if $find()==FALSE /call Finished
	/click left pack $v80 0

	/finditem "Bloodstone"
	/if $find()==FALSE /call Finished
	/click left pack $v80 3
	
	/sendkey up ctrl
	/click left pack $v80 combine

	/if "$cursor()"=="TRUE" /goto :AutoDropPlatBlood
	/for v1 1 to 5
	    /delay 11
	    /if "$cursor()"=="TRUE" /goto :AutoDropPlatBlood
	/next v1

	:AutoDropPlatBlood
	/click left auto
	/delay 2
	/click left auto
	/call SkillCheck

Sub PlatJasp
	/cleanup
	/if $invpanel==TRUE /if $pack($v80,open)!=TRUE /click right inv $v80
	/sendkey down ctrl

	/finditem "Platinum Bar"
	/if $find()==FALSE /call Finished
	/click left pack $v80 0

	/finditem "Jasper"
	/if $find()==FALSE /call Finished
	/click left pack $v80 3
	
	/sendkey up ctrl
	/click left pack $v80 combine

	/if "$cursor()"=="TRUE" /goto :AutoDropPlatJasp
	/for v1 1 to 5
	    /delay 11
	    /if "$cursor()"=="TRUE" /goto :AutoDropPlatJasp
	/next v1

	:AutoDropPlatTest
	/click left auto
	/delay 2
	/click left auto
	/call SkillCheck

Sub PlatRose
	/cleanup
	/if $invpanel==TRUE /if $pack($v80,open)!=TRUE /click right inv $v80
	/sendkey down ctrl

	/finditem "Platinum Bar"
	/if $find()==FALSE /call Finished
	/click left pack $v80 0

	/finditem "Star Rose Quartz"
	/if $find()==FALSE /call Finished
	/click left pack $v80 3
	
	/sendkey up ctrl
	/click left pack $v80 combine

	/if "$cursor()"=="TRUE" /goto :AutoDropPlatRose
	/for v1 1 to 5
	    /delay 11
	    /if "$cursor()"=="TRUE" /goto :AutoDropPlatRose
	/next v1

	:AutoDropPlatRose
	/click left auto
	/delay 2
	/click left auto
	/call SkillCheck

Sub PlatJade
	/cleanup
	/if $invpanel==TRUE /if $pack($v80,open)!=TRUE /click right inv $v80
	/sendkey down ctrl

	/finditem "Platinum Bar"
	/if $find()==FALSE /call Finished
	/click left pack $v80 0

	/finditem "Jade"
	/if $find()==FALSE /call Finished
	/click left pack $v80 3
	
	/sendkey up ctrl
	/click left pack $v80 combine

	/if "$cursor()"=="TRUE" /goto :AutoDropPlatJade
	/for v1 1 to 5
	    /delay 11
	    /if "$cursor()"=="TRUE" /goto :AutoDropPlatJade
	/next v1

	:AutoDropPlatJade
	/click left auto
	/delay 2
	/click left auto
	/call SkillCheck

Sub Finished
	/endmacro

/return

zedisdeadbaby
a ghoul
a ghoul
Posts: 83
Joined: Sun Nov 03, 2002 4:24 pm

Post by zedisdeadbaby » Wed Dec 18, 2002 5:03 pm

I was going to try it but then I realized I would need about 200kPP just to TEST it.
:cry:
The_Sage wrote:Nobody has anything to say about it?

=(

Grumpy
a hill giant
a hill giant
Posts: 167
Joined: Sun Nov 10, 2002 4:22 pm

Post by Grumpy » Fri Dec 20, 2002 2:12 am

Anytime I see basically identical code for 5 different subroutines, I can't resist, so:

Code: Select all

| - Jeweling.mac -
| by: The_Sage
| edited: L124RD
| butchered: Grumpy

#include routines.mac

Sub Main
      /if "$invpanel"!="TRUE" /press i
        /call FindCombiner "Jewelry Making"
         /if $return==99 /return
      /varset v80 $return
      /cleanup
     /filter skills increase
     /call SkillCheck
/return
 
Sub SkillCheck
/skill Jewel
/varset v1 $char(skill,"Jewelry Making")
/if n $v1<223 /call MakeJewelry "Turquoise"
/if n $v1<226 /if n $v1>=223 /call MakeJewelry "Hematite"
/if n $v1<231 /if n $v1>=226 /call MakeJewelry "Bloodstone"
/if n $v1<236 /if n $v1>=231 /call MakeJewelry "Jasper"
/if n $v1<242 /if n $v1>=236 /call MakeJewelry "Star Rose Quartz"
/if n $v1<250 /if n $v1>=242 /call MakeJewelry "Jade"
/if n $v1>=250 {
/echo CONGRATULATIONS! YOU HAVE GRANDMASTERED JEWELRY MAKING!
/cleanup
/filter skills all
/endmacro
}


Sub MakeJewelry
   /cleanup
   /if $invpanel==TRUE /if $pack($v80,open)!=TRUE /click right inv $v80
   /sendkey down ctrl

   /finditem "Platinum Bar"
   /if $find()==FALSE /call Finished
   /click left pack $v80 0

   /if "$p0"=="" {
	/echo no gem specified
	/call Finished
	}
   /finditem "$p0"
   /if $find()==FALSE /call Finished
   /click left pack $v80 3
   
   /sendkey up ctrl
   /click left pack $v80 combine

   /if "$cursor()"=="TRUE" /goto :AutoDropPlatTest
   /for v1 1 to 5
       /delay 11
       /if "$cursor()"=="TRUE" /goto :AutoDropPlatTest
   /next v1

   :AutoDropPlatTest
   /click left auto
   /delay 2
   /click left auto
   /call SkillCheck


Sub Finished
   /endmacro

/return 

Grumpy
a hill giant
a hill giant
Posts: 167
Joined: Sun Nov 10, 2002 4:22 pm

Post by Grumpy » Fri Dec 20, 2002 2:13 am

Anytime I see basically identical code for 5 different subroutines, I can't resist, so:

Code: Select all

| - Jeweling.mac -
| by: The_Sage
| edited: L124RD
| butchered: Grumpy

#include routines.mac

Sub Main
      /if "$invpanel"!="TRUE" /press i
        /call FindCombiner "Jewelry Making"
         /if $return==99 /return
      /varset v80 $return
      /cleanup
     /filter skills increase
     /call SkillCheck
/return
 
Sub SkillCheck
/skill Jewel
/varset v1 $char(skill,"Jewelry Making")
/if n $v1<223 /call MakeJewelry "Turquoise"
/if n $v1<226 /if n $v1>=223 /call MakeJewelry "Hematite"
/if n $v1<231 /if n $v1>=226 /call MakeJewelry "Bloodstone"
/if n $v1<236 /if n $v1>=231 /call MakeJewelry "Jasper"
/if n $v1<242 /if n $v1>=236 /call MakeJewelry "Star Rose Quartz"
/if n $v1<250 /if n $v1>=242 /call MakeJewelry "Jade"
/if n $v1>=250 {
/echo CONGRATULATIONS! YOU HAVE GRANDMASTERED JEWELRY MAKING!
/cleanup
/filter skills all
/endmacro
}


Sub MakeJewelry
   /cleanup
   /if $invpanel==TRUE /if $pack($v80,open)!=TRUE /click right inv $v80
   /sendkey down ctrl

   /finditem "Platinum Bar"
   /if $find()==FALSE /call Finished
   /click left pack $v80 0

   /if "$p0"=="" {
	/echo no gem specified
	/call Finished
	}
   /finditem "$p0"
   /if $find()==FALSE /call Finished
   /click left pack $v80 3
   
   /sendkey up ctrl
   /click left pack $v80 combine

   /if "$cursor()"=="TRUE" /goto :AutoDropPlatTest
   /for v1 1 to 5
       /delay 11
       /if "$cursor()"=="TRUE" /goto :AutoDropPlatTest
   /next v1

   :AutoDropPlatTest
   /click left auto
   /delay 2
   /click left auto
   /call SkillCheck


Sub Finished
   /endmacro

/return 

GreyDire
decaying skeleton
decaying skeleton
Posts: 6
Joined: Tue Oct 08, 2002 9:16 am
Location: New Jersey

Post by GreyDire » Fri Dec 20, 2002 11:11 am

A little FURTHER editing of the Macro - building on the original, L124rd's edits, and Grumpy's Edits - allows for Jewel Skills LOWER than the PLATINUM Trivial levels he specified - still expensive to raise - but for anyone that wants to start out with Silver/Electrum/Gold first - they can do it with this.

I haven't tested this version yet - but will do so tonight.

Enjoy!
| - Jeweling.mac -
| by: The_Sage
| edited: L124RD
| butchered: Grumpy
| edited: GreyDire – added Silver, Electrum, and Gold Bars to allow skilling from 1 up through 250

#include routines.mac

Sub Main
/if "$invpanel"!="TRUE" /press i
/call FindCombiner "Jewelry Making"
/if $return==99 /return
/varset v80 $return
/cleanup
/filter skills increase
/call SkillCheck
/return

Sub SkillCheck
/skill Jewel
/varset v1 $char(skill,"Jewelry Making")
/if n $v1<34 /call MakeJewelry "Silver Bar" "Star Rose Quartz"
/if n $v1<111 /if n $v1>=34 /call MakeJewelry "Electrum Bar" "Topaz"
/if n $v1<156 /if n $v1>=111 /call MakeJewelry "Gold Bar" "Cat’s Eye Agate"
/if n $v1<183 /if n $v1>=156 /call MakeJewelry "Gold Bar" "Topaz"
/if n $v1<199 /if n $v1>=183 /call MakeJewelry "Gold Bar" "Star Ruby"
/if n $v1<223 /if n $v1>=199 /call MakeJewelry "Platinum Bar" "Turquoise"
/if n $v1<226 /if n $v1>=223 /call MakeJewelry "Platinum Bar" "Hematite"
/if n $v1<231 /if n $v1>=226 /call MakeJewelry "Platinum Bar" "Bloodstone"
/if n $v1<236 /if n $v1>=231 /call MakeJewelry "Platinum Bar" "Jasper"
/if n $v1<242 /if n $v1>=236 /call MakeJewelry "Platinum Bar" "Star Rose Quartz"
/if n $v1<250 /if n $v1>=242 /call MakeJewelry "Platinum Bar" "Jade"
/if n $v1>=250 {
/echo CONGRATULATIONS! YOU HAVE GRANDMASTERED JEWELRY MAKING!
/cleanup
/filter skills all
/endmacro
}


Sub MakeJewelry
/cleanup
/if $invpanel==TRUE /if $pack($v80,open)!=TRUE /click right inv $v80
/sendkey down ctrl

/finditem "$p1"
/if $find()==FALSE /call Finished
/click left pack $v80 0

/if "$p1"=="" {
/echo no gem specified
/call Finished
}
/finditem "$p1"
/if $find()==FALSE /call Finished
/click left pack $v80 3

/sendkey up ctrl
/click left pack $v80 combine

/if "$cursor()"=="TRUE" /goto :AutoDropJewel
/for v1 1 to 5
/delay 11
/if "$cursor()"=="TRUE" /goto :AutoDropJewel
/next v1

:AutoDropJewel
/click left auto
/delay 2
/click left auto
/call SkillCheck


Sub Finished
/endmacro

/return
PS - My first edit and post - thanks for the great package here - I have been lurking for a bit - and am just really starting on my own macros - and on editing others macros!

boldor
a ghoul
a ghoul
Posts: 94
Joined: Tue Sep 10, 2002 11:46 am

Post by boldor » Fri Dec 20, 2002 5:39 pm

Perhaps add a line like this before each combind to ensure that you have sufficient free space in your packs. Place the Jewel kit in your lower right slot since /click auto always fills top down. The count greater than 5 takes the four slots of the Jewel kit plus one for your next combind into account. If your combinding close to a merchant you could even include a sell subroutine then start combinding again.

Code: Select all


/if n $freeinv(space)>5 /goto :StartLoop

Bolo

sethric
orc pawn
orc pawn
Posts: 19
Joined: Fri Oct 04, 2002 12:34 pm

Post by sethric » Mon Dec 23, 2002 5:20 am

was encumbered from plat, ran out of money before i hit 100, then it got messy, hope i dont get banned =(

The_Sage
orc pawn
orc pawn
Posts: 11
Joined: Wed Oct 30, 2002 5:23 am

Post by The_Sage » Thu Dec 26, 2002 1:44 pm

Hehe.....Encumbered by plat? Well, yea. I Grandmastered Jeweling without a macro and it was durned expensive too. Having a horse helps (Or J-Boots) because you can still move no matter how encumbered you are. *shrug* This macro won't really help many ppl cause GMing Jeweling takes a crapload of cash, and if you don't stair step up the recipes to keep your failures down...you may very well burn 10k in a matter of a couple of hours. And that's WITHOUT a macro doing the combines for you...

My thanks to those that have responded, and to those who have posted improvements to the sloppy code =)

Seeing as how it was my first, and it's been years since my last experience with any scripting, hehehe, I wasn't entirely sure how to compress it all down nice and neat, hence why I had 5 identical subroutines. *Shrug* Live and learn I suppose. Although the idea of a user defined variable should have been obvious fromt eh start but...hehehe, Thanks!
...

asshat
decaying skeleton
decaying skeleton
Posts: 9
Joined: Mon Dec 09, 2002 2:33 am

Post by asshat » Fri Dec 27, 2002 7:55 am

In response to the code GreyDire posted...
/finditem "$p1"
/if $find()==FALSE /call Finished
/click left pack $v80 0
needs to be changed to this:

Code: Select all

/finditem "$p0" 
/if $find()==FALSE /call Finished 
/click left pack $v80 0 
Otherwise, it'll be dropping 2 jewels into your jeweller's kit., and not dropping any metal bars.

Pretty basic fix, I know, but it's necessary for the macro to work correctly.

GreyDire
decaying skeleton
decaying skeleton
Posts: 6
Joined: Tue Oct 08, 2002 9:16 am
Location: New Jersey

Post by GreyDire » Fri Dec 27, 2002 9:14 am

Thanks Asshat - yea - I found that out when I got to playing around and testing it out this past weekend - meant to come back to correct it - but never did get back.

Thanks for posting it here!

MacroMaker
decaying skeleton
decaying skeleton
Posts: 4
Joined: Sat Jan 04, 2003 11:01 pm

Cost Concious Jewelry Trainer

Post by MacroMaker » Wed Jan 08, 2003 8:22 pm

I ain't tested it comprehensively, but it passed the few tests that I did put it through. Let me know if it helps.

Code: Select all

| - Jeweling.mac -
| by: The_Sage
| edited: L124RD
| butchered: Grumpy
| massacred: MacroMaker

#turbo
#include routines.mac
#chat say
#define TRIVIALS 0
#define NAMES 1
#define GEMS 2
#define METALS 3


Sub Main

|Lets Seed the Trivial steps required
/varset a(TRIVIALS,1) 16
/varset a(TRIVIALS,2) 18
/varset a(TRIVIALS,3) 21
/varset a(TRIVIALS,4) 22
/varset a(TRIVIALS,5) 26
/varset a(TRIVIALS,6) 28
/varset a(TRIVIALS,7) 30
/varset a(TRIVIALS,8) 32
/varset a(TRIVIALS,9) 34
/varset a(TRIVIALS,10) 36
/varset a(TRIVIALS,11) 38
/varset a(TRIVIALS,12) 40
/varset a(TRIVIALS,13) 42
/varset a(TRIVIALS,14) 44
/varset a(TRIVIALS,15) 74
/varset a(TRIVIALS,16) 76
/varset a(TRIVIALS,17) 79
/varset a(TRIVIALS,18) 82
/varset a(TRIVIALS,19) 84
/varset a(TRIVIALS,20) 87
/varset a(TRIVIALS,21) 90
/varset a(TRIVIALS,22) 92
/varset a(TRIVIALS,23) 95
/varset a(TRIVIALS,24) 98
/varset a(TRIVIALS,25) 100
/varset a(TRIVIALS,26) 103
/varset a(TRIVIALS,27) 106
/varset a(TRIVIALS,28) 108
/varset a(TRIVIALS,29) 111
/varset a(TRIVIALS,30) 114
/varset a(TRIVIALS,31) 116
/varset a(TRIVIALS,32) 119
/varset a(TRIVIALS,33) 146
/varset a(TRIVIALS,34) 148
/varset a(TRIVIALS,35) 151
/varset a(TRIVIALS,36) 154
/varset a(TRIVIALS,37) 156
/varset a(TRIVIALS,38) 159
/varset a(TRIVIALS,39) 162
/varset a(TRIVIALS,40) 164
/varset a(TRIVIALS,41) 167
/varset a(TRIVIALS,42) 170
/varset a(TRIVIALS,43) 172
/varset a(TRIVIALS,44) 175
/varset a(TRIVIALS,45) 178
/varset a(TRIVIALS,46) 180
/varset a(TRIVIALS,47) 183
/varset a(TRIVIALS,48) 186
/varset a(TRIVIALS,49) 188
/varset a(TRIVIALS,50) 191
/varset a(TRIVIALS,51) 196
/varset a(TRIVIALS,52) 199
/varset a(TRIVIALS,53) 202
/varset a(TRIVIALS,54) 218
/varset a(TRIVIALS,55) 220
/varset a(TRIVIALS,56) 223
/varset a(TRIVIALS,57) 226
/varset a(TRIVIALS,58) 228
/varset a(TRIVIALS,59) 231
/varset a(TRIVIALS,60) 234
/varset a(TRIVIALS,61) 236
/varset a(TRIVIALS,62) 239
/varset a(TRIVIALS,63) 242
/varset a(TRIVIALS,64) 244
/varset a(TRIVIALS,65) 247
/varset a(TRIVIALS,66) 250

|Set the Jewlery Names
/varset a(NAMES,16) "Silver Lapis Lazuli Necklace"
/varset a(NAMES,18) "Silver Turquiose Bracelet"
/varset a(NAMES,21) "Silver Malachite Ring"
/varset a(NAMES,22) "Silver Hematite Ring"
/varset a(NAMES,26) "Silver Bloodstone Earring"
/varset a(NAMES,28) "Silver Onyx Bracelet"
/varset a(NAMES,30) "Silver Jasper Ring"
/varset a(NAMES,32) "Silver Carnelian Wedding Ring"
/varset a(NAMES,34) "Silver Rose Engagement Ring"
/varset a(NAMES,36) "Silver Amber Ring"
/varset a(NAMES,38) "Silver Wolf's Eye Necklace"
/varset a(NAMES,40) "Jaded Silver Ring"
/varset a(NAMES,42) "Silver Pearl Ring"
/varset a(NAMES,44) "Silver Topaz Ring"
/varset a(NAMES,74) "Electrum Malachite Bracelet"
/varset a(NAMES,76) "Electrum Lapis Lazuli Earring"
/varset a(NAMES,79) "Electrum Turquois Engagement Ring"
/varset a(NAMES,82) "Electrum Hematite Necklace"
/varset a(NAMES,84) "Electrum Cat's Eye Agate Bracelet"
/varset a(NAMES,87) "Electrum Bloodstone Necklace"
/varset a(NAMES,90) "Electrum Onyx Necklace"
/varset a(NAMES,92) "Electrum Jasper Earring"
/varset a(NAMES,95) "Electrum Carnelian Wedding Ring"
/varset a(NAMES,98) "Electrum Star Rose Quartz Necklace"
/varset a(NAMES,100) "Electrum Amber Earring"
/varset a(NAMES,103) "Electrum Wolf's Eye Agate Bracelet"
/varset a(NAMES,106) "Jaded Electrum Bracelet"
/varset a(NAMES,108) "Electrum Pearl Necklace"
/varset a(NAMES,111) "Electrum Topaz Earring"
/varset a(NAMES,114) "Electrum Peridot Bracelet"
/varset a(NAMES,116) "Emerald Electrum Bracelet"
/varset a(NAMES,119) "Electrum Opal Amulet"
/varset a(NAMES,146) "Gold Malachite Bracelet"
/varset a(NAMES,148) "Gold Lapis Lazuli Earring"
/varset a(NAMES,151) "Gold Turquois Ring"
/varset a(NAMES,154) "Golden Hematite Choker"
/varset a(NAMES,156) "Golden Cat's Eye Agate Bracelet"
/varset a(NAMES,159) "Gold Bloodstone Necklace"
/varset a(NAMES,162) "Gold Onyx Pendant"
/varset a(NAMES,164) "Gold Jasper Earring"
/varset a(NAMES,167) "Gold Carnelian Wedding Ring"
/varset a(NAMES,170) "Gold Star Rose Quartz Necklace"
/varset a(NAMES,172) "Golden Amber Earring"
/varset a(NAMES,175) "Golden Wolf's Eye Agate Bracelet"
/varset a(NAMES,178) "Golden Jaded Bracelet"
/varset a(NAMES,180) "Golden Pearl Choker"
/varset a(NAMES,183) "Golden Topaz Earring"
/varset a(NAMES,186) "Golden Peridot Bracelet"
/varset a(NAMES,188) "Golden Emerald Bracelet"
/varset a(NAMES,191) "Golden Opal Amulet"
/varset a(NAMES,196) "Golden Fire Wedding Ring"
/varset a(NAMES,199) "Golden Star Ruby Ring"
/varset a(NAMES,202) "Fire Emerald Golden Bracelet"
/varset a(NAMES,218) "Platinum Malachite Ring"
/varset a(NAMES,220) "Platinum Lapis Lazuli Necklace"
/varset a(NAMES,223) "Platinum turquois Bracelet"
/varset a(NAMES,226) "Platinum Hematite Ring"
/varset a(NAMES,228) "Platinum Cat's Eye Agate Necklace"
/varset a(NAMES,231) "Platinum Bloodstone Earring"
/varset a(NAMES,234) "Platinum Onyx Bracelet"
/varset a(NAMES,236) "Platinum Jasper Ring"
/varset a(NAMES,239) "Platinum Carnelian Wedding Ring"
/varset a(NAMES,242) "Platinum Star Rose Quartz Ring"
/varset a(NAMES,244) "Platinum Amber Ring"
/varset a(NAMES,247) "Platinum Wolf's Eye Agate Necklace"
/varset a(NAMES,250) "Jaded Platinum Ring"

 
|Set the Gem Names
/varset a(GEMS,16)	"Lapis Lazuli"
/varset a(GEMS,18)	"Turquoise"
/varset a(GEMS,21)	"Malachite"
/varset a(GEMS,22)	"Hematite"
/varset a(GEMS,26)	"Bloodstone"
/varset a(GEMS,28)	"Onyx"
/varset a(GEMS,30)	"Jasper"
/varset a(GEMS,32)	"Carnelian"
/varset a(GEMS,34)	"Star Rose Quartz"
/varset a(GEMS,36)	"Amber"
/varset a(GEMS,38)	"Wolf's Eye Agate"
/varset a(GEMS,40)	"Jade"
/varset a(GEMS,42)	"Pearl"
/varset a(GEMS,44)	"Topaz"
/varset a(GEMS,74)	"Malachite"
/varset a(GEMS,76)	"Lapis Lazuli"
/varset a(GEMS,79)	"Turquoise"
/varset a(GEMS,82)	"Hematite"
/varset a(GEMS,84)	"Cat's Eye Agate"
/varset a(GEMS,87)	"Bloodstone"
/varset a(GEMS,90)	"Onyx"
/varset a(GEMS,92)	"Jasper"
/varset a(GEMS,95)	"Carnelian"
/varset a(GEMS,98)	"Star Rose Quartz"
/varset a(GEMS,100)	"Amber"
/varset a(GEMS,103)	"Wolf's Eye Agate"
/varset a(GEMS,106)	"Jade"
/varset a(GEMS,108)	"Pearl"
/varset a(GEMS,111)	"Topaz"
/varset a(GEMS,114)	"Peridot"
/varset a(GEMS,116)	"Emerald"
/varset a(GEMS,119)	"Opal"
/varset a(GEMS,146)	"Malachite"
/varset a(GEMS,148)	"Lapis Lazuli"
/varset a(GEMS,151)	"Turquoise"
/varset a(GEMS,154)	"Hematite"
/varset a(GEMS,156)	"Cat's Eye Agate"
/varset a(GEMS,159)	"Bloodstone"
/varset a(GEMS,162)	"Onyx"
/varset a(GEMS,164)	"Jasper"
/varset a(GEMS,167)	"Carnelian"
/varset a(GEMS,170)	"Star Rose Quartz"
/varset a(GEMS,172)	"Amber"
/varset a(GEMS,175)	"Wolf's Eye Agate"
/varset a(GEMS,178)	"Jade"
/varset a(GEMS,180)	"Pearl"
/varset a(GEMS,183)	"Topaz"
/varset a(GEMS,186)	"Peridot"
/varset a(GEMS,188)	"Emerald"
/varset a(GEMS,191)	"Opal"
/varset a(GEMS,196)	"Fire Opal"
/varset a(GEMS,199)	"Star Ruby"
/varset a(GEMS,202)	"Fire Emerald"
/varset a(GEMS,218)	"Malachite"
/varset a(GEMS,220)	"Lapis Lazuli"
/varset a(GEMS,223)	"Turquoise"
/varset a(GEMS,226)	"Hematite"
/varset a(GEMS,228)	"Cat's Eye Agate"
/varset a(GEMS,231)	"Bloodstone"
/varset a(GEMS,234)	"Onyx"
/varset a(GEMS,236)	"Jasper"
/varset a(GEMS,239)	"Carnelian"
/varset a(GEMS,242)	"Star Rose Quartz"
/varset a(GEMS,244)	"Amber"
/varset a(GEMS,247)	"Wolf's Eye Agate"
/varset a(GEMS,250) 	"Jade"

 
|Set the Metal Names
/varset a(METALS,16)	"Silver Bar"
/varset a(METALS,18)	"Silver Bar"
/varset a(METALS,21)	"Silver Bar"
/varset a(METALS,22)	"Silver Bar"
/varset a(METALS,26)	"Silver Bar"
/varset a(METALS,28)	"Silver Bar"
/varset a(METALS,30)	"Silver Bar"
/varset a(METALS,32)	"Silver Bar"
/varset a(METALS,34)	"Silver Bar"
/varset a(METALS,36)	"Silver Bar"
/varset a(METALS,38)	"Silver Bar"
/varset a(METALS,40)	"Silver Bar"
/varset a(METALS,42)	"Silver Bar"
/varset a(METALS,44)	"Silver Bar"
/varset a(METALS,74)	"Electrum Bar"
/varset a(METALS,76)	"Electrum Bar"
/varset a(METALS,79)	"Electrum Bar"
/varset a(METALS,82)	"Electrum Bar"
/varset a(METALS,84)	"Electrum Bar"
/varset a(METALS,87)	"Electrum Bar"
/varset a(METALS,90)	"Electrum Bar"
/varset a(METALS,92)	"Electrum Bar"
/varset a(METALS,95)	"Electrum Bar"
/varset a(METALS,98)	"Electrum Bar"
/varset a(METALS,100)	"Electrum Bar"
/varset a(METALS,103)	"Electrum Bar"
/varset a(METALS,106)	"Electrum Bar"
/varset a(METALS,108)	"Electrum Bar"
/varset a(METALS,111)	"Electrum Bar"
/varset a(METALS,114)	"Electrum Bar"
/varset a(METALS,116)	"Electrum Bar"
/varset a(METALS,119)	"Electrum Bar"
/varset a(METALS,146)	"Gold Bar"
/varset a(METALS,148)	"Gold Bar"
/varset a(METALS,151)	"Gold Bar"
/varset a(METALS,154)	"Gold Bar"
/varset a(METALS,156)	"Gold Bar"
/varset a(METALS,159)	"Gold Bar"
/varset a(METALS,162)	"Gold Bar"
/varset a(METALS,164)	"Gold Bar"
/varset a(METALS,167)	"Gold Bar"
/varset a(METALS,170)	"Gold Bar"
/varset a(METALS,172)	"Gold Bar"
/varset a(METALS,175)	"Gold Bar"
/varset a(METALS,178)	"Gold Bar"
/varset a(METALS,180)	"Gold Bar"
/varset a(METALS,183)	"Gold Bar"
/varset a(METALS,186)	"Gold Bar"
/varset a(METALS,188)	"Gold Bar"
/varset a(METALS,191)	"Gold Bar"
/varset a(METALS,196)	"Gold Bar"
/varset a(METALS,199)	"Gold Bar"
/varset a(METALS,202)	"Gold Bar"
/varset a(METALS,218)	"Platinum Bar"
/varset a(METALS,220)	"Platinum Bar"
/varset a(METALS,223)	"Platinum Bar"
/varset a(METALS,226)	"Platinum Bar"
/varset a(METALS,228)	"Platinum Bar"
/varset a(METALS,231)	"Platinum Bar"
/varset a(METALS,234)	"Platinum Bar"
/varset a(METALS,236)	"Platinum Bar"
/varset a(METALS,239)	"Platinum Bar"
/varset a(METALS,242)	"Platinum Bar"
/varset a(METALS,244)	"Platinum Bar"
/varset a(METALS,247)	"Platinum Bar"
/varset a(METALS,250)	"Platinum Bar"

      | We need to get the Jewel Kit
      /call GetJewelKit
      /varset v80 $return
      | Clean up any mess we made
      /cleanup
      | Turn off the spam
      /filter skills all
      | Lets see what Skill we are starting with
      /call GetMySkill
      | Character Skill Level = $Skill
      /varset v1 $return 
      /echo Current Jewelry Skill: $v1
      /call GetTrivial $v1
      | Target Trivial Level = $Trivial
      /varset v2 $return
      /echo Target Trivial Level: $v2
      | Jewelry Name = $Name
      /varset v3 "$a(NAMES,$v2)"
      | Gem Name = $Gem
      /varset v4 "$a(GEMS,$v2)"
      | Metal Name = $Metal
      /varset v5 "$a(METALS,$v2)"
      | Lets Make Some Jewelry
      /call MakeJewelry "$v3" "$v4" "$v5"
      :MAINLOOP
      	/if n $return==1 {
      		/goto :CRANK	
      	} else {
      		/call Finished "$p0" "$p1" "$p2"
      	}
      	:CRANK
		/call GetMySkill
		/varset v1 $return
		/echo Current Jewelry Skill: $v1
		/if n $v1<$v2 {
			/echo Target Trivial Level: $v2
			/call MakeJewelry "$v3" "$v4" "$v5"
			/goto :MAINLOOP
		} else {
			/echo We got a New Trivial!
			/call GetTrivial $v1
		      	/varset v2 $return 
      			/echo Target Trivial Level: $v2
		      	/varset v3 "$a(NAMES,$v2)"
		      	/varset v4 "$a(GEMS,$v2)"
      			/varset v5 "$a(METALS,$v2)"
      			/call MakeJewelry "$v3" "$v4" "$v5"
			/goto :MAINLOOP
		}
	/echo Once Again - We should never get here. Something else is wrong! :-)
      	/call Finished "$p0" "$p1" "$p2"
/return

| Usage: GetJewelKit
| Return: JewelKit
Sub GetJewelKit
      /if "$invpanel"!="TRUE" /press i
        /call FindCombiner "Jewelry Making"
         /if $return==99 /return
      /return $return
/return

| Usage: GetMySkill
| Returns: CurrentJewelrySkillLevel
Sub GetMySkill
	/skill Jewel
/return $char(skill,"Jewelry Making")

| Usage: GetTrivial $Skill
| Returns: TargetTrivial
Sub GetTrivial
	/Echo Looping May Take a Second .. Be Patient.
	/varset v1 1
	:FindTrivialLoop
		/if n $p0<$a(TRIVIALS,$v1) /goto :Done
		/varcalc v1 $v1 + 1
		/goto :FindTrivialLoop
	:Done
/return $a(TRIVIALS,$v1)

| Usage: MakeJewelry $Name $Gem $Metal
| Returns: 1 | 0
Sub MakeJewelry
	/echo Making a $p0 = $p1 + $p2
	/if $invpanel==TRUE /if $pack($v80,open)!=TRUE /click right inv $v80 
	/sendkey down ctrl 

	| Lets find the appropriate bar of metal
	/finditem "$p2"
	/if $find()==FALSE {
		/call Finished "$p0" "$p1" "$p2"
	}
	| Put the Metal in the Kit
	/click left pack $v80 0 

	/finditem "$p1" 
	/if $find()==FALSE {
		/call Finished "$p0" "$p1" "$p2"
	}
	| Put the Gem in the Kit
	/click left pack $v80 3 

	/sendkey up ctrl
	| Combine it
	/click left pack $v80 combine 

	| Drop it in our Inventory
	/if "$cursor()"=="TRUE" /goto :AutoDropJewel
	| Maybe we went to fast ... Lets slow down and repeat
	/for v1 1 to 5 
		/delay 11 
		/if "$cursor()"=="TRUE" /goto :AutoDropJewel 
	/next v1 

	:AutoDropJewel 
		/click left auto 
		/delay 2 
		/click left auto 
	/return 1
/return 0
| Usage: Finished $Name $Gem $Metal
Sub Finished
	/call SellIt "$p0"
	/echo Need more ingrediants to make $p0
	/echo Buy more $p1 & $p2
	/filter skills all
	/endmacro 
/return

|Usage: SellIt $Name
Sub SellIt
   /cleanup
   /echo Selling all your $p0
   /varset v65 0
   /target npc
   /varset v66 "$target(name,clean)"
   /click right target
   :WaitForMerchant
      /doevents
   /if n $v65==0 /goto :WaitForMerchant

   /sendkey down shift
   :Selling
      /finditem similar "$p0"
      /if $find()==FALSE /goto :Done
      /Call SellMyItem
   /goto :Selling

   :done
   /sendkey up shift
   /press esc
/return

sub Event_Chat
   /if "$p1"=="$v66" /if "$p0"~~"say" /if "$p2"~~"$char(name)" /varset v65 1
/return


Sub SellMyItem
   /varset v99 $char(cash)
   /click left merchant buy
   /varset t9 15s
   :WaitSell
      /doevents
      /if n $v99!=$char(cash) /goto :WaitEnd
   /if $t9>0 /goto :WaitSell
   :WaitEnd
   /varset t9 0
/return
-----
Anyone can be good ... only one can be the best.