LE
dúvida

Checkar Monstros Em Área E Dar Storage

Por Leoxtibia, 22 de jun. de 2012 em Scripts

script
18
3.6k
VodkartV
23 de junho de 2012 às 16:13

 

local porta = {x=253, y=69, z=7, stackpos = 1}
local toPos, fromPos = {x= 257, y= 75, z= 7},{x= 250, y= 69, z= 7}
local position = {x=math.random(fromPos.x,toPos.x), y=math.random(fromPos.y,toPos.y), z=math.random(fromPos.z,toPos.z)}
local monsters = {"Rat", "Rotworm", "Snake"}
   function onUse(cid, item, fromPosition, itemEx, toPosition)
   if item.itemid == 1945 then
   doTransformItem(item.uid,item.itemid+1)
   if getTileItemById(porta, 5734).uid > 0 then doTransformItem(getThingfromPos(porta).uid, 5733) end
   for i=1, #monsters do
   doCreateMonster(monsters[i], position)
   end
   elseif item.itemid == 1946 then
   for x = fromPos.x, toPos.x do
   for y = fromPos.y, toPos.y do
   local m = getTopCreature({x=x, y=y, z=toPos.z}).uid
   if m ~= 0 and isMonster(m) then return true end
   end
   end
   doTransformItem(item.uid,item.itemid-1)
   if getTileItemById(porta, 5733).uid > 0 then doTransformItem(getThingfromPos(porta).uid, 5734) end
   end
   return true
   end

 

 

sanado, reportado.

LeoxtibiaL
23 de junho de 2012 às 16:32

Dúvida Sanada, podem mover o tópico.

VildenV
24 de junho de 2012 às 13:30

Dúvida sanada, movido.