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

Pacc Bridge TFS 0.3.6

merfus

Member
Joined
Dec 27, 2011
Messages
214
Reaction score
5
Location
Poland
Hello every script don't work for me can any give me good script for pacc bridge for TFS 0.3.6pl1?
Or maybe this script is in engine? if is, where?
 
data/movements/scripts/script.lua

LUA:
function onStepIn(cid, item, fromPosition, toPosition)
	if not isPremium(cid) then
		doTeleportThing(cid, {x = 100, y = 100, z = 7}, true)
		doCreatureSay(cid, "Only Premium players are allowed to pass!", TALKTYPE_MONSTER)
	end
end
 
data/movements/scripts/script.lua

LUA:
function onStepIn(cid, item, fromPosition, toPosition)
	if not isPremium(cid) then
		doTeleportThing(cid, {x = 100, y = 100, z = 7}, true)
		doCreatureSay(cid, "Only Premium players are allowed to pass!", TALKTYPE_MONSTER)
	end
end

It will probably be more than just one tile, so you need multiple position to get teleported back to if you don't have premium, right? Wouldn't it be smarter to teleport the player to lastPos? I'm a newb in lua ...
 
It will probably be more than just one tile, so you need multiple position to get teleported back to if you don't have premium, right? Wouldn't it be smarter to teleport the player to lastPos? I'm a newb in lua ...

So, use this:

doTeleportThing(cid, fromPosition)
 
It will probably be more than just one tile, so you need multiple position to get teleported back to if you don't have premium, right? Wouldn't it be smarter to teleport the player to lastPos? I'm a newb in lua ...

You can set the same action id on multiple tiles, and no, I would not prefer to teleport the player to their 'lastPosition', though you could.

Why wouldn't I do that? Mainly because, if someone would perhaps lose Premium on the PACC side, it would keep them trapped instead of teleporting them out.

Here's another version, if you would prefer to have separate positions: (Tested and Working)

LUA:
local t = {
	[1220] = {x = 100, y = 100, z = 7},
	[1221] = {x = 100, y = 100, z = 7}
}

function onStepIn(cid, item, fromPosition, toPosition)
	local k = t[item.actionid]
	if(k and not isPremium(cid)) then
		doTeleportThing(cid, k, false)
		doSendMagicEffect(k, CONST_ME_TELEPORT)
		doCreatureSay(cid, "Only premium players may pass!", TALKTYPE_MONSTER)
	end
end
 
Back
Top