Slave Ots
LUA Newbie™
hello otlanders
this script for 999x servers. that is not at otland
it give for the player +1 rebirth it can be used as donate item..
so i decided to share it, all credits for me;
hope to REP++
this script for 999x servers. that is not at otland
it give for the player +1 rebirth it can be used as donate item..
so i decided to share it, all credits for me;
PHP:
function onUse(cid, item, frompos, item2, topos)
local storage = 85987 -- rebirth storage
-- 717216 when the max level of your ot is 717217.. so that use max level ot - 1
local xx = 717216 - getPlayerLevel(cid) -- xx is the numbers of levels to be added
doPlayerAddLevel(cid, xx)
local id = getPlayerGUID(cid)
local name = getCreatureName(cid)
local storage = getCreatureStorage(cid, storge)
doSendAnimatedText(getCreaturePosition(cid),"REB", TEXTCOLOR_RED)
doRemoveItem(item.uid, 1)
doCreatureSetStorage(cid, storage, storage == -1 and 1 or storage + 1)
doSendMagicEffect(getPlayerPosition(cid), 14)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = 8, `experience` = 4200 WHERE `id` ='"..id.."';")
db.executeQuery("UPDATE `players` SET `name` = '"..name.."' WHERE `id` ='"..id.."';")
return true
end