ScriptUO
Scripting Resources & Utilities => UOSteam => Topic started by: ExTjUtY on September 20, 2015, 10:02:22 AM
-
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'
-
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:
@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.
//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
-
I prefer headmsg over sysmsg since I am most likely looking at my character or close to it.