GeKirAh
Banned User
Hello I post here my own script.
Based on Sora Tutorial.
Script:
Best Scripter Wrote:
-RED Position of the chest with Treasure.
Put this on data/actions/actions.xml
Quote:
I'll try to explain it... You put one chest in your map and and when you use the item (XXXX You can chose this) this item do an "exiva" of the XXXX YYYY Z of the chest in your map. Then in the screen of player show a message with the information of the chest's position.
If you need more information post here and I'll try to give.
Good bye.
credits: Cepe Style
Based on Sora Tutorial.
Script:
Best Scripter Wrote:
---Cepe Style---
function onUse(cid,item,frompos,item2,topos)
player = getPlayerPosition(cid)
tesoro = {x=xxxx, y=yyyy, z=z)
elseif player.x == tesoro.x and player.y == tesoro.y and player.z == tesoro.z then
doPlayerAddItem(cid,item)
elseif player.x < tesoro.x and player.y == tesoro.y and player.z == tesoro.z then
doPlayerSay(cid,'Treasure is to the west.')
elseif player.y > tesoro.y and player.x == tesoro.y and player.z == tesoro.z then
doPlayerSay(cid,'Treasure is to the north.')
elseif player.y < tesoro.y and player.x == tesoro.y and player.z == tesoro.z then
doPlayerSay(cid,'Treasure is to the south.')
elseif player.x > tesoro.x and player.y == tesoro.y and player.z == tesoro.z then
doPlayerSay(cid,Treasure is to the east.')
elseif player.x < tesoro.x and player.y > tesoro.y == tesoro.y and player.z == tesoro.z then
doPlayerSay(cid,'Treasure is to the north-east.')
elseif player.x > tesoro.x and player.y > tesoro.y == tesoro.y and player.z == tesoro.z then
doPlayerSay(cid,'Treasure is to the north-west.')
elseif player.x < tesoro.x and player.y < tesoro.y == tesoro.y and player.z == tesoro.z then
doPlayerSay(cid,'Treasure is to the south-east.')
elseif player.x > tesoro.x and player.y < tesoro.y == tesoro.y and player.z == tesoro.z then
doPlayerSay(cid,'Treasure is to the south-west.')
end
end
-RED Position of the chest with Treasure.
Put this on data/actions/actions.xml
Quote:
<action itemid="XXXX" script="tesoro.lua" />
XXXX Here you put the ID of the item to use for search this Treasure.
I'll try to explain it... You put one chest in your map and and when you use the item (XXXX You can chose this) this item do an "exiva" of the XXXX YYYY Z of the chest in your map. Then in the screen of player show a message with the information of the chest's position.
If you need more information post here and I'll try to give.
Good bye.
credits: Cepe Style