function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = fromPosition
local aqui = getPlayerPosition(cid)
local vocs = {501, 502, 503, 504, 505, 506, 507, 508}
local agua = {4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825}
local parede = {1049, 1050, 1026, 1029, 1025, 9119, 1041, 5152, 1044, 1037, 4472, 4475, 4471, 1058, 1056, 1055, 1060, 1063, 1061}
local pedra = {3333, 2711, 2786, 2784, 2778, 3330}
if(doTeleportThing(cid, toPosition, false)) then
doSendMagicEffect(pos, 111)
doSendMagicEffect(toPosition, 122)
return doSendDistanceShoot(pos, toPosition, 35)
end
if getDistanceBetween(aqui, toPosition) >= 7 then
return doPlayerSendTextMessage(cid, 27, "Esta Muito Longe.")
elseif(not(isSightClear(aqui, toPosition, 1))) then
return doPlayerSendTextMessage(cid, 27, "Isso E Impossivel.")
elseif(getTilePzInfo(aqui)) then
return doPlayerSendCancel(cid, "voce nao pode usar quando estiver em protect zone.")
elseif(getTilePzInfo(toPosition)) then
return doPlayerSendCancel(cid, "voce nao pode entra em protec zone.")
elseif(isInArray(agua, itemEx.itemid)) then
return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em agua")
elseif(isInArray(parede, itemEx.itemid)) then
return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em paredes")
elseif(isInArray(pedra, itemEx.itemid)) then
return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em pedras")
elseif(not(isInArray(vocs, getPlayerVocation(cid)))) then
return doPlayerSendTextMessage(cid, 27, "Desculpe Apenas Vocacao Minato Para Usar.")
end
return doPlayerSendCancel(cid, "Desculpe Nao Foi Possivel.")
end