Em CREATUREEVENTS/CREATUREEVENTS.XML cole a tag abaixo:
<event type="advance" name="Effect" event="script" value="effect.lua"/>
em CREATUREEVENTS/SCRIPTS/ crie um arquivo chamado effect.lua e cole dentro isso:
local config = {
effect = 21, -- Aqui você coloca o effect que quer
days = 1, -- Quantos dias de vip o player tem que ter pra poder soltar o effect
level = 100, -- Level necessário pra poder usar o effect
tempo = 2, -- Tempo(em segundos), que vai soltar o effect no player
vipdays = 13540 -- Não precisa mecher
}
function onAdvance(cid, skill, oldLevel, newLevel)
if skill == SKILL_LEVEL and newLevel >= config.level and getPlayerStorageValue(cid, config.vipdays) - os.time() > 0 then
sendEffect(cid)
end
return TRUE
end
function sendEffect(cid)
if isCreature(cid) then
local pos = getCreaturePosition(cid)
local x = (pos.x)
local y = (pos.y)
doSendMagicEffect({x=x,y=y,z=pos.z}, config.effect)
addEvent(sendEffect, config.tempo * 1000, cid)
end
end
Pronto, agora vá em CREATUREEVENTS/SCRIPTS/LOGIN.LUA procure por ("REGISTER"), de ENTER e cole esta tag abaixo:
registerCreatureEvent(cid, "Effect")
Pronto ta ai, facil de configurar e algumas coisas a mais.









info
Grupo: Campones
Registrado: 19/07/11
Posts: 71
Reputação: +18
galera e o sequinte, sabe aqueles chokes que sai nos personagens de dbo e woodbo ?
eu queria aqueles script so que para tibia baseado nesse script da annemote
function onLogin(cid)
registerCreatureEvent(cid, "EffectOutLogin")
registerCreatureEvent(cid, "OutfitEffects")
return doCreatureChangeOutfit(cid,{lookType = getCreatureOutfit(cid).lookType, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons})
end
local events = {}
function onOutfit(cid, old, current)
local effect = {
[136] = 1, [128] = 1, -- citizen
[137] = 2,[129] = 2, -- hunter
[138] = 3, [130] = 3, -- mage
[139] = 4,[131] = 4, -- knight
[140] = 5,[132] = 5, -- Noblewoman
[141] = 6,[133] = 6, -- Summoner
[142] = 7,[134] = 7, -- warrior
[147] = 8,[143] = 8, -- Barbarian
[148] = 9,[144] = 9, -- druid
[149] = 10,[145] = 10, -- wizard
[150] = 11,[146] = 11, -- Oriental
[155] = 12,[151] = 12, -- pirate
[156] = 13,[152] = 13, -- assassin
[157] = 14,[153] = 14, -- beggar
[158] = 15,[154] = 15, -- shaman
[252] = 16,[251] = 16, -- Norsewoman
[269] = 17,[268] = 17, -- Nightmare
[270] = 18,[273] = 18, -- jester
[279] = 19,[278] = 19, -- brotherwood
[288] = 20,[289] = 20 -- demonhunter
}
local o,c= effect[old.lookType],effect[current.lookType]
if getPlayerAccess(cid) > 2 then return true
elseif (not o or not c or old.lookAddons == 3 and o) then stopEvent(events[getPlayerGUID(cid)]) end
if current.lookAddons == 3 and c then
function WalkEffect(cid, c, pos)
if not isCreature(cid) then return LUA_ERROR end
if c then frompos = getThingPos(cid)
if frompos.x ~= pos.x or frompos.y ~= pos.y or frompos.z ~= pos.z then doSendMagicEffect(frompos, c) end
events[getPlayerGUID(cid)] = addEvent(WalkEffect, 100, cid, c, frompos)
end return true end
WalkEffect(cid, c, {x=0, y=0, z=0}) end
return true
end
mais esse so sai effect se andar, e eu queria que ficase saindo effect toda hora
ha e esqueci de uma coisa, queria que saisse effect so em players vip
systema de vip que eu uso
http://www.xtibia.co...ciona-vip-time/
bom e isso
Editado Junho 4 por Vilden