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

Vip Script NEED :P

god of war

Member
Joined
Jun 15, 2011
Messages
126
Reaction score
5
Location
War Valley
Hello i need a script that when players are vip they can go down certain stairs and if they arent they get teleported back
 
You want to have vip system so you can make money. while you at the background can't make a VERY simple lua script.
It's easier to make that script you say, than set up a SQL server for 0.
 
just put Uniqueid on the stairs and use this script :p
movements.xml
Code:
      <movevent type="StepIn" uniqueid="30000" event="script" value="viptp.lua"/>
create file viptp.lua
Code:
local place = {x=927, y=1014, z=8}
function onStepIn(cid, item, pos, fromPos)
	if isPlayer(cid) then
		if getPlayerVipDays(cid) ~= 0 then
			doSendMagicEffect(pos, 2) 
			doTeleportThing(cid, place) 
			doSendMagicEffect(place,10)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are not VIP")
			doTeleportThing(cid, {x=1000, y=998, z=7})
		end
	end
end
 
just put Uniqueid on the stairs and use this script :p
movements.xml
Code:
      <movevent type="StepIn" uniqueid="30000" event="script" value="viptp.lua"/>
create file viptp.lua
Code:
local place = {x=927, y=1014, z=8}
function onStepIn(cid, item, pos, fromPos)
	if isPlayer(cid) then
		if getPlayerVipDays(cid) ~= 0 then
			doSendMagicEffect(pos, 2) 
			doTeleportThing(cid, place) 
			doSendMagicEffect(place,10)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are not VIP")
			doTeleportThing(cid, {x=1000, y=998, z=7})
		end
	end
end
It could just be doTeleportThing(cid, fromPos) :p
 
the script doesnt work,i did th files etc changed destination and unique id but when i walk down/up the stairs nothing happens and i get this error


[19/08/2011 17:15:08] [Error - MoveEvents Interface]
[19/08/2011 17:15:08] data/movements/scripts/viptp.lua:eek:nStepIn
[19/08/2011 17:15:09] Description:
[19/08/2011 17:15:09] data/movements/scripts/viptp.lua:4: attempt to call global 'getPlayerVipDays' (a nil value)
[19/08/2011 17:15:09] stack traceback:
[19/08/2011 17:15:09] data/movements/scripts/viptp.lua:4: in function <data/movements/scripts/viptp.lua:2>

[19/08/2011 17:15:09] [Error - MoveEvents Interface]
[19/08/2011 17:15:09] data/movements/scripts/viptp.lua:eek:nStepIn
[19/08/2011 17:15:09] Description:
[19/08/2011 17:15:09] data/movements/scripts/viptp.lua:4: attempt to call global 'getPlayerVipDays' (a nil value)
[19/08/2011 17:15:09] stack traceback:
[19/08/2011 17:15:09] data/movements/scripts/viptp.lua:4: in function <data/movements/scripts/viptp.lua:2>

[19/08/2011 17:15:10] [Error - MoveEvents Interface]
[19/08/2011 17:15:10] data/movements/scripts/viptp.lua:eek:nStepIn
[19/08/2011 17:15:10] Description:
[19/08/2011 17:15:10] data/movements/scripts/viptp.lua:4: attempt to call global 'getPlayerVipDays' (a nil value)
[19/08/2011 17:15:10] stack traceback:
[19/08/2011 17:15:10] data/movements/scripts/viptp.lua:4: in function <data/movements/scripts/viptp.lua:2>
 
Last edited:
It's supposed to be a move event, make sure u added the right line to movements.xml also.

Lua:
function onStepIn(cid, item, pos, fromPos)
	if isPlayer(cid) then
		if getPlayerVipDays(cid) ~= 0 then
			doSendMagicEffect(pos, 2) 
			doTeleportThing(cid, pos) 
			doSendMagicEffect(place,10)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are not VIP")
			doTeleportThing(cid, fromPos)
		end
	end
end

Modified ahmed's script try it.
 
i still get this error ;s

[19/08/2011 17:38:29] [Error - MoveEvents Interface]
[19/08/2011 17:38:29] data/movements/scripts/viptp.lua:eek:nStepIn
[19/08/2011 17:38:29] Description:
[19/08/2011 17:38:29] data/movements/scripts/viptp.lua:3: attempt to call global 'getPlayerVipDays' (a nil value)
[19/08/2011 17:38:29] stack traceback:
[19/08/2011 17:38:29] data/movements/scripts/viptp.lua:3: in function <data/movements/scripts/viptp.lua:1>
 
Back
Top