amr shalapy
Banned User
- Joined
- Aug 28, 2014
- Messages
- 122
- Reaction score
- 8
i was wondering if it possible to edit this script i have tried once but it's not working I just wanted to add some options at cfg,but I didn't know how to add it in the main code
here it's
here it's
Lua:
local cfg = {
level = 16, ---here the level is not working i want if u Less than the required leve can't be used and send text message "you can't use this only the required level or higher"
magic = 16, ----also same with level
min = 1750,
max = 1800,
Vocation={26} ---and custom vocation only can use
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isCreature(itemEx.uid) then
mini = (getPlayerLevel(cid) * cfg.level + getPlayerMagLevel(cid) * cfg.magic + cfg.min)
maxi = (getPlayerLevel(cid) * cfg.level + getPlayerMagLevel(cid) * cfg.magic + cfg.max)
doCreatureAddHealth(itemEx.uid, math.random(mini, maxi))
doSendMagicEffect(toPosition, 12)
doRemoveCondition(cid, 32)
doRemoveItem(item.uid, 1)
else
doCreatureSay(cid, "This rune can only be used on creatures.", TALKTYPE_ORANGE_1)
end
return true
end
Last edited: