Author Topic: Help w/ Ideas on efficient Targetting of AoE Spells (Subroutine)  (Read 1788 times)

0 Members and 1 Guest are viewing this topic.

Offline AlphaTopic starter

  • Hero Member
  • *
  • Posts: 583
  • Activity:
    0%
  • Reputation Power: 10
  • Alpha barely matters.Alpha barely matters.
  • Respect: +44
  • Referrals: 0
    • View Profile
Help w/ Ideas on efficient Targetting of AoE Spells (Subroutine)
« on: September 30, 2009, 11:30:07 AM »
0
I've been farming imbuing ingredients with a Mysticism Mage using alot of SDI & Splayer spellbooks & it occurred to me that I could most definately write a script for this.  I can quite resonably simply Cast spells like Nether Cyclone and Target myself effecting everything in 2 tile Radius, but there's gotta be a better way to do it!!

IDEAS:

1) Target self and Nether cyclone is basically just a 2 tile wither in this case.  You lose the time it takes for Mobs to walk up to you.

2) Target yourself & if nothing's near target the nearest Mob.. this is a bit better bc your not waiting for stuff to walk up to you all the time, but the "nearest mob" isn't usually the best spot to click your ranged AoE.

3) I'm looking for a better method of Scanning the nearby area (10 tile range for spell casting) & determining where the "Target Tile" is that includes the most Mobs in it's area of effect.. 
What I can think of so far is this... (if your farming area is static)
    -The sub would basically scan through each valid Target Tile & finditem the mobs at that point in time keeping track of how many of them are within range of the AoE if you targetted that tile.  The sub would scan all the tiles like this resulting in a specific spot or spots that maximizes the # of mobs hit.  I know I need to find a sub that computes relative distances in uo geometry for given x/y comparisons... & I don't know if scanning an area like this can be done fast enough (considering that everything is moving) to even be worth it...

  In short... your standing there with a nether cyclone Cursor up. 3 Ratmen spawn... some near some far...  Is there a spot to click that kills all 3?  2? etc..   gotta be a way heh...

I'm not looking for someone to write this for me..... Just some ideas on how it might be done and I'll figure the rest out...  or if you have the urge feel free!

thx 

Offline cgeorgemo

  • Hero Member
  • *
  • Posts: 586
  • Activity:
    0%
  • Reputation Power: 5
  • cgeorgemo has no influence.
  • Gender: Male
  • I'm Brian...cgeorgemo is Curious George Missouri
  • Respect: +19
  • Referrals: 1
    • View Profile
Re: Help w/ Ideas on efficient Targetting of AoE Spells (Subroutine)
« Reply #1 on: September 30, 2009, 12:33:40 PM »
0
Ok I've been thinking that there might be way too much calculating to try to find all the mobs in range. Perhaps a pattern that took into account all the squares that a cast would hit and targeted specific squares to maximize the damage done by overlapping one AOE tile at the edge of each cast would be better?
That pattern should be pretty easy to make. I'd say start at the middle and fan outward for a simple setup.
Is there a way to see how many mobs are currently withing a range of the player and where they are?
Sarcasm is your body's natural defense against stupidity.

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: Help w/ Ideas on efficient Targetting of AoE Spells (Subroutine)
« Reply #2 on: October 03, 2009, 07:06:49 PM »
0
lookup the command Finditem  ,  then read the options G = Gound .. then note the results it returns #finddist #Findx #findy

This is the info you will be needing.  I canrt rember if x/y returned is tile or screen postioning.. But you can translate between the 2 bit of complex coding but people have done it already and posted as reusable subs on EUO..

Enjoy the math that will surely follow.
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."

Tags: