Ir para conteúdo
Banner com Efeitos

Orochi Elf

Membro
  • Registro em

  • Última visita

Solutions

  1. Orochi Elf's post in (Resolvido)Erro Spell Bugando Tudo a Distro 8.6 was marked as the answer   
    Brother eu elaborei aqui uma magia, sem usar esses combats.
    Não sei se a formula que elaborei vai ficar ao seu gosto, porém, poderemos ir melhorando conforme o teste.
     
    Eu nomearia de "special exura", que no caso funcionaria para todas as vocações, aqui nesse código eu só configurei a magia para as 4 primeiras vocações, suas promoções ainda não estão configuradas, usando assim evitaria a necessidade de criar 3 magias/arquivos que no final executaria a mesma coisa, porém se não gostar do resultado eu posso apenas resolver sanar o problema do script.
     
    function onCastSpell(cid) local spellFormula = { [1] = (getPlayerLevel(cid) * getPlayerMagLevel(cid)), [2] = (getPlayerLevel(cid) * getPlayerMagLevel(cid)), [3] = (getPlayerLevel(cid) * (math.floor(getPlayerLevel(cid) / 2))), [4] = (getPlayerLevel(cid) * 2 + (math.floor(getPlayerLevel(cid) / 2) * 4)) } if spellFormula[getPlayerVocation(cid)] then doCreatureAddHealth(cid, spellFormula[getPlayerVocation(cid)]) doSendMagicEffect(getThingPos(cid, 49)) return true end return false end Mas de qualquer forma, está aqui o seu código com o problema resolvido.
    -- paladin local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 49) setCombatParam(combat2, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) setCombatParam(combat2, COMBAT_PARAM_AGGRESSIVE, 0) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, 0, 11000, 0, 12000) function onCastSpell(cid, var) doCombat(cid, combat2, var) return true end -- mage local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 49) setCombatParam(combat2, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) setCombatParam(combat2, COMBAT_PARAM_AGGRESSIVE, 0) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, 0, 20000, 0, 15000) function onCastSpell(cid, var) doCombat(cid, combat2, var) return true end -- knight local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 49) setCombatParam(combat2, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) setCombatParam(combat2, COMBAT_PARAM_AGGRESSIVE, 0) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, 0, 8000, 0, 9000) function onCastSpell(cid, var) doCombat(cid, combat2, var) return true end  
  2. Orochi Elf's post in (Resolvido)[Duvida] Vantagens com função na source ? was marked as the answer   
    Rapaz, dependendo das scripts como o membro acima citou, é melhor você criar pelas sources para diminuir o consumo de memória do seu servidor, deixando ele mais leve e mais rápido evitando "freezes" e outros. Além de você ter uma lista de funções mais ampla.
     
    Eu particularmente fiz o sistema de (Vantagem e Desvantagem // Effective) direto nas sources, eu creio que ficou melhor do que um "statsChange" que seria um "creature event". Assim essa edição direto, deixou o script, vamos dizer que mais "natural", que não precisa pegar algo que aconteceu e manipula-lo.
     
    Bom.. esse é o meu ponto de vista
  3. Orochi Elf's post in (Resolvido)Remake line of script was marked as the answer   
    U need add an condition:
     

    if ballcatch[item.itemid].typeee == "master" then     local restrictions = {"Moltres", "Articuno", "Zapdos", "Mew", "Mewtwo", "Entei", "Raikou", "Suicune", "Lugia", "Ho-oh", "Darkrai", "Beldum", "Metang", "Metagross","Shiny Metagross", "Shiny Metang", "Shiny Milotic"}     if isInArray(restrictions, name) then         return doPlayerSendTextMessage(cid, 25, "This pokemon is legendary and It can not be captured in master ball.")     end end  
    Sorry by my bad english :'c
  4. Orochi Elf's post in (Resolvido)[AJUDA] Addon System was marked as the answer   
    Não testei.
     



  5. Orochi Elf's post in (Resolvido)Monstros/Players Attack was marked as the answer   
    Não testei. o Statschange voce registra no login.lua, e o target voce registra no xml do monstro.
     

    function onStatsChange(cid, attacker, type, combat, value)     if isPlayer(cid) and type == STATSCHANGE_HEALTHLOSS then         if getPlayerStorageValue(cid, 12345) >= 1 then             return false         end     end     return true end function onTarget(cid, target)     if isPlayer(target) and getPlayerStorageValue(target, 12345) >= 1 then         return false     end     return true end
  6. Orochi Elf's post in (Resolvido)Limitar skills was marked as the answer   
    Então o "return false", não está impedindo de avançar o level.
    Bom.. eu não sei se existe uma função, de setar a nova "rate" de magic level. então eu tou usando desta forma. teste ai.
     

    local skills = {     [SKILL_SWORD] = {maxLevel = 171},     [SKILL_AXE] = {maxLevel = 171},     [SKILL_CLUB] = {maxLevel = 171},     [SKILL_DISTANCE] = {maxLevel = 171},     [SKILL_SHIELD] = {maxLevel = 171},     [SKILL_FISHING] = {maxLevel = 171},     [SKILL__MAGLEVEL] = {maxLevel = 171}, } function onAdvance(cid, skill, oldLevel, newLevel)     local i = skills[skill]          if i then         if newLevel > i.maxLevel then                          doPlayerSetRate(cid, skill, 0.0)             return false         end     end     return true end
  7. Orochi Elf's post in (Resolvido)Comando !Rebattle was marked as the answer   
    Não testei.
     

    local cfg = {     premium = true, -- Need Premium?     price = 5, -- Price ¨* 10000 } function onSay(cid)     if getTileInfo(getThingPos(cid)).protection then         if getCreatureCondition(cid, CONDITION_INFIGHT) then             if cfg.premium and isPremium(cid) then                 if doPlayerRemoveMoney(cid, cfg.price * 10000) then                                          doPlayerSendTextMessage(cid, 25, "Voce removeu seu battle.")                     doRemoveCondition(cid, CONDITION_INFIGHT)                     return true                 else                                          doPlayerSendCancel(cid, "Voce não tem 5 gold bars.")                     return true                 end             else                                  doPlayerSendCancel(cid, "Voce precisa de premium account.")                 return true             end         else                          doPlayerSendCancel(cid, "Voce não está com battle.")             return true         end     else              doPlayerSendCancel(cid, "Voce precisa estar dentro da area de protection zone.")         return true     end     return true end
  8. Orochi Elf's post in (Resolvido)[Ajuda] Script Simples was marked as the answer   
    Amigo, pra te falar a verdade está mandando o efeito sim, não está dando para você ver porque quando o player dá o teleport, ele recarrega as imagens no CLIENT então não aparece, porém algum outro player que estiver perto, vai ver o efeito direitinho.
     
     

    function onSay(cid, words, param)     local pos = {x = 1153, y = 1220, z = 6}       if not getTileInfo(getThingPos(cid)).protection then                  doPlayerSendCancel(cid, "Voce só pode teleportar dentro de áreas com proteção")         return true     end     doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)     addEvent(function()         doTeleportThing(cid, pos)         doSendMagicEffect(pos, CONST_ME_TELEPORT)     end, 50)     return true end
  9. Orochi Elf's post in (Resolvido)Players deslogando com battle status was marked as the answer   
    Bom.. de maneira customizável.
    @OBS: Não testei.
     
    Data/CreatureScripts/Scripts crie um arquivo chamado BS_Logout.lua, dentro adicione:
    function onLogout(cid)     if getCreatureCondition(cid, CONDITION_INFIGHT) then                  doPlayerSendCancel(cid, "Voce não pode deslogar, voce está com battle.")         return false     end     return true end CreatureScripts.xml
    <event type="logout" name="BS_Logout" event="script" value="BS_Logout.lua"/> E no Login.lua, antes do ultimo "Return True" adicione

    registerCreatureEvent(cid, "BS_Logout")
  10. Orochi Elf's post in (Resolvido)Scripters de plantão was marked as the answer   
    Nossa, um erro simples no código, viajei.
     

    local teleportPos = {x = 652, y = 1020, z = 7, stackpos = 1} local teleportId = 1387 function onTimer()     for i = 1, 255 do         teleportPos.stackpos = i         if getThingFromPos(teleportPos).itemid == teleportId then             doRemoveItem(getThingFromPos(teleportPos).uid, 1)         end     end     return true end
  11. Orochi Elf's post in (Resolvido)Esconder words da talkaction was marked as the answer   
    Prontinho
     

    local config = {     battle = true,    -- se precisa estar sem battle (true). Se colocar false, poder?usar teleport no meio de batalhas } function onSay(cid, words, param)     local storage = 23564     local tempo = 30          if exhaustion.check(cid, storage) then         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar esse comando novamente.")         return true     end          if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then         doPlayerSendCancel(cid, "Sair de Battle Primeiro.")         return true     end          doSendMagicEffect(getPlayerPosition(cid),250)     doPlayerSendCancel(cid,"Teleportado!")     doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))     exhaustion.set(cid, storage, tempo*60)     return true end
  12. Orochi Elf's post in (Resolvido)Ao abrir canal was marked as the answer   
    kkkkk, agora sim vai funcionar.
    local channels = {     [5] = {txt = "(GC) Lembretes Rápidos: Este canal é apenas para CONVERSAS CASUAIS e SOCIALIZAÇÃO. Negociações e spam/flood são proibidas neste canal, e respeito e educação são essenciais. Siga as regras para não ser mutado"}, -- GameChat     [6] = {txt = "(Trade) Lembretes Rápidos: Este canal é apenas para TROCAS de itens relacionados ao jogo ou FORMAÇÃO DE TIMES. Qualquer coisa além disso pode ocasionar um mute ou banimento."}, -- Trade     [9] = {txt = "(Help) Lembretes Rápidos: Este canal é apenas para AJUDA. Faça sua pergunta educadamente, ou no caso se você estiver respondendo, seja claro e objetivo. Spoils são proibidos."}, -- Help } -- [ChannelID] = {txt = Texto que irá aparecer}, function onJoinChannel(cid, channelId, users)     local t = channels[channelId]     if t then         addEvent(doPlayerSendChannelMessage, 150, cid, "", t.txt, TALKTYPE_CHANNEL_W, channelId)     end     return true end
  13. Orochi Elf's post in (Resolvido)Meu .exe do Serv com Outro Nome was marked as the answer   
    Da uma editada com no hex decimal, vê se você consegue editar
  14. Orochi Elf's post in (Resolvido)Script com erros na distro was marked as the answer   
    Teste assim agora.
     


      OBS: O Site tirou a identação do código.
  15. Orochi Elf's post in (Resolvido)[Talkactions] Comando !addon was marked as the answer   
    Aaah, perdão novamente...
     
    Eu estava fazendo sem debuggar antes...
    Erros de escrita, ctza que não tem mais...
     
    se tiver, é so nas funçoes...
     
    Estou sem um servidor pra testar, sorry..
     
    Tai : http://pastebin.com/MuZCqMuT
  16. Orochi Elf's post in (Resolvido)[Dúvida] Talkaction Ao Ser Falada Não Aparecer No Chat was marked as the answer   
    Prontinho., teste esse !
     



Informação Importante

Confirmação de Termo