• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Premium Over

DiegoRulez

Member
Joined
Apr 16, 2012
Messages
98
Reaction score
13
Location
Feira de Santana - Brasil
I need a script to teleport to the temple (town 1) and change the outfit of the player WHEN THE PREMIUM EXPIRES..

OTX BASED IN TFS 0.4

I use premium account system and not vip system
 
Solution
It did not work, but I found a solution, but this solution could be improved
Code:
function onLogin(cid)
if getPlayerPremiumDays(cid) > 0 then
setPlayerStorageValue(cid, 20500, 1)
elseif getPlayerPremiumDays(cid) == 0 and getPlayerStorageValue(cid, 20500) == 1 then
doCreatureChangeOutfit(cid, {lookType = 128, lookHead = 78, lookBody = 69, lookLegs = 58, lookFeet = 76 })
doTeleportThing(cid, getPlayerMasterPos(cid))
setPlayerStorageValue(cid, 20500, -1)
end
return TRUE
end
But the female outfit changes to the masculine when performing the action, would have to arrange?
Try:
LUA:
function onLogin(cid)
   if getPlayerPremiumDays(cid) > 0 then
       setPlayerStorageValue(cid, 20500, 1)
   elseif getPlayerPremiumDays(cid) == 0 and...
Test. (Idk if is the correct colors and correct outfit) I just did it for help you.

in your premiumscroll.lua add:
LUA:
setPlayerStorageValue(cid, 12890, 1)

Creaturecripts/scripts/endpremium.lua [edited]
LUA:
function onLogin(cid)

local freeOutfitMan = {lookType = 136, lookHead = 78, lookLegs = 49, lookBody = 85, lookFeet = 76}
local freeOutfitWoman = {lookType = 128, lookHead = 78, lookLegs = 49, lookBody = 85, lookFeet = 76}

if isPremium(cid) == FALSE and getPlayerSex(cid) == 1 and getPlayerStorageValue(cid, 12890) == 1 then
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doCreatureChangeOutfit(cid, freeOutfitMan)
doPlayerSendTextMessage(cid, 22, "Your Premium time has been expired")
setPlayerStorageValue(cid, 12890, 0)
elseif isPremium(cid) == FALSE and getPlayerSex(cid) ~= 1 and getPlayerStorageValue(cid, 12890) == 1 then
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doCreatureChangeOutfit(cid, freeOutfitWoman)
doPlayerSendTextMessage(cid, 22, "Your Premium time has been expired")
setPlayerStorageValue(cid, 12890, 0)
end
return TRUE
end

Creaturescripts.xml
XML:
     <event type="login" name="endPremium" script="creaturecripts/scripts/endpremium.lua"/>

also register in login.lua : Creaturecripts/scripts/login.lua
LUA:
    registerCreatureEvent(cid, "endPremium")
 
Last edited:
It did not work, but I found a solution, but this solution could be improved
Code:
function onLogin(cid)
if getPlayerPremiumDays(cid) > 0 then
setPlayerStorageValue(cid, 20500, 1)
elseif getPlayerPremiumDays(cid) == 0 and getPlayerStorageValue(cid, 20500) == 1 then
doCreatureChangeOutfit(cid, {lookType = 128, lookHead = 78, lookBody = 69, lookLegs = 58, lookFeet = 76 })
doTeleportThing(cid, getPlayerMasterPos(cid))
setPlayerStorageValue(cid, 20500, -1)
end
return TRUE
end
But the female outfit changes to the masculine when performing the action, would have to arrange?
 
It did not work, but I found a solution, but this solution could be improved
Code:
function onLogin(cid)
if getPlayerPremiumDays(cid) > 0 then
setPlayerStorageValue(cid, 20500, 1)
elseif getPlayerPremiumDays(cid) == 0 and getPlayerStorageValue(cid, 20500) == 1 then
doCreatureChangeOutfit(cid, {lookType = 128, lookHead = 78, lookBody = 69, lookLegs = 58, lookFeet = 76 })
doTeleportThing(cid, getPlayerMasterPos(cid))
setPlayerStorageValue(cid, 20500, -1)
end
return TRUE
end
But the female outfit changes to the masculine when performing the action, would have to arrange?
Try:
LUA:
function onLogin(cid)
   if getPlayerPremiumDays(cid) > 0 then
       setPlayerStorageValue(cid, 20500, 1)
   elseif getPlayerPremiumDays(cid) == 0 and getPlayerStorageValue(cid, 20500) == 1 and getPlayerSex(cid) == 1 then
       doCreatureChangeOutfit(cid, {lookType = 128, lookHead = 78, lookBody = 69, lookLegs = 58, lookFeet = 76 })
       doTeleportThing(cid, getPlayerMasterPos(cid))
       setPlayerStorageValue(cid, 20500, -1)
   elseif getPlayerPremiumDays(cid) == 0 and getPlayerStorageValue(cid, 20500) == 1 and getPlayerSex(cid) == 0 then
       doCreatureChangeOutfit(cid, {lookType = 136, lookHead = 78, lookBody = 69, lookLegs = 58, lookFeet = 76 })
       doTeleportThing(cid, getPlayerMasterPos(cid))
       setPlayerStorageValue(cid, 20500, -1)
       end
   return TRUE
end
 
Last edited:
Solution
Try:
LUA:
function onLogin(cid)
   if getPlayerPremiumDays(cid) > 0 then
       setPlayerStorageValue(cid, 20500, 1)
   elseif getPlayerPremiumDays(cid) == 0 and getPlayerStorageValue(cid, 20500) == 1 and getPlayerSex(cid) == 1 then
       doCreatureChangeOutfit(cid, {lookType = 128, lookHead = 78, lookBody = 69, lookLegs = 58, lookFeet = 76 })
       doTeleportThing(cid, getPlayerMasterPos(cid))
       setPlayerStorageValue(cid, 20500, -1)
   elseif getPlayerPremiumDays(cid) == 0 and getPlayerStorageValue(cid, 20500) == 1 and getPlayerSex(cid) == 0 then
       doCreatureChangeOutfit(cid, {lookType = 136, lookHead = 78, lookBody = 69, lookLegs = 58, lookFeet = 76 })
       doTeleportThing(cid, getPlayerMasterPos(cid))
       setPlayerStorageValue(cid, 20500, -1)
       end
   return TRUE
end

Very good. Worked perfectly
 
Back
Top