• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

script help please..

GOD Wille

Excellent OT User
Joined
Jan 11, 2010
Messages
2,826
Solutions
2
Reaction score
815
Location
Sweden
can any1 fix me a simple script on tfs 0.3.6 like a annih but 5 player tiles and just with the lever teleport..


example: when push lever
player1 start: x:,y:,z: teleports to: x:,y:,z:
player2 start: x:,y:,z: teleports to: x:,y:,z:
player3 start: x:,y:,z: teleports to: x:,y:,z:
player4 start: x:,y:,z: teleports to: x:,y:,z:
player5 start: x:,y:,z: teleports to: x:,y:,z:



Any1 =) rep++
 
yes, when you push the lever then the 5 players at the positions will come to 5 new positions..

short: when you push the lever the 5 guys teleports to 5 new places like
 
No errors in console on this script, but i'm not sure if it works.

/actions/scripts/5players.lua
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
player1pos = {x=429, y=453, z=7, stackpos=253}
player2pos = {x=428, y=453, z=7, stackpos=253}
player3pos = {x=427, y=453, z=7, stackpos=253}
player4pos = {x=426, y=353, z=7, stackpos=253}
player5pos = {x=425, y=353, z=7, stackpos=253}
player1 = getThingfromPos(player1pos)
player2 = getThingfromPos(player2pos)
player3 = getThingfromPos(player3pos)
player4 = getThingfromPos(player4pos)
player5 = getThingfromPos(player5pos)
nplayer1pos = {x=447, y=429, z=7}
nplayer2pos = {x=446, y=429, z=7}
nplayer3pos = {x=445, y=429, z=7}
nplayer4pos = {x=444, y=429, z=7}
nplayer5pos = {x=443, y=429, z=7}
if item.uid == 5555 and item.itemid == 1945 then
if player1.itemid == TRUE and player2.itemid == TRUE and player3.itemid == TRUE and player4.itemid == TRUE and player5.itemid == TRUE then
if isPlayer(player1.uid) and isPlayer(player2.uid) and isPlayer(player3.uid) and isPlayer(player4.uid) and isPlayer(player5.uid) then
doTeleportThing(player1.uid,nplayer1pos)
doTeleportThing(player2.uid,nplayer2pos)
doTeleportThing(player3.uid,nplayer3pos)
doTeleportThing(player4.uid,nplayer4pos)
doTeleportThing(player5.uid,nplayer5pos)
doSendMagicEffect(player1pos,2)
doSendMagicEffect(player2pos,2)
doSendMagicEffect(player3pos,2)
doSendMagicEffect(player4pos,2)
doSendMagicEffect(player5pos,2)
doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(nplayer2pos,10)
doSendMagicEffect(nplayer3pos,10)
doSendMagicEffect(nplayer4pos,10)
doSendMagicEffect(nplayer5pos,10)
doTransformItem(item.uid,item.itemid+1)
else
doPlayerSendTextMessage(cid,22,"You need five player for this quest.")
end
else
doPlayerSendCancel(cid,"You need five player for this quest.")
end
elseif item.uid == 5555 and item.itemid == 1946 then
if getPlayerAccess(cid) > 1 then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible")
end
end
return TRUE
end
/actions/actions.xml
Lua:
	<action uniqueid="5555" script="5players.lua"/>
And in map editor, on lever put unique id 5555
 
Like this but not 6 tiles just 5 tiles
plshelp.jpg


Different positions
thanks strasxni gonna test
 
Back
Top