Ir para conteúdo
  • Cadastre-se

(Resolvido)Efeito Staff


Ir para solução Resolvido por antharaz,

Posts Recomendados

Agora, antharaz disse:

@Mateus Santosss 

 

Não entendi o q vc qr, quer que sobe um texto a cada 1 seg como se fosse um efeito?

Sim, é como se fosse aquelas mensagens coloridas 

Estilo Esse: 

21105808_836941716484530_712943443603740

(Sorry pelo double post, eu nao tava conseguindo editar o outro post)

Link para o post
Compartilhar em outros sites
Agora, antharaz disse:

@Mateus Santosss 

 

passa seu login.lua ae que vou editar ele com o novo código, para evitar colocar errado e "fuder" o ot

Spoiler

local config = {
 loginMessage = getConfigValue('loginMessage'),
 useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
 local loss = getConfigValue('deathLostPercent')
 if(loss ~= nil) then
  doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
 end

 local accountManager = getPlayerAccountManager(cid)
 if(accountManager == MANAGER_NONE) then
  local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
  if(lastLogin > 0) then
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
   str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
  end

  doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
 elseif(accountManager == MANAGER_NAMELOCK) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
 elseif(accountManager == MANAGER_ACCOUNT) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
 else
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
 end

 if(not isPlayerGhost(cid)) then
  doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
 end

 registerCreatureEvent(cid, "Mail")
 registerCreatureEvent(cid, "GuildMotd")

 registerCreatureEvent(cid, "Idle")
 if(config.useFragHandler) then
  registerCreatureEvent(cid, "SkullCheck")
 end
        registerCreatureEvent(cid, "ProtDeath")
           registerCreatureEvent(cid, "Biohazard")
           registerCreatureEvent(cid, "ZombieAttack")
           registerCreatureEvent(cid, "WeaponMana")
     registerCreatureEvent(cid, "showVoc")       
        registerCreatureEvent(cid, "ReportBug")
        registerCreatureEvent(cid, "AdvanceSave")
 registerCreatureEvent(cid, "Outfit")
 registerCreatureEvent(cid, "MonsteDeath")
registerCreatureEvent(cid, "ExameJouninDead")
        registerCreatureEvent(cid, "ExameJouninBoss")
setPlayerStorageValue(cid, 8855, -1)
registerCreatureEvent(cid, "Senha")
registerCreatureEvent(cid, "eventotimes")
registerCreatureEvent(cid, "report")
registerCreatureEvent(cid, "attackguild")
-- registerCreatureEvent(cid, "NlooT")
registerCreatureEvent(cid, "DeathPlayer")
registerCreatureEvent(cid, "lvlup")
registerCreatureEvent(cid, "onlinebonus")
registerCreatureEvent(cid, "dropStone")
registerCreatureEvent(cid, "GodLight")
registerCreatureEvent(cid, "SkillUpText")
---------- PlayerPort---------------
if getPlayerStorageValue(cid, 49708) ~= 0 then
        setPlayerStorageValue(cid, 49708, 0) 
end
---------- Invencible ----------------
registerCreatureEvent(cid, "invencible")
if getPlayerStorageValue(cid, 3482101) ~= 0 then
        setPlayerStorageValue(cid, 3482101, 0) 
end
registerCreatureEvent(cid, "DeathHP")
 return true
end
 

Eu vou sair, amanha eu vejo oque se me mandou tá <3 ate amanha

Link para o post
Compartilhar em outros sites

Em creaturescripts/scripts crie um arquivo:

staffeffect.lua

 

Dentro do arquivo cole isto:

 

 

 

local t = {access = 3, -- acesso mínimo para sair o efeito
text = "STAFF", textcolor = COLOR_ORANGE, effect = CONST_ME_FIREWORK_YELLOW, interval = 10}


function onLogin(cid)
if getPlayerAccess(cid) >= t.access then
SendEffect(cid, t.effect, t.text, t.interval, t.textcolor)
end
return true
end

function SendEffect(cid, effect, text, time, color)
if isPlayer(cid) then
    doSendMagicEffect(getPlayerPosition(cid), effect)
    doSendAnimatedText(getPlayerPosition(cid), text, color)
    addEvent(SendEffect, time*1000, cid, effect, text, time, color) 
end
return true
end

 

Em creaturescripts.xml, adicione a tag: 

<event type="login" name="StaffEffect" event="script" value="staffeffect.lua"/>

 

Link para o post
Compartilhar em outros sites
  • Solução

@Mateus Santosss 

 

Spoiler

local eff_config = {
						[6] = {msg = '[GOD/ADM]', cor = 'random'}, --[group id] = {msg = 'MENSSAGEM', cor = cor que quer ou 'random' para aleatorio}
						[5] = {msg = '[CM]', cor = 'random'}
}

function group_effect(cid)
	if isCreature(cid) then
		local t = eff_config[getPlayerGroupId(cid)]
		t.cor = type(t.cor) == 'string' and math.random(1,255) or t.cor
		doSendAnimatedText(getThingPos(cid), t.msg, t.cor)
		addEvent(group_effect,1000,cid)
	end
end


local config = {
 loginMessage = getConfigValue('loginMessage'),
 useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
 local loss = getConfigValue('deathLostPercent')
 if(loss ~= nil) then
  doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
 end
 local accountManager = getPlayerAccountManager(cid)
 if(accountManager == MANAGER_NONE) then
  local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
  if(lastLogin > 0) then
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
   str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
  end
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
 elseif(accountManager == MANAGER_NAMELOCK) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
 elseif(accountManager == MANAGER_ACCOUNT) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
 else
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
 end
 if(not isPlayerGhost(cid)) then
  doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
 end
 registerCreatureEvent(cid, "Mail")
 registerCreatureEvent(cid, "GuildMotd")
 registerCreatureEvent(cid, "Idle")
 if(config.useFragHandler) then
  registerCreatureEvent(cid, "SkullCheck")
 end
        registerCreatureEvent(cid, "ProtDeath")
           registerCreatureEvent(cid, "Biohazard")
           registerCreatureEvent(cid, "ZombieAttack")
           registerCreatureEvent(cid, "WeaponMana")
     registerCreatureEvent(cid, "showVoc")       
        registerCreatureEvent(cid, "ReportBug")
        registerCreatureEvent(cid, "AdvanceSave")
 registerCreatureEvent(cid, "Outfit")
 registerCreatureEvent(cid, "MonsteDeath")
registerCreatureEvent(cid, "ExameJouninDead")
        registerCreatureEvent(cid, "ExameJouninBoss")
setPlayerStorageValue(cid, 8855, -1)
registerCreatureEvent(cid, "Senha")
registerCreatureEvent(cid, "eventotimes")
registerCreatureEvent(cid, "report")
registerCreatureEvent(cid, "attackguild")
-- registerCreatureEvent(cid, "NlooT")
registerCreatureEvent(cid, "DeathPlayer")
registerCreatureEvent(cid, "lvlup")
registerCreatureEvent(cid, "onlinebonus")
registerCreatureEvent(cid, "dropStone")
registerCreatureEvent(cid, "GodLight")
registerCreatureEvent(cid, "SkillUpText")
---------- PlayerPort---------------
if getPlayerStorageValue(cid, 49708) ~= 0 then
        setPlayerStorageValue(cid, 49708, 0) 
end
---------- Invencible ----------------
registerCreatureEvent(cid, "invencible")
if getPlayerStorageValue(cid, 3482101) ~= 0 then
        setPlayerStorageValue(cid, 3482101, 0) 
end
registerCreatureEvent(cid, "DeathHP")
if eff_config[getPlayerGroupId(cid)] then
group_effect(cid)
end
 return true
end

 

 

Link para o post
Compartilhar em outros sites
7 minutos atrás, antharaz disse:

@antharaz

Voce é foda Pode fazer no meu tambem ?

 

  Ocultar conteúdo

local config = {
 loginMessage = getConfigValue('loginMessage'),
 useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
 local loss = getConfigValue('deathLostPercent')
 if(loss ~= nil) then
  doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
 end

 local accountManager = getPlayerAccountManager(cid)
 if(accountManager == MANAGER_NONE) then
  local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
  if(lastLogin > 0) then
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
   str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
  end

  doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
 elseif(accountManager == MANAGER_NAMELOCK) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
 elseif(accountManager == MANAGER_ACCOUNT) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
 else
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
 end

 if(not isPlayerGhost(cid)) then
  doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
 end
 
 registerCreatureEvent(cid, "GuildMotd")

 registerCreatureEvent(cid, "Idle")
 if(config.useFragHandler) then
  registerCreatureEvent(cid, "SkullCheck")
 end       
        registerCreatureEvent(cid, "ReportBug")
        registerCreatureEvent(cid, "AdvanceSave")
 registerCreatureEvent(cid, "Outfit")
 registerCreatureEvent(cid, "MonsteDeath")
setPlayerStorageValue(cid, 8855, -1)
registerCreatureEvent(cid, "Senha")
registerCreatureEvent(cid, "report")
registerCreatureEvent(cid, "Niwdeath")
registerCreatureEvent(cid, "AdvLevelSpells")
registerCreatureEvent(cid, "FimVip")
registerCreatureEvent(cid, "VipReceive")
doPlayerPopupFYI(cid, 
"")
doPlayerPopupFYI(cid, "(Castle add) ")
return true
end
 

 

 

Editado por Cain Jorge (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

@antharaz

Agora, antharaz disse:

@antharaz

 

sim kk eu marquei errado ali  , voce é foda pode fazer igual porfavor ?

Link para o post
Compartilhar em outros sites

@Cain Jorge 

 

Ta ae:

 

Spoiler

local eff_config = {
						[6] = {msg = '[GOD/ADM]', cor = 'random'}, --[group id] = {msg = 'MENSSAGEM', cor = cor que quer ou 'random' para aleatorio}
						[5] = {msg = '[CM]', cor = 'random'}
}

function group_effect(cid)
	if isCreature(cid) then
		local t = eff_config[getPlayerGroupId(cid)]
		t.cor = type(t.cor) == 'string' and math.random(1,255) or t.cor
		doSendAnimatedText(getThingPos(cid), t.msg, t.cor)
		addEvent(group_effect,1000,cid)
	end
end

local config = {
 loginMessage = getConfigValue('loginMessage'),
 useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
 local loss = getConfigValue('deathLostPercent')
 if(loss ~= nil) then
  doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
 end
 local accountManager = getPlayerAccountManager(cid)
 if(accountManager == MANAGER_NONE) then
  local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
  if(lastLogin > 0) then
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
   str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
  end
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
 elseif(accountManager == MANAGER_NAMELOCK) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
 elseif(accountManager == MANAGER_ACCOUNT) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
 else
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
 end
 if(not isPlayerGhost(cid)) then
  doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
 end
 
 registerCreatureEvent(cid, "GuildMotd")
 registerCreatureEvent(cid, "Idle")
 if(config.useFragHandler) then
  registerCreatureEvent(cid, "SkullCheck")
 end       
        registerCreatureEvent(cid, "ReportBug")
        registerCreatureEvent(cid, "AdvanceSave")
 registerCreatureEvent(cid, "Outfit")
 registerCreatureEvent(cid, "MonsteDeath")
setPlayerStorageValue(cid, 8855, -1)
registerCreatureEvent(cid, "Senha")
registerCreatureEvent(cid, "report")
registerCreatureEvent(cid, "Niwdeath")
registerCreatureEvent(cid, "AdvLevelSpells")
registerCreatureEvent(cid, "FimVip")
registerCreatureEvent(cid, "VipReceive")
doPlayerPopupFYI(cid, 
"")
doPlayerPopupFYI(cid, "(Castle add) ")
if eff_config[getPlayerGroupId(cid)] then
group_effect(cid)
end
return true
end

 

 

 


Só não fale que sou "foda" ou coisas do tipo, n curto mto elogios n :x

Link para o post
Compartilhar em outros sites
2 minutos atrás, antharaz disse:

@Cain Jorge 

 

Ta ae:

 

  Mostrar conteúdo oculto


local eff_config = {
						[6] = {msg = '[GOD/ADM]', cor = 'random'}, --[group id] = {msg = 'MENSSAGEM', cor = cor que quer ou 'random' para aleatorio}
						[5] = {msg = '[CM]', cor = 'random'}
}

function group_effect(cid)
	if isCreature(cid) then
		local t = eff_config[getPlayerGroupId(cid)]
		t.cor = type(t.cor) == 'string' and math.random(1,255) or t.cor
		doSendAnimatedText(getThingPos(cid), t.msg, t.cor)
		addEvent(group_effect,1000,cid)
	end
end

local config = {
 loginMessage = getConfigValue('loginMessage'),
 useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
 local loss = getConfigValue('deathLostPercent')
 if(loss ~= nil) then
  doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
 end
 local accountManager = getPlayerAccountManager(cid)
 if(accountManager == MANAGER_NONE) then
  local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
  if(lastLogin > 0) then
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
   str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
  end
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
 elseif(accountManager == MANAGER_NAMELOCK) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
 elseif(accountManager == MANAGER_ACCOUNT) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
 else
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
 end
 if(not isPlayerGhost(cid)) then
  doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
 end
 
 registerCreatureEvent(cid, "GuildMotd")
 registerCreatureEvent(cid, "Idle")
 if(config.useFragHandler) then
  registerCreatureEvent(cid, "SkullCheck")
 end       
        registerCreatureEvent(cid, "ReportBug")
        registerCreatureEvent(cid, "AdvanceSave")
 registerCreatureEvent(cid, "Outfit")
 registerCreatureEvent(cid, "MonsteDeath")
setPlayerStorageValue(cid, 8855, -1)
registerCreatureEvent(cid, "Senha")
registerCreatureEvent(cid, "report")
registerCreatureEvent(cid, "Niwdeath")
registerCreatureEvent(cid, "AdvLevelSpells")
registerCreatureEvent(cid, "FimVip")
registerCreatureEvent(cid, "VipReceive")
doPlayerPopupFYI(cid, 
"")
doPlayerPopupFYI(cid, "(Castle add) ")
if eff_config[getPlayerGroupId(cid)] then
group_effect(cid)
end
return true
end

 

 

 


Só não fale que sou "foda" ou coisas do tipo, n curto mto elogios n :x

Obrigado Por Compartilhar !

@antharaz    {msg = '[GOD/ADM]', cor = 'random'}       Em cor eu posso por cor = 'red'} ?    qual jeito certo de por

Link para o post
Compartilhar em outros sites
10 horas atrás, antharaz disse:

@Mateus Santosss 

 

  Mostrar conteúdo oculto


local eff_config = {
						[6] = {msg = '[GOD/ADM]', cor = 'random'}, --[group id] = {msg = 'MENSSAGEM', cor = cor que quer ou 'random' para aleatorio}
						[5] = {msg = '[CM]', cor = 'random'}
}

function group_effect(cid)
	if isCreature(cid) then
		local t = eff_config[getPlayerGroupId(cid)]
		t.cor = type(t.cor) == 'string' and math.random(1,255) or t.cor
		doSendAnimatedText(getThingPos(cid), t.msg, t.cor)
		addEvent(group_effect,1000,cid)
	end
end


local config = {
 loginMessage = getConfigValue('loginMessage'),
 useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
 local loss = getConfigValue('deathLostPercent')
 if(loss ~= nil) then
  doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
 end
 local accountManager = getPlayerAccountManager(cid)
 if(accountManager == MANAGER_NONE) then
  local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
  if(lastLogin > 0) then
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
   str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
  end
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
 elseif(accountManager == MANAGER_NAMELOCK) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
 elseif(accountManager == MANAGER_ACCOUNT) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
 else
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
 end
 if(not isPlayerGhost(cid)) then
  doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
 end
 registerCreatureEvent(cid, "Mail")
 registerCreatureEvent(cid, "GuildMotd")
 registerCreatureEvent(cid, "Idle")
 if(config.useFragHandler) then
  registerCreatureEvent(cid, "SkullCheck")
 end
        registerCreatureEvent(cid, "ProtDeath")
           registerCreatureEvent(cid, "Biohazard")
           registerCreatureEvent(cid, "ZombieAttack")
           registerCreatureEvent(cid, "WeaponMana")
     registerCreatureEvent(cid, "showVoc")       
        registerCreatureEvent(cid, "ReportBug")
        registerCreatureEvent(cid, "AdvanceSave")
 registerCreatureEvent(cid, "Outfit")
 registerCreatureEvent(cid, "MonsteDeath")
registerCreatureEvent(cid, "ExameJouninDead")
        registerCreatureEvent(cid, "ExameJouninBoss")
setPlayerStorageValue(cid, 8855, -1)
registerCreatureEvent(cid, "Senha")
registerCreatureEvent(cid, "eventotimes")
registerCreatureEvent(cid, "report")
registerCreatureEvent(cid, "attackguild")
-- registerCreatureEvent(cid, "NlooT")
registerCreatureEvent(cid, "DeathPlayer")
registerCreatureEvent(cid, "lvlup")
registerCreatureEvent(cid, "onlinebonus")
registerCreatureEvent(cid, "dropStone")
registerCreatureEvent(cid, "GodLight")
registerCreatureEvent(cid, "SkillUpText")
---------- PlayerPort---------------
if getPlayerStorageValue(cid, 49708) ~= 0 then
        setPlayerStorageValue(cid, 49708, 0) 
end
---------- Invencible ----------------
registerCreatureEvent(cid, "invencible")
if getPlayerStorageValue(cid, 3482101) ~= 0 then
        setPlayerStorageValue(cid, 3482101, 0) 
end
registerCreatureEvent(cid, "DeathHP")
if eff_config[getPlayerGroupId(cid)] then
group_effect(cid)
end
 return true
end

 

 

Está funcionando, porem eu gostaria de soltar a tag [GOD] esperar 1 segundo e soltar novamente..

Tipo um mini cooldown nos [GOD] etc

Link para o post
Compartilhar em outros sites
2 horas atrás, Mateus Santosss disse:

Está funcionando, porem eu gostaria de soltar a tag [GOD] esperar 1 segundo e soltar novamente..

Tipo um mini cooldown nos [GOD] etc

Em creaturescripts/scripts crie um arquivo:

staffeffect.lua

 

Dentro do arquivo cole isto:

 

 

 

local t = {access = 3, -- acesso mínimo para sair o efeito
text = "[GOD]", textcolor = COLOR_ORANGE, effect = CONST_ME_FIREWORK_YELLOW, interval = 1}


function onLogin(cid)
if getPlayerAccess(cid) >= t.access then
SendEffect(cid, t.effect, t.text, t.interval, t.textcolor)
end
return true
end

function SendEffect(cid, effect, text, time, color)
if isPlayer(cid) then
    doSendMagicEffect(getPlayerPosition(cid), effect)
    doSendAnimatedText(getPlayerPosition(cid), text, color)
    addEvent(SendEffect, time*1000, cid, effect, text, time, color) 
end
return true
end

 

Em creaturescripts.xml, adicione a tag: 

<event type="login" name="StaffEffect" event="script" value="staffeffect.lua"/>
Link para o post
Compartilhar em outros sites

@Mateus Santosss 

 

O tempo você altera nessa linha addEvent(group_effect,1000,cid) no lugar de 1000 você deixa o intervalo de tempo em milisegundos.

Link para o post
Compartilhar em outros sites
Em 01/10/2017 em 20:25, antharaz disse:

@Mateus Santosss 

 

passa seu login.lua ae que vou editar ele com o novo código, para evitar colocar errado e "fuder" o ot

Desculpa se eu estiver revivendo topic mas @antharaz poderia fazer para mim tbm ?

login.lua :

 

local config = {
    loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)

if getPlayerSlotItem(cid, 2).itemid == 11396 then
doPlayerSetExperienceRate(cid, 2)
end
    local loss = getConfigValue('deathLostPercent')
    if(loss ~= nil) then
        doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
exhaustion.set(cid, 102053, -1)
setPlayerStorageValue(cid, 40008, -1)
setPlayerStorageValue(cid, 47002, -1)


    end

    local accountManager = getPlayerAccountManager(cid)
    if(accountManager == MANAGER_NONE) then
        local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
        if(lastLogin > 0) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
            str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
        end

        doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
    elseif(accountManager == MANAGER_NAMELOCK) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
    elseif(accountManager == MANAGER_ACCOUNT) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Infelizmente o servidor precisou ser resetado, como recompensa deixaremos 1 semana de double EXP!")
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Infelizmente o servidor precisou ser resetado, como recompensa deixaremos 1 semana de double EXP!")
    end

    if(not isPlayerGhost(cid)) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
    end

    registerCreatureEvent(cid, "Mail")
    registerCreatureEvent(cid, "GuildMotd")

    registerCreatureEvent(cid, "Idle")
    if(config.useFragHandler) then
        registerCreatureEvent(cid, "SkullCheck")
    end
               registerCreatureEvent(cid, "ShinobiWarCombat")
               registerCreatureEvent(cid, "ShinobiWarDeath")
           registerCreatureEvent(cid, "Arena")
           registerCreatureEvent(cid, "Izanami")
           registerCreatureEvent(cid, "Izanagi")
           registerCreatureEvent(cid, "AntiMc")
           registerCreatureEvent(cid, "UP")
           registerCreatureEvent(cid, "VocationIn")
           registerCreatureEvent(cid, "VocationOut")
           registerCreatureEvent(cid, "Protect")
           registerCreatureEvent(cid, "AmuletoDeath")
           registerCreatureEvent(cid, "AmuletoKill")
           registerCreatureEvent(cid, "Attack2")
           registerCreatureEvent(cid, "Attack")
           registerCreatureEvent(cid, "NonGuild")
           registerCreatureEvent(cid, "PvpNoPoison")
           registerCreatureEvent(cid, "ExameJouninDead")
           registerCreatureEvent(cid, "ExameJouninBoss")
           registerCreatureEvent(cid, "ExameChuninDead")
           registerCreatureEvent(cid, "ExameChuninBoss")
           registerCreatureEvent(cid, "Desbugar")
           registerCreatureEvent(cid, "Outfit")
           registerCreatureEvent(cid, "ProtDeath")
           registerCreatureEvent(cid, "Trocar Voc")
           registerCreatureEvent(cid, "Recompensa")
           registerCreatureEvent(cid, "showVoc") 
           registerCreatureEvent(cid, "ReportBug")
           registerCreatureEvent(cid, "AdvanceSave")
           
           
----------------------------------------------------------
local config = {
"itachi",
"kisame",
"minato",
"raikage",
"madara",
"pain",
"kakuzo",
"hashirama",
}

for i = 1, #config do
    if getVocationInfo(getPlayerVocation(cid)).name:lower() == config:lower() then
        if getPlayerStorageValue(cid, 5) < 1 then
            setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+80000)
            setCreatureMaxMana(cid, getCreatureMaxMana(cid)+80000)
            doCreatureAddMana(cid, getCreatureMaxMana(cid))
            doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
            setPlayerStorageValue(cid, 5, 1)
        end
        break
    end
end

-----------------------------------------------------------
    return true
end
 

Link para o post
Compartilhar em outros sites

@TiuoDrog 

Spoiler

local eff_config = {
						[6] = {msg = '[GOD/ADM]', cor = 'random'}, --[group id] = {msg = 'MENSSAGEM', cor = cor que quer ou 'random' para aleatorio}
						[5] = {msg = '[CM]', cor = 'random'}
}

function group_effect(cid)
	if isCreature(cid) then
		local t = eff_config[getPlayerGroupId(cid)]
		t.cor = type(t.cor) == 'string' and math.random(1,255) or t.cor
		doSendAnimatedText(getThingPos(cid), t.msg, t.cor)
		addEvent(group_effect,1000,cid)
	end
end


local config = {
    loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
if getPlayerSlotItem(cid, 2).itemid == 11396 then
doPlayerSetExperienceRate(cid, 2)
end
    local loss = getConfigValue('deathLostPercent')
    if(loss ~= nil) then
        doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
exhaustion.set(cid, 102053, -1)
setPlayerStorageValue(cid, 40008, -1)
setPlayerStorageValue(cid, 47002, -1)

    end
    local accountManager = getPlayerAccountManager(cid)
    if(accountManager == MANAGER_NONE) then
        local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
        if(lastLogin > 0) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
            str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
        end
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
    elseif(accountManager == MANAGER_NAMELOCK) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
    elseif(accountManager == MANAGER_ACCOUNT) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Infelizmente o servidor precisou ser resetado, como recompensa deixaremos 1 semana de double EXP!")
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Infelizmente o servidor precisou ser resetado, como recompensa deixaremos 1 semana de double EXP!")
    end
    if(not isPlayerGhost(cid)) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
    end
    registerCreatureEvent(cid, "Mail")
    registerCreatureEvent(cid, "GuildMotd")
    registerCreatureEvent(cid, "Idle")
    if(config.useFragHandler) then
        registerCreatureEvent(cid, "SkullCheck")
    end
               registerCreatureEvent(cid, "ShinobiWarCombat")
               registerCreatureEvent(cid, "ShinobiWarDeath")
           registerCreatureEvent(cid, "Arena")
           registerCreatureEvent(cid, "Izanami")
           registerCreatureEvent(cid, "Izanagi")
           registerCreatureEvent(cid, "AntiMc")
           registerCreatureEvent(cid, "UP")
           registerCreatureEvent(cid, "VocationIn")
           registerCreatureEvent(cid, "VocationOut")
           registerCreatureEvent(cid, "Protect")
           registerCreatureEvent(cid, "AmuletoDeath")
           registerCreatureEvent(cid, "AmuletoKill")
           registerCreatureEvent(cid, "Attack2")
           registerCreatureEvent(cid, "Attack")
           registerCreatureEvent(cid, "NonGuild")
           registerCreatureEvent(cid, "PvpNoPoison")
           registerCreatureEvent(cid, "ExameJouninDead")
           registerCreatureEvent(cid, "ExameJouninBoss")
           registerCreatureEvent(cid, "ExameChuninDead")
           registerCreatureEvent(cid, "ExameChuninBoss")
           registerCreatureEvent(cid, "Desbugar")
           registerCreatureEvent(cid, "Outfit")
           registerCreatureEvent(cid, "ProtDeath")
           registerCreatureEvent(cid, "Trocar Voc")
           registerCreatureEvent(cid, "Recompensa")
           registerCreatureEvent(cid, "showVoc") 
           registerCreatureEvent(cid, "ReportBug")
           registerCreatureEvent(cid, "AdvanceSave")
           
           
----------------------------------------------------------
local config = {
"itachi",
"kisame",
"minato",
"raikage",
"madara",
"pain",
"kakuzo",
"hashirama",
}
for i = 1, #config do
    if getVocationInfo(getPlayerVocation(cid)).name:lower() == config:lower() then
        if getPlayerStorageValue(cid, 5) < 1 then
            setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+80000)
            setCreatureMaxMana(cid, getCreatureMaxMana(cid)+80000)
            doCreatureAddMana(cid, getCreatureMaxMana(cid))
            doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
            setPlayerStorageValue(cid, 5, 1)
        end
        break
    end
end
if eff_config[getPlayerGroupId(cid)] then
group_effect(cid)
end
-----------------------------------------------------------
    return true
end

 

 

Link para o post
Compartilhar em outros sites
1 minuto atrás, antharaz disse:

@TiuoDrog 

  Ocultar conteúdo


local eff_config = {
						[6] = {msg = '[GOD/ADM]', cor = 'random'}, --[group id] = {msg = 'MENSSAGEM', cor = cor que quer ou 'random' para aleatorio}
						[5] = {msg = '[CM]', cor = 'random'}
}

function group_effect(cid)
	if isCreature(cid) then
		local t = eff_config[getPlayerGroupId(cid)]
		t.cor = type(t.cor) == 'string' and math.random(1,255) or t.cor
		doSendAnimatedText(getThingPos(cid), t.msg, t.cor)
		addEvent(group_effect,1000,cid)
	end
end


local config = {
    loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
if getPlayerSlotItem(cid, 2).itemid == 11396 then
doPlayerSetExperienceRate(cid, 2)
end
    local loss = getConfigValue('deathLostPercent')
    if(loss ~= nil) then
        doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
exhaustion.set(cid, 102053, -1)
setPlayerStorageValue(cid, 40008, -1)
setPlayerStorageValue(cid, 47002, -1)

    end
    local accountManager = getPlayerAccountManager(cid)
    if(accountManager == MANAGER_NONE) then
        local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
        if(lastLogin > 0) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
            str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
        end
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
    elseif(accountManager == MANAGER_NAMELOCK) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
    elseif(accountManager == MANAGER_ACCOUNT) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Infelizmente o servidor precisou ser resetado, como recompensa deixaremos 1 semana de double EXP!")
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Infelizmente o servidor precisou ser resetado, como recompensa deixaremos 1 semana de double EXP!")
    end
    if(not isPlayerGhost(cid)) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
    end
    registerCreatureEvent(cid, "Mail")
    registerCreatureEvent(cid, "GuildMotd")
    registerCreatureEvent(cid, "Idle")
    if(config.useFragHandler) then
        registerCreatureEvent(cid, "SkullCheck")
    end
               registerCreatureEvent(cid, "ShinobiWarCombat")
               registerCreatureEvent(cid, "ShinobiWarDeath")
           registerCreatureEvent(cid, "Arena")
           registerCreatureEvent(cid, "Izanami")
           registerCreatureEvent(cid, "Izanagi")
           registerCreatureEvent(cid, "AntiMc")
           registerCreatureEvent(cid, "UP")
           registerCreatureEvent(cid, "VocationIn")
           registerCreatureEvent(cid, "VocationOut")
           registerCreatureEvent(cid, "Protect")
           registerCreatureEvent(cid, "AmuletoDeath")
           registerCreatureEvent(cid, "AmuletoKill")
           registerCreatureEvent(cid, "Attack2")
           registerCreatureEvent(cid, "Attack")
           registerCreatureEvent(cid, "NonGuild")
           registerCreatureEvent(cid, "PvpNoPoison")
           registerCreatureEvent(cid, "ExameJouninDead")
           registerCreatureEvent(cid, "ExameJouninBoss")
           registerCreatureEvent(cid, "ExameChuninDead")
           registerCreatureEvent(cid, "ExameChuninBoss")
           registerCreatureEvent(cid, "Desbugar")
           registerCreatureEvent(cid, "Outfit")
           registerCreatureEvent(cid, "ProtDeath")
           registerCreatureEvent(cid, "Trocar Voc")
           registerCreatureEvent(cid, "Recompensa")
           registerCreatureEvent(cid, "showVoc") 
           registerCreatureEvent(cid, "ReportBug")
           registerCreatureEvent(cid, "AdvanceSave")
           
           
----------------------------------------------------------
local config = {
"itachi",
"kisame",
"minato",
"raikage",
"madara",
"pain",
"kakuzo",
"hashirama",
}
for i = 1, #config do
    if getVocationInfo(getPlayerVocation(cid)).name:lower() == config:lower() then
        if getPlayerStorageValue(cid, 5) < 1 then
            setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+80000)
            setCreatureMaxMana(cid, getCreatureMaxMana(cid)+80000)
            doCreatureAddMana(cid, getCreatureMaxMana(cid))
            doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
            setPlayerStorageValue(cid, 5, 1)
        end
        break
    end
end
if eff_config[getPlayerGroupId(cid)] then
group_effect(cid)
end
-----------------------------------------------------------
    return true
end

 

 

Obrigado :D como da rep++ ?

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo