Ir para conteúdo

RigBy

Visconde
  • Total de itens

    411
  • Registro em

  • Última visita

  • Dias Ganhos

    10

Tudo que RigBy postou

  1. RigBy

    Notificação de Rep

    Não sei se é apenas comigo mas aqui não ta mais chegando a notificação de quando alguém curti meu post, desde que adiciono as frases.
  2. RigBy

    Regen constante

    Acho que seria melhor fazer um globalevent mas ta ai do jeito que você quer. function doDoT(cid) local a = { {levelMin = 0, levelMax = 10, heal = 1}, {levelMin = 11, levelMax = 20, heal = 4}, {levelMin = 21, levelMax = math.huge, heal = 20}, } if not isCreature(cid) then return false end if getCreatureHealth(cid) < getCreatureMaxHealth(cid) then for _, b in pairs(a) do if getPlayerLevel(cid) >= b.levelMin and getPlayerLevel(cid) <= b.levelMax then doCreatureAddHealth(cid, b.heal) addEvent(doDoT, 2000, cid) end end end return true end function onLogin(cid) local condition_infight = createConditionObject(CONDITION_INFIGHT) setConditionParam(condition_infight, CONDITION_PARAM_TICKS, 3 * 1000) doAddCondition(cid, condition_infight) doDoT(cid) return true end
  3. RigBy

    Script e npc

    Reformulei o script do npc -- Do not remove the credits -- -- Developed by Rigby -- -- Xtibia.com -- local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local needVocation = 1 local config = { ["Master sorcerer"] = {items = {2033, 1}, items2 = {5882, 5}, gainVocation = 5, storage = 221321321}, ["Dark wizard"] = {items = {4852, 1}, items2 = {2144, 15}, gainVocation = 11, storage = 221321322}, ["Blood Mage"] = {items = {10601, 10}, items2 = {5905, 2}, gainVocation = 12, storage = 221321323}, } function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, 'yes') then if getPlayerVocation(cid) == needVocation then selfSay('Qual você quer?', cid) for k, v in pairs(config) do selfSay('{'..k..'}', cid) talkState[talkUser] = 1 end else selfSay('Sua vocação não e digna destas promotions, ou voce ja recebeu sua promotion.', cid) end end for i, q in pairs(config) do if talkState[talkUser] == 1 and msgcontains(msg, ''..i..'') then if getPlayerItemCount(cid, q.items[1]) >= q.items[2] and getPlayerItemCount(cid, q.items2[1]) >= q.items[2] then selfSay('Parabêns você acaba de se tornar '..i..'', cid) doPlayerSetVocation(cid, q.gainVocation) doPlayerRemoveItem(cid, q.items[1], q.items[2]) doPlayerRemoveItem(cid, q.items2[1], q.items2[2]) setPlayerStorageValue(cid, q.storage, 1) talkState[talkUser] = 2 else selfSay('Você ter '..q.items[2]..' '..getItemNameById(q.items[1])..' e '..q.items2[2]..' '..getItemNameById(q.items2[1])..'.', cid) end end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) e para que ele não perca a vocation local config = { --[storage] = vocation, [221321321] = 5, [221321322] = 11, [221321323] = 12, } function onLogin(cid) for i, q in pairs(config) do if getPlayerStorageValue(cid, i) == 1 then doPlayerSetVocation(cid, q) end end return true end
  4. RigBy

    Regen constante

    para de funciona e so volta quando loga de novo? mudei para onThink(cid, interval), não se esqueça de registra o evento. function doDoT(cid) local a = { {levelMin = 0, levelMax = 10, heal = 1}, {levelMin = 11, levelMax = 20, heal = 4}, {levelMin = 21, levelMax = math.huge, heal = 20}, } if not isCreature(cid) then return false end if getCreatureHealth(cid) < getCreatureMaxHealth(cid) then for _, b in pairs(a) do if getPlayerLevel(cid) >= b.levelMin and getPlayerLevel(cid) <= b.levelMax then doCreatureAddHealth(cid, b.heal) addEvent(doDoT, 2000, cid) end end end return true end function onThink(cid, interval) doDoT(cid) return true end
  5. RigBy

    Regen constante

    Da para fazer assim, mas vai da muito mais maitoooooooooo trabalho, porque você terá que adicionar um por um, porque caso eu use >= os heal vai começar a se junta tipo 25...75...225...655. Recomendo você usar esse dai de cima.
  6. RigBy

    Regen constante

    Ai, não repita os levels, coloque sempre 1 a mais, math.huge que dizer infinito. function doDoT(cid) local a = { {levelMin = 0, levelMax = 10, heal = 1}, {levelMin = 11, levelMax = 20, heal = 4}, {levelMin = 21, levelMax = math.huge, heal = 20}, } if not isCreature(cid) then return false end if getCreatureHealth(cid) < getCreatureMaxHealth(cid) then for _, b in pairs(a) do if getPlayerLevel(cid) >= b.levelMin and getPlayerLevel(cid) <= b.levelMax then doCreatureAddHealth(cid, b.heal) addEvent(doDoT, 2000, cid) end end end return true end function onLogin(cid) doDoT(cid) return true end
  7. RigBy

    Regen constante

    Eu também penso como o darkhell, mas pode ser que de certo. Fiz um onLogin function doDoT(cid) if not isCreature(cid) then -- Se o player tiver deslogado return false end doCreatureAddHealth(cid, 25) -- quanto vai healar addEvent(doDoT, 5000, cid) -- em quantos segundos vai healar, no caso 5000 = 5 segundos return true end function onLogin(cid) doDoT(cid) return true end
  8. RigBy

    Script e npc

    Eu vou arruma esse script ai, jaja eu posto ele mas arrumado e completo. To baixando um ot para testa.
  9. RigBy

    Regen constante

    Mudei para ativa em 5 em 5 segundos quando tiver em combate, so basta criar uma magia de se healar pera erei uma parada #pronto ai local magia = "blood rage" -- magia que ele ira solta, tem que ser o nome da magia e não a palavra magica local storage = 5834843857 -- storage que vai ser usada, o valor é 1 para ser ativado local hps = 5 -- 5 em 5 vai acontecer function onCombat(cid, target) if isPlayer(cid) then if getPlayerStorageValue(cid, storage) == 1 then if getPlayerStorageValue(cid, 5345435432534543) < os.time() then doCreatureCastSpell(cid, magia) setPlayerStorageValue(cid, 5345435432534543, os.time() + hps) end end end return true end function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) then if getPlayerStorageValue(cid, storage) == 1 then if getPlayerStorageValue(cid, 5345435432534543) < os.time() then doCreatureCastSpell(cid, magia) setPlayerStorageValue(cid, 5345435432534543, os.time() + hps) end end end return true end
  10. RigBy

    Regen constante

    Ele so fica se regenerando quando ta em combate que nem aquele outro script ou assim que logar começa a se regenera. precisa ter feito alguma coisa para começar a regenera.
  11. RigBy

    Script e npc

    Uma vez Oneshot falo num tópico que isso é um bug no sistema e infelizmente eu não lembro como resolve isso mas eu sei um jeito de resolver em .lua Isso pode resolve para que a vocação não mude, so basta adiciona para que o npc de uma certa storage, e quando ele loga ele ganha a vocação de novo. function onLogin(cid) if getPlayerStorageValue(cid, 645332) == 1 then doPlayerSetVocation(cid, 6) end return true end Eu to indo tomar banho, jaja eu refaço esse npc ai que eu tinha feito hehehe, adicionar um tabela nele.
  12. desabilita essas funções no config.lua allowChangeOutfit = true allowChangeColors = true allowChangeAddons = true
  13. Em plena terça... assustando encantado o povo.
  14. Seria uma boa amostrar a quantidade de melhores respostas que uma pessoa tem no perfil que nem a reputação e não apenas no top 5 (se isso já existir eu não sei onde fica). E também volta com aqueles nomezinho que tinha antigamente na reputação, tipo ao atingir 1000 rep ficaria la em baixo da reputação "Sou o Deus do XTibia".
  15. RigBy

    Summon spell

    Seria uma magia normal, só que em cada level summonaria um Mob diferente. Digamos que eu coloque essa magia no lugar de exura, se eu usa-se exura no level 25 summonaria um rat, se eu usa-se exura no level 100 summonaria um demon. Para adicionar, acredito eu que so basta substitui essa função: void Creature::addDamagePoints(Creature* attacker, int32_t damagePoints) por essa dai que eu ta no tópico.(acredito eu) Acabei de formatar o pc, to sem os programas aqui, ai não da para eu testa
  16. Até que fim terminei de formata meu pc
  17. RigBy

    Summon spell

    Summon por level Summon não ganha exp
  18. Que poha é esse negocio colorido no facebook
  19. Substitua por essa local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO) setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 6, 12) local area = createCombatArea(AREA_CROSS5X5) setCombatArea(combat, area) local slotPos = {5,6} -- slots local items = {2376, 2512, 2467} -- id das rods function onCastSpell(cid, var) for i = 1, #slotPos do for _, y in pairs(items) do if getPlayerSlotItem(cid, slotPos[i]).itemid == y then doCombat(cid, combat, var) return true end end end return false end
  20. RigBy

    Usar Baú e Equipar itens

    Conseguir fazer, deu um pouco de trabalho mas com ajuda do Vodkart e comedinha eu conseguir fazer. Testei de todos os jeito, acho que ta sem nenhum bug. Action: .lua -- Do not remove the credits -- -- [ACTION] Clicar no bau é equipa os items -- -- Developed by Rigby -- -- Config -- local bau = 2500 -- id do bau local slotPos = {1,4,5,6,7,8} -- slots local items = {2461, 2467, 2512, 2376, 2649, 2643} -- Set que vai ganha, você terar que adiciona na seguinte ordem -- local items = {helmet, armor, mão esquerda, mão direita, legs, boots} -- Config -- function onUse(cid, item, fromPosition, itemEx, toPosition) local check_slot = true for _, y in pairs(items) do if item.itemid == bau then for i = 1, #slotPos do if getPlayerSlotItem(cid, slotPos[i]).uid > 1 then check_slot = false end end if check_slot then doRemoveItem(item.uid, 1) for _, var in pairs(items) do doPlayerAddItem(cid, var, 1) end end elseif item.itemid == y then local tab = {} for _, i in pairs(items) do if getPlayerItemCount(cid, i) > 0 then table.insert(tab, 1) end end if #tab >= 6 then doPlayerAddItem(cid, bau, 1) for _, var in pairs(items) do doPlayerRemoveItem(cid, var, 1) end else doPlayerSendCancel(cid, "Você precisa ter todas as partes para transformar no bau denovo") end end end return true end Você adicionar no itemid todos os items que vai ganha e o id do bau também \/, que nesse caso é 2500 .xml <action itemid="2500;2461;2467;2512;2376;2649;2643" event="script" value="Nomedoscript.lua"/>
  21. TFS 0.4, rev 3777 r19, versão 8.60 eu baixei as dll uma por uma só basta você puxa no google que você acha. libiconv-2.dll libmysql.dll libxml2-2.dll lua5.1.dll zlib1.dll
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...