Author Topic: Trageting ground for spell  (Read 2586 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
Trageting ground for spell
« on: October 25, 2011, 11:57:34 PM »
0
While i cast EV's i need to target the ground,  I'm using the click xxxx yyy, for now,  but if a corpse and anything is on the way, I can't cast.  Here what I have so far can anyone help  thx

This is what I 'm using right now
Code: [Select]
 
if #followers < 5
goto cast

if #followers = 5
gosub invisible
gosub cure
goto scan

cast:
{
event macro 15 57  ; EV's
click 450 370
wait 1s
}
goto scan 

Here what  I'm attempting to do and going  nowhere.    I just what to be able to walk in and cast a few title from myself.
Code: [Select]

sub cast
set %tx #charposx
set %ty #charposy
event macro 15 57
target 3s
set %tx #findx -2
set %ty #findy -2
set #LTargetx %tx
set #LTargety %ty
set #LTargetKind 2
event macro 22
wait 20
return




Offline freddy

  • Sr. Member
  • *
  • Posts: 271
  • Activity:
    0%
  • Reputation Power: 4
  • freddy has no influence.
  • Gender: Male
  • Respect: +37
  • Referrals: 1
    • View Profile
Re: Trageting ground for spell
« Reply #1 on: October 26, 2011, 01:14:41 AM »
0
you could do a search for items within a given range

like
finditem * G_2
if #findkind <> -1
{
for #findindex 1 #findcnt
{
if #findx = %tx && #findy = %ty
{
....
break
}
}
}

use #findx #findy #findz to compare to the x/y/z your spell is casting and if it is the same, then have the script adjust the initial settings to a different spot.
« Last Edit: October 26, 2011, 01:21:09 AM by freddy »

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: Trageting ground for spell
« Reply #2 on: October 26, 2011, 03:00:17 AM »
0
You are trying to set vars to findx/findy but you never did a finditem:

set %tx #findx -2
set %ty #findy -2

You want to do:

set %tx #charposx - 2
set %ty #charposy - 2

And you don't need to set the variables twice.

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

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: Trageting ground for spell
« Reply #3 on: October 26, 2011, 09:30:23 AM »
0
Thx   So here what I did and I insert two location encase one is block.   Do you guy  know of a easier way to do it.

Code: [Select]

set % itemtype *  ;   the * can be replace by any id to want to cast near 
while #true
{
finditem * G_3
while #findcnt <  1[
{
wait 1
finditem * G_3
}
gosub one

sub one
event macro 15 57
target 3s
set %tx #findx -2
set %ty #findy -2
set #LTargetx %tx
set #LTargety %ty
set #LTargetKind 2
event macro 22
wait 20
return
/code]

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: Trageting ground for spell
« Reply #4 on: October 26, 2011, 09:51:37 AM »
0
Thx   So here what I did and I insert two location encase one is block.   Do you guy  know of a easier way to do it.

Code: [Select]

set % itemtype *  ;   the * can be replace by any id to want to cast near 
while #true
{
finditem * G_3
while #findcnt <  1[
{
wait 1
finditem * G_3
}
gosub one

sub one
event macro 15 57
target 3s
set %tx #findx -2
set %ty #findy -2
set #LTargetx %tx
set #LTargety %ty
set #LTargetKind 2
event macro 22
wait 20
return
/code]

Why not keep it relative to your character's location like you already mentioned so it's usable anywhere that location isn't blocked? Also, you can simplify it a little:

Code: [Select]
sub CastEV
   set #ltargetx #charposx - 2
   set #ltargety #charposy - 2
   set #LTargetKind 2
   event macro 15 57
   target 3s
   event macro 22
   wait 20
return

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

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: Trageting ground for spell
« Reply #5 on: October 26, 2011, 08:25:56 PM »
0
Thx lot for the help  that work fine.

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: Trageting ground for spell
« Reply #6 on: October 27, 2011, 02:47:28 AM »
0
I use this to cast RC's at Harrowers.

Code: [Select]
set %waiting_to_start #TRUE
while %waiting_to_start = #TRUE
{
  onhotkey F10 alt
    set %waiting_to_start #FALSE
}
set %targetX #charPosX
set %targetY #charPosY
set %targetZ #charPosZ
wait 4s

repeat
if #followers < 4
gosub cast %targetX %targetY %targetZ
while H notin #charStatus
{
event macro 15 43
target 3s
event macro 23
wait 10
}
wait 1
until #false

sub cast
repeat
event macro 15 693
target 5s
set #lTargetX %1
set #lTargetY %2
set #lTargetZ %3
set #lTargetKind 2
event macro 22
wait 5
if #followers < 5
  set %1 ( %1 + 1 )
until #followers = 5
return

Use Alt+F10 when you are standing on the spot you want to cast. Then you have 4 seconds to move to the spot you want to cast from.

Will Invis self between casting.
« Last Edit: October 27, 2011, 02:49:19 AM by Cerveza »
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.

Tags: