Hello Otland people, i would like to know how to do something with a script. I want to do that by pressing a lever, first check if there is a "scarab coin" in a place on the map, and if so, teleport you to another location on the map. When you
teleport, also want the scarab coin removed.
I have this script:
local pos = {x = 3245, y = 2305, z = 10}
local teleport = {x = 3260, y = 2305, z = 10}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if (Here the command to check if the scarab coin is in the position of "post") then
doTeleportThing (cid, teleport)
doSendMagicEffect (teleport, CONST_ME_TELEPORT)
(Here the command to delete the scarab coin)
else
doPlayerSendTextMessage (cid, 24, "You must place a scarab coin and press the lever.")
end
end
This is the script that would have the lever.
I want to know how to check if the scarab coin and also want to know how to remove that scarab coin.
Greetings!
teleport, also want the scarab coin removed.
I have this script:
local pos = {x = 3245, y = 2305, z = 10}
local teleport = {x = 3260, y = 2305, z = 10}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if (Here the command to check if the scarab coin is in the position of "post") then
doTeleportThing (cid, teleport)
doSendMagicEffect (teleport, CONST_ME_TELEPORT)
(Here the command to delete the scarab coin)
else
doPlayerSendTextMessage (cid, 24, "You must place a scarab coin and press the lever.")
end
end
This is the script that would have the lever.
I want to know how to check if the scarab coin and also want to know how to remove that scarab coin.
Greetings!