• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

VIP System

exique

Natala-ot.com
Joined
Sep 28, 2008
Messages
1,673
Reaction score
25
Location
Sweden
Since every one wants a vip system and I did before. Im going to give you a working VIP System.

Put this in your actions.xml

<action actionid="5788" script="other/vipdoor.lua" />

And put this in : data > actions > scripts > other > and name it "vip.lua"

Code:
 function onUse(cid, item, fromPosition, itemEx, toPosition)

	if getPlayerStorageValue(cid,11551) < 1 then
		if getPlayerLevel(cid) > 1 then
			getPlayerStorageValue(cid, 11551)
			doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED) 
			doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP for 30 days! You can now enter the VIP-area and use unique features!. ", TALKTYPE_ORANGE_1)
			setPlayerStorageValue(cid, 11551, (getPlayerStorageValue(cid,11551) + 30))
			doRemoveItem(item.uid, 1)
		else
			doPlayerSendCancel(cid,"You need to be at least level 2 to use this.")
			doRemoveItem(item.uid, 1)
		end
	else
		doPlayerSendCancel(cid,"You are already a donator.")
	end	
return TRUE
end

Then you put this in the same folder name it "vipdoor.lua"

Code:
  function onUse(cid, item, fromPosition, itemEx, toPosition)
	local cidPosition = getCreaturePosition(cid)
	local message = "Welcome VIP Player!"
		if (item.actionid == 7777 and getPlayerStorageValue(cid,7777) >= 1) then
			if cidPosition.x < toPosition.x then
				doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
								doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
			elseif cidPosition.x > toPosition.x then
				doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
								doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
			elseif cidPosition.y < toPosition.y then
				doTeleportThing(cid, {x=toPosition.x,y=toPosition.y+1,z=toPosition.z}, TRUE)
								doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
			elseif cidPosition.y > toPosition.y then
				doTeleportThing(cid, {x=toPosition.x,y=toPosition.y-1,z=toPosition.z}, TRUE)
								doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
			end
			return TRUE
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, but only VIP players can pass here! Buy VIP with 

command: !buyvip.")
			return TRUE
	end
	return FALSE
end

Then you need use a unobtainable item (I use Item 9004)
I renamed it, here is my "VIP Scroll".

Code:
 	<item id="9004" article="a" name="VIP Scroll">
		<attribute key="description" value="If you use this you will be a VIP player."/>
		<attribute key="weight" value="2000"/>
If you use my "VIP Scroll" you need to delete the other 9004 item.

Press CTRL+F and search for:

<item id="9004"/>
Then you just delete it.

And POOF! Your done! :)

Credits: Me
And some for Bintzer and Nikkster for their scripts. But it didn't work 100 %.
:)
 
Last edited:
Didnt see :/ This is the simpler one lol xD
Use if you would like or dont use if you dont want :p
 
That wasn't the bug.. It didnt work at all :p
This one is not on time. You could change it..
 
Last edited:
Well, like I told you. You could just change it.. Or use it as it is :p
 
Vip door fix:

Code:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
	local cidPosition = getCreaturePosition(cid)
	local message = "Welcome VIP Player!"
		if (item.actionid == 7777 and getPlayerStorageValue(cid,7777) >= 1) then
			if cidPosition.x < toPosition.x then
				doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
								doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
			elseif cidPosition.x > toPosition.x then
				doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
								doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
			elseif cidPosition.y < toPosition.y then
				doTeleportThing(cid, {x=toPosition.x,y=toPosition.y+1,z=toPosition.z}, TRUE)
								doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
			elseif cidPosition.y > toPosition.y then
				doTeleportThing(cid, {x=toPosition.x,y=toPosition.y-1,z=toPosition.z}, TRUE)
								doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
			end
			return TRUE
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, but only VIP players can pass here! Buy VIP with 

command: !buyvip.")
			return TRUE
	end
	return FALSE
end
 
Last edited:
@up
Nopp.. There is a more advanced script that does :)

Vip doors fix:

Code:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
	local cidPosition = getCreaturePosition(cid)
	local message = "Welcome VIP Player!"
		if (item.actionid == 7777 and getPlayerStorageValue(cid,7777) >= 1) then
			if cidPosition.x < toPosition.x then
				doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
								doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
			elseif cidPosition.x > toPosition.x then
				doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
								doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
			elseif cidPosition.y < toPosition.y then
				doTeleportThing(cid, {x=toPosition.x,y=toPosition.y+1,z=toPosition.z}, TRUE)
								doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
			elseif cidPosition.y > toPosition.y then
				doTeleportThing(cid, {x=toPosition.x,y=toPosition.y-1,z=toPosition.z}, TRUE)
								doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
			end
			return TRUE
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, but only VIP players can pass here! Buy VIP with 

command: !buyvip.")
			return TRUE
	end
	return FALSE
end

Ty :)
Edited :D
 
Last edited by a moderator:
Code:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
	local cidPosition = getCreaturePosition(cid)
	local message = "Welcome VIP Player!"
		if (item.actionid == 7777 and getPlayerStorageValue(cid,7777) >= 1) then
			if cidPosition.x < toPosition.x then
				doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
								doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
			elseif cidPosition.x > toPosition.x then
				doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
								doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
			elseif cidPosition.y < toPosition.y then
				doTeleportThing(cid, {x=toPosition.x,y=toPosition.y+1,z=toPosition.z}, TRUE)
								doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
			elseif cidPosition.y > toPosition.y then
				doTeleportThing(cid, {x=toPosition.x,y=toPosition.y-1,z=toPosition.z}, TRUE)
								doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
			end
			return TRUE
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, but only VIP players can pass here! Speak with a GM for VIP access.")
			return TRUE
	end
	return FALSE
end

Vipdoor.lua code for people who don't have !buyvip player command.
 
Back
Top