Ok my annih script is bugged cant use the switch. all i want is when playerA is on the posisons they teleports to playerB posisons. ( i am using ItemID:1945 as a switch)
i will give rep+ for the one thats helps me aut i am not a good att chaning scripts so thanks for help.
Regards Brask
if it is another script that dosent summon deamons (just teleporting players when using switch) i can take that script insted.
i will give rep+ for the one thats helps me aut i am not a good att chaning scripts so thanks for help.
PHP:
local playerA={
{x=1106, y=1095, z=15},
{x=1106, y=1094, z=15},
{x=1106, y=1093, z=15},
{x=1106, y=1092, z=15}
}
local playerB={
{x=1166, y=1080, z=15},
{x=1165, y=1080, z=15},
{x=1164, y=1080, z=15},
{x=1163, y=1080, z=15}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local t = {}
if item.itemid == 1945 then
for i = 1, 4 do
t[i]=getTopCreature(playerA[i]).uid
if t[i] == 0 or not isPlayer(t[i]) then
return doPlayerSendCancel(cid, 'You need 4 players for this quest.')
elseif getPlayerLevel(t[i]) < 100 then
return doPlayerSendCancel(cid, 'All players need to have level 100 or higher.')
end
end
for i = 1, 6 do
doCreateMonster('Demon', summon[i])
end
for i=1, 4 do
doTeleportThing(t[i], playerB[i])
doSendMagicEffect(playerA[i], CONST_ME_POFF)
doSendMagicEffect(playerB[i], CONST_ME_ENERGYAREA)
end
else
for x = from.x, to.x do
for y = from.y, to.y do
local v = getTopCreature({x=x, y=y, z=from.z}).uid
if v ~= 0 then
if isPlayer(v) then
return doPlayerSendCancel(cid, 'There is already a team in the quest room.')
elseif isMonster(v) then
table.insert(t, v)
end
end
end
end
for i = 1, #t do
doRemoveCreature(t[i])
end
end
return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
Regards Brask
if it is another script that dosent summon deamons (just teleporting players when using switch) i can take that script insted.
Last edited by a moderator: