ScriptUO

Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: Rn on August 07, 2009, 05:28:03 PM

Title: Quick Quesiton
Post by: Rn on August 07, 2009, 05:28:03 PM
I'm using a hiding/stealth training script but I feel it could be better but my scripting ability is limited

The following code is after start/stop locations have been set

Code: [Select]
goto stealth

stealth:
if #menubutton = b_stop
{
   goto Main
}
If H notIn #charStatus
{
gosub hider
}
while #charposx <> %x1 || #charposy <> %y1
{
move %x1 %y1 0 4
}
if #menubutton = b_stop
{
   goto Main
}
If H notIn #charStatus
gosub hider
while #charposx <> %x2 || #charposy <> %y2
{
move %x2 %y2 0 4
}
goto stealth

sub hider
hideloop:
event Macro 13 21
If H notIn #charStatus
{
wait 10
goto hideloop
}
return


This will only attempt to hide if I become unhidden but im trying to figure out how to keep my character constantly attempting to hide, even when its already hidden.

I know i need to get rid of the "If H notIn #charStatus" If's, but im not sure what i should be replacing it with. I assume ill need a simple "event Macro 13 21" loop but im not sure how to keep it going in the background while the character is moving

Suggestions?



edited for clarity
Title: Re: Quick Quesiton
Post by: Rn on August 07, 2009, 06:02:39 PM
ha, think i just solved it. I did delete those If loops but didn't add anything else to it and its working just how I wanted.

I want to share this with everyone but the majority, well pretty much all of it besides minor tweaks, of it was written by someone else and I want to make sure I give them credit, is their a certain way to do so?

Title: Re: Quick Quesiton
Post by: SunTigress on August 07, 2009, 06:38:28 PM
best way to do so is just state that in the top of teh script something like this

Code: [Select]
Hiding/invis script
originally written by Runaway Zamboni
edited and modified by Rn (maybe even say what was modified)
Title: Re: Quick Quesiton
Post by: Rn on August 07, 2009, 06:52:34 PM
kk, ima go post this in the submit a script section