Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onUse(cid, item, frompos, item2, topos)
- --Config-->
- local RemovePos = {fromx = 1153, fromy = 737, fromz = 10, tox = 1173, toy = 755, toz = 10}
- local function RemoveMonstersInArea(area)
- for x = area.fromx, area.tox do
- for y = area.fromy, area.toy do
- for z = area.fromz, area.toz do
- monsterpos = {x=x,y=y,z=z,stackpos=253}
- monster = getThingFromPos(monsterpos)
- if isMonster(monster.uid) == true then
- doRemoveCreature(monster.uid)
- end end end end end
- local config = {
- statue_pos = {x=1164, y=746, z=10},
- portal_quest01_pos = {x=1164, y=755, z=10, stackpos = 2},
- portal_quest02_pos = {x=1165, y=757, z=9, stackpos = 2},
- boss = "Azerus"
- }
- --End Config-->
- function Potwory1()
- if math.random (1,8) == 4 then
- doSummonCreature('Rat', {x = config.statue_pos.x+1, y = config.statue_pos.y+1, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x-1, y = config.statue_pos.y+1, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x, y = config.statue_pos.y-1, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x-1, y = config.statue_pos.y, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x+1, y = config.statue_pos.y, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x+1, y = config.statue_pos.y-1, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x-1, y = config.statue_pos.y-1, z = config.statue_pos.z, stackpos = 253})
- addEvent(Potwory2, 30 * 1000)
- else
- doSummonCreature('Rat', {x = config.statue_pos.x, y = config.statue_pos.y+1, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x+1, y = config.statue_pos.y+1, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x-1, y = config.statue_pos.y+1, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x, y = config.statue_pos.y-1, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x-1, y = config.statue_pos.y, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x+1, y = config.statue_pos.y, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x+1, y = config.statue_pos.y-1, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x-1, y = config.statue_pos.y-1, z = config.statue_pos.z, stackpos = 253})
- addEvent(Potwory2, 30 * 1000)
- end
- end
- function Potwory2()
- doSummonCreature('Azerus3', {x = config.statue_pos.x-1, y = config.statue_pos.y+1, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x, y = config.statue_pos.y-1, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x-1, y = config.statue_pos.y, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x+1, y = config.statue_pos.y, z = config.statue_pos.z, stackpos = 253})
- addEvent(Potwory3, 35 * 1000)
- end
- function Potwory3()
- doSummonCreature('Rat', {x = config.statue_pos.x-1, y = config.statue_pos.y, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x+1, y = config.statue_pos.y, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x+1, y = config.statue_pos.y-1, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x-1, y = config.statue_pos.y-1, z = config.statue_pos.z, stackpos = 253})
- addEvent(Potwory4, 40 * 1000)
- end
- function Potwory4()
- doSummonCreature('Rat', {x = config.statue_pos.x, y = config.statue_pos.y+1, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x+1, y = config.statue_pos.y+1, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x-1, y = config.statue_pos.y+1, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x, y = config.statue_pos.y-1, z = config.statue_pos.z, stackpos = 253})
- doSummonCreature('Rat', {x = config.statue_pos.x-1, y = config.statue_pos.y, z = config.statue_pos.z, stackpos = 253})
- addEvent(NewPortal, 90 * 1000)
- end
- function NewPortal()
- addEvent(RemoveAll, 60 * 1000)
- end
- function RemoveAll()
- doRemoveItem(getThingfromPos(config.portal_quest01_pos).uid,1)
- doRemoveItem(getThingfromPos(config.portal_quest02_pos).uid,1)
- end
- RemoveMonstersInArea(RemovePos)
- if item.uid == 11223 and getThingfromPos(config.portal_quest01_pos).itemid ~= 9772 then
- doCreateItem(9772,1,config.portal_quest01_pos)
- doCreateItem(9772,1,config.portal_quest02_pos)
- addEvent(Potwory1, 0)
- else
- doPlayerSendTextMessage(cid,22,"Sorry, not possible.")
- end
- return TRUE
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement