Author Topic: Move With Pet Help  (Read 2316 times)

0 Members and 1 Guest are viewing this topic.

Offline noonehomeTopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Activity:
    0%
  • Reputation Power: 0
  • noonehome has no influence.
  • Respect: +3
  • Referrals: 0
    • View Profile
    • Age Of Virtues
Move With Pet Help
« on: July 07, 2009, 07:16:01 AM »
0
i was wondering if someone could help me fix a issue im having... i think im going about it too complicated so feel free to give me ideas for easier ways... the problem im having is that on the option 6 the dragon halfling i want to make sure my player char stays with my pet to keep it healed while its fighting but i want to make sure i always keep the pet between me and the monster so the monster doesnt switch targets... would someone mind looking over the code and tell me where ive went wrong... btw this is a afk monstertargetter that uses pets to kill... the shard i play on we have pets that do not need to be fed and thus i didnt include any pet feeding subs i also use outside healing for the pet so just needed this script to stay close to the pet when said monster is in the area

Code: [Select]
set %corpse YFM

Begin:
gosub petsetup
gosub menuinit
;ignoreitem reset
set #menubutton N/A
menu delete EUOLabel3
menu text EUOLabel3 85 148 Status: Paused                   


hotkeyloop:
if #menubutton = Start
goto Start
goto hotkeyloop

Start:

menu set EUOLabel3 Status: Working...   

gosub monsterpick
gosub moveback
gosub findtarget

if #Menubutton = Pause1
menu set EUOLabel3 Status: Paused
goto HotKeyLoop


sub petsetup
display Target Your Pet
  wait 1
  set #targcurs 1
  target
  while #targcurs = 1
    wait 0
  set %petid #ltargetid
  set %pettype #findtype
  wait 5
return
sub moveback
move %startx %starty 0
return

sub findtarget
if #menures != 6
{
finditem %monster G_8
}
else {
finditem %monster G_25
}
if #findkind > -1
{
if #menures = 6
{
event Property #findid
if Halfling notin #property
{
ignoreitem #findid
gosub findtarget
}
}
if #findid = UCSE
{
ignoreitem #findid
gosub findtarget
}
set #ltargetid #findid
if %music = 1
{
gosub discordswoop
gosub peace
}
;ignoreitem reset
msg all kill $
target 5s
event macro 22 0
wait 10s
time:
if #menures != 6
{
finditem %monster G_8
} else {
finditem %monster G_25
}
if #findkind > -1
{
if %healpet = 1
{
gosub followpet
}
if %music = 1
{
gosub peaceagain
}
goto time
}

gosub findcorpse  ;use if looting corpse
}
;goto start
return


sub followpet
;ignoreitem reset
finditem %pettype G_25
if #findid = %petid
{
set %petx #findx
set %pety #findy

finditem %monster G_25
event Property #findid
if Halfling notin #property
{
ignoreitem #findid
goto time
}
set %monsterx #findx
set %monstery #findy

if %petx >= %monsterx
{
set %stepx %petx + 1
}
if %petx =< %monsterx
{
set %stepx %petx - 1
}
if %pety >= %monstery
{
set %stepy %pety + 1
}
if %pety =< %monstery
{
set %stepy %pety - 1
}
if ( ( ( #charposx = %petx + 2 ) || ( #charposx = %petx - 2 ) || ( #charposy = %pety - 2 ) || ( #charposy = %pety + 2 ) && ( ( #charposx >= %monsterx + 1 ) || ( #charposx <= %monsterx - 1 ) || ( #charposy >= %monstery + 1 ) || ( #charposy <= %monstery - 1 ) ) )
{
goto time
}
;event pathfind %stepx %stepy 0
move %stepx %stepy 0
}
goto time
;ignoreitem reset
return

sub findcorpse

redo:
finditem %corpse G_12
if #findkind = -1
{
goto time
}
if #findkind > -1
{
msg all guard me $
wait 2s
ignoreitem #findid
set %corpsex #findx
set %corpsey #findy
move %corpsex %corpsey 0

if %loot = 1
{
wait 20s
}
gosub moveback
goto redo
}
return

sub peaceagain
event macro 13 9
target 5s
event macro 22 0
return

sub peace
event macro 13 9
target 5s
event macro 22 0
wait 10
scanjournal 1
if You_play_hypnotic notin #journal
{

wait 10s
gosub peace
}

wait 10

return

sub discordswoop
event macro 13 15
target 5s
event macro 22 0
wait 2s
return


sub monsterpick

menu get combo

if #menures = 1  ;Swoops in Twisted Weald
{
Set %startx 2225
Set %starty 1222
Set %music 1
set %loot 1
set %healpet 0
Set %monster TC
;Set %distance 8
return
}

if #menures = 2 ;Daemons in Wind NorthWest of Exit
{
Set %startx 5131
Set %starty 158
Set %music 0
set %loot 1
set %healpet 0
;Set %distance 12
Set %monster FD
return
}

if #menures = 3 ;Daemons in Wind South of Bank
{
Set %startx 5307
Set %starty 139
Set %music 0
Set %monster FD
set %healpet 0
set %loot 1
;Set %distance 12
return
}

if #menures = 4 ;BloodElementals in Shame Lvl 4
{
Set %startx 5720
Set %starty 11
Set %music 0
Set %monster RI
set %healpet 0
set %loot 1
;Set %distance 12
return
}
if #menures = 5
{
return
}
if #menures = 6 ; Dragon Halfling Laz Lair End Room
{
set %startx 6113
set %starty 359
set %monster XU_AV_GJ
set %music 0
set %healpet 1
;set %pettype CE
;set %petid KZMB
set %loot 0
return
}

;--------- EasyUO Menu Designer Code Begin ---------
sub menuinit
  menu Clear
  menu Window Title DuckFarm v1.0
  menu Window Color Black
  menu Window Size 230 170
  menu Font Transparent #true
  menu Font Align Right
  menu Font Name MS Sans Serif
  menu Font Size 8
  menu Font Style
  menu Font Color Red
  menu Font Transparent #false
  menu Font Align Left
  menu Font BGColor Black
  menu Text EUOLabel1 60 34 Monster to farm
  menu Font Size 9
  menu Font Size 8
  menu Font Color WindowText
  menu Font BGColor Window
  menu Combo Create combo 10 10 210
  menu Combo Add combo Swoops(TwistedWeald)Disco&Peace REQ
  menu Combo Add combo Daemons(Wind NW of Exit)
  menu Combo Add combo Daemons(Wind S of Bank)
  menu Combo Add combo Blood Elementals(Shame 4th LvL)
  menu Combo Add combo Covetous Harpy PlaceHolder
  menu Combo Add combo Dragon Halfling(Lazlair End)
  menu Font BGColor BtnFace
  menu Button Start 64 70 109 25 Start!
  menu Button Pause1 10 140 50 25 Pause
  menu Font BGColor Black
  menu Font Color White
  menu Font Align Center
  menu Show 800 10
return
;--------- EasyUO Menu Designer Code End ---------

Tags: