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

I need those scripts!

Kojiiro

Nobody cares. Do yourself.
Joined
May 10, 2010
Messages
534
Reaction score
9
Location
Brazil
= I need a script to pull the lever only teleport players that are in the area of teleportation, as shown in the image below.


= Need a script to kill this monster that he immediately summon other

= I need a script to kill such a beast that the player won a StogareID

Would someone help me in finding these scripts?

Kojiiro hugs :wub:
 
[1]

LUA:
local frompos = {x=,y=,z=}    ---the startsqm
local topos = {x=,y=,z=}        --the end sqm
local tpplace = {x=,y=,z=}     -- place where the players will be tped
function onUse(cid, item, fromPosition, itemEx, toPosition)
	for _,tid in ipairs(getPlayersOnline()) do
		if isInRange(getCreaturePosition(tid), frompos, topos)
			doTeleportThing(tid,tpplace,false)
			doSendMagicEffect(tpplace,10)
		end
	end
	doPlayerSendTextMessage(cid,19,"Players were teleported.")
return doTransforeItem(item.uid, ( item.itemid == 1945 and 1946 or 1945 ) )
end
 
Last edited:
This one would make less iterations if there's more players online:
LUA:
local from = {x=,y=,z=} ---the start sqm
local to = {x=,y=,z=} --the end sqm
local destination = {x=,y=,z=} -- place where the players will be tped

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1946 then
		return doTransformItem(item.uid, 1945)
	end

	for x=from.x, to.x do
		for y=from.y, to.y do
			local p = getTopCreature({x=x, y=y, z=from.z}).uid
			if isPlayer(p) then
				doTeleportThing(p, destination)
			end
		end
	end

	doSendMagicEffect(destination, CONST_ME_TELEPORT)
	return doTransformItem(item.uid, 1946)
end
 
can't happen, unless he has walkstack (war system or protection level in tfs 0.4) :p

or simply change doTeleportThing to doRelocate :p
 
Back
Top