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

Premium Door tfs 1.2

dervin13

Active Member
Joined
Apr 26, 2008
Messages
459
Solutions
1
Reaction score
28
Hi anyone know how to do a premium door to tfs 1.2
or convert this door?

function onUse(cid, item, frompos, item2, topos)
if isPremium(cid) == TRUE then
pos = getPlayerPosition(cid)
if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,"Stand in front of the door.")
return true
end
doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'Only Donators Account can go there.')
end
return true
end

thanks
 
I didn't know to do it correctly i already tried some scripts, this is my old script that i used in tfs 0.4
 
For the doors.lua script.
https://github.com/otland/forgottenserver/blob/master/data/actions/scripts/other/doors.lua#L12
Code:
if (item.actionid >= 1000 and player:getLevel() >= item.actionid - 1000) or (item.actionid == 189 and player:isPremium()) then
Like this if the actionid of a level door (gate of expertise) is 189 and the player is premium it will open.

About the script you posted, it's always useful to add what the problems are with the script (errors, debugs, what happens).
 
Back
Top