ImaG
Active Member
Version: Tibia 10.99 otservbr
Hello, I tried to make a script from item to give % magic lvlu. No bugs, no magic lvl.
Script:
And ...
I have a question, I noticed in the Tibia client that my engine has imbuing. How can I use them, can they be loaded into weapons?
Hello, I tried to make a script from item to give % magic lvlu. No bugs, no magic lvl.
Script:
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local itemId = 7735
local targetIds = {18226, 18227}
local magicLevelIncrease = 90.10
if item:getId() == itemId and player:getItemCount(itemId) >= 1 then
local targetId = target:getId()
local isTargetValid = false
for i = 1, #targetIds do
if targetId == targetIds[i] then
isTargetValid = true
break
end
end
if isTargetValid then
player:removeItem(itemId, 1)
local playerMagicLevel = player:getMagicLevel()
local magicLevelBonus = math.floor(playerMagicLevel * magicLevelIncrease)
player:addSkillTries(SKILL_MAGLEVEL, magicLevelBonus)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Użyłeś narzędzia treningowego na kukłę. Zdobywasz efekt magiczny oraz zwiększenie poziomu magicznego o " .. magicLevelBonus .. " prób umiejętności.")
return true
else
player:sendCancelMessage("Ten przedmiot można użyć tylko na kukłach treningowych.")
end
end
return false
end
And ...
I have a question, I noticed in the Tibia client that my engine has imbuing. How can I use them, can they be loaded into weapons?