MoveEvent Vip Bridge Script

legolas23

New Member
Joined
Jan 8, 2009
Messages
537
Best answers
0
Reaction score
3
This is script for vi bridge ,it works like this one on rookgar in rl tibia but instead of pacc it checks player for vip and tp somewhere if he hasn't. So there's no ability to pass without it :p



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"/>

Rep++
 
Last edited:

Shawak

Intermediate OT User
Joined
Sep 11, 2008
Messages
1,976
Best answers
2
Reaction score
101
Location
Germany
This is script for vi bridge ,it works like this one on rookgar in rl tibia but instead of pacc it checks player for vip and tp somewhere if he hasn't. So there's no ability to pass without it :p



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"/>

Rep++
This scrips is 100% bugged.
Lua:
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
}
Have to be:
Lua:
local config = {
uniqueid = 1234,  ---item unique id
vipstorage = 1234, ---- storage of vip player
kickpos = {x=1232, y=234, z=234} --- position where non vip player will be kicked
}
 
OP
legolas23

legolas23

New Member
Joined
Jan 8, 2009
Messages
537
Best answers
0
Reaction score
3
Ops srry I forgot :p

@edited
 

chojrak

Banned User
Joined
Oct 25, 2008
Messages
5,832
Best answers
2
Reaction score
158
This scrips is 100% bugged.
Lua:
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
}
Have to be:
Lua:
local config = {
uniqueid = 1234,  ---item unique id
vipstorage = 1234, ---- storage of vip player
kickpos = {x=1232, y=234, z=234} --- position where non vip player will be kicked
}
It's not 100% ;d, it is only cfg :eek:
 

marcryzius

New Member
Joined
Mar 22, 2009
Messages
61
Best answers
0
Reaction score
0
End.

function onstepin(cid, item, position, fromposition)

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
}

if(item.uid == config.uniqueid) then --this (if)
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
end--end needed for close (if) of line 9
return true
end
 

Avios

New Member
Joined
Dec 26, 2009
Messages
8
Best answers
0
Reaction score
0
PHP:
function onStepIn(cid, item, position, fromPosition)
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
}

    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
	end
	return TRUE
end
:)
 

Matias Alvarez

New Member
Joined
Dec 15, 2013
Messages
2
Best answers
0
Reaction score
0
What i have to put the unique id?? were i get that?? help please!! im really new in this !! and how i make the bridge?? in what materials ??
 
Top