1
[Sistema] sistema premium el Lun Jul 04, 2016 3:10 pm
God Aries

Miembro


PD: uso tfs 0.3.7
Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...
function onStepIn(cid, item, position, fromPos, fromPosition)
if not isPremium(cid) then
doTeleportThing(cid, fromPosition, true)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
doCreatureSay(cid, "Sorry, only Premium players are allowed to pass!", TALKTYPE_MONSTER)
doPlayerSendTextMessage(cid, 27, "Go away only premium can enter!.")
else
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED)
doPlayerSendTextMessage(cid, 27, "Welcome to the Premium Side, here can you explore new things and face other creatures.")
doCreatureSay(cid, "Welcome Bro!", TALKTYPE_MONSTER)
end
end
<movevent type="StepIn" actionid="40050" event="script" value="premiumtile.lua"/>
function onLogin(cid)
if getPlayerPremiumDays(cid) >= 1 then
doPlayerSetExperienceRate(cid, 1.15) -- 1.15 = +15% experience, change as you wish. Example: 2.0 = double exp
else
doPlayerSetExperienceRate(cid, 1.0) -- returns to normal rate when premium days expire
end
return true
end
registerCreatureEvent(cid, "extraPremExp")
<event type="login" name="extraPremExp" event="script" value="premiumCheck.lua"/>
local time = 5
local random = math.random(1, 255)
local info = {
{effect = 29, message = "PREMIUM"}
}
function effect(cid)
if (isPlayer(cid)) then
if (isPremium(cid)) then
doSendMagicEffect(getCreaturePosition(cid), info.effect)
end
addEvent(effect, time * 1000, cid)
end
end
function onLogin(cid)
if (isPremium(cid)) then
doSendMagicEffect(getCreaturePosition(cid), info.effect)
doCreatureSay(cid, info.message, random)
end
return 1
end
registerCreatureEvent(cid, "pm")
<event type="login" name="pm" event="script" value="pm.lua"/>
local tab = {
effect = {27, 5} -- {number, delay}
}
function sendEffect(cid)
doSendMagicEffect(getThingPos(cid), tab.effect[1])
addEvent(sendEffect, tab.effect[2] * 1000, cid)
return true
end
function onLogin(cid)
if getPlayerPremiumDays(cid) > 0 then
sendEffect(cid)
doCreatureSay(cid,"PREMIUM", random)
end
return true
end
local random = math.random(1, 255)
local tab = {
effect = {27, 5} -- {number, delay}
}
function sendEffect(cid)
doSendMagicEffect(getThingPos(cid), tab.effect[1])
addEvent(sendEffect, tab.effect[2] * 1000, cid)
return true
end
function onLogin(cid)
if getPlayerPremiumDays(cid) > 0 then
sendEffect(cid)
doCreatureSay(cid,"PREMIUM", random)
end
return true
end
local delay = 3000
function sendpreEffect(cid)
if getPlayerPremiumDays(cid) > 0 then
doSendAnimatedText(getThingPos(cid), "Premium", math.random(1, 255))
addEvent(sendVipEffect, delay, cid)
end
end
function onLogin(cid)
sendpreEffect(cid)
return true
end
local delay = 3000
function sendPreEffect(cid)
if getPlayerPremiumDays(cid) > 0 then
doCreatureSay(getThingPos(cid), "Premium", math.random(1, 255))
addEvent(sendPreEffect, delay, cid)
end
end
function onLogin(cid)
sendPreEffect(cid)
return true
end
local effect = 27
local tempo = 7
function onLogin(cid)
if getPlayerStorageValue(cid, storage) - os.time() >= 1 then
SendEffect(cid)
end
return TRUE
end
function SendEffect(cid)
if getPlayerPremiumDays(cid) > 0 then return LUA_ERROR end
doSendMagicEffect(getCreaturePosition(cid), effect)
doCreatureSay(getPlayerPosition(cid), "PREMIUM!", TALKTYPE_ORANGE_1)
addEvent(SendEffect, tempo*1000, cid)
return TRUE
end
local effect = 27
local tempo = 7
function onLogin(cid)
if getPlayerPremiumDays(cid) > 0 then
SendEffect(cid)
end
return TRUE
end
function SendEffect(cid)
if getPlayerPremiumDays(cid) > 0 then return LUA_ERROR end
doSendMagicEffect(getCreaturePosition(cid), effect)
doCreatureSay(getPlayerPosition(cid), "PREMIUM!", TALKTYPE_ORANGE_1)
addEvent(SendEffect, tempo*1000, cid)
return TRUE
end
function onThink(interval, lastExecution)
for _, name in ipairs(getOnlinePlayers()) do
local cid = getPlayerByName(name)
if not isPlayerGhost(cid) and getPlayerPremiumDays(cid) > 0 then
doSendMagicEffect(getPlayerPosition(cid), 27)
doSendAnimatedText(getPlayerPosition(cid), "Premium!", TEXTCOLOR_RED)
end
end
return true
end
<globalevent name="vipEffect" interval="3" script="vipEffect.lua"/>
Permisos de este foro:
No puedes responder a temas en este foro.
|
|