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

help with script!

tompan

Member
Joined
Dec 13, 2008
Messages
646
Reaction score
23
Location
Sweden
I need a movement script, when you walk over a bridge you need to be VIP to pass it.

Like in rl tibia rookgard, when you need to be prem to walk to prem island. But this script need to be VIP to pass the bridge. Thanks for any help!
 
data/movements/scripts/vipbridge.lua
Code:
function onStepIn(cid, item, position, fromPosition)

[B]local config = {
uniqueid = 1234,   ---item unique id
vipstorage = 1234, ---- storage of vip player
kickpos = {x=1232, y=234, z=234, stackpos=1 } --- position where non vip player will be kicked
}[/B]

    if(item.uid == config.uniqueid) then
        if (getPlayerStorageValue(cid, config.vipstorage) == 0) then
			doTeleportThing(cid, config.kickpos)
			doCreatureSay(cid, "Only Vip players can pass here!, TALKTYPE_ORANGE_2, getCreaturePosition(cid))
		else
			doPlayerSendTextMessage(cid, 20, 'Hiho vip Player!')		
		end
return TRUE
end

in movements.xml add
Code:
<movevent type="StepIn" itemid="[B]UNIQUEID HERE[/B]" event="script" value="vipbridge.lua"/>
 
Last edited:
Back
Top Bottom