Skrypty & Kody Problem anihilator dzwignia

Status
Zamknięty.

bernio96

Active User
Zarejestrowany
Dołączył
Marzec 1, 2014
Posty
53
Liczba reakcji
0
Witam mam problem ze skryptem na dzwiginie w anihilatorze wygl?daa on tak
[lua]local playerr1 = {x=1257, y=947, z=9, stackpos=253}
local playerr2 = {x=1260, y=947, z=9, stackpos=253} <--- These are from posision
local playerr3 = {x=1257, y=949, z=9, stackpos=253}
local playerr4 = {x=1260, y=949, z=9, stackpos=253}

local posisionn1 = {x=1038, y=1084, z=10} <--- These are to posision XXX
local posisionn2 = {x=1040, y=1086, z=10}
local posisionn3 = {x=1038, y=1084, z=10}
local posisionn4 = {x=1040, y=1086, z=10}

Local uniqueidoflever = 8002 <---- lever uniqueID

function onUse(cid, item, frompos, item2, topos)

if item.uid == uniqueidoflever and item.itemid == 1945 then
player1pos = playerr1
player1 = getThingfromPos(player1pos)

player2pos = playerr2
player2 = getThingfromPos(player2pos)

player3pos = playerr3
player3 = getThingfromPos(player3pos)

player4pos = playerr4
player4 = getThingfromPos(player4pos)


if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
queststatus1 = getPlayerStorageValue(player1.uid,uniqueidoflever)
queststatus2 = getPlayerStorageValue(player2.uid,uniqueidoflever)
queststatus3 = getPlayerStorageValue(player3.uid,uniqueidoflever)
queststatus4 = getPlayerStorageValue(player4.uid,uniqueidoflever)

if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
nplayer1pos = posisionn1
nplayer2pos = posisionn2
nplayer3pos = posisionn3
nplayer4pos = posisionn4

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,nplayer3pos)

doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(nplayer2pos,10)
doSendMagicEffect(nplayer3pos,10)
doSendMagicEffect(nplayer4pos,10)

doTransformItem(item.uid,item.itemid+1)
else
doPlayerSendCancel(cid,"Somebody in your team has already done this quest.")
end
else
doPlayerSendCancel(cid,"You need three players for this quest.")
end

elseif item.uid == uniqueidoflever and item.itemid == 1946 then
if getPlayerAccess(cid) > 0 then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
else
return 0
end

return 1
end[/lua]
a b??d tak:
77mkwg.jpg

Z g?ry dzi?kuj? za pomoc i dam oczywi?cie reputa :D
 
Odp: Problem anihilator dzwignia

Zobacz teraz.

Kod:
local playerr1 = {x=1257, y=947, z=9, stackpos=253}
local playerr2 = {x=1260, y=947, z=9, stackpos=253}     --- These are from posision
local playerr3 = {x=1257, y=949, z=9, stackpos=253}
local playerr4 = {x=1260, y=949, z=9, stackpos=253}
 
local posisionn1 = {x=1038, y=1084, z=10}    --- These are to posision XXX
local posisionn2 = {x=1040, y=1086, z=10}
local posisionn3 = {x=1038, y=1084, z=10}
local posisionn4 = {x=1040, y=1086, z=10}
 
Local uniqueidoflever = 8002                        ---- lever uniqueID
 
function onUse(cid, item, frompos, item2, topos)
 
   	if item.uid == uniqueidoflever and item.itemid == 1945 then
		player1pos = playerr1		
		player1 = getThingfromPos(player1pos)
 
		player2pos = playerr2
		player2 = getThingfromPos(player2pos)
 
		player3pos = playerr3
		player3 = getThingfromPos(player3pos)
 
		player4pos = playerr4
		player4 = getThingfromPos(player4pos)
 
 
		if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
			queststatus1 = getPlayerStorageValue(player1.uid,uniqueidoflever)
			queststatus2 = getPlayerStorageValue(player2.uid,uniqueidoflever)
			queststatus3 = getPlayerStorageValue(player3.uid,uniqueidoflever)
			queststatus4 = getPlayerStorageValue(player4.uid,uniqueidoflever)
 
			if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
				nplayer1pos = posisionn1
				nplayer2pos = posisionn2
				nplayer3pos = posisionn3
				nplayer4pos = posisionn4
 
				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,nplayer3pos)
 
				doSendMagicEffect(nplayer1pos,10)
				doSendMagicEffect(nplayer2pos,10)
				doSendMagicEffect(nplayer3pos,10)
				doSendMagicEffect(nplayer4pos,10)
 
				doTransformItem(item.uid,item.itemid+1)
			else
				doPlayerSendCancel(cid,"Somebody in your team has already done this quest.")
			end
		else
			doPlayerSendCancel(cid,"You need three players for this quest.")
		end
 
	elseif item.uid == uniqueidoflever and item.itemid == 1946 then
		if getPlayerAccess(cid) > 0 then
			doTransformItem(item.uid,item.itemid-1)
		else
			doPlayerSendCancel(cid,"Sorry, not possible.")
		end
	else
		return 0
	end
 
	return 1
end
 
Odp: Problem anihilator dzwignia

Kod:
local playerr1 = {x=1257, y=947, z=9, stackpos=253}
local playerr2 = {x=1260, y=947, z=9, stackpos=253}     --- These are from posision
local playerr3 = {x=1257, y=949, z=9, stackpos=253}
local playerr4 = {x=1260, y=949, z=9, stackpos=253}
 
local posisionn1 = {x=1038, y=1084, z=10}    --- These are to posision XXX
local posisionn2 = {x=1040, y=1086, z=10}
local posisionn3 = {x=1038, y=1084, z=10}
local posisionn4 = {x=1040, y=1086, z=10}
 
local uniqueidoflever = 8002                        ---- lever uniqueID
 
function onUse(cid, item, frompos, item2, topos)
 
   	if item.uid == uniqueidoflever and item.itemid == 1945 then
		player1pos = playerr1		
		player1 = getThingFromPos(player1pos)
 
		player2pos = playerr2
		player2 = getThingFromPos(player2pos)
 
		player3pos = playerr3
		player3 = getThingFromPos(player3pos)
 
		player4pos = playerr4
		player4 = getThingFromPos(player4pos)
 
 
		if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
			queststatus1 = getPlayerStorageValue(player1.uid,uniqueidoflever)
			queststatus2 = getPlayerStorageValue(player2.uid,uniqueidoflever)
			queststatus3 = getPlayerStorageValue(player3.uid,uniqueidoflever)
			queststatus4 = getPlayerStorageValue(player4.uid,uniqueidoflever)
 
			if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
				nplayer1pos = posisionn1
				nplayer2pos = posisionn2
				nplayer3pos = posisionn3
				nplayer4pos = posisionn4
 
				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,nplayer3pos)
 
				doSendMagicEffect(nplayer1pos,10)
				doSendMagicEffect(nplayer2pos,10)
				doSendMagicEffect(nplayer3pos,10)
				doSendMagicEffect(nplayer4pos,10)
 
				doTransformItem(item.uid,item.itemid+1)
			else
				doPlayerSendCancel(cid,"Somebody in your team has already done this quest.")
			end
		else
			doPlayerSendCancel(cid,"You need three players for this quest.")
		end
 
	elseif item.uid == uniqueidoflever and item.itemid == 1946 then
		if getPlayerAccess(cid) > 0 then
			doTransformItem(item.uid,item.itemid-1)
		else
			doPlayerSendCancel(cid,"Sorry, not possible.")
		end
	else
		return 0
	end
 
	return 1
end
 
Odp: Problem anihilator dzwignia

Kod:
local playerr1 = {x=1257, y=947, z=9, stackpos=253}
local playerr2 = {x=1260, y=947, z=9, stackpos=253}     --- These are from posision
local playerr3 = {x=1257, y=949, z=9, stackpos=253}
local playerr4 = {x=1260, y=949, z=9, stackpos=253}
 
local posisionn1 = {x=1038, y=1084, z=10}    --- These are to posision XXX
local posisionn2 = {x=1040, y=1086, z=10}
local posisionn3 = {x=1038, y=1084, z=10}
local posisionn4 = {x=1040, y=1086, z=10}
 
local uniqueidoflever = 8002                        ---- lever uniqueID
 
function onUse(cid, item, frompos, item2, topos)
 
   	if item.uid == uniqueidoflever and item.itemid == 1945 then
		player1pos = playerr1		
		player1 = getThingFromPos(player1pos)
 
		player2pos = playerr2
		player2 = getThingFromPos(player2pos)
 
		player3pos = playerr3
		player3 = getThingFromPos(player3pos)
 
		player4pos = playerr4
		player4 = getThingFromPos(player4pos)
 
 
		if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
			queststatus1 = getPlayerStorageValue(player1.uid,uniqueidoflever)
			queststatus2 = getPlayerStorageValue(player2.uid,uniqueidoflever)
			queststatus3 = getPlayerStorageValue(player3.uid,uniqueidoflever)
			queststatus4 = getPlayerStorageValue(player4.uid,uniqueidoflever)
 
			if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
				nplayer1pos = posisionn1
				nplayer2pos = posisionn2
				nplayer3pos = posisionn3
				nplayer4pos = posisionn4
 
				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,nplayer3pos)
 
				doSendMagicEffect(nplayer1pos,10)
				doSendMagicEffect(nplayer2pos,10)
				doSendMagicEffect(nplayer3pos,10)
				doSendMagicEffect(nplayer4pos,10)
 
				doTransformItem(item.uid,item.itemid+1)
			else
				doPlayerSendCancel(cid,"Somebody in your team has already done this quest.")
			end
		else
			doPlayerSendCancel(cid,"You need three players for this quest.")
		end
 
	elseif item.uid == uniqueidoflever and item.itemid == 1946 then
		if getPlayerAccess(cid) > 0 then
			doTransformItem(item.uid,item.itemid-1)
		else
			doPlayerSendCancel(cid,"Sorry, not possible.")
		end
	else
		return 0
	end
 
	return 1
end

Dzi?ki dzia?a wszystko <3 repucik polecia?
 
Status
Zamknięty.
Back
Do góry