Finalized the mount system and the recently new skills/stats.

* Added mount options to the thing menu.
* Reworked the mounting/dismounting.
* Fixed up some skill module bugs.
* Added alerts to stats like health, mana, capacity, and regeneration time (need to revise this one as it currently has no maximum).
This commit is contained in:
BeniS
2012-08-21 00:28:19 +12:00
parent f4cc942c85
commit 1d20cc9e4b
8 changed files with 85 additions and 35 deletions

View File

@@ -54,3 +54,26 @@ function Player:hasVip(creatureName)
end
return false
end
function Player:isMounted()
local outfit = self:getOutfit()
return outfit.mount ~= nil and outfit.mount > 0
end
function Player:toggleMount()
if g_game.getFeature(GamePlayerMounts) then
g_game.mount(not self:isMounted())
end
end
function Player:mount()
if g_game.getFeature(GamePlayerMounts) then
g_game.mount(true)
end
end
function Player:dismount()
if g_game.getFeature(GamePlayerMounts) then
g_game.mount(false)
end
end