Piifafa
Member
- Joined
- Apr 16, 2023
- Messages
- 67
- Reaction score
- 16
Hello everyone, thanks for trying to help me!
How could I make a script, for use where the person uses it and gains 150 thousand experience instantly? Without having the stage effects that exist in otserver?
I made a script that adds more capacity for players, but it wasn't as good for the experience as I wanted.
How could I make a script, for use where the person uses it and gains 150 thousand experience instantly? Without having the stage effects that exist in otserver?
I made a script that adds more capacity for players, but it wasn't as good for the experience as I wanted.
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local additionalCapacity = 50000 -- Aumento de capacidade em 5 kg
player:setCapacity(player:getCapacity() + additionalCapacity) -- Aumenta a capacidade
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
player:sendTextMessage(MESSAGE_INFO_DESCR, "You won " .. (additionalCapacity / 100) .. " kg capacity.")
item:remove(1) -- Remove o item após o uso
return true
end