Mount Up

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
iam_clint
Posts: 9
Joined: Sat Jan 23, 2010 11:22 pm

Mount Up

#1 Post by iam_clint » Sat Jan 23, 2010 11:34 pm

player.lua

Code: Select all

function CPlayer:Mount()
	self:update();
	cprintf(cli.green, "Checking mount status and mounting: %i\n", self.Mounted);
	if (self.Mounted==1) then
		keyboardRelease(settings.hotkeys.MOVE_FORWARD.key);
		keyboardPress(_G.key.VK_MINUS);
		yrest(6000);
	end;
end
cplayer:update() function mod

Code: Select all

self.Mounted = debugAssert(memoryReadByte(getProc(), self.Address + addresses.pawnMount_offset), language[41]);
pawn.lua cpawn class

Code: Select all

self.Mounted = 0;
pawn.lua update

Code: Select all

self.Mounted = debugAssert(memoryReadByte(proc, self.Address + addresses.pawnMount_offset), memerrmsg);
addresses.lua

Code: Select all

pawnMount_offset = 0xC8,

Thought I would share this, I did add it myself.

basicly in your waypoint file if you want it to hop on your mount because you know its a ways from town to fight anything

<!-- # 2 --><waypoint x="-13709" z="-450">player.Mount()</waypoint>

you can do something like this..

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Mount Up

#2 Post by Administrator » Sun Jan 24, 2010 2:03 am

Good work. I'd like to add this to the bot. I played with it a bit, improving it slightly. For example, your mount function will only work if the user hotkeys their mount to VK_MINUS. Try this instead:

Code: Select all

function CPlayer:mount()
	if( not inventory ) then
		return;
	end

	local mount = inventory:getMount();
	if( mount ) then
		mount:use();
		yrest(6000);
	end
end
This should work with any permanant mount.

iam_clint
Posts: 9
Joined: Sat Jan 23, 2010 11:22 pm

Re: Mount Up

#3 Post by iam_clint » Sun Jan 24, 2010 7:17 am

Administrator wrote:Good work. I'd like to add this to the bot. I played with it a bit, improving it slightly. For example, your mount function will only work if the user hotkeys their mount to VK_MINUS. Try this instead:

Code: Select all

function CPlayer:mount()
	if( not inventory ) then
		return;
	end

	local mount = inventory:getMount();
	if( mount ) then
		mount:use();
		yrest(6000);
	end
end
This should work with any permanant mount.
Ahh nice improvement however you took the check out to see if you are on your mount already which at this point it would demount you... I have it popping you up on your mount after 30 seconds of not fighting for my personal script.

InadequateCoder
Posts: 33
Joined: Fri Jan 22, 2010 1:23 am

Re: Mount Up

#4 Post by InadequateCoder » Sun Jan 24, 2010 1:42 pm

iam_clint wrote:Ahh nice improvement however you took the check out to see if you are on your mount already which at this point it would demount you... I have it popping you up on your mount after 30 seconds of not fighting for my personal script.
Clicking the mount again in RoM doesn't dismount you it just resummons the mount. Though I agree a check should be used as less excess casting mean less lag. That's why all my buffs and cooldown skills have checks for existing buffs and cooldowns. (I also hate seeing that scrolling red text in the center of the screen)

Seeing this makes me think I didn't do enough on the functions I'm writing XD. Well, I guess I'll just have to learn as I go.

iam_clint
Posts: 9
Joined: Sat Jan 23, 2010 11:22 pm

Re: Mount Up

#5 Post by iam_clint » Sun Jan 24, 2010 2:46 pm

InadequateCoder wrote:
iam_clint wrote:Ahh nice improvement however you took the check out to see if you are on your mount already which at this point it would demount you... I have it popping you up on your mount after 30 seconds of not fighting for my personal script.
Clicking the mount again in RoM doesn't dismount you it just resummons the mount. Though I agree a check should be used as less excess casting mean less lag. That's why all my buffs and cooldown skills have checks for existing buffs and cooldowns. (I also hate seeing that scrolling red text in the center of the screen)

Seeing this makes me think I didn't do enough on the functions I'm writing XD. Well, I guess I'll just have to learn as I go.

When i click my mount while i'm on it it simply demounts and thats all it does but at any rate there should still be a check in it in my opinion

InadequateCoder
Posts: 33
Joined: Fri Jan 22, 2010 1:23 am

Re: Mount Up

#6 Post by InadequateCoder » Sun Jan 24, 2010 3:09 pm

Wierd. All mine does is recast the mount buff. Which mount are you using? It sounds like it's acting like a world of warcraft mount :lol: .

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Mount Up

#7 Post by Administrator » Sun Jan 24, 2010 10:17 pm

I've just committed the changes. player:mount() will now check if you are mounted before casting. player.Mounted is also a now boolean; true when mounted, false when not.

freerom
Posts: 4
Joined: Sun Jan 10, 2010 4:30 am

Re: Mount Up

#8 Post by freerom » Thu Feb 11, 2010 12:04 pm

And any way of using the mount for 1 day you got from the begining? Tnks.Tryed to use a code in my profile page like this for mounting.has no effect.
<onLevelup>
-- open giftbag and equipt content
openGiftbags1To10(player.Level);
--203571 the id for brown horse
inventory:useItem(203571);

</onLevelup>

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

Re: Mount Up

#9 Post by rock5 » Mon Mar 08, 2010 2:35 am

freerom wrote:And any way of using the mount for 1 day you got from the begining? Tnks.Tryed to use a code in my profile page like this for mounting.has no effect.
<onLevelup>
-- open giftbag and equipt content
openGiftbags1To10(player.Level);
--203571 the id for brown horse
inventory:useItem(203571);

</onLevelup>
Maybe you need to do an inventory:update() before trying to use the mount?

Anyway I use this, which doesn't need inventory update and you can even put the mount in the Item Shop Bag;

Code: Select all

sendMacro("UseItemByName('Brown Horse (1 Day)')"); yrest(7500);
  • 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

Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 9 guests