Postado Outubro 1, 2017 7 anos 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"/>
Postado Outubro 1, 2017 7 anos 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
Postado Outubro 1, 2017 7 anos 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 Outubro 1, 2017 7 anos por Cain Jorge (veja o histórico de edições)
Postado Outubro 1, 2017 7 anos @antharaz Agora, antharaz disse: @antharaz sim kk eu marquei errado ali , voce é foda pode fazer igual porfavor ?
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.