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

@@ -251,12 +251,19 @@ function createThingMenu(menuPosition, lookThing, useThing, creatureThing)
end
if creatureThing then
local localPlayer = g_game.getLocalPlayer()
menu:addSeparator()
if creatureThing:isLocalPlayer() then
menu:addOption(tr('Set Outfit'), function() g_game.requestOutfit() end)
if creatureThing:isPartyMember() --[[and not fighting]] then
if not localPlayer:isMounted() then
menu:addOption(tr('Mount'), function() localPlayer:mount() end)
else
menu:addOption(tr('Dismount'), function() localPlayer:dismount() end)
end
if creatureThing:isPartyMember() then
if creatureThing:isPartyLeader() then
if creatureThing:isPartySharedExperienceActive() then
menu:addOption(tr('Disable Shared Experience'), function() g_game.partyShareExperience(false) end)
@@ -268,7 +275,6 @@ function createThingMenu(menuPosition, lookThing, useThing, creatureThing)
end
else
local localPlayer = g_game.getLocalPlayer()
if g_game.getAttackingCreature() ~= creatureThing then
menu:addOption(tr('Attack'), function() g_game.attack(creatureThing) end)
else