Serginov
Onkonkoronkonk
Why does not my script work?
Code:
local playerPos1 = {x=33225, y=31671, z=13}
local playerPos2 = {x=33224, y=31671, z=13}
local playerPos3 = {x=33223, y=31671, z=13}
local playerPos4 = {x=33222, y=31671, z=13}
local getPlayer1 = getCreaturePosition(playerPos1)
local getPlayer2 = getCreaturePosition(playerPos2)
local getPlayer3 = getCreaturePosition(playerPos3)
local getPlayer4 = getCreaturePosition(playerPos4)
local getL1 = getPlayerLevel(cid)
local getL2 = getPlayerLevel(cid)
local getL3 = getPlayerLevel(cid)
local getL4 = getPlayerLevel(cid)
local newPlayerPos1 = {x=33222, y=31659, z=13}
local newPlayerPos2 = {x=33221, y=31659, z=13}
local newPlayerPos3 = {x=33220, y=31659, z=13}
local newPlayerPos4 = {x=33219, y=31659, z=13}
local demonPos1 = {x=33224, y=31659, z=13}
local demonPos2 = {x=33223, y=31659, z=13}
local demonPos3 = {x=33221, y=31657, z=13}
local demonPos4 = {x=33219, y=31657, z=13}
local demonPos5 = {x=33220, y=31661, z=13}
local demonPos6 = {x=33222, y=31661, z=13}
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 1945 and item.uid == 5000 then
if getPlayer1 == 1 and getPlayer2 == 1 and getPlayer3 == 1 and getPlayer4 == 1 then
if getL1 >= 100 and getL2 >= 100 and getL3 >= 100 and getL4 >= 100 then
doTeleportThing(playerPos1.uid, newPlayerPos1, TRUE)
doTeleportThing(playerPos2.uid, newPlayerPos2, TRUE)
doTeleportThing(playerPos3.uid, newPlayerPos3, TRUE)
doTeleportThing(playerPos4.uid, newPlayerPos4, TRUE)
doSummonCreature("Demon",demonPos1)
doSummonCreature("Demon",demonPos2)
doSummonCreature("Demon",demonPos3)
doSummonCreature("Demon",demonPos4)
doSummonCreature("Demon",demonPos5)
doSummonCreature("Demon",demonPos6)
else
doPlayerSendCancel(cid, "You need 4 players for this quest.")
end
return TRUE
end
elseif item.itemid == 1946 then
doPlayerSendCancel(cid, "Sorry, not possible.")
end
return TRUE
end