Author Topic: attack nearest hostile  (Read 12190 times)

0 Members and 1 Guest are viewing this topic.

Offline CervezaTopic starter

  • 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
attack nearest hostile
« on: May 23, 2011, 09:40:13 AM »
0
Will attack closest targets, very useful for spawn or farming stuff.

Code: [Select]
repeat
gosub attack
repeat
  namespace copy TM_loot_in_progress from global TM_loot
until !TM_loot_in_progress <> #TRUE
until #false

sub attack
if #targCurs = 1 || #lLiftedKind = 1
  return
event macro 52 1
wait 10
event macro 53
wait 20
return

It's CLAw sensing, could put in healing sensing as well...
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 UOMaddog

  • Maddog
  • Elite
  • *
  • *
  • Posts: 1625
  • Activity:
    0%
  • Reputation Power: 22
  • UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...
  • Gender: Male
  • Biggest B@D@$$ of the Universe
  • Respect: +165
  • Referrals: 8
    • View Profile
    • Insane UO
Re: attack nearest hostile
« Reply #1 on: May 23, 2011, 10:09:38 AM »
0
Very nice! Three comments

I wrote a similar snippet (no Claw sensing) and discovered 3 things:
#1 - to prevent spamming while dead, I put in a loop to check for #charghost and it just does a "wait 1" if you're dead so you don't get the stupid messages flying up your screen about not being able to do it while dead
#2 - if you're on a regular character (read #3 and you'll understand), only do the gosub attack if you're over a certain HP so that you aren't luring in more things while you're low on health
#3 - if you're on a sampire/whammy, disregard #2 and make sure you're always attacking so that you can leech back life! I made the mistake of keeping #2 in for a while on my sampire and it sucked because when I got low, it would stop targeting! LOL

I also like you're check for targeting cursor and something being currently lifted!! I might just have to add that to mine!
There are 10 kinds of people in this world: those that understand binary and those that don't!

Windows:  A 64-bit tweak of a 32-bit extension to a 16-bit user interface for an 8-bit operating system based on a 4-bit architecture from a 2-bit company that can't stand 1 bit of competition!

Offline Outlaw Josey Wales

  • Full Moon Rising!
  • Hero Member
  • *
  • Posts: 595
  • Activity:
    0%
  • Reputation Power: 7
  • Outlaw Josey Wales has no influence.
  • Gender: Male
  • Respect: +59
  • Referrals: 2
    • View Profile
Re: attack nearest hostile
« Reply #2 on: May 24, 2011, 04:03:51 AM »
0
if my wife ever brings me my mouse to the hospital ill do some testing on some of this awesome stuff

Offline A LLama

  • Jr. Member
  • **
  • Posts: 10
  • Activity:
    0%
  • Reputation Power: 1
  • A LLama has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: attack nearest hostile
« Reply #3 on: September 23, 2012, 05:24:33 PM »
0
Very nice! Three comments

I wrote a similar snippet (no Claw sensing) and discovered 3 things:
#1 - to prevent spamming while dead, I put in a loop to check for #charghost and it just does a "wait 1" if you're dead so you don't get the stupid messages flying up your screen about not being able to do it while dead
#2 - if you're on a regular character (read #3 and you'll understand), only do the gosub attack if you're over a certain HP so that you aren't luring in more things while you're low on health
#3 - if you're on a sampire/whammy, disregard #2 and make sure you're always attacking so that you can leech back life! I made the mistake of keeping #2 in for a while on my sampire and it sucked because when I got low, it would stop targeting! LOL

I also like you're check for targeting cursor and something being currently lifted!! I might just have to add that to mine!

I really hate to be the one to bring up a dead post, but this is a good learning example?

how would i take this^^ and add it to snippets im throwing together? i am trying to learn how to make the script "flow"? but its rough finding learning material.

sorry gentlemen Resurrecting the dead
Lead by example

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: attack nearest hostile
« Reply #4 on: September 23, 2012, 08:35:49 PM »
0
I really hate to be the one to bring up a dead post, but this is a good learning example?

how would i take this^^ and add it to snippets im throwing together? i am trying to learn how to make the script "flow"? but its rough finding learning material.

sorry gentlemen Resurrecting the dead

try this section http://www.scriptuo.com/index.php?board=17.0
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline unbelromano

  • Newbie
  • *
  • Posts: 8
  • Activity:
    0%
  • Reputation Power: 1
  • unbelromano has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: attack nearest hostile
« Reply #5 on: May 02, 2022, 10:09:53 AM »
0
Will attack closest targets, very useful for spawn or farming stuff.

Code: [Select]
repeat
gosub attack
repeat
  namespace copy TM_loot_in_progress from global TM_loot
until !TM_loot_in_progress <> #TRUE
until #false

sub attack
if #targCurs = 1 || #lLiftedKind = 1
  return
event macro 52 1
wait 10
event macro 53
wait 20
return

It's CLAw sensing, could put in healing sensing as well...

hi i know this is a old thread
is possibile to ignore monsters? or ignore energy vortex and reaper?
is really annoying when you ciccle on monster and there are some vortex or reaper around  :-[

thx :)

Post Merge: May 03, 2022, 09:30:27 AM
someone?  :'(
« Last Edit: May 03, 2022, 09:30:27 AM by unbelromano »

Tags: