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

The best VIP system ever! [Action/Movevent/Globalevent]

Lua:
local config = {
	loginMessage = getConfigValue('loginMessage'),
	useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
	end

	local accountManager = getPlayerAccountManager(cid)
	if(accountManager == MANAGER_NONE) then
		local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
		if(lastLogin > 0) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
			str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
		else
			str = str .. " Please choose your outfit."
			doPlayerSendOutfitWindow(cid)
		end

		doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
	elseif(accountManager == MANAGER_NAMELOCK) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
	elseif(accountManager == MANAGER_ACCOUNT) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
	end

	if(not isPlayerGhost(cid)) then
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
	end

	registerCreatureEvent(cid, "Mail")
	registerCreatureEvent(cid, "GuildMotd")

	registerCreatureEvent(cid, "Idle")
	if(config.useFragHandler) then
		registerCreatureEvent(cid, "SkullCheck")
	end

	registerCreatureEvent(cid, "ReportBug")
	registerCreatureEvent(cid, "AdvanceSave")
	registerCreatureEvent(cid, "VipCheck")
	return true
end

what have i done wrong there?
 
Just replace the actual one for the original one and add the line again.
 
Kekox i got 2 requests for ur system =p
Ofc that ill rep u if you do them xD

Requests:

Could you turn it in a MOD?

Could you make a talkaction (!vipstatus) that will show you how many vip days you got left in a text window(non writeable/copyable)?

I would love the system if u do them =p
 
1- I dont know if you can do creaturescripts/talkactions/actions/movements/globalevents in just 1 mod..

2- Ye thats easy but, the system already tells you how many days left you have when you log in :eek: but if you want it here you are then.
Lua:
function onSay(cid, words, param)
         doPlayerPopupFYI(cid, "You have ".. getPlayerVipDays(cid) .." days left!.")
         return true
end
 
@Up
I dont see anything wrong with it.. should work fine.. working for me..

Any error? something?
 
Yes, there is an error. It says that your profile "location" is incorrect.

getCreaturePosition(cid)
 
Yes, there is an error. It says that your profile "location" is incorrect.

getCreaturePosition(cid)

There is no such line returning positions in vip medal o.o

Fail.

Under your name < on your profile. It was a joke, but now it's not even funny. <_<
 
Last edited:
I love it, finally a vip system that worked for me in the first try! ty :D
little remark:
<action itemnid="2112" event="script" value="vipmedal.lua"/>
this N shouldn't be there :p
 
Oh!! thats why people are tlling me that vip medal is not working.. haha

Fixed, thanks.
 
Back
Top