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

0 Members and 4 Guests are viewing this topic.

Offline Superslayer

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #120 on: January 30, 2010, 08:03:33 AM »
0
*shameless bump for my question 2 posts above*

Additionally, I have another question/suggestion. Is it possible to throw in another call that will return the direction that the current rail is running?  I'm working on a function that will allow users to stop the rail and the script all together and allow them to restart all together like they never missed anything. With my setup in the WIT, there are several rails that run in different directions depending on where they started, so knowing which way the rail was running is imperative to the restarting. Perhaps something like "Call %railsubs TM_GetCurrentRailDirection"

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13303
  • Activity:
    0.4%
  • 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 #121 on: January 30, 2010, 10:56:29 AM »
0
I have that in the latest version but a silly bug is preventing any testing.  I may have to revert a little bit to absorb the bug.  Was cleaning up some stupid code and broke something.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Superslayer

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #122 on: January 30, 2010, 11:05:36 AM »
0
ROFL, sounds like me with my many changes to my scripts!

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13303
  • Activity:
    0.4%
  • 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 #123 on: January 30, 2010, 11:06:59 AM »
0
ROFL, sounds like me with my many changes to my scripts!

Ya, I broke something silly.  Problem is it's kinda hard to debug a script that's running in "server" mode when it's the server!  I do have a namespace debugger I wrote a little while ago now that I'm going to have to dust off I think.
Please read the ScriptUO site RULES
Come play RIFT with me!

Scrripty

  • Guest
Re: TrailMyx's Master Rail Engine/Developer
« Reply #124 on: January 30, 2010, 12:38:48 PM »
0
ROFL, sounds like me with my many changes to my scripts!

Ya, I broke something silly.  Problem is it's kinda hard to debug a script that's running in "server" mode when it's the server!  I do have a namespace debugger I wrote a little while ago now that I'm going to have to dust off I think.

I just found out you could add vars to EUO for watching... so um... yea... :)  You guys should be giving out these little tidbits to people... heh  What seems easy to you guys might be a valuable lesson to us scrubs. :)

Offline Superslayer

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #125 on: January 30, 2010, 12:44:26 PM »
0
Read thoroughly the PDF that's on the first page. Admittedly I think it needs some extra examples and some more info on the functions, but other than that, it's a great read for beginners and just like any other callable script, any var can be 'watched' throughout the script, which makes it SO incredibly powerful.

Offline Superslayer

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #126 on: February 08, 2010, 01:54:27 PM »
0
Sub to consider adding to the Rail Engine?

Code: [Select]
Sub SetCursPos
  set %ClickX #clixres / 2
  set %ClickY ( ( #cliyres / 2 ) + 70 )
Return
; ---------------------

I use this sub in the WIT for really only one purpose, should the character decide to walk to the pathfinding destination. Then why am I bringing it up? Surprisingly, I noticed that while my game screen sized is lessened because of my Razor use and recent UO Client patch, there's also the possibility that others play in the smaller size.  When I tested this out recently while stealthing, the pathfinding forced my character to run, thus revealing himself, something others may not want especially if they want to walk continuously.

The '+70' places the cursor at the feet of the character and not directly on them.

Just for consideration.

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13303
  • Activity:
    0.4%
  • 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 #127 on: February 08, 2010, 03:26:34 PM »
0
Ah yes, that's something I've been meaning to do with the rail engine.  I have other scripts that do screen-relative centering, but that just never made it into the engine.  I have a TODO list somewhere for the engine that already has your request. heh
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Superslayer

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #128 on: February 09, 2010, 03:24:59 PM »
0
Question:

I'm comming around to using some of the other commands, in particular, the TM_Pop & TM_Push functions.  I'm obviously not doing it right, so I'm asking, could you post a small example or correction to what I'm doing?

What I'm doing:

1. Load rail1
2. Start running rail1 from 0 to End
3. Call TM_SetPresentServerCommand STOP midway through rail... waypoint 100 for example
4. Call TM_Push
5. Load rail2
6. Run rail2 from 0 to end, then backwards 100 to End.
7. Call TM_Pop
At this point, I'd half expect to see the TM_RE Info window to show that rail1 is now loaded with the last waypoint from where I pushed it from, rail1/waypoint 100. From the call tm_pop, there is no error.

I'm still a little baffled with this one,

Offline JackCiaran

  • Jr. Member
  • **
  • Posts: 35
  • Activity:
    0%
  • Reputation Power: 1
  • JackCiaran has no influence.
  • Respect: +2
  • Referrals: 1
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #129 on: April 07, 2010, 05:42:09 AM »
0
So this script is insane and my understanding of scripting isn't that great =( but I'm definitely learning from everyones posts and scripting codes they submitted but currently I'm TRYING to write a stealth script and curious after reading everything in here and the pdf if its possible to find something and then walk to it using this rail engine? ( I assume it would be possible but I'm afraid I may have just misunderstood a few things )

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13303
  • Activity:
    0.4%
  • 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 #130 on: April 07, 2010, 07:43:22 AM »
0
So are you going to be railing around until you find something.  Then stop the rail and walk to the found object.  All stealthed? 
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline JackCiaran

  • Jr. Member
  • **
  • Posts: 35
  • Activity:
    0%
  • Reputation Power: 1
  • JackCiaran has no influence.
  • Respect: +2
  • Referrals: 1
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #131 on: April 07, 2010, 10:50:34 AM »
0
yes thats correct and i figured out how to do it =)

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13303
  • Activity:
    0.4%
  • 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 #132 on: April 07, 2010, 11:45:27 AM »
0
It's pretty easy to stop/start a rail with this rail engine. Superslayer has some pretty detailed code.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Superslayer

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
TM_MaxDistance
« Reply #133 on: September 27, 2010, 04:54:53 AM »
0
Here's a nice tid-bit of info for people using the rail creator and engine. When using the "TM_MaxDistance" function, the highest value for when using #true is 576, this is the square-root of 24.  If you choose not to pass any arguments, it defaults to 450.

So what does this mean? It means that if you are 'x' tiles away from destination x, 'y' tiles away from destination y and 'z' tiles away from destination z, these are added together and multiplied by it self. If the addition is equal to or lower than 24, you'll most likely arrive at your destination.

Example: my destination "X" tile is 1500, "Y" tile is 2000 and "Z" tile is 5.  This is the waypoint tile, so the railengine is going to try to get you there.  Lets say my current position is 1483, 1996 and 3 (x, y and z respectively). Subtracting the differences results in this set of results: 17, 4 and 2 (relative coordinates  ;) ).  The sum of this set is 23 and is likely to get you to your destination when you pass #true 576 to the TM_MaxDistance function.  If you had left it blank, default to 450, the rail would error out.

Hope someone finds this useful :)

BTW TrailMyx, plopping in a square-root for 450 is 21.213203..hehe.

This is why sometime rail errors occur even when you are 9-10 tiles of both your x and y destination tiles, it's the 'z' tile that's putting you over the 24 threshold of erring out. Hilly area's are best left to pathfind  :)

Offline Noobie

  • Sr. Member
  • *
  • Posts: 262
  • Activity:
    0%
  • Reputation Power: 1
  • Noobie has no influence.
  • Gender: Male
  • Respect: +13
  • Referrals: 1
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #134 on: July 24, 2011, 01:04:06 PM »
0
Well I am having trouble with this. I read the userguide and still am not sure if i am on the right track. Can anyone give me some guidance?

1. I have downloaded both the rail engines 30I and 30k "just in case this was the issue"
2. I have developed a rail with the development tool.--- Rail File Name "noobiesrail" Label "Lablell1"
3. Tried to run the rail using the code below in its own saved tab

I am running windows 7




Code: [Select]
set %railsubs tool_railengine30k.txt
set %rail_filename c:\noobiesrail.txt
set %rail_label  LABEL1

call %railsubs TM_Initialize 

call %railsubs TM_LoadRail %rail_filename

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

call %railsubs TM_RunRail %rail_label 0 END FW 
if #RESULT = #TRUE
{
  display ok Rail error occurred.
}

call %railsubs TM_Close
stop