Post by magon on Mar 17, 2012 9:44:00 GMT -5
Hi peeps
I used to play another shard about 3yrs ago that used a taming stone, so I dug up my old macro from their and modified it for use on here.
Feel free to edit / tidyup the code as you wish, all I as is that you please keep the header and credits in-tact
Simply copy and paste the code below into EasyUo - instructions are in the comments of the script.
If you have ANY problems with it please post and I'll look into it.
[glow=red,2,300]New Version : v1.3.2 [/glow]
I used to play another shard about 3yrs ago that used a taming stone, so I dug up my old macro from their and modified it for use on here.
Feel free to edit / tidyup the code as you wish, all I as is that you please keep the header and credits in-tact
Simply copy and paste the code below into EasyUo - instructions are in the comments of the script.
If you have ANY problems with it please post and I'll look into it.
[glow=red,2,300]New Version : v1.3.2 [/glow]
;Mystic Online Tamer Stone auto-tamer v1.3.2
;
;Trains Taming from 0 to 120.0
;
;Stand within 5 squares of a taming stone and run
;
;You may need to edit the wait timer in skill_use
;currently set to 13 seconds for taming attempt
;
; *** YOU HAVE TO BE IN PEACE MODE ***
;
;Edit startup section to match your own server types as needed
;
;Note : to get creature types, drag their health bar then
;check the #CONTTYPE code in Container Info.
;
;Changelog
;---------
;v1.3.2
;* Added skill-check to stop script once skillcap is reached
;* Tidied up the coding a little in places
;
;v1.3.1
;* Updated creature list to work properly from zero skill (Mystic Online shard)
;
;v1.3
;* Edited stone type to work on Mystic
;* Added new skill check for which button to push
; based on skill level
;
;v1.2
;* Minor bug fixes and tidying of code
;* Added Fire Steed to taming list
;
; v1.1
;* Added Hiryu for 100.1 + skill taming
;* Added error checking for unknown animal types.
;
;Happy Taming
;
;Script by Magonis (formerly of BES Oasis)
;Now called Magon on Mystic Online
;Startup
set %mob_tame KB_PF_PG_BG_ZI_UF_XG_AH_WF_CB_EH_HH_YJ
; sets animal types to tame, add to this list as needed
;KB=mountaint goat / PF=sheep / PG = timber wolf / BG = black bear / ZI=black bear
;UF=alligator / XG=bull / AH=great hart / WF=grizzly bear / CB=giant toad
;EH=bake kitsune / HH =hiryu (100.1)
;YJ=fire steed Fire steed isn't needed for Mystic
set %tame_stone UNG ; sets Tamer Stone ObjectType
display ok Press OK and we'll get on with taming!$
main:
chooseSkill Anim
if #skill < #skillcap
{
finditem %tame_stone G_8 ; look for a stone within 5 squares
gosub stone_check
gosub stone_use
gosub animal_get
gosub skill_use
gosub clear_animal
goto main
}
else
{
display ok Skill cap reached. Macro halting.
}
halt
sub gumpclick
set %clickx #contposx + %1
set %clicky #contposy + %2
click %clickx %clicky
return
sub stone_check ;make sure you stand up to 8 squares away from tame stone
IF #finddist = n/a
{
display ok Please stand up to s squares away from the taming stone. You have 20 seconds to move!$
wait 20s
goto stone_check
}
return
sub stone_use ; double click stone to get animal
event macro 1 Getting an animal to tame ....
;check for taming gump
if #contKind = STM
{
if ( #contPosX = 10 and #contPosY = 50 )
{
return
}
else
{
; move taming gump to 10,10
set #contPosX 10
set #contPosY 50
return
}
}
else
{
set #lobjectid #findid
set #lobjecttype %tame_stone
event macro 17 ; call the dbl click macro
wait 1s
; move taming gump to 10,10
set #contPosX 10
set #contPosY 50
contpos
wait 1s
}
return
sub animal_get ;click the correct button depending on taming skill
chooseSkill anim
;select which button to push based on skill
if #skill < 111
{
gosub gumpclick 90 60
return
}
if #skill < 231
{
gosub gumpclick 90 85
return
}
if #skill < 351
{
gosub gumpclick 90 110
return
}
if #skill < 411
{
gosub gumpclick 90 135
return
}
if #skill < 471
{
gosub gumpclick 90 160
return
}
if #skill < 591
{
gosub gumpclick 90 185
return
}
if #skill < 651
{
gosub gumpclick 290 60
return
}
if #skill < 701
{
gosub gumpclick 290 85
return
}
if #skill < 801
{
gosub gumpclick 290 110
return
}
if #skill < 901
{
gosub gumpclick 290 135
return
}
if #skill < 1001
{
gosub gumpclick 290 160
return
}
if #skill < 1200
{
gosub gumpclick 290 185
return
}
return
sub skill_use
wait 2s
finditem %mob_tame G_0 ;make sure creature has appeared for taming
set #ltargetid #findid ; set last target to animal
if #FINDCNT > 0
{
exevent Popup #findid 1 ; attempts to tame animal
event macro 1 0 If you see this, i'm probably AFK
wait 13s ;wait for taming attempt - change the number to higher values if needed
}
else
{
display ok Sorry, you have no animal or this is a new type.$Press ok and add it to the list.
halt
}
return
;the clear_animal sub will only clear animals on the same square
;if you change the G value, you do so at your own peril :P
sub clear_animal
finditem %mob_tame G_0 ; find animal on same square
set #lobjectid #ltargetid ; set target to current animal
wait 1s
event macro 17 ;calls double click macro to remove animal
wait 1s
set #lobjectid %tame_stone ; reset object to tamer stone
return