Author Topic: target scanning  (Read 5449 times)

0 Members and 1 Guest are viewing this topic.

Offline The GhostTopic starter

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
target scanning
« on: January 18, 2013, 10:14:06 PM »
0
I has been looking around any can't seen to find an answer to my question. so Let see if you guy can shed some light.  I'm trying to have one my script to scan for a target range.    I use this often
findItem %monster G_2 . so I can kill animals  from range  1 to 12 tile.  Or if I step up G_12 I will kill anything in that radius.    thx

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: target scanning
« Reply #1 on: January 19, 2013, 08:18:30 AM »
0
Yes, that's just the radius value.  G_2 is useful for scanning for items that are within your reach.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline KaliOfLS

  • That's "Dr." Kali to you!
  • Sr. Member
  • *
  • Posts: 406
  • Activity:
    0%
  • Reputation Power: 6
  • KaliOfLS has no influence.
  • Gender: Male
  • Respect: +33
  • Referrals: 2
    • View Profile
Re: target scanning
« Reply #2 on: January 19, 2013, 12:19:58 PM »
0
Unless you're an orangutan, then you can use G_3
R~~~~ B~~~~~~~~ 
^ real life signature for sure

Offline The GhostTopic starter

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: target scanning
« Reply #3 on: January 19, 2013, 03:15:36 PM »
0
What I'm doing is recalling to a spot, trying to target every animal around me.  I have G_8 right now and it working good.   Was just looking to see if we can look at G_1, to G_8   I do believe that if you have G_8 it will look at G_8 first and get the farthest.

Offline KaliOfLS

  • That's "Dr." Kali to you!
  • Sr. Member
  • *
  • Posts: 406
  • Activity:
    0%
  • Reputation Power: 6
  • KaliOfLS has no influence.
  • Gender: Male
  • Respect: +33
  • Referrals: 2
    • View Profile
Re: target scanning
« Reply #4 on: January 19, 2013, 04:38:20 PM »
0
targeting by distance is hard.

If you want to target closest you can use the
event macro 52 1
which will target nearest hostile
event macro 52 5
which will target nearest mobile

However, that is hard to have work out well in a lot of situations.

One solution is this

Code: [Select]
for %i 1 8
{
       finditem %iType G_ , %i
       if #findcnt > 0
       {
                  ;First entrance would be closest guy.
        }
}

However, that's a slow method due to finditem.  It's kind of a slow command.

One way to do it is to set up an algorithm that can dual sort based on one item.  Similar to
http://www.easyuo.com/forum/viewtopic.php?p=132997#132997
R~~~~ B~~~~~~~~ 
^ real life signature for sure

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: target scanning
« Reply #5 on: January 19, 2013, 05:46:29 PM »
0
Unless you're an orangutan, then you can use G_3

Due to a picture I posted some time ago, I have been accused of having freakishly long arms that have caused nightmares..  lol
Please read the ScriptUO site RULES
Come play RIFT with me!

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: target scanning
« Reply #6 on: January 21, 2013, 07:53:21 AM »
0
targetting by distance and then picking the closest is actually not so hard use the finddist value
sub from my list of free to use subs  http://www.scriptuo.com/index.php?topic=2454.msg91121#msg91121

Code: [Select]
gosub ENs_FindClosestType %Monster
display ok Closest monster id = #result
halt

sub ENs_FindClosestType
  set !dist 100000000
  set #result N/A
  findItem %1 G_20
  if #findcnt > 0
    {
    for #findindex 1 #findcnt
       {
        if #finddist < !dist
            {
            set !dist #finddist
            set #result #findid
            }
       }
    }
return #result
« Last Edit: January 21, 2013, 07:57:39 AM by Endless Night »
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 KaliOfLS

  • That's "Dr." Kali to you!
  • Sr. Member
  • *
  • Posts: 406
  • Activity:
    0%
  • Reputation Power: 6
  • KaliOfLS has no influence.
  • Gender: Male
  • Respect: +33
  • Referrals: 2
    • View Profile
Re: target scanning
« Reply #7 on: January 21, 2013, 07:57:31 AM »
0
lol.  #finddist?  I use to calculate that using the max of #findx/#findy differences.  bahaha

I was thinking more of one finditem call and then organizing them in order of distance, however, by the time you're done with the first, the landscape will have changed eh?  good call
R~~~~ B~~~~~~~~ 
^ real life signature for sure

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: target scanning
« Reply #8 on: January 21, 2013, 07:59:53 AM »
0
lol.  #finddist?  I use to calculate that using the max of #findx/#findy differences.  bahaha

I was thinking more of one finditem call and then organizing them in order of distance, however, by the time you're done with the first, the landscape will have changed eh?  good call

One benifit of writting my EUO to LUA converter is that i had to go through every command and every var EUO supports and sets.. ... #findidst is one of those useful and overlooked vars.
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 The GhostTopic starter

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: target scanning
« Reply #9 on: January 21, 2013, 05:00:12 PM »
0
If only I know 1/10 of what you guy can do, I will happy  player.   Thx for the Help.  Sure gonna try to ENs way maybe that can be good.  More testing Hehe

Offline Masscre

  • Gran Master Jester !!
  • Scripthack
  • *
  • Posts: 4615
  • Activity:
    0%
  • Reputation Power: 55
  • Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!
  • Gender: Male
  • Air Guitar Commander !!
  • Respect: +144
  • Referrals: 1
    • View Profile
Re: target scanning
« Reply #10 on: January 24, 2013, 04:58:18 AM »
0
Unless you're an orangutan, then you can use G_3

Due to a picture I posted some time ago, I have been accused of having freakishly long arms that have caused nightmares..  lol

He can scratch his ankles with out bending over !!

Offline The GhostTopic starter

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: target scanning
« Reply #11 on: October 20, 2016, 09:58:59 AM »
0
Funny that 3 years  I do a search and come up to this post. I have the same issue then that I have now.  My knowledge have increase but still can't figure that one out.   

I try EN snippet and it not working because it still find the fardes one not the one near me. 

I still required help with that. 

thanks you

Tags: