I'm trying to make a anni script. I saearched for "anni" and "spawn lever" but none of them have the part where the monsters spawn. Having the monsters alredy on map will cause problems if there's other players around that are, the monsters will move around and mess up the quest, also another team can enter if some team recently cleaned it.
I have no idea how i should put a "spawning onUse" script inside this alredy existing one
So i'm trying to add 8 monsters spawning in this script:
And then I'm going to use this as a build to make a couple more anni's with different amount and type of monsters.
Would be cool if i could get some help here
I have no idea how i should put a "spawning onUse" script inside this alredy existing one
So i'm trying to add 8 monsters spawning in this script:
HTML:
local playerr1 = {x=871, y=963, z=7, stackpos=253}
local playerr2 = {x=xxx, y=xxx, z=x, stackpos=253} <!--- These are from posision -->
local playerr3 = {x=xxx, y=xxx, z=x, stackpos=253}
local posisionn1 = {x=xxx, y=xxx, z=x} <!--- These are to posision XXX -->
local posisionn2 = {x=xxx, y=xxx, z=x}
local posisionn3 = {x=xxx, y=xxx, z=x}
Local uniqueidoflever = XXX <!---- lever uniqueID -->
function onUse(cid, item, frompos, item2, topos)
if item.uid == uniqueidoflever and item.itemid == 1945 then
player1pos = playerr1
player1 = getThingfromPos(player1pos)
player2pos = playerr2
player2 = getThingfromPos(player2pos)
player3pos = playerr3
player3 = getThingfromPos(player3pos)
if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 then
queststatus1 = getPlayerStorageValue(player1.uid,uniqueidoflever)
queststatus2 = getPlayerStorageValue(player2.uid,uniqueidoflever)
queststatus3 = getPlayerStorageValue(player3.uid,uniqueidoflever)
if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 then
nplayer1pos = posisionn1
nplayer2pos = posisionn2
nplayer3pos = posisionn3
doSendMagicEffect(player1pos,2)
doSendMagicEffect(player2pos,2)
doSendMagicEffect(player3pos,2)
doTeleportThing(player1.uid,nplayer1pos)
doTeleportThing(player2.uid,nplayer2pos)
doTeleportThing(player3.uid,nplayer3pos)
doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(nplayer2pos,10)
doSendMagicEffect(nplayer3pos,10)
doTransformItem(item.uid,item.itemid+1)
else
doPlayerSendCancel(cid,"Somebody in your team has already done this quest.")
end
else
doPlayerSendCancel(cid,"You need three players for this quest.")
end
elseif item.uid == uniqueidoflever and item.itemid == 1946 then
if getPlayerAccess(cid) > 0 then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
else
return 0
end
return 1
end
And then I'm going to use this as a build to make a couple more anni's with different amount and type of monsters.
Would be cool if i could get some help here
Last edited: