ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: Nuscheltier on December 16, 2013, 03:28:39 AM
-
Hi there,
I was wondering if there is a simple script around which alowes to combine two spells with a timer...
E.g. -casting Energy vortex
- casting second energy vortex
- Hide yourself by spell
- As soon as energy vortex decays recast
- Hide again
Im aware that this is most probably pretty simple to write so I wondered if there is allready something like this around.
greetings, Nuscheltier
-
check the script libary for the script for hunting silver serpents. It does just what you asked for
-
hi there, do you mean the silver afk farmer? Because thats with a tamer and a cu side...
-
No there is a script for a mage that cast 2 EV where you tell it to and then invises you untile you can cast another EV
-
I have written such a script numerous times and its not that hard as u surmised.... If i still had the code i would post it but no longer have it... but it would be a great script for you to start on....
A few tips... detemine when to caste an ev by looking at how many followers you have. Heres a simple script outline .. just fill in the 2 subs with the needed code
repeat
While #Followers < 5
gosub CasteEV
Gosub HideMe
until #charghost = yes
halt
sub CasteEV
; some code here
return
sub HideMe
; some code here
return
-
@Sutler... sorryI just couldnt find it...
@Endless night... I worked my way round somehow, but the problem now is that I dont know how to target the place to release the e vortex
repeat
While #Followers < 5
gosub CasteEV
Gosub HideMe
until #charghost = yes
halt
sub CasteEV
event Macro 15 57
wait 5s
event Macro 15 57
return
sub HideMe
event macro 15 43
target self
wait 120s
return
-
For Targetting you could try something like
set #LTARGETX #charposx + 2
set #LTARGETY #charposy + 2
set #LTARGETZ #CHARPOSZ
set #LTARGETKIND 2
event macro 22 0
By the way thiers now such command as "target self"... you have to wait for target and then issue an event macro ?? ?? look it up in wiki http://wiki.easyuo.com/index.php/Documentation?sid=6b3a231986c7f5fd36435e1c93484940
-
hi there, first of all thanks for your patience not really getting this targeting... It casts and casts but the EVs never appear... well sometimes they to appear but rarely
repeat
While #Followers < 5
gosub CasteEV
Gosub HideMe
until #charghost = yes
halt
sub CasteEV
event macro 25 0
event Macro 15 57
wait 2s
set #LTARGETX #charposx + 4
set #LTARGETY #charposy + 4
set #LTARGETZ #CHARPOSZ
set #LTARGETKIND 2
event macro 22 0
wait 4s
event macro 25 0
event Macro 15 57
wait 2s
set #LTARGETX #charposx + 2
set #LTARGETY #charposy - 2
set #LTARGETZ #CHARPOSZ
set #LTARGETKIND 2
event macro 22 0
return
sub HideMe
event macro 25 0
event macro 15 43
event macro 23 0
wait 120s
return
greetings Nuscheltier
-
Rember the golden rule... write your script to follow the actions you would do manually.
event macro 25 0 = wait for target .. try using this http://wiki.easyuo.com/index.php?title=Target
Now ask yourself when you caste a spell manually do you wait for a Target PRIOR to clicking on the spell caste icon ????
Well if you did you would be waiting forever wouldnt you..... first you caste the spell .. then you wait for a target cursor then you target the item person object or ground...
So thats 3 steps .. caste spell, wait for target cursor, select a target done in that order... which is not what you are doing.
Just play with this segment until you get it working then slot it into the rest of the script
event macro 25 0
event Macro 15 57
wait 2s
set #LTARGETX #charposx + 4
set #LTARGETY #charposy + 4
set #LTARGETZ #CHARPOSZ
set #LTARGETKIND 2
event macro 22 0
halt
-
Hei there,
well thank you alot for your help I finally made it :) sometime it stucks due to trying to cast twice the spell at the same time (Ithink 3s should be enought waiting time)...but what ever :) it works!
Thanks alot for your patience and your explenations :)
P.s. is there a way to check if Im really hidden?
repeat
While #Followers < 5
gosub CasteEV
Gosub HideMe
until #charghost = yes
halt
sub CasteEV
event Macro 15 57
target 3s
set #LTARGETX #charposx + 2
set #LTARGETY #charposy + 2
set #LTARGETZ #CHARPOSZ
set #LTARGETKIND 2
event macro 22 0
wait 3s
event Macro 15 57
target 3s
set #LTARGETX #charposx + 2
set #LTARGETY #charposy - 2
set #LTARGETZ #CHARPOSZ
set #LTARGETKIND 2
event macro 22 0
return
sub HideMe
event macro 15 43
target 2s
event macro 23 0
wait 120s
return
-
if h in #charstatus
{
do this
}
or
if h notin #charstatus
{
do this
}
-
Good job on learning... couple improvements..
1) you don't have to wait 12 seconds between casting invisibility .. only for hiding skill. (changed sub name to reflect its not hide)
2) You dont have to caste EV twice in the Caste ev sub... the loop while #followers < 5 will call casteEV while the followers count is less than 5. Ie you dont want it trying to caste 2 ev's when you have 4 followers. And if you only have 3 followers you want 3 evs caste...
repeat
While #Followers < 5
gosub CasteEV
Gosub InvisMe
until #charghost = yes
halt
sub CasteEV
event Macro 15 57
target 3s
set #LTARGETX #charposx + 2
set #LTARGETY #charposy + 2
set #LTARGETZ #CHARPOSZ
set #LTARGETKIND 2
event macro 22 0
wait 3s
return
sub InvisMe
if h notin #charstatus
{
event macro 15 43
target 2s
event macro 23 0
wait 3s
}
return