• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Item Radar

Saper1995

Technologic
Joined
Jul 11, 2009
Messages
104
Reaction score
3
Location
Poland
Hi all:) I'm looking for someone who could improve the script so that it acted in ver.8.54. The principle of this script is very simple .. Radar scan for the object and it works like a charm 'exiva' giving the coordinates of the [south, west, east, north]. Thank you and best regards. For working script gives rep.x3 :rolleyes:

function onUse(cid, item, frompos)

kula1 = {x=2114, y=1157, z=7, stackpos=1} --- item position

getpiece1 = getThingfromPos(kula1)


player = getPlayerPosition(cid)

if item.itemid == 11382 and getpiece1.itemid == 2626 then --- 11382 id radar, 2626 item id Dragon ball.

if player.x > 700 then
doPlayerSendTextMessage(cid,22,"Dragon Ball is on Earth.")
elseif player.z > kula1.z and (player.y - kula1.y) <= 3 and (player.y - kula1.y) > -3 then
doPlayerSendTextMessage(cid,22,"Dragon Ball is above you.")
elseif player.z < kula1.z and (player.x - kula1.x) <= 3 and (player.x - kula1.x) > -3 then
doPlayerSendTextMessage(cid,22,"Dragon Ball is below you.")
else
if player.x > kula1.x then
if player.y > kula1.y then
if (player.y - kula1.y) >= 3 then
if (player.x - kula1.x) >= 1 then
doPlayerSendTextMessage(cid,22,"Dragon Ball is to the north-west.")
else
if (player.y - kula1.y) <= 10 then
doPlayerSendTextMessage(cid,22,"Dragon Ball is to the north.")
else
doPlayerSendTextMessage(cid,22,"Dragon Ball is far to the north.")
end
end
else
if (player.x - kula1.x) <= 10 then
doPlayerSendTextMessage(cid,22,"Dragon Ball is to the west.")
else
doPlayerSendTextMessage(cid,22,"Dragon Ball is far to the west.")
end
end
elseif player.y < kula1.y then
if (kula1.y - player.y) >= 3 then
TextMessage(cid,22,"Dragon Ball is far to the south.")
end
end
else
if (player.x - kula1.x) <= 10 then
doPlayerSendTextMessage(cid,22,"Dragon Ball is to the west.")
else
doPlayerSendTextMessage(cid,22,"Dragon Ball is far to the west.")
end
end
else
doPlayerSendTextMessage(cid,22,"Dragon Ball is to the west.")
end
elseif player.x < kula1.x then
if player.y > kula1.y then
if (player.y - kula1.y) >= 3 then
if (kula1.x - player.x) >= 1 then
doPlayerSendTextMessage(cid,22,"Dragon Ball is to the north-east.")
else
if (player.y - kula1.y) <= 10 then
doPlayerSendTextMessage(cid,22,"Dragon Ball is to the north.")
else
doPlayerSendTextMessage(cid,22,"Dragon Ball is far to the north.")
end
end
else
if (kula1.x - player.x) <= 10 then
doPlayerSendTextMessage(cid,22,"Dragon Ball is to the east.")
else
doPlayerSendTextMessage(cid,22,"Dragon Ball is far to the east.")
end
end
elseif player.y < kula1.y then
if (kula1.y - player.y) >= 3 then
if (kula1.x - player.x) >= 1 then
doPlayerSendTextMessage(cid,22,"Dragon Ball is to the south-east.")
else
if (kula1.y - player.y) <= 10 then
doPlayerSendTextMessage(cid,22,"Dragon Ball is to the south.")
else
doPlayerSendTextMessage(cid,22,"Dragon Ball is far to the south.")
end
end
else
if (kula1.x - player.x) <= 10 then
doPlayerSendTextMessage(cid,22,"Dragon Ball is to the east.")
else
doPlayerSendTextMessage(cid,22,"Dragon Ball is far to the east.")
end
end
else
doPlayerSendTextMessage(cid,22,"Dragon Ball is to the east.")
end
else
if player.y > kula1.y then
doPlayerSendTextMessage(cid,22,"Dragon Ball is to the north.")
else
doPlayerSendTextMessage(cid,22,"Dragon Ball is to the south.")
end
end
end

else
doPlayerSendCancel(cid,"Radar Cant find the Dragon Ball.")
end
return 1
end
 
Last edited:
Back
Top