Havocbringer
Well-Known Member
Hey guys i saw a few people asking for it.. Here u go Rebirth on look =)
make a new file in your server /data/creaturescripts/scripts called Onlook ( a lua file )
Now add this To Creaturescripts.xml
Rep++ if it helped OR u like it , thanks!
make a new file in your server /data/creaturescripts/scripts called Onlook ( a lua file )
Code:
local minlvl = 50000
local newlvl = 8
function onLook(cid, thing, position, lookDistance)
if(not isPlayer(thing.uid)) then
return true
end
local rebirth = math.floor(((getCreatureMaxHealth(thing.uid) - (getVocationInfo(getPlayerVocation(thing.uid)).healthGain * getPlayerLevel(thing.uid) + 150)) / ((minlvl - 1 - newlvl) * getVocationInfo(getPlayerVocation(thing.uid)).healthGain)))
if(rebirth > 0) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see " .. getCreatureName(thing.uid) .. "(Level " .. getPlayerLevel(thing.uid) .. "). " .. (getPlayerSex(thing.uid) == 0 and "She" or "He") .. " is a " .. getVocationInfo(getPlayerVocation(thing.uid)).name .. ". " .. (getPlayerSex(thing.uid) == 0 and "She" or "He") .. " was " .. rebirth .. " times reborn.")
end
return false
end
Code:
<event type="look" name="test" event="script" value="onlook.lua"/>
Last edited: