• 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!

can some one make me a script please

Ralfegor

New Member
Joined
Apr 6, 2008
Messages
297
Reaction score
1
need a action script like anihilator script but with 3 people and when use a thing with action id 1018 here is a pic

asi.jpg


the blue circle is the item with action id 1018
i tried to make it but always was teleporting was ignoring that i need 3 people in the right floor to teleport if there not 3 people in the right floor then send cancel Sorry you need 3 people for this.

tnx :)
 
Lua:
function onUse(cid, item, frompos, item2, topos)
	if item.uid == 1018 then
		player1pos = {x=0000, y=0000, z=0, stackpos=253}
		player1 = getThingfromPos(player1pos)

		player2pos = {x=0000, y=0000, z=0, stackpos=253}
		player2 = getThingfromPos(player2pos)

		player3pos = {x=0000, y=0000, z=0, stackpos=253}
		player3 = getThingfromPos(player3pos)

	if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 then

			player1level = getPlayerLevel(player1.uid)
			player2level = getPlayerLevel(player2.uid)
			player3level = getPlayerLevel(player3.uid)
		questlevel = 100
	if player1level >= questlevel and player2level >= questlevel and player3level >= questlevel then

				queststatus1 = getPlayerStorageValue(player1.uid,1018)
				queststatus2 = getPlayerStorageValue(player2.uid,1018)
				queststatus3 = getPlayerStorageValue(player3.uid,1018)
	if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 then

				nplayer1pos = {x=0000, y=0000, z=0}
				nplayer2pos = {x=0000, y=0000, z=0}
				nplayer3pos = {x=0000, y=0000, z=0}

				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)

		else
			doPlayerSendCancel(cid,"Sorry, not possible.")
		end
	else
		doPlayerSendCancel(cid,"Sorry, not possible.")
end
	else
	doPlayerSendCancel(cid,"Sorry, not possible.")
end

	return TRUE
end
NOT TESTED
 
its not a quest can you remove the lines of quest and storage value? i want players do it always and
Code:
        if item.uid == 1018 then

its not the item id 1018 is action id 1018 works that way too?
 
just set UniqueID on that rock to 1018

Lua:
function onUse(cid, item, frompos, item2, topos)
		player1pos = {x=0000, y=0000, z=0, stackpos=253} -- player position
		player1 = getThingfromPos(player1pos)

		player2pos = {x=0000, y=0000, z=0, stackpos=253} -- player position
		player2 = getThingfromPos(player2pos)

		player3pos = {x=0000, y=0000, z=0, stackpos=253} -- player position
		player3 = getThingfromPos(player3pos)

		player1level = getPlayerLevel(player1.uid)
		player2level = getPlayerLevel(player2.uid)
		player3level = getPlayerLevel(player3.uid)

		questlevel = 100 --level needed to tp works

	if item.uid == 1018 then
		if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 then
			if player1level >= questlevel and player2level >= questlevel and player3level >= questlevel then

				nplayer1pos = {x=0000, y=0000, z=0} -- new player position
				nplayer2pos = {x=0000, y=0000, z=0} -- new player position
				nplayer3pos = {x=0000, y=0000, z=0} -- new player position

				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)

				else
					doPlayerSendCancel(cid,"Sorry, not possible.")
				end
			else
				doPlayerSendCancel(cid,"Sorry, not possible.")
			end
	else
		doPlayerSendCancel(cid,"Sorry, not possible.")
	end

	return TRUE
end
in actions.xml add
Lua:
<action uniqueid="1018" event="script" value="SOMETHING.lua"/>
 
nononono
Lua:
player1pos = {x=0000, y=0000, z=0, stackpos=253} -- player position

player2pos = {x=0000, y=0000, z=0, stackpos=253} -- player position

player3pos = {x=0000, y=0000, z=0, stackpos=253} -- player position
thats the position where 3 players should stay


Lua:
nplayer1pos = {x=0000, y=0000, z=0} -- new player position
nplayer2pos = {x=0000, y=0000, z=0} -- new player position
nplayer3pos = {x=0000, y=0000, z=0} -- new player position
thats new position where they will be teleported
 
Back
Top