
Untitled
By: a guest on
May 25th, 2012 | syntax:
Lua | size: 1.05 KB | hits: 28 | expires: Never
function onSay(cid, words, param)
local a = getPlayerStorageValue(cid, 6441)
local b = getPlayerStorageValue(cid, 6442)
local c = getPlayerStorageValue(cid, 6443)
local position = getPlayerPosition(cid)
local battle = getCreatureCondition(cid, CONDITION_INFIGHT)
local level = getPlayerLevel(cid)
if level >= 500 and battle == FALSE then
if param == "mark" then
setPlayerStorageValue(cid, 6441, position.x)
setPlayerStorageValue(cid, 6442, position.y)
setPlayerStorageValue(cid, 6443, position.z)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "New position succesfuly marked.")
doSendMagicEffect(position, 4)
elseif param == "recall" then
recall = {x = a, y = b, z = c}
doTeleportThing(cid, recall)
doSendMagicEffect(position, 10)
doSendMagicEffect(recall, 10)
end
else
doPlayerSendCancel(cid, "You need to be at least level 500 to use this spell and you cannot be in a fight!")
doSendMagicEffect(position, CONST_ME_POFF)
end
return TRUE
end