klekSu
Stroke my ego.
- Joined
- Nov 4, 2008
- Messages
- 1,285
- Reaction score
- 18
Could anyone help with this? On 0.3.3 everything is ok, but when i update to 0.3.4 it keep saying i need 4 ppl to do the quest.
Code:
local unique_id = 10019
local anihi = {
monsters = "Demon",
anihi_storage = 10020,
level = 100
}
local monsters_pos = {
{x=1400, y=292, z=12},
{x=1399, y=292, z=12},
{x=1395, y=290, z=12},
{x=1397, y=290, z=12},
{x=1396, y=294, z=12},
{x=1398, y=294, z=12}
}
local players_pos = {
{x=1379, y=292, z=12, stackpos=253},
{x=1378, y=292, z=12, stackpos=253},
{x=1377, y=292, z=12, stackpos=253},
{x=1376, y=292, z=12, stackpos=253}
}
local n_pos = {
{x=1398, y=292, z=12},
{x=1397, y=292, z=12},
{x=1396, y=292, z=12},
{x=1395, y=292, z=12}
}
function doSummonCreatures(creature, spawns)
for _, v in pairs(spawns) do
doSummonCreature(creature, v)
end
end
function onUse(cid, item, frompos, item2, topos)
local foundPlayers = {}
local ALL_READY = FALSE
if item.uid == unique_id and item.itemid == 1945 then
for i = 1, #players_pos do
get_player = getThingfromPos(players_pos[i])
if get_player.itemid > 0 and isPlayer(get_player.uid) == 1 then
table.insert(foundPlayers, get_player.uid)
end
end
if #players_pos == #foundPlayers then
for q = 1, #foundPlayers do
if getPlayerLevel(foundPlayers[q]) >= anihi.level then
if getPlayerStorageValue(foundPlayers[q],anihi.anihi_storage) == -1 then
ALL_READY = TRUE
else
doPlayerSendCancel(cid,"Some one in your team has already done this quest.")
end
else
doPlayerSendCancel(cid,"All players must be " .. anihi.level .. " to do this quest.")
end
end
else
doPlayerSendCancel(cid,"You need " .. #players_pos .. " players for this quest.")
end
if ALL_READY == TRUE then
for w = 1, #foundPlayers do
doSendMagicEffect(players_pos[w],2)
doTeleportThing(foundPlayers[w], n_pos[w])
doSendMagicEffect(n_pos[w],10)
end
doSummonCreatures(anihi.monsters, monsters_pos)
doTransformItem(item.uid,item.itemid+1)
end
elseif item.uid == unique_id and item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
end
return TRUE
end
--By Nahruto