Author Topic: EnemyID and Pets  (Read 3844 times)

0 Members and 1 Guest are viewing this topic.

Offline crameepTopic starter

  • Jr. Member
  • **
  • Posts: 50
  • Activity:
    0%
  • Reputation Power: 0
  • crameep has no influence.
  • Respect: +2
  • Referrals: 1
    • View Profile
EnemyID and Pets
« on: November 30, 2009, 08:57:31 AM »
0
Hi, I just started playing some UO again after a while, I started using my AutoKill Script its posted in the scripts section of this forum and theres a strange bug with EnemyID where after I drag my pets bar EnemyID stays as my Pet ID no matter what. I've been trying to figure out a way to work around this. Any Ideas?

Offline Xclio

  • Officially "The MAN"
  • Elite
  • *
  • *
  • Posts: 981
  • Activity:
    0%
  • Reputation Power: 9
  • Xclio has no influence.
  • Gender: Male
  • Respect: +56
  • Referrals: 1
    • View Profile
Re: EnemyID and Pets
« Reply #1 on: November 30, 2009, 09:10:00 AM »
0
EnemyID is broken last I knew for EUO...I have was having alot of issues with it about 3-4 months ago if I remember right.

Offline crameepTopic starter

  • Jr. Member
  • **
  • Posts: 50
  • Activity:
    0%
  • Reputation Power: 0
  • crameep has no influence.
  • Respect: +2
  • Referrals: 1
    • View Profile
Re: EnemyID and Pets
« Reply #2 on: November 30, 2009, 09:12:26 AM »
0
So, i need to find an alternative way for finding out if my enemy is dead eh?

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: EnemyID and Pets
« Reply #3 on: November 30, 2009, 09:21:32 AM »
0
The best way is to get the specific ID of whatever your trying kill, and seeing if it's still there.

Code: [Select]
sub killstuff
finditem %monsters_from_list G_12
if #findCnt < 1 ; didn't find it
  return ; so go back
set #ltargetID #findID
set %target #findID ; you set that specific ones ID
set #ltargetKind 1 ; don't forget this
event macro 27 0 ; attack last target, I use this with my archer
; msg ALL KILL $ ; for you tamers
; target 3s
; event macro 22 0 ; last target
;
; ok now when will you know if it's dead?
;
set %killing_timer ( #sCnt + 30 ) ; set this to the max time it takes you to kill... plus 5-10
repeat
finditem %target G_12 ; looks for the id of your targetted monster
until #findCnt < 1 || #sCnt > %killing_timer
return

So you just repeat looking for the specific ID of your target. You could put in some healing stuff in there also, or healing pets if you do that. Just include it in the repeat/until portion. The %killing_timer is just a safety incase the monster suddenly disappears or wanders away.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline rana70

  • Elite
  • *
  • *
  • Posts: 294
  • Activity:
    0%
  • Reputation Power: 5
  • rana70 has no influence.
  • Gender: Male
  • Respect: +37
  • Referrals: 2
    • View Profile
    • MyScripts
Re: EnemyID and Pets
« Reply #4 on: November 30, 2009, 09:27:03 AM »
0
So, i need to find an alternative way for finding out if my enemy is dead eh?

Hi,

I haven't used #EnemyID for a while so I don't  know if it is broken,
but you can check the #EnemyID against your pedID to make sure it is not
your ped you track and if the #EnemyID is set correctly you can use #EnemyHits
to see if it is dead.

But to be honest .. I would go the old style way ..
track down your enemy and find it's ID eg with a FindItem and
check if it is killed simply with the same command...
if you have a  #FindCnt < 1 ... it is dead ...

cu

Offline crameepTopic starter

  • Jr. Member
  • **
  • Posts: 50
  • Activity:
    0%
  • Reputation Power: 0
  • crameep has no influence.
  • Respect: +2
  • Referrals: 1
    • View Profile
Re: EnemyID and Pets
« Reply #5 on: November 30, 2009, 09:46:45 AM »
0
Surprisingly my code is simalar to that already I just used

while n/a notin enemyid to keep attacking :) just a little change needed to fix it. Surprised thats all thats broken in my script after this long.

Edit: Thanks for the words of wisdom :p.
« Last Edit: November 30, 2009, 11:07:31 AM by crameep »

Tags: