ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: The Ghost on May 28, 2017, 08:44:07 AM

Title: Stealth on a rail
Post by: The Ghost on May 28, 2017, 08:44:07 AM
 I have a rail system, I can walk ans perform the task I want.  Good for me.  My problem is I'm trying be stay in stealth mode between  each point.   To help me move I try  have reduce the X Y location to each step, but still having issue. Each time I use Pathfind to move  my toon move to fast.    I try adding some wait but still getting my self of hiding.  Is this a lose cause.
Title: Re: Stealth on a rail
Post by: The Ghost on May 28, 2017, 09:14:07 AM
Ok after I remove a few line of code and chance pathfind for move, I can move stealth using the rail. 
Cheer
Title: Re: Stealth on a rail
Post by: gimlet on May 28, 2017, 09:22:56 AM
I have found if you use pathfinding you need to keep the cursor close to your toon to not run to a new spot breaking stealth.
Title: Re: Stealth on a rail
Post by: The Ghost on May 28, 2017, 09:30:52 AM
Ok after I remove a few line of code and chance pathfind for move, I can move stealth using the rail. 
Cheer

Thx Gimlet   that a good info, i will try that. 
Title: Re: Stealth on a rail
Post by: manwinc on May 28, 2017, 10:06:52 AM
You best bet is to use Cheffes Move command while stealthing with a failsafe for pathfinding that takes control of your mouse every so often.


So lets say you want to let it take control of your mouse every 5 minutes if it absolutely needs to

Code: [Select]
set %Mouse_Timer #Scnt ; Resetting the Timer at the start of the script
set %X ; however you handle your rails
set %Y ;
set %Charposx #Charposx
set %Charposy #Charposy
Move %X %Y 0 2s
if #Charposx = %Charposx && #Charposy = %Charposy
{
if %Mouse_Timer < #Scnt
{
Center the mouse
set %Mouse_Timer #Scnt + 3,000 ; 5 Minutes
}
Event Pathfind %X %Y
wait XX
}

The Problem is cheffes move command looks goofy as hell unless you jack the #lpc to 9999 and then do something wonky like

set %Time_Limit #Systime + 3000
while %Time_Limit < #Systime && ( #Charposx <> %X || #Charposy <> %Y )
{
Move %X %Y 0 2
}