Page 1 of 1

Player Mount Command

Posted: Wed Jul 06, 2011 12:51 pm
by mschmitd
Hi all

If i want use the mount i use this Command

player:mount();

but which command i use for dismount ?

player:?????


Greetings Mike

sry for my bad english

Re: Player Mount Command

Posted: Wed Jul 06, 2011 9:23 pm
by lisa
usually when you cast a skill or attack a mob it autodismounts. I can't think of any reason to dismount just for the sake of dismounting. Maybe if you explained why you want to then we can work out the best way to do it.

Re: Player Mount Command

Posted: Thu Jul 07, 2011 5:24 am
by mschmitd
@Lisa

Thank you for you quick answer

Greetings Mike

Re: Player Mount Command

Posted: Sat Jul 09, 2011 6:29 pm
by kanta
I would think you could also use the cancelbuff userfunction, but I've never actually been able to figure out how it works. I've tried several different ways to put it in the code but it never works.

Re: Player Mount Command

Posted: Sat Jul 09, 2011 9:13 pm
by lisa
The trouble with canceling buffs is you need to know the name of the buff you want to cancel.
It looks for the word "mount" in the buff name and cancels it, change mount to something that you would find in the name. I'm not in game and can't remember what the buffs say for mounts.

--untested.

Code: Select all

for i=1,20,1 do -- only looks for max of 20 buffs, can make it higher if needed.
   local name = RoMScript('UnitBuff( "player", '..i..' );')
local _name = string.find(name,"mount")
if _name then
RoMScript('CancelPlayerBuff('..i..');')
end
end

Re: Player Mount Command

Posted: Sun Jul 10, 2011 7:02 am
by wizzyslo
At the end of wiki-->functions is code for buffs cancel

Re: Player Mount Command

Posted: Mon Jul 11, 2011 8:32 pm
by kanta
@Lisa
Thanks, I'll give that a try

@Wizzy
I know about that code. Never been able to get it to work.

Re: Player Mount Command

Posted: Mon Jan 16, 2012 3:42 am
by rock5
I've added

Code: Select all

player:dismount()
to revision 690. Enjoy.