Advertisement
Guest User

Untitled

a guest
Aug 4th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.04 KB | None | 0 0
  1. function onThink()
  2.     for _, cid in ipairs(getPlayersOnline()) do
  3.         local t = getCreatureStorage(cid, 128)
  4.         if t ~= -1 then
  5.             if os.time() >= t then
  6.                 for i = 125, 128 do
  7.                     doCreatureSetStorage(cid, i)
  8.                 end
  9.                 --[[
  10.                 doBroadcastMessage(getCreatureName(cid) .. ' has been banned for 2 days for afk botting.')
  11.                 doAddAccountBanishment(getPlayerAccountId(cid), getPlayerGUID(cid), os.time() + 2 * 86400, 12, 2, 'Banished by Antibot System', 0)
  12.                 doRemoveCreature(cid)
  13.                 ]]
  14.                 doBroadcastMessage(getCreatureName(cid) .. ' has been died by Anti AFK Monster for afk botting.')
  15.                 doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 200)
  16.                 doTeleportThing(cid, {x=2511, y=2467, z=6})
  17.             else
  18.                 doSendAnimatedText(getThingPos(cid), tostring(getCreatureStorage(cid, 126)):sub(2) ..' = ?', COLOR_RED, cid)
  19.                 local my = getThingPos(cid)
  20.                 for _, p in ipairs(getArea(my, 1, 1)) do
  21.                     if doComparePositions(my, p) == false then
  22.                         doSendMagicEffect(p, CONST_ME_ENERGYAREA)
  23.                     end
  24.                 end
  25.             end
  26.         end
  27.     end
  28.     return true
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement