• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

annihilator script

Tsson

New Member
Joined
Nov 4, 2007
Messages
76
Reaction score
0
I got a bug while take the rewards when a plyer use the first chest(the demon armor chest) "Sorry it's not possible" but you can use the 3 other chests as normal. now the important thing if you took etc Magic sword then you can use the demon armor chest and take 1000000 demon armors :( , i would be happy if someone could take a look at the script

Note - The switch wont change to 1946 becouse i want player be able to make annih more then once/restart - homemade edited :p

-- Annihilator script v2.1 by GriZzm0.
--
-- Variables used:
--
-- 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:
--
-- 4000 = The switch.
-- 4001 = Demon Armor chest.
-- 4002 = Magic Sword chest.
-- 4003 = Stonecutter Axe chest.
-- 4004 = Present chest.
--

function onUse(cid, item, frompos, item2, topos)
if item.uid == 4000 then
if item.itemid == 1945 then

player1pos = {x=878, y=1160, z=7, stackpos=253}
player1 = getThingfromPos(player1pos)

player2pos = {x=877, y=1160, z=7, stackpos=253}
player2 = getThingfromPos(player2pos)

player3pos = {x=876, y=1160, z=7, stackpos=253}
player3 = getThingfromPos(player3pos)

player4pos = {x=875, y=1160, 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





demon1pos = {x=899, y=1162, z=7}
demon2pos = {x=900, y=1162, z=7}
demon3pos = {x=897, y=1160, z=7}
demon4pos = {x=895, y=1160, z=7}
demon5pos = {x=896, y=1164, z=7}
demon6pos = {x=898, y=1164, z=7}

doSummonCreature("Deamon", demon1pos)
doSummonCreature("Deamon", demon2pos)
doSummonCreature("Deamon", demon3pos)
doSummonCreature("Deamon", demon4pos)
doSummonCreature("Deamon", demon5pos)
doSummonCreature("Deamon", demon6pos)

nplayer1pos = {x=898, y=1162, z=7}
nplayer2pos = {x=897, y=1162, z=7}
nplayer3pos = {x=896, y=1162, z=7}
nplayer4pos = {x=895, y=1162, z=7}

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+0)

else
doPlayerSendCancel(cid,"You need four player for this quest!")
end
else
doPlayerSendCancel(cid,"You need four player for this quest!")
end
else
doPlayerSendCancel(cid,"You need four player for this quest!")
end
elseif item.itemid == 1946 then
if getPlayerAccess(cid) == 1 then
doTransformItem(item.uid,item.itemid-1)

end
elseif item.uid == 4001 then


if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a demon armor.")
doPlayerAddItem(cid,2494,1)
setPlayerStorageValue(cid,4000,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 4002 then

queststatus = getPlayerStorageValue(cid,4000)

if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a magic sword.")
doPlayerAddItem(cid,2400,1)
setPlayerStorageValue(cid,4000,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 4003 then

queststatus = getPlayerStorageValue(cid,4000)

if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a stonecutter axe.")
doPlayerAddItem(cid,2431,1)
setPlayerStorageValue(cid,4000,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 4004 then

queststatus = getPlayerStorageValue(cid,4000)

if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a spellbook of dark mysteries.")
doPlayerAddItem(cid,8918,1)
setPlayerStorageValue(cid,4000,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
end
return 1
end

Thanks for help =)
 
Back
Top