Author Topic: event pathfind  (Read 5692 times)

0 Members and 1 Guest are viewing this topic.

Offline CrisisTopic starter

  • Global Moderator
  • *
  • *
  • Posts: 2998
  • Activity:
    3.4%
  • Reputation Power: 41
  • Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.
  • Gender: Male
  • Scripting well enough to break things!
  • Respect: +205
  • Referrals: 2
    • View Profile
event pathfind
« on: July 14, 2020, 10:16:49 AM »
0
Code: [Select]
   event pathfind xxxx yyy
  until #charposx = xxxx && #charposy = yyy
  wait 20

  • I am using this code to walk while stealthed to my house from my ship. It then steps on a teleport tile to get into the house. The teleport tile is on the steps which appears to be 2 higher than the ground. Do I need to add something to it so it will go to it? Currently it runs in circles for a few seconds until it lands on it and goes in.
  • Is there a way to make my character slow down so he doesn't become revealed for moving to quick at the beginning?
  • Is there a better way to move without path finding that may be more smooth?

EDIT: I may have figured out the answer to question 1 using Z axis but I will have to test it. I am still really interested in slowing down the path finding so I can stay stealthed.
« Last Edit: July 14, 2020, 10:23:59 AM by Crisis »

Offline gimlet

  • Very Super Secret
  • Global Moderator
  • *
  • *
  • Posts: 6190
  • Activity:
    3%
  • Reputation Power: 71
  • gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!
  • Gender: Male
  • Respect: +273
  • Referrals: 3
    • View Profile
Re: event pathfind
« Reply #1 on: July 14, 2020, 11:20:16 AM »
0
The key is to keep the cursor close to your character. If it is on your toon he will always walk slow. The further away he may run and break stealth.

Offline MeWonUo

  • Hero Member
  • *
  • Posts: 913
  • Activity:
    0%
  • Reputation Power: 11
  • MeWonUo barely matters.MeWonUo barely matters.
  • Gender: Male
  • Respect: +85
  • Referrals: 1
    • View Profile
Re: event pathfind
« Reply #2 on: July 14, 2020, 11:38:17 AM »
0
I used to use event macro to force the character to walk in a specific direction.

Movement
Param 1   Param 2   Param 3   Description
5   0      Walk North West
5   1      Walk North
5   2      Walk North East
5   3      Walk East
5   4      Walk South East
5   5      Walk South
5   6      Walk South West
5   7      Walk West

Sorry for the quick copy/paste as I'm at work currently.  Hope it helps.

Offline Gaderian

  • Elite
  • *
  • *
  • Posts: 486
  • Activity:
    0%
  • Reputation Power: 10
  • Gaderian barely matters.Gaderian barely matters.
  • Respect: +50
  • Referrals: 3
    • View Profile
Re: event pathfind
« Reply #3 on: July 14, 2020, 12:05:11 PM »
0
There is a client option (your character will always run) that needs to be off.
As said the mouse can't be far away. The HW Quester forces this by keeping the mouse cursor on or near your character while it runs the rail.
MeWonUO's suggestion works too. Now for a rail version of that, I have been using EN's rail code for all my stuff. It includes a parameter for how "slow" to walk. So it can run moderately quickly (maybe not a full run, but faster than walking), but I often have it walk a bit slower. You can slow it down severely so just about force walking if the above options are taken care of as well.

Gaderian
"Go ahead ask me: 'Should I use hard waits or timers?'"
You say:"Should I"
Gaderian:"Timers!"
You Say:"use hard waits or timers?"

The serious side of timer use is illustrated here: http://www.scriptuo.com/index.php?topic=12094.msg101926#msg101926

However, every time I go back and look at this [AutoLooter] script, I realize I had wrote it in my zen state of EUO scripting - so it makes my brain hurt.

Offline CrisisTopic starter

  • Global Moderator
  • *
  • *
  • Posts: 2998
  • Activity:
    3.4%
  • Reputation Power: 41
  • Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.
  • Gender: Male
  • Scripting well enough to break things!
  • Respect: +205
  • Referrals: 2
    • View Profile
Re: event pathfind
« Reply #4 on: July 14, 2020, 12:06:22 PM »
0
The key is to keep the cursor close to your character. If it is on your toon he will always walk slow. The further away he may run and break stealth.

This is scripted though using path finding. When he starts path finding, he sometimes speeds up breaking stealth, other times walks perfect and keeps stealth from the gate to the house teleporter. The Z axis fixed the circling around on the teleporter, just trying to keep him slow moving not to break stealth until inside.


I used to use event macro to force the character to walk in a specific direction.

Movement
Param 1   Param 2   Param 3   Description
5   0      Walk North West
5   1      Walk North
5   2      Walk North East
5   3      Walk East
5   4      Walk South East
5   5      Walk South
5   6      Walk South West
5   7      Walk West

Sorry for the quick copy/paste as I'm at work currently.  Hope it helps.

I will have to look into that to see how to use it to make him walk to where I need him to be. Thanks for the idea!

Offline CrisisTopic starter

  • Global Moderator
  • *
  • *
  • Posts: 2998
  • Activity:
    3.4%
  • Reputation Power: 41
  • Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.
  • Gender: Male
  • Scripting well enough to break things!
  • Respect: +205
  • Referrals: 2
    • View Profile
Re: event pathfind
« Reply #5 on: July 14, 2020, 12:07:36 PM »
0
There is a client option (your character will always run) that needs to be off.
As said the mouse can't be far away. The HW Quester forces this by keeping the mouse cursor on or near your character while it runs the rail.
MeWonUO's suggestion works too. Now for a rail version of that, I have been using EN's rail code for all my stuff. It includes a parameter for how "slow" to walk. So it can run moderately quickly (maybe not a full run, but faster than walking), but I often have it walk a bit slower. You can slow it down severely so just about force walking if the above options are taken care of as well.

Gaderian

I have not messed with rails in many many years but that seems like it might be good too.

Offline CrisisTopic starter

  • Global Moderator
  • *
  • *
  • Posts: 2998
  • Activity:
    3.4%
  • Reputation Power: 41
  • Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.
  • Gender: Male
  • Scripting well enough to break things!
  • Respect: +205
  • Referrals: 2
    • View Profile
Re: event pathfind
« Reply #6 on: July 14, 2020, 02:39:03 PM »
0
I was experimenting with the move command but not sure it works anymore. My character never moved an inch. http://wiki.easyuo.com/index.php?title=Move

Offline gimlet

  • Very Super Secret
  • Global Moderator
  • *
  • *
  • Posts: 6190
  • Activity:
    3%
  • Reputation Power: 71
  • gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!
  • Gender: Male
  • Respect: +273
  • Referrals: 3
    • View Profile
Re: event pathfind
« Reply #7 on: July 14, 2020, 04:48:30 PM »
0
Another thing: If it is having a hard time getting on to your steps, break up the rail into 2 parts. First part to get close to steps and then a second to go to the tile.

Offline MeWonUo

  • Hero Member
  • *
  • Posts: 913
  • Activity:
    0%
  • Reputation Power: 11
  • MeWonUo barely matters.MeWonUo barely matters.
  • Gender: Male
  • Respect: +85
  • Referrals: 1
    • View Profile
Re: event pathfind
« Reply #8 on: July 14, 2020, 05:58:13 PM »
0
Ok, got home and took a look at one of my old scripts.   I used the move command:

Code: [Select]
move xxxx yyyy 0 10
The zero is how many squares away you want to be, the 10 is how many seconds before it times out.

Adjust as needed.

This will keep you walking all the time unless you have always run on, or tap/hold your control key for some reason.  :)
« Last Edit: July 14, 2020, 05:59:59 PM by MeWonUo »

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: event pathfind
« Reply #9 on: July 15, 2020, 09:07:11 PM »
0
You can only walk 10 step at the time while in stealth..  You need to take break and start walking again.    \If you pay attention you will gett he msg every thing the skill is active.

Offline CrisisTopic starter

  • Global Moderator
  • *
  • *
  • Posts: 2998
  • Activity:
    3.4%
  • Reputation Power: 41
  • Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.
  • Gender: Male
  • Scripting well enough to break things!
  • Respect: +205
  • Referrals: 2
    • View Profile
Re: event pathfind
« Reply #10 on: July 15, 2020, 10:28:54 PM »
0
You can only walk 10 step at the time while in stealth..  You need to take break and start walking again.    \If you pay attention you will gett he msg every thing the skill is active.

At the most it moves 13 steps all together but I have it broken into 4 groups of 3 steps with a wait after each one. The problem is when it starts out, sometimes it moves fast like it is running and sometimes slow and does not break stealth. Gim was telling me I need to use CLICK to keep mouse cursor close to my character. I will have to look into how to use it.

Offline Gaderian

  • Elite
  • *
  • *
  • Posts: 486
  • Activity:
    0%
  • Reputation Power: 10
  • Gaderian barely matters.Gaderian barely matters.
  • Respect: +50
  • Referrals: 3
    • View Profile
Re: event pathfind
« Reply #11 on: July 16, 2020, 03:06:30 AM »
0
I thought stealth was 2 steps walking for each 10 skill points??? I think that changed from 1 step/10 skill points - when you no longer had to use the stealth skill to keep stealthing. Then you get less if you run. Docs say you will be revealed after the run, but I have just waited out the time (you get half the steps running stealthed compared to walking stealth) and been able to continue successfully many times.

The mouse/click thing is to use calculate the click location based on screen resolution. You may need a slight offset from this, but it would look something like:
Code: easyuo
  1. set %HoverMouseX #clileft + #clixres / 2
  2. set %HoverMousey  #clitop + #cliyres / 2
  3. click %HoverMouseX %HoverMouseY MC N
  4. MOVE x y 0 10 ; or whatever your move statement looks like
  5.  
That needs the x and y of the move statement to be close so you keep resetting the mouse "click..." position so it doesn't get too far away.
Wreaks havoc if you are trying to do something else on the computer at the same time, but allows you to walk (assuming of course you have the "always run" option unchecked.

Gaderian
"Go ahead ask me: 'Should I use hard waits or timers?'"
You say:"Should I"
Gaderian:"Timers!"
You Say:"use hard waits or timers?"

The serious side of timer use is illustrated here: http://www.scriptuo.com/index.php?topic=12094.msg101926#msg101926

However, every time I go back and look at this [AutoLooter] script, I realize I had wrote it in my zen state of EUO scripting - so it makes my brain hurt.

Offline gimlet

  • Very Super Secret
  • Global Moderator
  • *
  • *
  • Posts: 6190
  • Activity:
    3%
  • Reputation Power: 71
  • gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!
  • Gender: Male
  • Respect: +273
  • Referrals: 3
    • View Profile
Re: event pathfind
« Reply #12 on: July 16, 2020, 08:19:10 AM »
0
Stealth (greater or equal to 75 with medable armor - I always use barbed leather (not studded)) you can stealth all day anywhere almost. Any non mage armor requires more skill.

Offline gimlet

  • Very Super Secret
  • Global Moderator
  • *
  • *
  • Posts: 6190
  • Activity:
    3%
  • Reputation Power: 71
  • gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!
  • Gender: Male
  • Respect: +273
  • Referrals: 3
    • View Profile
Re: event pathfind
« Reply #13 on: July 16, 2020, 08:21:49 AM »
0
When i can i also use animal form (ninja) because you can run using stealth.

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: event pathfind
« Reply #14 on: August 17, 2020, 01:28:10 PM »
0
There is a client option (your character will always run) that needs to be off.
As said the mouse can't be far away. The HW Quester forces this by keeping the mouse cursor on or near your character while it runs the rail.
MeWonUO's suggestion works too. Now for a rail version of that, I have been using EN's rail code for all my stuff. It includes a parameter for how "slow" to walk. So it can run moderately quickly (maybe not a full run, but faster than walking), but I often have it walk a bit slower. You can slow it down severely so just about force walking if the above options are taken care of as well.

Gaderian

Gaderian,  which one of my rail systems do you use the one inside the character toolbox ?
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Tags: