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

CreatureEvent FreePremium in Premium Zone = TP

Pitufo™

InfinityOT.com
Joined
Feb 14, 2008
Messages
1,438
Reaction score
10
Location
Mexico, Cuernavaca
I was bored and i did this script:
What does this script?
This script will check if the player is non premium and check if its in "X" Area, if the player is not premium and is in "X" area player will be teleported...

Tested and working on TFS 0.3 Beta2+


You can add the Areas you whant!
in creaturescripts/scripts/ create a file .lua and paste this:
PHP:
local areas = {
-- Area1					--Area2
{{x=95, y=128, z=7}, {x=98, y=131, z=7}}, 
{{x=67, y=133, z=7}, {x=70, y=136, z=7}},
{{x=95, y=128, z=7}, {x=98, y=131, z=7}} 
}
local templePosition = {
{x=92, y=134, z=7}
}
function onLogin(cid)
getPPos = getPlayerPosition(cid)
	if isPremium(cid) == FALSE then
		for _, area in pairs(areas) do
			if isInArea(getPPos, area[1], area[2]) == TRUE then
				doTeleportThing(cid, templePosition[1], TRUE)
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You dont have more premium days!")
			end
		end
	end	
return TRUE
end

in creaturescripts.xml:

PHP:
<event type="login" name="TPNonPremium" script="TPNonPremium.lua"/>



Enjoy,
Pitufo
 
Last edited:
Back
Top