The ShincZ
Lua Scripter
Hello Otlanders!
This is my first release of a script.
Well. Goto Data\actions\action.xml
Paste This.
The first XXX is what unique id the lever that you pull to get teleported will get.
The second XXX is what the script in scripts folder is called.
Goto Data\Actions\Scripts\
and copy a file with, ".lua" paste this.
It works for me on my server, it's messy, but it works.
Feel free to comment and give some rep++ If it's worth it...
Regards ShincZ
This is my first release of a script.
Well. Goto Data\actions\action.xml
Paste This.
<action uniqueid="XXX" script="XXX.lua"/>
The first XXX is what unique id the lever that you pull to get teleported will get.
The second XXX is what the script in scripts folder is called.
Goto Data\Actions\Scripts\
and copy a file with, ".lua" paste this.
Code:
local playerr1 = {x=871, y=963, z=7, stackpos=253}
local playerr2 = {x=xxx, y=xxx, z=x, stackpos=253} <--- These are from posision
local playerr3 = {x=xxx, y=xxx, z=x, stackpos=253}
local posisionn1 = {x=xxx, y=xxx, z=x} <--- These are to posision XXX
local posisionn2 = {x=xxx, y=xxx, z=x}
local posisionn3 = {x=xxx, y=xxx, z=x}
Local uniqueidoflever = XXX <---- 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)
if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 then
queststatus1 = getPlayerStorageValue(player1.uid,uniqueidoflever)
queststatus2 = getPlayerStorageValue(player2.uid,uniqueidoflever)
queststatus3 = getPlayerStorageValue(player3.uid,uniqueidoflever)
if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 then
nplayer1pos = posisionn1
nplayer2pos = posisionn2
nplayer3pos = posisionn3
doSendMagicEffect(player1pos,2)
doSendMagicEffect(player2pos,2)
doSendMagicEffect(player3pos,2)
doTeleportThing(player1.uid,nplayer1pos)
doTeleportThing(player2.uid,nplayer2pos)
doTeleportThing(player3.uid,nplayer3pos)
doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(nplayer2pos,10)
doSendMagicEffect(nplayer3pos,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
It works for me on my server, it's messy, but it works.
Feel free to comment and give some rep++ If it's worth it...
Regards ShincZ
Last edited: