Hello,
This Scripts Is For You "Use" And For Reward Have You One Level!
Is 100% Me...!
YourOt/data/actions/scripts
LevelR.lua;
In Actions.xml;
Thanks For Watch!
This Scripts Is For You "Use" And For Reward Have You One Level!
Is 100% Me...!
YourOt/data/actions/scripts
LevelR.lua;
Lua:
local levelup = 1 --- Level Up
local level = 100 --- Level For Use Item
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLevel(cid) <= level then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You Need A Reached Level ".. level .." For Up ".. levelup .." Level! .")
doSendAnimatedText(getPlayerPosition(cid), "Failed!", 180)
return doSendMagicEffect(fromPosition, CONST_ME_POFF)
end
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Congratz!")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREWORK_BLUE)
doSendAnimatedText(getPlayerPosition(cid), "LevelUp!", 18)
return doPlayerAddLevel(cid, levelup)
end
In Actions.xml;
XML:
<action itemid="XXXX" event="script" value="LevelR.lua" />
Thanks For Watch!
Last edited: