Improved Jumping Ability!

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Improved Jumping Ability!

#1 Post by jduartedj » Sun Jan 16, 2011 1:38 am

Ever wanted to make you bot jump normally? To that exact spot?

I did, and so I did it! I added a couple of code lines to CPlayer and one small change to CPawn and now he jumps properly :D

The bot jumps to land in the next Waypoint so

Code: Select all

<waypoint A>CPlayer:jump();</waypoint>
<waypoint B></waypoint>
A----------jump--B(lands)

note:distance(jump,B) = 50

The code is:

Code: Select all

		if( dist<=50 and self.Jump == true ) then 
			keyboardPress(settings.hotkeys.JUMP.key);
			self.Jump = false;
		end
inside the CPlayer:moveTo() movement loop --> "while( dist > successDist ) do"

and:

Code: Select all

self.Jump = false;
on the CPawn constructor, and finally but optional:

Code: Select all

function CPlayer:jump()
		self.Jump = true;
end
since you can just use "self.Jump = true;" instead!
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Improved Jumping Ability!

#2 Post by rock5 » Sun Jan 16, 2011 2:41 am

There are a few things that could affect your speed and therefore your jumping distance. The main one is if you're mounted. Maybe you could check if your mounted and change the jump distance.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Improved Jumping Ability!

#3 Post by lisa » Sun Jan 16, 2011 3:17 am

Some mobs have slow down abilities that they hit you with, it depends on the situation your trying to use it in that would affect if you need to detect these things.
If you are doing a daily where you don't need to kill anything and don't use mount. It would work fine without alterations but if you do either or both of those things then I'd say you need some additional coding to allow for other situations.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Improved Jumping Ability!

#4 Post by jduartedj » Sun Jan 16, 2011 3:21 am

rock5 wrote:There are a few things that could affect your speed and therefore your jumping distance. The main one is if you're mounted. Maybe you could check if your mounted and change the jump distance.
Yeah well I though of adding:

Code: Select all

 if( dist<=self.Speed and self.Jump == true ) then 
instead

since Speed would be in Units/sec and jump time is aprox. 1sec Speed = dist

But I would have to include a speed update based on buff (mount,food,pot,etc) base speed is 50, then multiply by bonus so

Code: Select all

player.Speed = 50*(1+bonus/100) --bonus in %
a second option would be to determine the speed based on a calculation but that would be somewhat inacurate like in here:

Code: Select all

function speed()
	local X=player.X 
	local Z=player.Z 
	local timed=os.time() 
	local speed
	while true do 
		player:update()
		printf("Speed: %f\n",distance(X,Z,player.X,player.Z)/(os.time()-timed)) 
		speed = distance(X,Z,player.X,player.Z)/(os.time()-timed);
		player:update()
		X=player.X 
		Z=player.Z 
		timed=os.time() 
		yrest(1000) 
	end
	
end
But it this this most useful while not on a mount and probably in specific situations :P
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

revolver
Posts: 26
Joined: Fri Dec 23, 2011 8:05 am

Re: Improved Jumping Ability!

#5 Post by revolver » Sat Jan 07, 2012 2:35 pm

Thats really nice but could you make a more noob guide for us..cause i didn't understand anything ...thank you :D

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Improved Jumping Ability!

#6 Post by kanta » Sat Jan 07, 2012 4:54 pm

This post is a few days short of 1 year old. If it hasn't been added to the base code by now it most likely won't be.
Scout/Knight/Rogue 70/66/66

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Improved Jumping Ability!

#7 Post by rock5 » Sun Jan 08, 2012 12:24 am

It's an interresting idea but I think the bot isn't accurate enough to do this reliably. It would be nearly impossible to make it jump at exactly the right time.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
MustHave
Posts: 28
Joined: Sat Jan 21, 2012 11:51 pm
Location: 742, Evergreen Terrace, Springfield

Re: Improved Jumping Ability!

#8 Post by MustHave » Thu Jan 26, 2012 9:49 am

I'm testing the cyclops farm run and it seems to be it would be helpful for jumping into the instance.
Beer: The cause of, and solution to, all of life's problems.
Thnx to all of those who are working their ass off for us dumb asses

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 2 guests