Post by embryosalad on Feb 6, 2016 8:39:13 GMT
Great to see this forum is coming back!
I was hoping to have someone with more experience with scripting to help me learn something about what I am doing wrong with my script.
My end goal is to ignore any enemy that is in my safe list instead of having to edit any UO files for the getenemy targeting function.
I have all but given up and simply added a stop when it encounters a horse and would instead like it to somehow ignore the horse or any mob in the SafeAnimals list.
I've had a few too many beers tonight and I'm hoping someone will be able to teach me something here.
Thank you!
I was hoping to have someone with more experience with scripting to help me learn something about what I am doing wrong with my script.
My end goal is to ignore any enemy that is in my safe list instead of having to edit any UO files for the getenemy targeting function.
I have all but given up and simply added a stop when it encounters a horse and would instead like it to somehow ignore the horse or any mob in the SafeAnimals list.
I've had a few too many beers tonight and I'm hoping someone will be able to teach me something here.
Thank you!
if not listexists 'SafeAnimals'
createlist 'SafeAnimals'
pushlist 'SafeAnimals' 0xc8 //Horse
pushlist 'SafeAnimals' 0xe2 //Horse2
pushlist 'SafeAnimals' 0xcc //Horse3
pushlist 'SafeAnimals' 0xe4 //horse4
endif
for 0 in 'SafeAnimals'
if @findtype SafeAnimals[] 'any' 'ground' 1 10
headmsg 'Move away from this creature' 333 'found'
stop
endif
endfor
@getenemy 'murderer' 'gray' 'enemy' 'criminal' 'closest'
if @inrange 'enemy' 10
headmsg "Target aquired!" 333 'enemy'
@target 'enemy'
virtue 'honor'
pause 200
attack 'enemy'
while @findobject 'enemy' and not dead 'enemy'
if @injournal 'You gain' 'system'
cast "Lightning Strike"
clearjournal
elseif @injournal 'You attack' 'system'
cast "Lightning Strike"
clearjournal
elseif @injournal 'You have lost' 'system'
cast "lightning strike"
clearjournal
endif
if stam < 100
cast 'divine fury'
pause 600
endif
endwhile
headmsg 'Target Eliminated'
else
headmsg 'No target found!' 333
endif