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

Check if lost premium

corydurban

New Member
Joined
Jul 21, 2007
Messages
43
Reaction score
1
I want a way to check when some one logs in if its possible to check if they was premium but are not now and if they are not set promotion to 1 and town id to 1 and teleport them to town 1
i thought maybe using storage ids but no idea how to do it
 
here we are..
go to your creaturescripts folder and open
creautrescripts.xml and post the following:
XML:
    <event type="login" name="check" script="checkprem.lua"/>

then go to scripts and open file name login.lua
and search code
Lua:
	registerCreatureEvent(cid, "GuildMotd")

then paste after it this code

Lua:
	registerCreatureEvent(cid, "check")

then create file name checkprem.lua and paste the following:
Lua:
function onLogin(cid)
  if getPlayerPremiumDays(cid) < 1 then
	doPlayerSetPromotionLevel(cid, 1)
    doPlayerSetTown(cid, 1)
end
	return true
end
 
Last edited:
Back
Top