Idea : Horse dismount tracking script

... A place to ask for help on any topic whether it be starting out to player killing to IT issues.
Tran
Posts: 84
Joined: Sat Apr 30, 2016 1:49 pm

Idea : Horse dismount tracking script

Post by Tran » Fri Aug 19, 2016 5:10 pm

It happens to me often that I'll dism to overchase or attempt to horsehop only to find no horse and then forget where my original horse is and so I was wondering if it would be possible to have some sort of horse dismount tracking script.

Are the following possible?

Upon "dismount", the map room you are in changes color (Bright Green!) and upon riding (any mount (War COW!)) the room color reset to it's original color until next dismount? Perhaps add a manual reset key to clear the color manually.

That's the most practicle idea I could think of. Other ideas where : All moves are recorded and can be called back like a view history record to see where your last horse is.

IE : findhorse : Your horse is EWSWWWWWSSWNE

(Any way to make it copy-pastable so you could copy and paste it into the command line of Zmud instead of typing it out manually?)

Personally I think the first would be most practicle but I have no idea how to script or code so what are your opinnions on the feasability of the above ideas?

Alison
Posts: 821
Joined: Mon Mar 30, 2015 3:09 am
Location: South Africa
Contact:

Re: Idea : Horse dismount tracking script

Post by Alison » Tue Aug 23, 2016 3:51 am

Recording a path is easy. Highlighting rooms in map tricky but can highlight room name. Eg getting it to record the room name.
You want to be able to a dismount spam x rooms and arrive at b then auto path back to a?

Tran
Posts: 84
Joined: Sat Apr 30, 2016 1:49 pm

Re: Idea : Horse dismount tracking script

Post by Tran » Tue Aug 23, 2016 9:03 am

Recording a path would be amazing.

"You want to be able to a dismount spam x rooms and arrive at b then auto path back to a?"

Auto path back to A would be a cool option. Otherwise simply something that could tell me the spams back to the horse would be nice too.

Auto path could have problems, due to it perhaps not being the most immediate path back to the horse. IE : If I chased around in a circle and not a straight line the auto path back to A would be skewed. Unless there's a way to make the Auto path back to A intelligent? (testing required)

The other scenario is Recording the path and maybe having a command that would just show me the spams I've done since I dismed? And from there I can have a general idea of where or how far the horse is... Not perfect but better than my own memory failing me.

Any ideas? It's a tad early for me here so brains being foggy.

I use Zmud, in case that can help.

Yeri
Posts: 109
Joined: Sat May 23, 2015 4:26 am

Re: Idea : Horse dismount tracking script

Post by Yeri » Tue Aug 23, 2016 1:49 pm

Thoughts:

On dism, store room number, highlight I guess too. Let's call this var lonelyHorse.
Create a path variable, comingBackForYouIPromise. As you spam, add the directions to the path.

Two aliases:
ohGodImHagg, to echo the path.
tookYouForGranted, to #walk from current room to lonelyHorse. Think that command should do it most efficiently too, and takes care of one-way rooms and other pitfalls if you just used the reverse of the path.

And finally, something like a regex for ^You begin riding to delete the stored room number, highlight, and path. Be good if you could #echo Abandonment Issues! in cyan or something.

Tran
Posts: 84
Joined: Sat Apr 30, 2016 1:49 pm

Re: Idea : Horse dismount tracking script

Post by Tran » Wed Aug 24, 2016 8:46 am

Yeri that looks fantastic! And I love the funny named aliases and variables. I have no idea how to put that all together unfortunately or even where to begin.

If anyone feels comfortable enough to do so, I will offer a 1000 gold crown reward!

*Tran sits on a rock scratching his head not being able to remember where his dear pony was last seen. "Soon ponies of the world, I will no longer loose you or forget about you!" he says shaking his fist at the sky. Horses, War Cows and War Oxen, neigh, moo and grunt in unison across Rand Land with glee! No longer will they be hungry or alone, no longer will they be forgotten!*

byrg
Posts: 394
Joined: Fri Aug 07, 2015 8:56 pm

Re: Idea : Horse dismount tracking script

Post by byrg » Wed Aug 24, 2016 6:35 pm

I'm using cmud these days, so had to convert this back on the fly... its fairly simplistic and doesn't have the map highlighting bit or the delete bit... but hopefully it's something to start from if nothing else... most of the map commands to do this are built in to some extent - we'll have to see how well they work. I checked the commands used and they all *appear* to be backwards compatible to zmud...
The pathfrom command seems to be the shortest path back calculated automatically... that will need some testing.

EDIT: Alright... I think i have the room coloring down... take 2 the color change does unlock the map (i think that's the same as edit mode?) while changing the color... so i assume if you're spamming around like crazy as you fire these it might mess up the map? worth a thought i guess) Also fixed the output to be separated with semicolons so it can be copied and pasted:

Code: Select all

#CLASS {RandomHorseThing}
#VAR lonelyhorse 0
#VAR startingcolor ""
#TRIGGER {you stop riding %1} {#VAR startingcolor %roomcol();#CALL %maplocked( 0);#CALL %roomcol(,lightgreen);#CALL %maplocked( 1);#VAR lonelyhorse %mapvnum()}
#TRIGGER {you start riding %1} {#CALL %maplocked( 0);#IF (@startingcolor = "") {} {#CALL  %roomcol(,@startingcolor);};#CALL %maplocked( 1);#VAR startingcolor ""}
#ALIAS ohGodImHagg {#ECHO You left a horse: %replace(%pathexpand(%pathfrom(,@lonelyhorse)),"|",";")}
#ALIAS tookYouForGranted {#WALK @lonelyhorse}
#ALIAS forgethorse {#CALL %maplocked( 0);#CALL %roomcol(@lonelyhorse,@startingcolor);#CALL %maplocked( 1);#VAR lonelyhorse 0;#VAR startingcolor "";}
#CLASS 0
Last edited by byrg on Thu Aug 25, 2016 2:06 pm, edited 2 times in total.

Tran
Posts: 84
Joined: Sat Apr 30, 2016 1:49 pm

Re: Idea : Horse dismount tracking script

Post by Tran » Thu Aug 25, 2016 9:13 am

Wow Byrg! That looks great! I'm very anxious to try this out when I get home tonight.
I'll also need to find a way to give you 1000 crowns! ;)

Yeri
Posts: 109
Joined: Sat May 23, 2015 4:26 am

Re: Idea : Horse dismount tracking script

Post by Yeri » Thu Aug 25, 2016 11:08 am

byrg wrote:I'm using cmud these days, so had to convert this back on the fly... its fairly simplistic and doesn't have the map highlighting bit or the delete bit... but hopefully it's something to start from if nothing else... most of the map commands to do this are built in to some extent - we'll have to see how well they work. I checked the commands used and they all *appear* to be backwards compatible to zmud...
The pathfrom command seems to be the shortest path back calculated automatically... that will need some testing.

EDIT: Alright... I think i have the room coloring down... take 2 the color change does unlock the map (i think that's the same as edit mode?) while changing the color... so i assume if you're spamming around like crazy as you fire these it might mess up the map? worth a thought i guess) Also fixed the output to be separated with semicolons so it can be copied and pasted:

#CLASS {RandomHorseThing}
#VAR lonelyhorse 0
#VAR startingcolor ""
#TRIGGER {you stop riding %1} {#VAR startingcolor %roomcol();#CALL %maplocked( 0);#CALL %roomcol(,lightgreen);#CALL %maplocked( 1);#VAR lonelyhorse %mapvnum()}
#TRIGGER {you start riding %1} {#CALL %maplocked( 0);#IF (@startingcolor = "") {} {#CALL %roomcol(,@startingcolor);};#CALL %maplocked( 1);#VAR startingcolor ""}
#ALIAS ohGodImHagg {#ECHO You left a horse: %replace(%pathexpand(%pathfrom(,@lonelyhorse)),"|",";")}
#ALIAS tookYouForGranted {#WALK @lonelyhorse}
#ALIAS forgethorse {#CALL %maplocked( 0);#CALL %roomcol(@lonelyhorse,@startingcolor);#CALL %maplocked( 1);#VAR lonelyhorse 8;#VAR startingcolor "";}
#CLASS 0
This is amazing, thanks Byrg for doing this.

A few things I'd probably change:
-Change the triggers to be ^You stop riding %1 and ^You start riding %1 respectively - since they don't use the ^ operator it isn't making sure the pattern is at the beginning of a line, so I think it can be triggered by people saying it too rather than just mud output.
-Add a color to the #ECHO, just so it's a little more visible.
-[For Tran] - Change the alias names unless you really want to hate yourself in the middle of PK. I mean, they're funny but looooong.

byrg
Posts: 394
Joined: Fri Aug 07, 2015 8:56 pm

Re: Idea : Horse dismount tracking script

Post by byrg » Thu Aug 25, 2016 1:25 pm

Tran wrote:Wow Byrg! That looks great! I'm very anxious to try this out when I get home tonight.
I'll also need to find a way to give you 1000 crowns! ;)
Thanks! I love working on stuff like this! I'm really not worried about the gold - scripts like this are just fun to make, but if you really feel like carting 1k crowns up to me sometime I won't complain :P
Yeri wrote:A few things I'd probably change:
-Change the triggers to be ^You stop riding %1 and ^You start riding %1 respectively - since they don't use the ^ operator it isn't making sure the pattern is at the beginning of a line, so I think it can be triggered by people saying it too rather than just mud output.
-Add a color to the #ECHO, just so it's a little more visible.
-[For Tran] - Change the alias names unless you really want to hate yourself in the middle of PK. I mean, they're funny but looooong.
Haha, yeah. I personally have horseloc and gotohorse for my aliases, but i left the funny names in for the post. Good call on the triggers - I almost always forget that for some reason with mine. Coloring the echo should certainly be doable - any thoughts on a color? I personally usually stick with the default to make it not be super distracting.

EDIT: latest version with mentioned changes: Newline Triggers / Normal named aliases / echo colored green. Also fixed the lonelyhorse variable to initialize to 0 instead of 8, and set the ride trigger to clear it (oops).

Code: Select all

#CLASS {RandomHorseThing}
#VAR lonelyhorse 0
#VAR startingcolor ""
#TRIGGER {^you stop riding %1} {#VAR startingcolor %roomcol();#CALL %maplocked( 0);#CALL %roomcol(,lightgreen);#CALL %maplocked( 1);#VAR lonelyhorse %mapvnum()}
#TRIGGER {^you start riding %1} {#CALL %maplocked( 0);#IF (@startingcolor = "") {} {#CALL %roomcol(@lonelyhorse,@startingcolor);};#CALL %maplocked( 1);#VAR startingcolor "";#VAR lonelyhorse 0}
#ALIAS horseloc {#ECHO %ansi(green) You left a horse: %replace(%pathexpand(%pathfrom(,@lonelyhorse)),"|",";")}
#ALIAS gotohorse {#WALK @lonelyhorse}
#ALIAS forgethorse {#CALL %maplocked( 0);#CALL %roomcol(@lonelyhorse,@startingcolor);#CALL %maplocked( 1);#VAR lonelyhorse 0;#VAR startingcolor "";}
#CLASS 0

Yeri
Posts: 109
Joined: Sat May 23, 2015 4:26 am

Re: Idea : Horse dismount tracking script

Post by Yeri » Thu Aug 25, 2016 7:42 pm

byrg wrote:
Tran wrote:Wow Byrg! That looks great! I'm very anxious to try this out when I get home tonight.
I'll also need to find a way to give you 1000 crowns! ;)
Thanks! I love working on stuff like this! I'm really not worried about the gold - scripts like this are just fun to make, but if you really feel like carting 1k crowns up to me sometime I won't complain :P
Yeri wrote:A few things I'd probably change:
-Change the triggers to be ^You stop riding %1 and ^You start riding %1 respectively - since they don't use the ^ operator it isn't making sure the pattern is at the beginning of a line, so I think it can be triggered by people saying it too rather than just mud output.
-Add a color to the #ECHO, just so it's a little more visible.
-[For Tran] - Change the alias names unless you really want to hate yourself in the middle of PK. I mean, they're funny but looooong.
Haha, yeah. I personally have horseloc and gotohorse for my aliases, but i left the funny names in for the post. Good call on the triggers - I almost always forget that for some reason with mine. Coloring the echo should certainly be doable - any thoughts on a color? I personally usually stick with the default to make it not be super distracting.

EDIT: latest version with mentioned changes: Newline Triggers / Normal named aliases / echo colored green. Also fixed the lonelyhorse variable to initialize to 0 instead of 8, and set the ride trigger to clear it (oops).

Code: Select all

#CLASS {RandomHorseThing}
#VAR lonelyhorse 0
#VAR startingcolor ""
#TRIGGER {^you stop riding %1} {#VAR startingcolor %roomcol();#CALL %maplocked( 0);#CALL %roomcol(,lightgreen);#CALL %maplocked( 1);#VAR lonelyhorse %mapvnum()}
#TRIGGER {^you start riding %1} {#CALL %maplocked( 0);#IF (@startingcolor = "") {} {#CALL %roomcol(@lonelyhorse,@startingcolor);};#CALL %maplocked( 1);#VAR startingcolor "";#VAR lonelyhorse 0}
#ALIAS horseloc {#ECHO %ansi(green) You left a horse: %replace(%pathexpand(%pathfrom(,@lonelyhorse)),"|",";")}
#ALIAS gotohorse {#WALK @lonelyhorse}
#ALIAS forgethorse {#CALL %maplocked( 0);#CALL %roomcol(@lonelyhorse,@startingcolor);#CALL %maplocked( 1);#VAR lonelyhorse 0;#VAR startingcolor "";}
#CLASS 0
Love it, now we just need to wait for Tran to get home to test it! For the #ECHO color, it was just a thought - really it comes down to personal preference, so not having a color is fine, all that matters is that you know when the trigger is going off.

Post Reply