Ir para conteúdo

xWhiteWolf

Héroi
  • Registro em

  • Última visita

Solutions

  1. xWhiteWolf's post in (Resolvido)Deixa Clone Com Buff was marked as the answer   
    local tempo = 180 -- tempo em segundos. local effect = {208} -- effect no player, caso queira apenas 1, basta remover os outros numeros.       local ml = 30 -- quantos ira aumentar o skill de ML local skillfist = 55 -- quantos ira aumentar o skill de Fist local skillsword = 15 -- quantos ira aumentar o skill de Sword local skillaxe = 15 -- quantos ira aumentar o skill de Axe local skillclub = 55 -- quantos ira aumentar o skill de Club local skilldistance = 15 -- quantos ira aumentar o skill de Distance local skillshield = 15 -- quantos ira aumentar o skill de Shield local health = 80 -- A cada 1 segundo quantos aumentar de vida local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)       local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml) setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, skillfist) setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, skillsword) setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, skillaxe) setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, skilldistance) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield) setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit) setCombatCondition(combat, condition)       local condition = createConditionObject(CONDITION_HASTE) setConditionParam(condition, CONDITION_PARAM_SPEED, 250) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE) setCombatCondition(combat, condition)       local condition = createConditionObject(CONDITION_REGENERATION) setConditionParam(condition, CONDITION_PARAM_SUBID, 1) setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health) setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000) setCombatCondition(combat, condition)              function magicEffect3(tempo2,tempo3,cid) if (isCreature(cid)) then     if getPlayerStorageValue(cid, 102053) > 0 and getCreatureCondition(cid, CONDITION_REGENERATION, 1) then         for i=1, #effect do local position = {x=getPlayerPosition(cid).x+1, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} doSendMagicEffect(position, effect[i]) -- parte modificada local summons = getCreatureSummons(cid) if #summons > 0 then for k = 1, #summons do local pos = getCreaturePosition(summons[k]) local positions = {x = pos.x + 1, y = pos.y, z = pos.z} doSendMagicEffect(positions, effect[i]) end end -- fim da parte modificada         end     end end end                    function onCastSpell(cid, var) local position129 = {x=getPlayerPosition(cid).x+1, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} if getPlayerStorageValue(cid, 102053) ~= 1 or getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then     doCombat(cid, combat, var)     tempo2 = 0     while (tempo2 ~= (tempo*1000)) do         addEvent(magicEffect3, tempo2, tempo2, tempo*1000, cid)         tempo2 = tempo2 + 300     end     setPlayerStorageValue(cid, 102053,1) -- storage verifica transformado, quando = 1 player esta transformado.     doCreatureSay(cid, "Kyuubi Furie", TALKTYPE_MONSTER)     doSendMagicEffect(position129, 130) else     doPlayerSendCancel(cid, "Sorry, you are transformed.") end end deve resolver, só alterei a função pra funcionar com cada summon;
  2. xWhiteWolf's post in (Resolvido)[Pedido] "Gema" REP+ was marked as the answer   
    mas você é muito preguiçoso viu...




    PS: eu apenas peguei os arquivos que vem no server "Mapa FoxWorld 1.0", os créditos são de quem fez.
    As spells são todas feitas pelo Jovial, é o script dele de meteor cast. O resto foi feito baseado no foxworld.
  3. xWhiteWolf's post in (Resolvido){PEDIDO} Script de TRAPP Narutibia was marked as the answer   
    existe uma função que faz isso que é a doCreatureSetNoMove(cid, cannotMove). Pra usar ela vc faz assim:
    doCreatureSetNoMove(uid, true) --- faz o cara não andar addEvent(doCreatureSetNoMove, segundos trapado * 1000, uid, false) --- faz o cara andar e vai ser executada depois de x segundos. Se eu quiser deixar o cara 15 segundos preso eu faço:
     
    e esse uid aí é o unique id da criatura que eu quero que seja trapada. Se for o cara que vai castar a spell vc troca uid por cid, se for um target vc faz
    local target = getCreatureTarget(cid) doCreatureSetNoMove(target, true) addEvent(doCreatureSetNoMove, 15 * 1000, target, false) Espero que tenha ajudado.
  4. xWhiteWolf's post in (Resolvido)[PEDIDO] Summon Monsters was marked as the answer   
    fiz uma versãozinha aqui, espero que vc curta
    function onCastSpell(cid, var) local pos = getPlayerPosition(cid) local maxsummon = 4 -- numero máximo de summons local possible = { {x = pos.x, y = pos.y - 2, z = pos.z, stackpos = 0}, {x = pos.x, y = pos.y + 2, z = pos.z, stackpos = 0}, {x = pos.x - 2, y = pos.y, z = pos.z, stackpos = 0}, {x = pos.x + 2, y = pos.y, z = pos.z, stackpos = 0}, {x = pos.x - 2, y = pos.y - 1, z = pos.z, stackpos = 0}, {x = pos.x + 2, y = pos.y - 1, z = pos.z, stackpos = 0}, {x = pos.x + 2, y = pos.y + 1, z = pos.z, stackpos = 0}, {x = pos.x - 2, y = pos.y + 1, z = pos.z, stackpos = 0}, {x = pos.x - 1, y = pos.y - 2, z = pos.z, stackpos = 0}, {x = pos.x + 1, y = pos.y - 2, z = pos.z, stackpos = 0}, {x = pos.x + 1, y = pos.y + 2, z = pos.z, stackpos = 0}, ---- {x = pos.x, y = pos.y - 1, z = pos.z, stackpos = 0}, {x = pos.x, y = pos.y + 1, z = pos.z, stackpos = 0}, {x = pos.x - 1, y = pos.y, z = pos.z, stackpos = 0}, {x = pos.x + 1, y = pos.y, z = pos.z, stackpos = 0}, {x = pos.x - 1, y = pos.y + 1, z = pos.z, stackpos = 0}, {x = pos.x - 1, y = pos.y - 1, z = pos.z, stackpos = 0}, {x = pos.x + 1, y = pos.y - 1, z = pos.z, stackpos = 0}, {x = pos.x + 1, y = pos.y + 1, z = pos.z, stackpos = 0}, ------ {x = pos.x - 1, y = pos.y + 2, z = pos.z, stackpos = 0} } local mobs = { -- monstros que serão sumonados (coloque o nome deles) [1] = "Clone Spider", [2] = "Demon Skeleton", [3] = "Dog", [4] = "Bug" } summonpos = 0 for k = 1, #mobs do alert = false local summons = getCreatureSummons(cid) if #summons < maxsummon then  for i = 1, #possible do if isWalkable(possible[i], true, false, true) then summonpos = possible[i] end end if summonpos ~= 0 then if #summons >= 1 then for j = 1, #summons do if getCreatureName(summons[j]):lower() == string.lower(mobs[k]) then alert = true end end end if alert == false then doConvinceCreature(cid, doCreateMonster(mobs[k], summonpos)) doSendMagicEffect(pos, 12) doSendMagicEffect(summonpos, 10) else doPlayerSendCancel(cid, "You already have this kinda of summon.") doSendMagicEffect(pos, 2) end else doPlayerSendCancel(cid, "There is not enough room.") doSendMagicEffect(pos, 2) return true end else doSendMagicEffect(pos, 2) doPlayerSendCancel(cid, "You cannot summon more than "..maxsummon.." creature(s).") break end end  end <instant name="Volatile Spiderling" words="utevo res tera" lvl="40" mana="20" prem="1" selftarget="1" exhaustion="2000" groups="1,2000" icon="88" needlearn="0" event="script" value="especiais/assistedsuicide.lua"> <vocation id="5"/> <vocation id="6"/> <vocation id="7"/> <vocation id="8"/> </instant>
  5. xWhiteWolf's post in (Resolvido)[Ajuda] Sistema akatsuki was marked as the answer   
    prontíssimo!




  6. xWhiteWolf's post in (Resolvido)Problema Hardcore sobre Dobra was marked as the answer   
    Simplicidade é o último grau de sofisticação!
  7. xWhiteWolf's post in (Resolvido)Duvida simples demais was marked as the answer   
    Entra num char god e testa cada um desses efeitos usando /x numero

    no lugar do numero vc vai colocando de 0 até 41 e se gostar de algum apenas coloque no items.xml o nome dele m minúsculo sem o "const_ani_" na frente
     
    CONST_ANI_SPEAR = 0 CONST_ANI_BOLT = 1 CONST_ANI_ARROW = 2 CONST_ANI_FIRE = 3 CONST_ANI_ENERGY = 4 CONST_ANI_POISONARROW = 5 CONST_ANI_BURSTARROW = 6 CONST_ANI_THROWINGSTAR = 7 CONST_ANI_THROWINGKNIFE = 8 CONST_ANI_SMALLSTONE = 9 CONST_ANI_DEATH = 10 CONST_ANI_LARGEROCK = 11 CONST_ANI_SNOWBALL = 12 CONST_ANI_POWERBOLT = 13 CONST_ANI_POISON = 14 CONST_ANI_INFERNALBOLT = 15 CONST_ANI_HUNTINGSPEAR = 16 CONST_ANI_ENCHANTEDSPEAR = 17 CONST_ANI_REDSTAR = 18 CONST_ANI_GREENSTAR = 19 CONST_ANI_ROYALSPEAR = 20 CONST_ANI_SNIPERARROW = 21 CONST_ANI_ONYXARROW = 22 CONST_ANI_PIERCINGBOLT = 23 CONST_ANI_WHIRLWINDSWORD = 24 CONST_ANI_WHIRLWINDAXE = 25 CONST_ANI_WHIRLWINDCLUB = 26 CONST_ANI_ETHEREALSPEAR = 27 CONST_ANI_ICE = 28 CONST_ANI_EARTH = 29 CONST_ANI_HOLY = 30 CONST_ANI_SUDDENDEATH = 31 CONST_ANI_FLASHARROW = 32 CONST_ANI_FLAMMINGARROW = 33 CONST_ANI_SHIVERARROW = 34 CONST_ANI_ENERGYBALL = 35 CONST_ANI_SMALLICE = 36 CONST_ANI_SMALLHOLY = 37 CONST_ANI_SMALLEARTH = 38 CONST_ANI_EARTHARROW = 39 CONST_ANI_EXPLOSION = 40 CONST_ANI_CAKE = 41 CONST_ANI_WEAPONTYPE = 254 CONST_ANI_NONE = 255 Espero ter ajudado.
  8. xWhiteWolf's post in (Resolvido)Comando !saga was marked as the answer   
    haha não é pra tanto mas fico feliz em ter ajudado. Se der certo clique em "Melhor Resposta!" para que fique como resolvido!
  9. xWhiteWolf's post in (Resolvido)[Ajuda] Como fazer magias "vip" was marked as the answer   
    isso é bem simples meu jovem, você cria dois combats numa mesma spell e faz por storage pra ver qual vc tem que soltar.

    aqui tem um exemplo:
     
    local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 34) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0) local xCombat = createCombatObject() setCombatParam(xCombat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(xCombat, COMBAT_PARAM_BLOCKSHIELD, 1) setCombatParam(xCombat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(xCombat, COMBAT_PARAM_EFFECT, 34) setCombatFormula(xCombat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0) local area = createCombatArea({ {0, 1, 1, 1, 0}, {1, 1, 1, 1, 1}, {1, 1, 3, 1, 1}, {1, 1, 1, 1, 1}, {0, 1, 1, 1, 0} }) local area1 = createCombatArea({ {0, 0, 0}, {0, 3, 0}, {0, 0, 0} }) setCombatArea(xCombat, area) setCombatArea(combat, area1) local config = { storageativ = 76650 } function onCastSpell(cid, var) if getPlayerStorageValue(cid, config.storageativ) == 1 then retorn = doCombat(cid, xCombat, var) else retorn = doCombat(cid, combat, var) end return retorn end
  10. xWhiteWolf's post in (Resolvido)Alguem me explica como calculo o dano de skills como essa ? was marked as the answer   
    o traço de negativo é só pra definir que o resultado vai ser negativo (se for positivo não vai tirar dano, vai adicionar vida)

    ele define que skillTotal é a skill multiplicada pelo ataque e que o level total é o level do player dividido por 5.

    Daí dps ele retorna uma fórmula de mínimo de dano e uma de máximo de dano, separadas por virgula.
     
    perceba que no final da formula ele coloca o negativo justamente pq formulas de dano não podem ser positivas
  11. xWhiteWolf's post in (Resolvido)[PEDIDO] NPC de task avançado [Zezenia] was marked as the answer   
    tópico criado, vou dar como resolvido. http://www.tibiaking.com/forum/topic/44760-magnus-challenger/
  12. xWhiteWolf's post in (Resolvido)[Ajuda] Player Look Bug was marked as the answer   
    tópico fechado à pedido do autor.
  13. xWhiteWolf's post in (Resolvido)[pedido] spell izanagi was marked as the answer   
    isso que você tá pedindo é exatamente isso daqui: http://www.tibiaking.com/forum/topic/34189-boss-skill-aegis-of-immortal/

    só trocar a checagem de storage do reborn pra ser por tempo em vez de cargas (1 ou 0) e fazer uma magia que dê 20 segundos de storage
  14. xWhiteWolf's post in (Resolvido)[Pedido] Utura gran em 8.6 com efeito a cada 1 seg was marked as the answer   
    local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, 33) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local condition = createConditionObject(CONDITION_REGENERATION) setConditionParam(condition, CONDITION_PARAM_SUBID, 1) setConditionParam(condition, CONDITION_PARAM_BUFF, true) setConditionParam(condition, CONDITION_PARAM_TICKS, 10 * 1000) setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 100000) setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 100) setCombatCondition(combat, condition) function onCastSpell(cid, var) for i = 0, 9 do addEvent(function()  if isCreature(cid) then doSendMagicEffect(getCreaturePosition(cid), 12) end end, 1 + (1000 * i)) end    return doCombat(cid, combat, var) end
  15. xWhiteWolf's post in (Resolvido)Boolean value - getPlayerMana(cid) was marked as the answer   
    puts, eu vou ver se sobra um tempo essa semana pra eu dar uma olhada nisso pra ti e fazendo os respectivos testes.. é melhor doque ficar nesse bate papo. Daí conforme for eu já posto o script pronto

    não dá pra usar combat a menos que você esteja pk, por isso não tava indo.. eu fiz uma mudanças no healmaster que eu havia postado pra ele rodar em um retangulo

     
    local config = { health = 300, mana = 300, effect = 12, effectheal = 12, area = 3 } function onCastSpell(cid, var) if getCreatureMaster(cid) then local master = getCreatureMaster(cid) local pos = getCreaturePosition(cid) local poseffect = {x = pos.x, y = pos.y, z = pos.z} for k = -(config.area - 1), (config.area - 1) do for j = -(config.area - 1), (config.area - 1) do poseffect.x = pos.x + k poseffect.y = pos.y + j doSendMagicEffect(poseffect, config.effect) end end if isInParty(master) then local members = getPartyMembers(getPlayerParty(master)) local health = math.ceil( config.health / #members ) local mana = math.ceil( config.mana / #members ) for i = 1, #members do if getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(members[i])) < config.area then doCreatureAddHealth(members[i], health) doCreatureAddMana(members[i], mana) doSendAnimatedText(getCreaturePosition(members[i]), "+"..health, 18) doSendMagicEffect(getCreaturePosition(members[i]), config.effectheal) end end else doCreatureAddHealth(master, config.health) doCreatureAddMana(master, config.mana) doSendAnimatedText(getCreaturePosition(master), "+"..config.health, 18) doSendMagicEffect(getCreaturePosition(master), config.effectheal) end end return true end testa aí e vê se te interessa.
  16. xWhiteWolf's post in (Resolvido)Erro na spell! was marked as the answer   
    local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTGREEN) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 31) setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 11) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -50.0, 0, -50.8, 0) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end function onCastSpell(cid, var) local parameters = {cid = cid, var = var, combat1 = combat1} for k = 1, 7 do addEvent(function() if isPlayer(cid) then addEvent(onCastSpell1, 1, parameters) end end, 1 + ((k-1) * 200)) end return true end isso resolve a maior parte dos problemas.. se vc quiser adicionar ou remover danos mude ali no for.. da forma que está tá dando 7 hits. 
  17. xWhiteWolf's post in (Resolvido)COMBAT_PARAM_CREATEITEM sem adicionar pz locked was marked as the answer   
    local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) setCombatParam(combat, COMBAT_PARAM_EFFECT, 43) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 28) local condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, 2000) setConditionFormula(condition, -0.5, 0, -0.5, 0) setCombatCondition(combat, condition) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1) function onCastSpell(cid, var) doCreateItem(2120, 1, getThingPos(variantToNumber(var))) doCombat(cid, combat, var) return true end
  18. xWhiteWolf's post in (Resolvido)Todo script é feito em lua? Onde começar para fazer scripts? was marked as the answer   
    sim, todo script é feito em lua mas como lua é uma linguagem dinâmica e relativamente simples as declarações são organizadas em XML.. as funções usadas são todas da source (que é escrita em C++) mas pra fazer um script existe uma ordem respectiva que você tem que respeitar:
     
    NON-SCRIPT RELATED / LIB RELATED CALLBACK SCRIPT RELATED SCRIPT ITSELF RETURN (true/false/anything) END OF CALLBACK essa é a estrutura de um script perfeito mas na prática são poucos os scripts que possuem esse cuidado todo. Se quer começar pegue uma apostila de matlab pra compreender numa linguagem mais didática como são as estruturas condicionais e de repetição, como usar métodos e tudo mais. Depois pegue e crie scripts simples pra treinar e vá evoluindo com o tempo
  19. xWhiteWolf's post in (Resolvido)Ajuda Npc Passagem. was marked as the answer   
    resolvido então!
  20. xWhiteWolf's post in (Resolvido)Shapeshifter Ring Script was marked as the answer   
    Items.xml: Procure os items com os id's e edite.. eu só fiz no 7967 e 7968 porque são os que tem aqui no meu 8.54
    <item id="7967" article="a" name="Shapeshifter Ring"> <attribute key="weight" value="80" /> <attribute key="armor" value="1" /> <attribute key="slotType" value="ring" /> <attribute key="transformEquipTo" value="7968" /> <attribute key="stopduration" value="1" /> <attribute key="showduration" value="1" /> </item> <item id="7968" article="a" name="Shapeshifter Ring"> <attribute key="slotType" value="ring" /> <attribute key="decayTo" value="14327" /> <attribute key="transformDeEquipTo" value="7967" /> <attribute key="duration" value="36000" /> <attribute key="armor" value="1" /> <attribute key="showduration" value="1" /> <attribute key="weight" value="80" /> </item> o script é esse daqui e vai em movements:
    local outfits = {320, 311, 305, 246, 232, 120, 90, 47} function onEquip(cid, item, slot) doTransformItem(item.uid, item.itemid + 1) local outfit = outfits[math.random(1, #outfits)] doSetCreatureOutfit(cid, {lookType = outfit}, -1) doSendMagicEffect(getCreaturePos(cid), 12) doDecayItem(item.uid) return true end function onDeEquip(cid, item, slot) doTransformItem(item.uid, item.itemid - 1) doRemoveCondition(cid, CONDITION_OUTFIT) doSendMagicEffect(getCreaturePos(cid), 12) return true end <movevent type="Equip" itemid="7967" slot="ring" event="script" value="shapeshifter.lua"/> <movevent type="DeEquip" itemid="7968" slot="ring" event="script" value="shapeshifter.lua"/> Desculpa a demora, essa semana foi complicada pra mim..
    se quiser adicionar mais outfits é só editar aqui:
  21. xWhiteWolf's post in (Resolvido)[HELP] MAGIAS AUMENTAR ATTACK was marked as the answer   
    1)
    function onGetFormulaValues(cid, level, skill, attack, factor) local skillTotal, levelTotal = skill + attack * 3, level / 5 return -(skillTotal * 1.4 + levelTotal), -(skillTotal * 3 + levelTotal) end aqui você tem toda a fórmula de dano, nela entra o level, as skills, o ataque total e o fator (uma constante qualquer)
    , ele cria então duas variáveis chamadas SkillTotal e Level total. SkillTotal é a skill + 3x o Ataque total e o LevelTotal é o level dividido por 5.
    Então ele retorna a seguinte fórmula: skillTotal * 1,4 + levelTotal como sendo o dano mínimo e skillTotal * 3 + LevelTotal como sendo o dano máximo.

    Pra aumentar o dano é só aumentar os valores que estão multiplicando ali no return. Coloca 2.0 e 4 e vai aumentando devagar e testando pra ver quando está do seu agrado (use o Reload)

    2) 
    Ele usa uma fórmula diferente que está aqui: setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -7, 0, -8, 0)
    Apenas altere esse valor -7 e -8 que você vai chegar na medida ideal que você quiser. Coloque -5 e -6 pra começar e vá alterando devagar (sempre deixando negativo porque ele vai remover vida, e não adicionar)
  22. xWhiteWolf's post in (Resolvido){Pedido} Magia que reflete outras was marked as the answer   
    Mude aqui na spell
    local config = {  storage = 3482101, cooldown = 20, effect1 = 29, --- efeito que sai qnd usa a spell charges = 10 --- quantas cargas vai ganhar de reflect }  function onCastSpell(cid, var)    if getPlayerStorageValue(cid, config.storage) >= 1 then doPlayerSendCancel(cid, "Your skill is already active.") return false end      if os.time() - getPlayerStorageValue(cid, 55694) >= config.cooldown then setPlayerStorageValue(cid, 55694, os.time()) doSendMagicEffect(getCreaturePosition(cid), config.effect1) setPlayerStorageValue(cid, config.storage, config.charges)  doPlayerSendTextMessage(cid, 27, "You activated your skill, the next "..config.charges.." damage(s) will be reflected.") else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, 55694))).." seconds.") return false end        return true end e no creaturescripts:
     
    local config = {  storage = 3482101, effect1 = 17, --- efeito que sai ao dar reflect effect2 = 29 -- efeito que aparece na pessoa que levou reflect }  function onStatsChange(cid, attacker, type, combat, value) if value >= 1 and (type == STATSCHANGE_HEALTHLOSS or (getCreatureCondition(cid, CONDITION_MANASHIELD) and type == STATSCHANGE_MANALOSS))  then if getPlayerStorageValue(cid,config.storage) >= 1 and isCreature(attacker) then doSendAnimatedText(getCreaturePosition(attacker),"-"..value, 215) doCreatureAddHealth(attacker, -value, true) doCreatureSay(cid,"Uchihagaeshi!", 19) doSendMagicEffect(getCreaturePosition(cid), config.effect1) doSendMagicEffect(getCreaturePosition(attacker), config.effect2) setPlayerStorageValue(cid,config.storage, getPlayerStorageValue(cid,config.storage) - 1) return false end end return true end Só substituir os dois que vai ficar da forma que vc quer
  23. xWhiteWolf's post in (Resolvido){Pedido} Criação de potion was marked as the answer   
    Crie um arquivo.xml em data/mods chamado Alchemist.xml e cole isto dentro:
    <?xml version="1.0" encoding="UTF-8"?> <mod name="Alchemist System" version="1.0" author="Leoxtibia" contact="none" enabled="yes"> <config name="alch_sys"><![CDATA[ counter = {x = 17, y = 56, z = 7} efeitos = {x=17, y=53, z=7} receitas = { {items = {{2160,1}, {2157,2}} , itemgain = {{5878,100}}, storage = 56000}, {items = {{2148,5}, {2155,1}} , itemgain = {{2113,1}}, storage = 56001}, {items = {{2498,1}, {2113,1}} , itemgain = {{2472,1}}, storage = 56002} } function Caldeiron() local B = { {3693,{x=17, y=53, z=7, stackpos = 1}}, {3694,{x=18, y=53, z=7, stackpos = 1}} } for i = 1, #B do doTransformItem(getThingfromPos(B[i][2]).uid,getTileItemById(B[i][2], B[i][1]).uid == 0 and B[i][1] or (B[i][1]-4)) end end function getItemsInPos(items, pos)      for i = 1,#items do      local stack = getTileItemById(pos, items[i][1])          if stack.uid > 0 and math.max(1, stack.type) >= items[i][2] and i == #items then          return true          end      end return false end function doRemoveItensInPos(items, pos) local items = type(items) == "table" and items or {items}          for i = 1, table.maxn(items) do      doRemoveItem(getThingFromPos({x=pos.x,y=pos.y,z=pos.z,stackpos=2}).uid)      end      return nil end function effets(position,delay)      local text = {"Ishhh!", "Kaboom", "Tic Tac", "BUM!", "Blop Blop!", "Cronch!"}      local effects = {2, 6, 25, 31, 36,40, 54, 51, 65, 66, 67, 68} if delay ~= 0 then      doSendAnimatedText(position, text[math.random(1, #text)], math.random(1, 255))      doSendMagicEffect(position, effects[math.random(1, #effects)])      addEvent(effets, 1000, position, delay -1) end end]]></config> <action actionid="4780" event="script"><![CDATA[ domodlib('alch_sys') function onUse(cid, item, fromPosition, itemEx, toPosition) doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) for _, t in ipairs(receitas) do          if getItemsInPos(t.items, counter) then              doRemoveItensInPos(t.items, counter)              effets(efeitos,6)              Caldeiron()              return setPlayerStorageValue(cid, t.storage, 1)          end end return doPlayerSendCancel(cid, "You must put the correct items in the counter.") end]]></action> <action itemid="2567" event="script"><![CDATA[ domodlib('alch_sys') function onUse(cid, item, fromPosition, itemEx, toPosition) if itemEx.actionid == 4781 then      for _, x in ipairs(receitas) do          if getPlayerStorageValue(cid, x.storage) >= 0 then              for i=1,#x.itemgain do              doPlayerAddItem(cid, x.itemgain[i][1], x.itemgain[i][2])              doPlayerPopupFYI(cid, "You have prepared ".. x.itemgain[i][2] .." ".. getItemNameById(x.itemgain[i][1]) ..".")              end              Caldeiron()              setPlayerStorageValue(cid, x.storage, -1)          end      end end return true end]]></action> </mod> Configuração:
    Quote

    counter = {x = 17, y = 56, z = 7} -- local do counter (balcão) onde os items estarão.
    efeitos = {x=17, y=53, z=7} -- é a primeira posição mostrada no vídeo

    receitas = {
    {items = {{2160,1}, {2157,2}} , itemgain = {{5878,100}}, storage = 56000}, --- items = {ITEMS DA RECEITA}, itemgain={ITEMQUEGANHARÁ}
    {items = {{2148,5}, {2155,1}} , itemgain = {{2113,1}}, storage = 56001},
    {items = {{2498,1}, {2113,1}} , itemgain = {{2472,1}}, storage = 56002}
    }

    function Caldeiron() ----- [só EDITE AS POSIÇÕES]
    local B = { 
    {3693,{x=17, y=53, z=7, stackpos = 1}}, --- PRIMEIRA POSIÇÃO no vídeo -- não mexa no stackpos
    {3694,{x=18, y=53, z=7, stackpos = 1}} -- segunda posição no vídeo -- n mexa no stackpos Para adicionar mais receitas, é só adicionar mais uma linha, mudando o storage para +1. Lembrando que a última linha não tem vírgula no final.
    {items = {{2666,1}, {2671,1}} , itemgain = {{2672,1}}, storage = 56003}


    aqui tem um vídeo de como o sistema funciona:

  24. xWhiteWolf's post in (Resolvido)[PEDIDO] Como instalar esse mod? was marked as the answer   
    Tópico dado como resolvido à pedido do autor.
  25. xWhiteWolf's post in (Resolvido)Cooldown was marked as the answer   
    troca essa parte
     
    por
    local cooldown = 10 function onCastSpell(cid, var) if os.time() - getPlayerStorageValue(cid, 19329) >= cooldown then doPlayerSetStorageValue(cid, 19329, os.time()) if #returnSpell > 1 then for i = 1, #returnSpell do addEvent(onCallCombat, (i*450)+15, {cid, returnSpell[i], var}) end else doCombat(cid, ret[1], var) end else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(cooldown - (os.time() - getPlayerStorageValue(cid, 19329))).." seconds.") return false end return true end

Informação Importante

Confirmação de Termo