Hello, i'm have problem to convert script 1.3 to 1.5.
when passing the actionid, guild1 gets a bonus, if another guild passes the actionid, the bonus will pass to guild2 and removed from guild1.
tfs 1.3
data/movements/scripts/guildexp.lua
data/movements/movements.xm
when passing the actionid, guild1 gets a bonus, if another guild passes the actionid, the bonus will pass to guild2 and removed from guild1.
tfs 1.3
data/movements/scripts/guildexp.lua
if not guildExperienceBonus then
guildExperienceBonus = 0 -- default value; no guild
end
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
local guild = player:getGuild()
if guild then
guildExperienceBonus = guild:getId()
player:sendTextMessage(MESSAGE_INFO_DESCR, 'Sua guild agora possui o bônus em experiência.')
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
end
return true
end
data/movements/movements.xm
data/events/scripts/player.lua<movevent event="StepIn" actionid="33462" script="guildexp.lua" />
local guild = self:getGuild()
if guild and guild:getId() == guildExperienceBonus then
exp = exp * 1.2 -- 20% bonus
end
Last edited: