Kaorus
Unleash Dreams Staff
- Joined
- May 18, 2008
- Messages
- 1,111
- Reaction score
- 41
My first script
Is a simple script
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local teleport = {x=79, y=97, z=6}
local pos = getCreaturePosition(cid)
if item.itemid == 9825 and isPlayerPzLocked(cid) and getPlayerAccess(cid) >= 2 then
doPlayerSendTextMessage(cid,21,"You are a staff member, you can pass")
doTeleportThing(cid, teleport, TRUE)
doSendMagicEffect(pos, 10)
doSendMagicEffect(teleport, 10)
doTransformItem(item.uid, 9826)
elseif item.itemid == 9826 and isPlayerPzLocked(cid) and getPlayerAccess(cid) >= 2 then
doPlayerSendTextMessage(cid,21,"You are a staff member, you can pass")
doTeleportThing(cid, teleport, TRUE)
doSendMagicEffect(pos, 10)
doSendMagicEffect(teleport, 10)
doTransformItem(item.uid, 9825)
else
doPlayerSendCancel(cid,"You dont are member of the staff.")
end
return true
end
Description said:You use the lever and the member is teleported to "x" pos, but, you need the access and dont had Pz --->This is for tutors, in war, a tutor can use this for leave of the war, but, with this function, is a big fail!