aioriusox
New Member
- Joined
- Apr 8, 2009
- Messages
- 70
- Reaction score
- 0
Help, my script checks five players at each position and checks the call in accordance with the board that sits behind the story, players have to be in orden right and pull the lever like a anihilation lever, and each player teleports to a place different, but the script keeps on saying that players are not ordered, and I have done several tests and not worked can someone help me?
here the script:
here the script:
PHP:
function onUse(cid, item, frompos, item2, topos)
-- annihilator
if item.uid == 7201 then
if item.itemid == 1945 then
player1pos = {x=941, y=110, z=8, stackpos=253}
player1 = getThingfromPos(player1pos)
player2pos = {x=943, y=109, z=8, stackpos=253}
player2 = getThingfromPos(player2pos)
player3pos = {x=944, y=110, z=8, stackpos=253}
player3 = getThingfromPos(player3pos)
player4pos = {x=945, y=109, z=8, stackpos=253}
player4 = getThingfromPos(player4pos)
player5pos = {x=947, y=110, z=8, stackpos=253}
player5 = getThingfromPos(player5pos)
if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 and player5.itemid > 0 then
player1voc = getPlayerVocation(player1.uid)
player2voc = getPlayerVocation(player2.uid)
player3voc = getPlayerVocation(player3.uid)
player4voc = getPlayerVocation(player4.uid)
player5voc = getPlayerVocation(player5.uid)
if player1voc == 8 and player2voc == 6 and player3voc == 13 and player4voc == 5 and player5voc == 7 then
queststatus1 = getPlayerStorageValue(player1.uid,7199)
queststatus2 = getPlayerStorageValue(player2.uid,7199)
queststatus3 = getPlayerStorageValue(player3.uid,7199)
queststatus4 = getPlayerStorageValue(player4.uid,7199)
queststatus5 = getPlayerStorageValue(player4.uid,7199)
if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 and queststatus5 == -1 then
nplayer1pos = {x=979, y=397, z=8}
nplayer2pos = {x=979, y=398, z=8}
nplayer3pos = {x=979, y=399, z=8}
nplayer4pos = {x=979, y=400, z=8}
nplayer5pos = {x=979, y=401, z=8}
doSendMagicEffect(player1pos,2)
doSendMagicEffect(player2pos,2)
doSendMagicEffect(player3pos,2)
doSendMagicEffect(player4pos,2)
doSendMagicEffect(player5pos,2)
doTeleportThing(player1.uid,nplayer1pos)
doTeleportThing(player2.uid,nplayer2pos)
doTeleportThing(player3.uid,nplayer3pos)
doTeleportThing(player4.uid,nplayer4pos)
doTeleportThing(player5.uid,nplayer5pos)
doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(nplayer2pos,10)
doSendMagicEffect(nplayer3pos,10)
doSendMagicEffect(nplayer4pos,10)
doSendMagicEffect(nplayer5pos,10)
doTransformItem(item.uid,item.itemid+1)
else
doPlayerSendCancel(cid,"Someone already finished the quest.")
end
else
doPlayerSendCancel(cid,"Players are not ordered in their respective vocations.")
end
else
doPlayerSendCancel(cid,"Need 5 Players.")
end
elseif item.itemid == 1946 then
if getPlayerAccess(cid) > 0 then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Impossible.")
end
end
end
return TRUE
end