Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 25th, 2012  |  syntax: Lua  |  size: 1.05 KB  |  hits: 28  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function onSay(cid, words, param)
  2. local a = getPlayerStorageValue(cid, 6441)
  3. local b = getPlayerStorageValue(cid, 6442)
  4. local c = getPlayerStorageValue(cid, 6443)
  5. local position = getPlayerPosition(cid)
  6. local battle = getCreatureCondition(cid, CONDITION_INFIGHT)
  7. local level = getPlayerLevel(cid)
  8. if level >= 500 and battle == FALSE then
  9.     if param == "mark" then
  10.         setPlayerStorageValue(cid, 6441, position.x)
  11.         setPlayerStorageValue(cid, 6442, position.y)
  12.         setPlayerStorageValue(cid, 6443, position.z)
  13.         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "New position succesfuly marked.")
  14.         doSendMagicEffect(position, 4)
  15.     elseif param == "recall" then
  16.     recall = {x = a, y = b, z = c}
  17.         doTeleportThing(cid, recall)
  18.         doSendMagicEffect(position, 10)
  19.         doSendMagicEffect(recall, 10)
  20.         end
  21. else
  22. doPlayerSendCancel(cid, "You need to be at least level 500 to use this spell and you cannot be in a fight!")
  23. doSendMagicEffect(position, CONST_ME_POFF)
  24. end
  25.     return TRUE
  26. end