Hello! I have seached all around, but I couldn't make annihi for my ot that would work more than 1 time after restart. I tried like 10 other scripts, I even edited mine script, but something always isnt working after I do changes, cuz im messing it up Lol
Im noob in scriptting, so thats why Im asking help. So, can someone edit this script so it would reset lever so quest can be done more than 1 time after restart. Im asking it cuz I know its not hard and does not take long time(at least, I think so).
This is the script that Im using atm:
PS. You will not help only me, but all the players that are playing my ot will be happy cuz annihi will work

This is the script that Im using atm:
Code:
-- player?pos = The position of the players before teleport.
-- player? = Get the thing from playerpos.
-- player?level = Get the players levels.
-- questslevel = The level you have to be to do this quest.
-- questtatus? = Get the quest status of the players.
-- demon?pos = The position of the demons.
-- nplayer?pos = The position where the players should be teleported too.
--
-- UniqueIDs used:
-- 10019 = The switch.
function onUse(cid, item, frompos, item2, topos)
if item.uid == 10019 then
if item.itemid == 1945 then
player1pos = {x=1057, y=735, z=7, stackpos=253}
player1 = getThingfromPos(player1pos)
player2pos = {x=1056, y=735, z=7, stackpos=253}
player2 = getThingfromPos(player2pos)
player3pos = {x=1055, y=735, z=7, stackpos=253}
player3 = getThingfromPos(player3pos)
player4pos = {x=1054, y=735, z=7, stackpos=253}
player4 = getThingfromPos(player4pos)
if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
player1level = getPlayerLevel(player1.uid)
player2level = getPlayerLevel(player2.uid)
player3level = getPlayerLevel(player3.uid)
player4level = getPlayerLevel(player4.uid)
questlevel = 100
if player1level >= questlevel and player2level >= questlevel and player3level >= questlevel and player4level >= questlevel then
queststatus1 = getPlayerStorageValue(player1.uid,10020)
queststatus2 = getPlayerStorageValue(player2.uid,10020)
queststatus3 = getPlayerStorageValue(player3.uid,10020)
queststatus4 = getPlayerStorageValue(player4.uid,10020)
if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
demon1pos = {x=1058, y=735, z=8}
demon2pos = {x=1059, y=735, z=8}
demon3pos = {x=1055, y=733, z=8}
demon4pos = {x=1057, y=733, z=8}
demon5pos = {x=1054, y=737, z=8}
demon6pos = {x=1056, y=737, z=8}
doSummonCreature("Demon", demon1pos)
doSummonCreature("Demon", demon2pos)
doSummonCreature("Demon", demon3pos)
doSummonCreature("Demon", demon4pos)
doSummonCreature("Demon", demon5pos)
doSummonCreature("Demon", demon6pos)
nplayer1pos = {x=1057, y=735, z=8}
nplayer2pos = {x=1056, y=735, z=8}
nplayer3pos = {x=1055, y=735, z=8}
nplayer4pos = {x=1054, y=735, z=8}
doSendMagicEffect(player1pos,2)
doSendMagicEffect(player2pos,2)
doSendMagicEffect(player3pos,2)
doSendMagicEffect(player4pos,2)
doTeleportThing(player1.uid,nplayer1pos)
doTeleportThing(player2.uid,nplayer2pos)
doTeleportThing(player3.uid,nplayer3pos)
doTeleportThing(player4.uid,nplayer4pos)
doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(nplayer2pos,10)
doSendMagicEffect(nplayer3pos,10)
doSendMagicEffect(nplayer4pos,10)
doTransformItem(item.uid,item.itemid+1)
else
doPlayerSendCancel(cid,"Some one in your team has already done this quest.")
end
else
doPlayerSendCancel(cid,"All players must be "..questlevel.." to do this quest.")
end
else
doPlayerSendCancel(cid,"You need 4 players for this quest.")
end
elseif item.itemid == 1946 then
if getPlayerAccess(cid) == 3 then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
end
end
return 1
end
PS. You will not help only me, but all the players that are playing my ot will be happy cuz annihi will work
