Author Topic: TrailMyx's Master Rail Engine/Developer  (Read 150898 times)

0 Members and 1 Guest are viewing this topic.

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #165 on: February 16, 2013, 07:53:05 AM »
0
I'm trying to do search for something after each way point, and i'm not sure if i'm going about this the right way....
it seems to be skipping over a bunch of WayPoints...
Code: [Select]
For %KhamRail 0 31
    {
    Event ExMsg #CharID 3 0 Railing to Position %KhamRail
    call %railsubs TM_RunRail %rail_label present %KhamRail FW
    Wait 2s
    FindItem xxx
    event ExMsg #charID 3 0 Searching....
    if #FindKind = -1
        goto end
    else
       ;Do something here
End:   
}

Online TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Master Rail Engine/Developer
« Reply #166 on: February 16, 2013, 08:22:38 AM »
0
Did you walk when you recorded the waypoints? 

You might want to query the present rail position and use that for the starting index instead of using "present".  From you're code, it looks like you are just single stepping through the rail.  Also, you might give this a go:

Code: [Select]
    call %railsubs TM_RunRail %rail_label %KhamRail %KhamRail FW
« Last Edit: February 16, 2013, 08:25:46 AM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #167 on: February 16, 2013, 08:25:59 AM »
0
Yes.. I recorded them slowly, I tested them with your Generated, everything works fine.. but when I call it from my script using the above code, it rails way point 1-3 ok, then waypoint 4 is where waypoint 6 or 7 is.. and it keeps jumping up from there.

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #168 on: February 16, 2013, 08:38:47 AM »
0
ok after further investigating..
each time it loops it keeps doubling for some reason.
from 1 to 2, to 3, then to 6.

Online TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Master Rail Engine/Developer
« Reply #169 on: February 16, 2013, 08:40:07 AM »
0
Here's another snippet to try:

Code: [Select]
set %continue #TRUE
while %continue
{
  call %railsubs TM_DetermineCurrentWaypointIndex
  if #RESULT <> 31 ; check for end of rail
  {
    set %next_index #RESULT + 1
    call %railsubs TM_RunRail %rail_label #RESULT %next_index FW  
    Wait 2s
    FindItem xxx
    event ExMsg #charID 3 0 Searching....
    if #FindKind <> -1
    {
      ;Do something here
    }
  }
  else
  {
    set %continue #FALSE
  }
}

What may be actually happening is the index is advancing by +1 at the end of the rail execution.  You may need to correct for this.  Using the above code, it should be easy to subtract one.  But give the above code a whirl because it should update you present rail index upon each movement.
« Last Edit: February 16, 2013, 08:43:21 AM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #170 on: February 16, 2013, 08:50:37 AM »
0
 call %railsubs TM_DetermineCurrentWaypointIndex
seems not to be updating..
I keep getting a #Result of 0

I think the problem here is the first waypoint is 0
so it keeps trying to add 1 to 0
« Last Edit: February 16, 2013, 08:58:12 AM by Khameleon »

Online TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Master Rail Engine/Developer
« Reply #171 on: February 16, 2013, 08:59:35 AM »
0
Hmm, should be.  That's the index that runs at the core of the engine.  You wouldn't be running rails at all if that value wasn't updating....
Please read the ScriptUO site RULES
Come play RIFT with me!

Online TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Master Rail Engine/Developer
« Reply #172 on: February 16, 2013, 09:33:49 AM »
0
ok, try this:

Code: [Select]
set %railsubs tool_railengine30k.txt
set %rail_filename railfile.txt
set %rail_label  RAIL_LABEL1

call %railsubs TM_Initialize

call %railsubs TM_LoadRail %rail_filename

if #RESULT = #TRUE
{
  display ok Rail file not found
  stop
}
set #LPC 1000

set %continue #TRUE
while %continue
{
  call %railsubs TM_DetermineCurrentWaypointIndex
  if #RESULT <> 31 ; check for end of rail
  {
    set %current_index #RESULT
    call %railsubs TM_RunRail %rail_label present 2 FW
    Wait 2s
    display ok %current_index
  }
  else
  {
    set %continue #FALSE
  }
}

On thing to note about the rail engine is that the second index isn't the destination index, but the number of steps

Code: [Select]
call %railsubs TM_RunRail %rail_label present 2 FW

This steps once forward but does miss the first waypoint.  There's probably a ">" that should be a ">=" somewhere in the engine.  But you can live with the above code.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #173 on: February 16, 2013, 09:41:16 AM »
0
thats it.. TYVM, I thought that was the next waypoint in line.

Online TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Master Rail Engine/Developer
« Reply #174 on: February 16, 2013, 10:33:00 AM »
0
thats it.. TYVM, I thought that was the next waypoint in line.

heh, I forgot also!
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Alpha

  • Hero Member
  • *
  • Posts: 583
  • Activity:
    0%
  • Reputation Power: 10
  • Alpha barely matters.Alpha barely matters.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #175 on: February 17, 2013, 01:43:20 PM »
0
Just getting around to playing with this & it's GREAT !   I'm thinking ok I get the whole index thing & can run them forwards & backwards I'm Good!   Then I start thinking about the next step & go back to look at the callback Function & I realize I probably just need to understand it all 100% or I will be just using a small fraction of the POWER !   Anyway....   Thanks !

Only TM can write a Tool that Requires 25+ pages of PDF to use / understand correctly.  I LoL'ed when I opened the PDF & went "hmm more to this than I'm prepared for!"

Online TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Master Rail Engine/Developer
« Reply #176 on: February 17, 2013, 07:36:09 PM »
0
Heh yeh, I can't remember when I had the time to write that PDF.  lol - I must have been bored at one point in my life.

Well, I'm glad you're getting some use out of it.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Alpha

  • Hero Member
  • *
  • Posts: 583
  • Activity:
    0%
  • Reputation Power: 10
  • Alpha barely matters.Alpha barely matters.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #177 on: March 11, 2013, 02:28:40 PM »
0
Is there some way to make it so that the rail engine doesn't take command of the mouse when it moves?

Online TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Master Rail Engine/Developer
« Reply #178 on: March 11, 2013, 03:41:05 PM »
0
There's around 8 instances of the "click" instruction in the rail engine.  Just comment all of them out. 

The next question should not then be "my rail doesn't work anymore while I play games on facebook"  heh.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Alpha

  • Hero Member
  • *
  • Posts: 583
  • Activity:
    0%
  • Reputation Power: 10
  • Alpha barely matters.Alpha barely matters.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #179 on: March 11, 2013, 05:06:31 PM »
0
Yea thats what I ended up doing before I even read this.  I had forgotten about the "n" parameter for click though.   It wasnt ME.....it was the wife playing on facebook & shes happy now!

One last question just to confirm something.  When i record a rail being mounted / not mounted DOES matter correct?  Ive had a few instances where i ran a rail on foot when it was recorded mounted & it would get stuck but im thinking it simply cannot reach the Z-coord?