• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

How to make "VIP System"

exique

Natala-ot.com
Joined
Sep 28, 2008
Messages
1,673
Reaction score
25
Location
Sweden
As the title says !

How do I make a VIP system? :O Any one got a script for it? >.<



Heelpp !! <---!!

Ofc rep++ If you help :)
 
Hum -.^ Like a vip has aces to other "Places" like only he can enter that tp or door or w /e. Like faster mana / hp maybe >.<

Thanks for the fast answer
 
Last edited:
Well with my old VIP system I did it like this:

First put this script as an action script on an item that is unobtainable in your server (I used the oracle figurine)

In actions/scripts/other create a file called vip.lua and paste this inside:
PHP:
function onUse(cid, item, frompos, item2, topos)
text = "Congratulations, you are now a donator."
vip = 11420 -- Change this to storage value you want for your VIP status
vipstatus = getPlayerStorageValue(cid, vip)

if vipstatus == -1 then
doShowTextDialog(cid, 8974, text)
setPlayerStorageValue(cid, vip, 1)
doRemoveItem(item.uid)

else
doPlayerSendCancel(cid,"You already have donator status.")

end

return 1

end

Then go into your actions.xml and add this line:
PHP:
<action itemid="8974" event="script" value="other/vip.lua"/>

And you can add this item to your shop offers or whatever you want.


Then to make it so only donators can use a certain door or teleport just use a script like this:

In actions/scripts/other create a file called vipdoor.lua and paste this inside:
PHP:
function onUse(cid, item, frompos, item2, topos)
donatorstatus = getPlayerStorageValue(cid,11420) -- Change this number to the storage value of your VIP
if item.uid == 11551 then -- This number you will imput into map editor for the unique id on the door you wish to use
area = {x=4186, y=4390, z=7} -- This is where they will get teleported after clicking on the door
if donatorstatus == 1 then
doTeleportThing(cid, area,0)
else
doPlayerSendTextMessage(cid, 22, "Sorry, you are not a donator. Go to YOURSITEHERE to donate.")
doSendMagicEffect(topos, 12)
end
end
return 1
end
Then go into your actions.xml and write this line:
PHP:
<action uniqueid="11551" event="script" value="other/vipdoor.lua" />



Then if you want spells that only donators can use simply use this for the onCastSpell function in the spell script of your choice:
PHP:
function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 11420) ~= -1 then
	return doCombat(cid, combat, var)
	end
	doPlayerSendCancel(cid,"Sorry, only people with VIP Status can use this spell.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) 
    return LUA_ERROR
end

Please take the time to rep me as this took me awhile to write and edit.
 
Last edited:
change uniqueid for actionid..

oh yeah, and you will need to use this script:

PHP:
function onUse(cid, item, frompos, item2, topos) 
   donatorstatus = getPlayerStorageValue(cid,11420) -- Change this number to the storage value of your VIP 

   if item.aid == 11551 then -- This number you will imput into map editor for the unique id on the door you wish to use 
      area = {x=4186, y=4390, z=7} -- This is where they will get teleported after clicking on the door 

      if donatorstatus == 1 then 
         doTeleportThing(cid, area,0) 
      else 
         doPlayerSendTextMessage(cid, 22, "Sorry, you are not a donator. Go to YOURSITEHERE to donate.") 
         doSendMagicEffect(topos, 12) 
      end 
   end 
   return TRUE
end
 
Last edited:
Take this. Much better.


Because that they gave you, it will teleport you how to come back? teleport? nah:)

PHP:
local function checkStackpos(item, position)
	position.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
	local thing = getThingfromPos(position)
	position.stackpos = STACKPOS_TOP_FIELD
	local field = getThingfromPos(position)
	if(item.uid ~= thing.uid and thing.itemid >= 100 or field.itemid ~= 0) then
		return FALSE
	end

	return TRUE
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
local storage = 2000

	if(getItemLevelDoor(item.itemid) > 0) then
		if getPlayerStorageValue(cid, storage) == TRUE then
			doTransformItem(item.uid, item.itemid + 1)
			doTeleportThing(cid, toPosition, TRUE)
		
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only VIP Players can access this door")
		end
                 end
				
		return TRUE
	end
 
Back
Top