ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: Crisis on March 07, 2015, 08:45:22 PM

Title: Movement VS Rail
Post by: Crisis on March 07, 2015, 08:45:22 PM
What is the difference between using movement in a script and a true rail system? I was looking at TM's and EN's Rail subs and they look great but fairly complicated. The movement almost seems too easy though and it is easy to make a mistake and very tedious doing it.

Movement Example in case it is needed for clarification:

Code: [Select]
step_15a
 move 5711 1960 0 5s
     if ! ( #charposx = 5711 && #charposy = 1960 )
     {
     goto step_15a
    }
 else
 {
 goto step_16
 }
Title: Re: Movement VS Rail
Post by: manwinc on March 07, 2015, 09:10:45 PM
True rail systems you just give it a series of coordinates and it will attempt to move you from one end to the other. With fail Safes etc etc etc.
Move command just moves you to 1 tile.
Title: Re: Movement VS Rail
Post by: Endless Night on April 05, 2015, 03:47:09 PM
I did make a mini-rail system based entirely off of keyboard directional move commands.   I use it for house movement and supper small rails and it works very effectively and very fast.

Thier are some issues to consider with this...  the main one being time, lag and keyboard buffer...

Sadly I just looked and even tho i had intended to publicly release it, it  looks like i never did......  I did use a 2007 version of it in one of my public released scripts the character-tool box.

In the character tool box script search for string "; Simple Movement Recording Subs".   I use these subs in this script to run a movement based rail from new haven to luna bank... the rail is represented by these 2 strings (inn to new haven moongate) "30d593ZNCk5h4s5f6e75l6n7z5a5d6z5o5c7w5t7a5"  (luna moongate to luna upstairs inn)  "36g1g7f5a7f1p7a593BQCf5a3"

Included in the subs is a rail recorder... Sub SimpleMovementRecording  - it returns the string containing the recorded rail.    This version is more advanced than the original one step movement version and incorporates the move command for longer rails and rail data compression, but it still uses 1 step event marco commands as well .


Title: Re: Movement VS Rail
Post by: TrailMyx on April 05, 2015, 04:25:41 PM
EN's secret favorite programming language is THIS (http://www.muppetlabs.com/~breadbox/bf/)  eheheh
Title: Re: Movement VS Rail
Post by: Endless Night on April 05, 2015, 04:35:54 PM
EN's secret favorite programming language is THIS (http://www.muppetlabs.com/~breadbox/bf/)  eheheh

lol my secret is out.
Title: Re: Movement VS Rail
Post by: manwinc on April 06, 2015, 03:24:57 PM
LOL, the Brain****!

Another neat option for Movement is to use the Event Macros for moving in certain directions. There is no huge delay like from Keystrokes so it can move you much faster. I found that for running at mount speed it was the best way to go, but you can't stealth with it without keeping the mouse center of the screen like pathfind, so I usually tend to stick to cheffes good ol Move command.


Move (x) (y) ( Dist Failsafe) (Time, 20= 1s) is best for moving across uneven Terrain.

Event Pathfind (X) (Y) (Z) is excellent as a fail safe as the game literally tries to find a path from where you are to the location. This isn't suggested to be spammed as it can make your character freak out if its accidentally combined with a Click move. (Its also Super Obvious with Event Pathfinding spamming your journal)

Let me see if I can find my sub for Movement that was supposed to mimic Cheffes.

Gosub MW_Move (X) (Y) (Dist)
Code: [Select]
Sub MW_Move
Namespace Push
Namespace Local MW_Move
Set !X %1
set !Y %2
set !Distance %3
set !Timeout #Systime + 500
While !Timeout > #Systime && ( ABS ( !X - #Charposx ) > !Distance || ABS ( !Y - #Charposy ) > !Distance )
{
if !Y < #Charposy && !X = #Charposx
set !Macro 1
if !Y > #Charposy && !X = #Charposx
set !Macro 5
if !Y < #Charposy && !X < #Charposx
set !Macro 0
if !Y = #Charposy && !X < #Charposx
set !Macro 7
if !Y > #Charposy && !X < #Charposx
set !Macro 6
if !Y > #CHarposy && !X > #Charposx
set !Macro 4
if !Y = #Charposy && !X > #Charposx
set !Macro 3
if !Y < #Charposy && !X > #Charposx
set !Macro 2
set !Charposx #Charposx
set !Charposy #Charposy
set !Direction #Chardir
set !Timer #Systime + 250
Event macro 5 !Macro
While #Charposx = !Charposx && #Charposy = !Charposy && !Direction = #Chardir && !Timer > #Systime
{
}
}
Namespace Pop
Return