Author Topic: Help with auto target  (Read 7800 times)

0 Members and 1 Guest are viewing this topic.

Offline ExTjUtYTopic starter

  • Restricted
  • *
  • Posts: 1
  • Activity:
    0%
  • Reputation Power: 1
  • ExTjUtY has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Help with auto target
« on: September 20, 2015, 10:02:22 AM »
0
I got one problem in this scp!When i first time use the scp on first target everything is working, but when i choose the another player target script anyway try to cast and drop explosion to first target!Mby somebody could help me?



cast 'Paralyze' 'last'
pause 2800
warmode 'on'
usetype 0xf0d
waitfortarget 15000
target! 'last'
attack 'last'

Offline Vlek

  • Jr. Member
  • **
  • Posts: 35
  • Activity:
    0%
  • Reputation Power: 1
  • Vlek has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
    • Bloodclan Orcs
Re: Help with auto target
« Reply #1 on: November 19, 2015, 10:29:07 AM »
0
This script is very, very confused. You shouldn't need to play with warmode, and you're using 'last' target which can cause issues because 'last' can include your friendlies as well as enemies. It's better to use 'enemy' in this case. Regardless, if they have magic reflect on, this isn't going to end well for you. You might want to do a check in the middle of your script to see if you're paralyzed and do some counter measures if you are. Also, usually people wait a while before throwing an explosion potion. I'd suggest having it in another macro if possible, but if you want a one-and-done script then you'd probably want to do some waiting after using the potion.

You should have a targeting macro like this:
Code: [Select]
@getenemy 'enemy' 'gray' 'criminal' 'murderer' 'closest'
if @inrange 'enemy' 16
  headmsg "You're attacking me!" 'enemy'
endif

And then this is my version of what you're trying to do.
Code: [Select]
//Before we run through this long code, lets check
//if we even have an enemy on screen.
if @inrange 'enemy' 16
  cast 'paralyze'
  waitfortarget 15000
  target! 'enemy'
  pause 500
  if @findtype 0xf0d 'any' 'backpack'
    useobject 'found'
    waitfortarget 15000
    target! 'enemy'
  else
    sysmsg 'You do not have any explosion potions!'
  endif
  attack 'enemy'
else
  sysmsg 'Your enemy was not on screen'
endif

Offline CharlieB

  • Newbie
  • *
  • Posts: 5
  • Activity:
    0%
  • Reputation Power: 1
  • CharlieB has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Help with auto target
« Reply #2 on: July 09, 2016, 11:07:07 AM »
0
I prefer headmsg over sysmsg since I am most likely looking at my character or close to it.

Tags: