This repository has been archived by the owner on May 20, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update player.lua * Update creaturescripts.xml * Create loyalty.lua * Update loyalty.lua * Update player.lua * Update player.lua * Update global.lua * Update player.lua * Update player.lua * Update player.lua * Update init.lua
- Loading branch information
1 parent
f80acef
commit ee5e37b
Showing
6 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
local loyalty_condition = Condition(CONDITION_ATTRIBUTES) | ||
loyalty_condition:setParameter(CONDITION_PARAM_TICKS, -1) | ||
loyalty_condition:setParameter(CONDITION_PARAM_SUBID, 10) | ||
loyalty_condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, 115) | ||
|
||
local parameters = { | ||
CONDITION_PARAM_STAT_MAGICPOINTSPERCENT, CONDITION_PARAM_SKILL_MELEEPERCENT, CONDITION_PARAM_SKILL_FISTPERCENT, | ||
CONDITION_PARAM_SKILL_DISTANCEPERCENT, CONDITION_PARAM_SKILL_SHIELDPERCENT, CONDITION_PARAM_SKILL_FISHINGPERCENT | ||
} | ||
|
||
function onLogin(player) | ||
local attr_value = 100 + math.floor(player:getLoyalty() / 360) * 0.05 | ||
for key, attr_key in pairs(parameters) do | ||
loyalty_condition:setParameter(attr_key, attr_value) | ||
end | ||
player:addCondition(loyalty_condition) | ||
return true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters