ArcEmu: Player Character Speed Increase - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Labels

Make sure when posting a help or release topic you put [c++] or [lua] BEFORE your topic title!
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Player Character Speed Increase

#1 User is offline   Ampherion 

  • Member
  • Pip
  • Group: Members
  • Posts: 12
  • Joined: 17-June 08

Posted 10 August 2010 - 11:07 AM

Is there a method to increase the movement speed for player characters by upon creation? I want to have players be able to move faster so that travel times aren't as painful within zone. I didn't see a "speed" or "move" aspect in the character DB...
0

#2 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 10 August 2010 - 12:59 PM

I can't recall of an easy way. However if you are a programmer you can add such customization easily :)
On the other hand you could add "Speed" (Amphetamine) to your players' bags on character creation. They just have to sniff it then and they will become 100% superfast :P
"The demand for free goods is infinite."
0

#3 User is offline   Foereaper 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 184
  • Joined: 21-May 09

Posted 10 August 2010 - 05:02 PM

or... Lemme toss together a script for ya. I'll edit it in soon!

function Speed_Enter(event, plr)
	plr:CastSpell(54055)
end

RegisterServerHook(4, "Speed_Enter")


Make a Lua outta that, and it should work! Its using Dominion Over Acherus. Will be applied on each login.

You can also add a level modifier to it, so if the player is above level X, they will not gain the effect when logging in:

function Speed_Enter(event, plr)
	if(plr:GetPlayerLevel() < X) then
		plr:CastSpell(54055)
	end
end

RegisterServerHook(4, "Speed_Enter")


Edit:
Found a function that might work, untested however!


function Speed_Enter(event, plr)
	if(plr:GetPlayerLevel() < X) then
		plr:SetPlayerSpeed(X2)
	end
end

RegisterServerHook(4, "Speed_Enter")


Set X2 as speed, no idea if this uses the same as .mod speed, if it does, 14 is 100% if I'm not wrong
0

#4 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 10 August 2010 - 05:59 PM

That might be feasible too. I don't know Lua so I can't check for correctness.
"The demand for free goods is infinite."
0

#5 User is offline   Ampherion 

  • Member
  • Pip
  • Group: Members
  • Posts: 12
  • Joined: 17-June 08

Posted 10 August 2010 - 08:32 PM

Ok, so this will make the character speed 12.25 instead of 7? How can I make it 25? They don't stack do they?
0

#6 User is offline   Foereaper 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 184
  • Joined: 21-May 09

Posted 10 August 2010 - 08:44 PM

function Speed_Enter(event, plr)
        plr:SetPlayerSpeed(25)
end

RegisterServerHook(4, "Speed_Enter")


Try that
0

#7 User is offline   Ampherion 

  • Member
  • Pip
  • Group: Members
  • Posts: 12
  • Joined: 17-June 08

Posted 10 August 2010 - 11:42 PM

Works perfectly! Thanks alot!

Any other LUA scripts I should consider?
0

#8 User is offline   lesone 

  • Enthusiast
  • Group: Retired
  • Posts: 294
  • Joined: 07-June 08
  • Gender:Male
  • Location:Zpain
  • Interests:Programming--
  • Server OS:Windows

Posted 11 August 2010 - 03:04 AM

Quote

They just have to sniff it then and they will become 100% superfast


lol'd o.O!
Posted Image
0

#9 User is offline   Foereaper 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 184
  • Joined: 21-May 09

Posted 11 August 2010 - 06:21 PM

View PostAmpherion, on 10 August 2010 - 11:42 PM, said:

Any other LUA scripts I should consider?


Well, what Luas to use is entirely up to you, and what fits your server. Some simple Luas can always give your realm that "special touch", so read up about em and find something that can make your server special and memorable for your players :)
0

#10 User is offline   Jarlaxlerox 

  • Newbie
  • Group: Members
  • Posts: 3
  • Joined: 27-July 09

Posted 12 August 2010 - 03:22 AM

You guys are registering it with the wrong ID. 4 is for SERVER_HOOK_ON_ENTER_WORLD 3 is for SERVER_HOOK_FIRST_ENTER_WORLD
function ModSpeed(event, pPlayer)
	player:SetPlayerSpeed(25)
end

RegisterServerHook(3, "ModSpeed")

0

#11 User is offline   Foereaper 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 184
  • Joined: 21-May 09

Posted 12 August 2010 - 04:47 AM

Quote

I want to have players be able to move faster so that travel times aren't as painful within zone. I didn't see a "speed" or "move" aspect in the character DB...


I know its upon enter world, based it off of the above comment that he wanted the travel time between zones to be easier :)

But yes, using 3 would be upon first enter world :D
0

#12 User is offline   Jarlaxlerox 

  • Newbie
  • Group: Members
  • Posts: 3
  • Joined: 27-July 09

Posted 12 August 2010 - 12:28 PM

View PostFoereaper, on 12 August 2010 - 04:47 AM, said:

I know its upon enter world, based it off of the above comment that he wanted the travel time between zones to be easier :P

But yes, using 3 would be upon first enter world :)


Sorry if I offended you.
0

#13 User is offline   Foereaper 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 184
  • Joined: 21-May 09

Posted 12 August 2010 - 12:37 PM

View PostJarlaxlerox, on 12 August 2010 - 12:28 PM, said:

Sorry if I offended you.


hehe, dont worry, im not easily offended, and i didnt see your comment as offensive at all :) rather helpful for the OP in case he wants to change it :)

Edit:

Btw, you have an end too much in your version :P
0

#14 User is offline   grayfish 

  • Newbie
  • Group: Members
  • Posts: 2
  • Joined: 20-July 12
  • Gender:Male
  • Server OS:Windows

Posted 20 July 2012 - 01:29 AM

Hi, i know this is a old topic but it's exactly what i'm looking for.. ALMOST!

So i tested this LUA and it worked almost perfect! The problem occurs when I Die and that problem is that my "super speed" is gone :(
I thought to myself, "I bet somone knows how to fix this!. As of now i dont know how to script with lua (or any other launguage), so i would be very greatful if somone could help me with this.
0

#15 User is offline   Satanail 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 150
  • Joined: 11-March 12
  • Gender:Male
  • Location:Absurdistan
  • Server OS:Windows

Posted 20 July 2012 - 07:51 AM

Well i recommend you to use aura rather than setting the speed with lua command. I did a script that uses timed event to check if the player is mounted and then casts a spell, that gives him a speed increase. I am not sure what are you actually trying to do: Do you want to add a speed increase only to the low level players or to all players in the starting and low level (below level 20) areas. So i did a basic script, that will increase the speed for anyone, who is not mounted. The aura also works if you are dead.
Here is the script, it uses a timed event because of the mount checks and etc.
function speedaura()
for k,v in pairs(GetPlayersInWorld()) do
	if(v:IsMounted() == false)then
		if(v:HasAura(39870) == false)then
			v:CastSpell(39870)
		end
	else
		if(v:HasAura(39870) == true)then
			v:RemoveAura(39870)
		end
	end
end
end

RegisterTimedEvent("speedaura", 1000, 0)


If this speed is too much for you, you can change the aura (the number 39870 anywhere in the script), with another one.
1

#16 User is offline   grayfish 

  • Newbie
  • Group: Members
  • Posts: 2
  • Joined: 20-July 12
  • Gender:Male
  • Server OS:Windows

Posted 20 July 2012 - 10:27 AM

View PostSatanail, on 20 July 2012 - 07:51 AM, said:

Well i recommend you to use aura rather than setting the speed with lua command. I did a script that uses timed event to check if the player is mounted and then casts a spell, that gives him a speed increase. I am not sure what are you actually trying to do: Do you want to add a speed increase only to the low level players or to all players in the starting and low level (below level 20) areas. So i did a basic script, that will increase the speed for anyone, who is not mounted. The aura also works if you are dead.
Here is the script, it uses a timed event because of the mount checks and etc.
function speedaura()
for k,v in pairs(GetPlayersInWorld()) do
	if(v:IsMounted() == false)then
		if(v:HasAura(39870) == false)then
			v:CastSpell(39870)
		end
	else
		if(v:HasAura(39870) == true)then
			v:RemoveAura(39870)
		end
	end
end
end

RegisterTimedEvent("speedaura", 1000, 0)


If this speed is too much for you, you can change the aura (the number 39870 anywhere in the script), with another one.



Thank you! this is more like it! :)
I wanted to raise speed to all players (all levels). so i think this going to be wonderfull! :) just one more thing that i ran up on when i was trying to change the speed, I play as hunter/warlock and both (as you might now) has pets.
When i run my pets cant keep up and slowly dissapears = i need to revive my pets after runnning for a while. Is there anyway to make this script aply to Pets too? :)

And thank so much for quick reply! :)
0

#17 User is offline   Satanail 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 150
  • Joined: 11-March 12
  • Gender:Male
  • Location:Absurdistan
  • Server OS:Windows

Posted 20 July 2012 - 01:05 PM

Lol, completely forgot about the pets :blink: . Edited the script to speed up pets as well.
function speedaura()
for k,v in pairs(GetPlayersInWorld()) do
	if(v:IsMounted() == false)then
	for k,m in pairs(v:GetInRangeUnits()) do
		if(m:IsPet())then
		local owner = m:GetPetOwner()
			if(owner:IsPlayer() == true)then
				if(m:HasAura(39870) == false)then
					m:CastSpell(39870)
				end
			end
		end
	end
		if(v:HasAura(39870) == false)then
			v:CastSpell(39870)
		end
	else
		if(v:HasAura(39870) == true)then
			v:RemoveAura(39870)
		end
	end
end
end

RegisterTimedEvent("speedaura", 1000, 0)

Note that this only works on a player controlled pets. It does not affect guardians or pets, summoned by creatures. Anyway, hunter and warlock pets now will have the same speed aura like the master. I think i can improve this in a way, but i will deal with it later.

EDIT: Wops, forgot an aura check. Fixed it.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users