Felipinho

Pega

Oct 21st, 2012
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.23 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <mod name="Regicide Event" version="1.0" author="LuckOake" contact="none" enabled="yes">
  3. ------------------------------------------------------------------------------------
  4. <config name="king_func"><![CDATA[
  5. kingdom = {
  6.         ["Protectors"] = {
  7.                 pos = {x = 168, y = 84, z = 7},
  8.                 storage = 51322,
  9.         },
  10.         ["Killers"] = {
  11.                 pos = {x = 168, y = 84, z = 7},
  12.                 storage = 51323,
  13.         }
  14. }
  15.  
  16. area1 = {x = 152, y = 77, z = 7} -- Ponta de cima na esquerda da área
  17. area2 = {x = 172, y = 93, z = 7} -- Ponta de baixo na direita da área
  18. stor = 51320
  19. tp_pos = {x = 155, y = 84, z = 7, stackpos = 1} -- Posição do teleport (Não altere o stackpos)
  20. maxplayers = 20 -- Máximo de players (De preferência, coloque um número par)
  21. wall = { -- Positions das paredes de bloqueio (Não altere o stackpos)
  22.         [1] = {x = 167, y = 85, z = 7, stackpos = 1},
  23.         [2] = {x = 167, y = 86, z = 7, stackpos = 1},
  24.         }
  25. wallid = 1111 -- Id das walls
  26. king = "King" -- Nome do monstro que será o King
  27. kpos = {x = 170, y = 82, z = 7} -- Position que o King será criado
  28. prizes = {
  29. [1] = {id = 2149, count = 13},
  30. [2] = {id = 2149, count = 12},
  31. [3] = {id = 2149, count = 11}
  32. }
  33. prand = math.random(1, #prizes)
  34.  
  35. function doCreatureFollow(cid, target, playerpos, targetpos, times)
  36.         followstor = 51325
  37.         if playerdir ~= getCreatureLookDirection(cid) then
  38.                 doCreatureSetLookDirection(target, getCreatureLookDirection(cid))
  39.         end
  40.  
  41.         if playerpos ~= getCreaturePosition(cid) then
  42.                 if playerpos.z == getCreaturePosition(cid).z then
  43.                 ntpos = getCreaturePosition(cid)
  44.                 local x,y,z = ntpos.x-playerpos.x,ntpos.y-playerpos.y,ntpos.z-playerpos.z
  45.                 ntpos = getCreaturePosition(target)
  46.                 ntpos.x, ntpos.y, ntpos.z = ntpos.x+x,ntpos.y+y,ntpos.z+z
  47.                         if queryTileAddThing(target, ntpos) == RETURNVALUE_NOERROR and getCreaturePosition(cid).z == getCreaturePosition(target).z then
  48.                                 doMoveCreature(target, getCreatureLookDirection(cid))
  49.                         end
  50.                 end
  51.         end
Advertisement
Add Comment
Please, Sign In to add comment