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

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

The problem i see here is that if a VIP players is in a non-vip area and he runs out of days .. lets say hunting in non vip or in a war... he will be teleported back

considering vip zone a square between x 100 - 200 and y 100 - 200
Instead you could scan his position to see if he is in a vip zone ....
if playerposition.x >100 and playerposition.x< 200
if playerposition.y >100 and playerposition.y>200
teleport him
end
end
i dont want to elaborate on it if not necesary ... tell me if you get the idea or need the correct lua format hahahaha ... good system

Also maybe not an onlogin but an on move script (althought it would be very heavy for the server) because if i stay online then i have infinite VIP.
 
Hey, i got the latest version of phpMyAdmin and when i try to execute the new table this comes up;

how can i add it without this happening?

1a0657c6.jpg
 
How to make every new account gets 3 vip days? :)

Lua:
function onLogin(cid)
	if getPlayerStorageValue(cid, 30002) > 0 then
		return true
	else
		doPlayerAddVipDays(cid, 3)
		doPlayerSendTextMessage(cid, 11, "Welcome to "..getConfigValue(serverName)..". We hope you enjoy your stay. As a welcome gift here's 3 free VIP days!")
		doPlayerSetStorageValue(cid, 30002, 1)
	end
	return true
end
Rep if it works.
 
Lua:
function onLogin(cid)
	if getPlayerStorageValue(cid, 30002) > 0 then
		return true
	else
		doPlayerAddVipDays(cid, 3)
		doPlayerSendTextMessage(cid, 11, "Welcome to "..getConfigValue(serverName)..". We hope you enjoy your stay. As a welcome gift here's 3 free VIP days!")
		doPlayerSetStorageValue(cid, 30002, 1)
	end
	return true
end
Rep if it works.



Sooo... where am I supposed to place this? Actions? Creaturescripts? Globalevents?
 
How i have to use the /adddays command?^^

I got this Error in console:


[Error – GlobalEvent Interface]
Data/globalevents/scripts/vipeffect.lua:eek:nThink
Description:
Data/globalevents/scripts/vipeffect.lua:4: attempt to call global ‘getPlayerVipDays’ <a nil value>
Stack traceback:
Data/globalevents/scripts/vipeffect.lua:4: in function <data/globalevents/scripts/vipeffect.lua:1:>
[Error – GlobalEvents::think] Couldn’t execute event: vipEffect
 
Last edited:
Back
Top