Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <mod name="Regicide Event" version="1.0" author="LuckOake" contact="none" enabled="yes">
- ------------------------------------------------------------------------------------
- <config name="king_func"><![CDATA[
- kingdom = {
- ["Protectors"] = {
- pos = {x = 168, y = 84, z = 7},
- storage = 51322,
- },
- ["Killers"] = {
- pos = {x = 168, y = 84, z = 7},
- storage = 51323,
- }
- }
- area1 = {x = 152, y = 77, z = 7} -- Ponta de cima na esquerda da área
- area2 = {x = 172, y = 93, z = 7} -- Ponta de baixo na direita da área
- stor = 51320
- tp_pos = {x = 155, y = 84, z = 7, stackpos = 1} -- Posição do teleport (Não altere o stackpos)
- maxplayers = 20 -- Máximo de players (De preferência, coloque um número par)
- wall = { -- Positions das paredes de bloqueio (Não altere o stackpos)
- [1] = {x = 167, y = 85, z = 7, stackpos = 1},
- [2] = {x = 167, y = 86, z = 7, stackpos = 1},
- }
- wallid = 1111 -- Id das walls
- king = "King" -- Nome do monstro que será o King
- kpos = {x = 170, y = 82, z = 7} -- Position que o King será criado
- prizes = {
- [1] = {id = 2149, count = 13},
- [2] = {id = 2149, count = 12},
- [3] = {id = 2149, count = 11}
- }
- prand = math.random(1, #prizes)
- function doCreatureFollow(cid, target, playerpos, targetpos, times)
- followstor = 51325
- if playerdir ~= getCreatureLookDirection(cid) then
- doCreatureSetLookDirection(target, getCreatureLookDirection(cid))
- end
- if playerpos ~= getCreaturePosition(cid) then
- if playerpos.z == getCreaturePosition(cid).z then
- ntpos = getCreaturePosition(cid)
- local x,y,z = ntpos.x-playerpos.x,ntpos.y-playerpos.y,ntpos.z-playerpos.z
- ntpos = getCreaturePosition(target)
- ntpos.x, ntpos.y, ntpos.z = ntpos.x+x,ntpos.y+y,ntpos.z+z
- if queryTileAddThing(target, ntpos) == RETURNVALUE_NOERROR and getCreaturePosition(cid).z == getCreaturePosition(target).z then
- doMoveCreature(target, getCreatureLookDirection(cid))
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment