sub TamingRename

menu set status Ranaming Animal
Exevent RenamePet %tameid Domaojudas inscariote

contpos 5 30
wait 5
set %screenx #contposx + 130
set %screeny #contposy + 20
; click %screenx %screeny
; for %i 1 5
; {
; key RIGHT
; }
; for %i 1 20
; {
; key BACK
; }
; msg MoriEstuvoAqui$
click %screenx %screeny r
return

sub TamingKill
menu set status Killing Animal
TamingKillLoop:
finditem %tameid
if #findkind = -1
return


; if #mana < 50
; {
; chooseskill medi
; if #skill > 500
; {
; event macro 13 46 ; meditation
; wait 11s
; goto TamingKillLoop
; }
; else
; {
; event sysmessage You must have at least 50 skill Meditation to use this option.
; menu set releasekill #false
; return
; }
; }
; set #ltargetid %tameid
; set #ltargetkind 1
; chooseskill eval
; if #skill >= 800
; event macro 15 50 ; flame strike
; else
; {
; chooseskill necr
; if #skill >= 800
; event macro 15 109 ; pain strike
; else
; {
; event sysmessage You must have at least 80 skill in Necromancy or Evaluating Intelligence to use this option.
; menu set releasekill #false
; return
; }
; }
; target 6s
; event macro 22 0 ; last target
; wait 2s
; goto TamingKillLoop
gosub Dismount
set #ltargetid %tameid
event macro 1 0 All Kill
target
event macro 22 0
EsperaQueMateAlBixo:
finditem %tameid
if #findkind = -1
goto BixoMatado
goto EsperaQueMateAlBixo
BixoMatado:
event macro 1 0 All guard
wait 2s
;gosub Mount



return

; clickScreenXYZ by ScriptFellow modded by Roadkill
; Mods by UncleDave
sub GetScreenXY
set %1 ( %1 - #charposx ) * 22 ; world x-coordinate
set %2 ( #charposy - %2 ) * 22 ; world y-coordinate
set %3 ( %3 - #charposz ) * 4 ; world z-coordinate
if %0 < 4 || %4 = N/A
set %4 0 ; x displacement, added to screen coordinate
if %0 < 5 || %5 = N/A
set %5 35 ; y displacement, added to screen coordinate
set %screenx #clileft + #clixres / 2 + %1 + %2 + %4
set %screeny #clitop + #cliyres / 2 + %1 - %2 - %3 + %5
set %offscreen #true
if %screenx > #clileft &&
+ %screeny > #clitop &&
+ %screenx < ( #clileft + #clixres ) &&
+ %screeny < ( #clitop + #cliyres )
{
set %offscreen #false
;click %screenx %screeny F
}
return

; GetYDisplacementForAnimType by Roadkill
; Mods by UncleDave
sub GetAnimalDisplacement
set %screenydisp -32
if %tametype in GE_ZD_L_M_TF__IG_NG__ZF_PF_EG_CO_TG_PG_VD
set %screenydisp -25
if %tametype in AH
set %screenydisp -45
if %tametype in DG_AG_WC_RF_WG_TC
set %screenydisp -15
return

sub SetReagentContainer
if %tameid <> N/A
{
event sysmessage You must wait until you are finished taming.
return
}
event sysmessage Target the container to drop reagents.
gosub GetTargetId
set %regcont #ltargetid
return

sub PickupRegs
finditem %1 G_16
if #findkind = -1
return
menu set status Picking Up Reagents
set %regsid #findid
set %regsdist #finddist
if %regsdist > 2
{
gosub PathfindWait #findx #findy #findz
if %moveres = error
{
ignoreitem %regsid
return
}
}
gosub GetContainerPos %regcont
if #result = #false
{
event sysmessage Unable to find reagent container.
menu set pickupregs #false
return
}
set %js #jindex
event drag %regsid
wait 10
if #contname = stack_gump
key ENTER
set %je #jindex
for %ji %js %je
{
scanjournal %ji
if can_not_pick in #journal 2
ignoreitem %regsid
return
}
click %contdropx %contdropy
wait 10
return

sub PickupRegsNearby
menu get pickupregs
if #menures = #false
return
finditem %reagents G_2
if #findkind <> -1
gosub PickupRegs #findid
return

sub FindClosestItem
finditem %1 G_16
set %findid #findid
set %findtype #findtype
set %finddist #finddist
if #findcnt > 1
{
for %i 1 #findcnt
{
finditem %1 %i G_16
if #findkind <> -1 && #finddist < %finddist
{
set %findid #findid
set %findtype #findtype
set %finddist #finddist
}
}
}
return

sub GetTargetId
set #ltargetid N/A
set #targcurs 1
GetTargetIdLoop:
if #targcurs = 1
goto GetTargetIdLoop
return

sub PathfindWait
set %moveres unknown
menu get dontmove
if #menures = #true
return
if #charposx = %1 && #charposy = %2
{
set %moveres success
return
}
set %js #jindex
event pathfind %1 %2 %3
wait 10
set %je #jindex
for %ji %js %je
{
scanjournal %ji
if pathfinding in #journal
{
set %movex #charposx
set %movey #charposy
set %movetimer #systime + 500
PathfindWaitLoop:
if #systime < %movetimer
goto PathfindWaitLoop
if %movex = %1 && %movey = %2
{
set %moveres success
return
}
if %movex = #charposx && %movey = #charposy
{
set %moveres stopped
return
}
set %movex #charposx
set %movey #charposy
set %movetimer #systime + 500
goto PathfindWaitLoop
}
if can't_get_there in #journal
{
set %moveres error
return
}
}
return

sub GetContainerPos
finditem %1 C
if #findkind = -1
return #false
if #findtype = ZJF 5 ; backpack
set %contposx #findx + 22
set %contposy #findy + 16
set %contdropx #findx + 22
set %contdropy #findy + 12
return #true
if #findtype = CKF 5 ; bag
set %contposx #findx + 22
set %contposy #findy + 15
set %contdropx #findx + 21
set %contdropy #findy + 10
return #true
if #findtype = LKF 5 ; pouch
set %contposx #findx + 22
set %contposy #findy + 13
set %contdropx #findx + 25
set %contdropy #findy + 7
return #true
return #false


sub IdentificaMontura
event exmsg #charid 2 37 Targetea Tu Montura.
gosub dismount
wait 10
set #targcurs 1
wait 5
while #targcurs = 1
wait 1
set %Mount #ltargetid
;gosub Mount
return


sub Dismount
;set #menubutton n/a
;ver 1.3 4Nov04 by Roadkill spcl mod for petfighter
;purpose: get off steed
;%1 is the ID of your steed--this ver assumes %steed
_dismount:
SET #LOBJECTID #CHARID
EVENT MACRO 17
WAIT 10

;menu delete DisMount
;menu Button Mount 5 180 60 20 Mount
Return

;============================

;ver 1.3 4Nov04 by Roadkill spcl mod for petfighter
;purpose: end up on steed whether you were on or off at call
;%1 is the ID of your steed--this ver assumes %steed
sub Mount
;set #menubutton n/a
_remountLoop:
finditem %mount G
if #findkind = -1
goto mountexitloop
if #finddist > 1
{
msg all follow me $
wait 2s
goto _remountLoop
}
SET #LOBJECTID %mount
event macro 17 0
WAIT 5
mountexitloop:
;menu delete Mount
;menu Button Dismount 5 180 60 20 Dismount
RETURN





Ésta pone vendas y bebe pocimas para curarse rapido


dislpay ok pon el id correcto de las de refresh y comprueba que furulan las
vendas con el .bandself
set %poti 10
Code:

Initialization:

InitEvents

HpScanning:
if yes notin #charghost
{
if ( #hits < #maxhits || C in #CHARSTATUS )
goto Curar
}


goto HpScanning


Curar:

event macro 1 0 .bandself
set %healtimer 10
set %penalizador #dex / 20
set %healtimer %healtimer - %penalizador
event SysMessage %healtimer segundos

CountDownLoop:

wait 1s
set %poti %poti + 1
if #hits < 45 && %healtimer > 1
{
if C notin #CHARSTATUS && %poti > 9
{
findItem UUF C_ ,
set #lobjectid #findid
event macro 17 0
set %poti 0
}
}
else
{
if #stamina < 80
{
findItem ZUF C_ ,
set #lobjectid #findid
event macro 17 0
}
}
set %healtimer %healtimer - 1
set #SYSMSGCOL 100
if %healtimer > 0
{
event SysMessage %healtimer segundos
goto CountDownLoop
}
wait 1s

goto HpScanning




Esta cura la pet

;================================================= ======================== Script Name: Mort's Autovet
; Author: Mort
; Version: 1.00
; Client Tested with: 4.0.4a
; EUO version tested with: 1.42 (0097)
; Shard OSI / FS: OSI
; Revision Date: September 6, 2004
; Public Release:
; Purpose: Heals and cures your pet with a hotkey (specify below), and will continue to do so until the pet is fully healed.
;================================================= =========================
; Notes:
; - You must have some bandages in your backpack for the script to work.
; - You need to be within healing distance of your pet i.e. 2 spaces (You'll recieve a message telling you otherwise)

set %key D ; This is the macro key that will start the healing process. Be sure it doesn't conflict with another macro within the client.
set %keymod CTRL ; This is the macro modifer key. Change it to either ALT, SHIFT, CTRL (recommended), or Leave Blank.
set #menubutton closed

gosub showWindow
gosub setup

initevents
mainloop:
set %status IDLE
gosub updateStatusWindow
gosub checkMenuBtn
; Waits until user presses the macro key combination, then starts the healing process.
onHotKey %key %keymod
gosub startHeal
goto mainloop
return

sub setPet
set #lTargetID null
event sysmessage Target pet...
loop:
set #targCurs 1
wait 2
if #lTargetID = null
{
goto loop
}
set %pet #lTargetID
return

sub setup
set %status SETUP
gosub updateStatusWindow
gosub setPet
gosub setBandages
return

sub setBandages
findItem ZLF C_ , #BackPackID
If #findKind = 0
set %Bandages #findID
return

sub startHeal
heal:
set %status RUNNING
set #LObjectID %bandages
event Macro 17 0
target
set #LTargetID %pet
event Macro 22 0

waitforheal:
scanjournal 1
if that_being_is_not_damaged in #journal
{
deleteJournal
event Sysmessage Auto-heal stopped...
set %status Idle
return
}
if that_is_too_far_away in #journal
{
deleteJournal
event Sysmessage Too far away, retrying auto-heal...
wait 1s
goto heal
}
if you_cannot_see_that in #journal
{
deleteJournal
event Sysmessage Can't see your pet, retrying auto-heal...
wait 1s
goto heal
}
if you_cannot_heal_that in #journal
{
deleteJournal
event Sysmessage You pet is not a vaild heal target, halting script...
halt
}
if you_finish_applying_the_bandages in #journal
{
deleteJournal
event Sysmessage Heal successful...
wait 1s
goto heal
}
if you_have_cured_the_target_of_all_poisons in #journal
{
deleteJournal
event Sysmessage Cure successful...
wait 1s
goto heal
}
if you_heal_what_little_damage_your_patient_had in #journal
{
deleteJournal
event Sysmessage Pet fully healed, auto-heal stopped...
return
}
if but_they_barely_help in #journal
{
deleteJournal
event Sysmessage Heal failed...
wait 1s
goto heal
}
if you_have_failed_to_cure_your_target in #journal
{
deleteJournal
event Sysmessage Cure failed...
wait 1s
goto heal
}
goto waitforheal
return

sub showWindow
menu Clear
menu Window Title Autovet
menu Window Color btnFace
menu Window Size 125 175
menu Font Transparent #true
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style b
menu Font Color WindowText
menu Font Transparent #false
menu Font Align Left
menu Text informationTxt 4 10 Information:
menu Font Style n
menu Text bandagesTxt 5 115 Bandages:
menu Text statusTxt 5 130 Status:
menu Font Align Right
menu Text bandageCountTxt 118 115 -
menu Text statusInfoTxt 118 130 -
menu button resetBtn 5 150 50 20 Reset
menu button closeBtn 70 150 50 20 Close
menu Show 1145 347
return

sub updateStatusWindow
; Displays the status field in the status window
menu Set statusInfoTxt %status
; Displays bandage count in the status window.
findItem ZLF C_ , #BackPackID
set %bandageCount #findStack
menu Set bandageCountTxt %bandageCount
return

sub checkMenuBtn
; These conditions check if a button has been pressed.
if #menubutton = resetBtn
{
gosub setup
set #menubutton closed
}
if #menubutton = closeBtn
{
menu Hide
set #menubutton closed
halt
}
return