--function by rafal2714--
function onUse(cid, item, frompos, item2, topos)
temple = {x=437, y=504, z=8}
local target = getThingfromPos(topos)
local targetname = getPlayerName(target.uid)
local playerVoc = getPlayerVocation(target.uid)
local pos = getPlayerPosition(target.uid)
if getPlayerLevel(cid) >= 50 then
if getTilePzInfo(topos) == FALSE then
if getPlayerLevel(target.uid) < 50 then
if playerVoc == 0 or playerVoc == 1 or playerVoc == 2 or playerVoc == 3 or playerVoc == 4 or playerVoc == 5 or playerVoc == 6 or playerVoc == 7 or playerVoc == 8 then
if isPlayer(target.uid) == 1 then
doTeleportThing(target.uid,temple)
doPlayerSendTextMessage(cid, 22,"Gracz " ..targetname .. " zostal przeniosiony do temple za pomoca penetrate rune.")
doPlayerSendTextMessage(target.uid, 22,"Zostales przeniosiony do temple za pomoca penetrate rune.")
end
else
doPlayerSendTextMessage(cid, 21,"Penetrate rune can be only used on players.")
end
else
doPlayerSendTextMessage(cid, 21,"Penetrate rune can be only used on players with level 49 or lower.")
end
else
doPlayerSendTextMessage(cid, 21,"Action not permitted into protection zone.")
end
else
doPlayerSendTextMessage(cid, 21,"Only players with level 50 or above can use penetrate rune.")
end
end
Paste Hosted With By Wklejamy.pl