Ir para conteúdo

Bennyhappy

Artesão
  • Total de itens

    118
  • Registro em

  • Última visita

Tudo que Bennyhappy postou

  1. ? https://t.co/yjlVrghQp6

  2. ????? https://t.co/kqADxsynRK

  3. sim obrigado, use .lua function onHealthChange(player, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)if not attacker then return primaryDamage, primaryType, secondaryDamage, secondaryType end if attacker:isMonster() and not attacker:getMaster() then primaryDamage = primaryDamage*3 secondaryDamage = secondaryDamage*3end return primaryDamage, primaryType, secondaryDamage, secondaryTypeendfunction onManaChange(player, attacker, manaChange, origin)if not attacker then return manaChange end if attacker:isMonster() and not attacker:getMaster() then manaChange = manaChange *3 end return manaChangeend
  4. Eu procuro para aumentar o dano de todos os monstros em geral em sources ou com function onHealthChange(player, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
  5. Olá amigos, como eu posso aumentar o dano de monstros? percentagem uso tfs 1.2 obrigado
  6. ¡Descárgate un oso! https://t.co/OG662drZhz ¡Navega como si estuvieras en otro país! @thetunnelbear

  7. @yamipeque34 tu pues amore

  8. @yamipeque34 ya ps, no cierto, que va dcir la gente! yo soy un amors de persona te hablo con mucha finura y delicadesa <3

  9. Ando buscando, pensando, encontrando una forma,De estar contigo un par de horas... https://t.co/WebBBAEfiF
  10. Perdamos los modales ? que aqui todo se vale ?? https://t.co/0UlSc002JN
  11. Funcionou perfeitamente. obrigado pequenos detalhes que fazem grandes erros kkk testado em tfs 0.4
  12. Error em consola: attempt to concatenate a nil value você não está devolver qualquer valor na função, não é tão simples quanto você pensa. yo modifique para: function getPlayerProtection(cid, param) for slot, const in pairs(slots) do local hasItemOn = getPlayerSlotItem(cid, const).uid if hasItemOn ~= 0 then itemSlots[slot] = hasItemOn end end for slot, slottedItem in pairs(itemSlots) do local temp = getItemAttribute(slottedItem, param) return total + (temp ~= nil and temp or 0 ) end end mas eu tenho alguns erros, então eu pedi ajuda
  13. local slots = { ['head'] = CONST_SLOT_HEAD, ['armor'] = CONST_SLOT_ARMOR, ['legs'] = CONST_SLOT_LEGS, ['feet'] = CONST_SLOT_FEET, ['left'] = CONST_SLOT_LEFT, ['right'] = CONST_SLOT_RIGHT } local itemSlots, total = {}, 0 for slot, const in pairs(slots) do local hasItemOn = getPlayerSlotItem(cid, const).uid if hasItemOn ~= 0 then itemSlots[slot] = hasItemOn end end for slot, slottedItem in pairs(itemSlots) do local temp = getItemAttribute(slottedItem, 'IceProtec') total = total + (temp ~= nil and temp or 0 ) end Eu quero converter este código em uma função como esta: // getPlayerProtection(cid, 'IceProtec')
  14. Obrigado amigo, que a linha simplesmente meu erro resolvido Você poderia me ajudar a criar uma função com esse código? local slots = { ['head'] = CONST_SLOT_HEAD, ['armor'] = CONST_SLOT_ARMOR, ['legs'] = CONST_SLOT_LEGS, ['feet'] = CONST_SLOT_FEET, ['left'] = CONST_SLOT_LEFT, ['right'] = CONST_SLOT_RIGHT } local itemSlots, total = {}, 0 for slot, const in pairs(slots) do local hasItemOn = getPlayerSlotItem(cid, const).uid if hasItemOn ~= 0 then itemSlots[slot] = hasItemOn end end for slot, slottedItem in pairs(itemSlots) do local temp = getItemAttribute(slottedItem, 'IceProtec') total = total + (temp ~= nil and temp or 0 ) end para uso: getPlayerProtection(cid, 'IceProtec') ? I Use TFS 0.4
  15. HI Este código funciona perfeitamente retornado bons valores. mas .... Só tenho esse erro no console: Este erro acontece quando o personagem não tem nenhum artigo na respectiva ranhura. Aqui, o código: local slots = { ['head'] = CONST_SLOT_HEAD, ['armor'] = CONST_SLOT_ARMOR, ['legs'] = CONST_SLOT_LEGS, ['feet'] = CONST_SLOT_FEET, ['left'] = CONST_SLOT_LEFT, ['right'] = CONST_SLOT_RIGHT } local itemSlots, total = {}, 0 for slot, const in pairs(slots) do local hasItemOn = getPlayerSlotItem(cid, const).uid if hasItemOn then itemSlots[slot] = hasItemOn end end for slot, slottedItem in pairs(itemSlots) do local temp = getItemAttribute(slottedItem, 'IceProtec') total = total + (temp ~= nil and temp or 0 ) end // doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Ice: "..total..".") E eu tento criar esta função, mas só me retorna o valor de um slot: function getPlayerProtection(cid, attribute) local slots = { ['head'] = CONST_SLOT_HEAD, ['armor'] = CONST_SLOT_ARMOR, ['legs'] = CONST_SLOT_LEGS, ['feet'] = CONST_SLOT_FEET, ['left'] = CONST_SLOT_LEFT, ['right'] = CONST_SLOT_RIGHT } local itemSlots, total = {}, 0 for slot, const in pairs(slots) do local hasItemOn = getPlayerSlotItem(cid, const).uid if hasItemOn then itemSlots[slot] = hasItemOn end end for slot, slottedItem in pairs(itemSlots) do local temp = getItemAttribute(slottedItem, attribute) return total + (temp ~= nil and temp or 0 ) end end para uso: getPlayerProtection(cid, 'IceProtec') e mesmo erro no valor de nulo em consola
  16. por el momento estoy teniendo error em creatureevent.cpp xD agora errror em monster.cpp xD i use tfs 0.4 update para 0.4 pls
  17. alreves: function onDropLoot(cid, item) local block = {2221, 1221, 2922} for i=1, #block do if item.itemid == block[i] then return true else return false end end return true end
  18. sim no e posible, agora estoy mudando para reflection: function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and type == STATSCHANGE_HEALTHLOSS then if isPlayer(attacker) or isMonster(attacker) then if combat == COMBAT_ICEDAMAGE then absorb = math.floor(value / 2) doSendMagicEffect(getThingPosition(attacker), CONST_ME_ICEATTACK) doCreatureAddHealth(attacker, -absorb) doSendAnimatedText(getThingPosition(attacker), absorb, COLOR_TEAL) end if combat == COMBAT_EARTHDAMAGE then absorb = math.floor(value / 2) doSendMagicEffect(getThingPosition(attacker), CONST_ME_GREEN_RINGS) doCreatureAddHealth(attacker, -absorb) doSendAnimatedText(getThingPosition(attacker), absorb, COLOR_LIGHTGREEN) end end return true end end itemHEAD = getPlayerSlotItem(cid, CONST_SLOT_HEAD) itemARMOR = getPlayerSlotItem(cid, CONST_SLOT_ARMOR) itemLEGS = getPlayerSlotItem(cid, CONST_SLOT_LEGS) itemFEET = getPlayerSlotItem(cid, CONST_SLOT_FEET) itemLEFT = getPlayerSlotItem(cid, CONST_SLOT_LEFT) itemRIGHT = getPlayerSlotItem(cid, CONST_SLOT_RIGHT) getItemAttribute(itemHEAD.uid, "EnergyProtec") getItemAttribute(itemHEAD.uid, "FireProtec") getItemAttribute(itemHEAD.uid, "IceProtec") getItemAttribute(itemHEAD.uid, "PhysicalProtec") getItemAttribute(itemHEAD.uid, "DeathProtec") getItemAttribute(itemHEAD.uid, "EarthProtec") getItemAttribute(itemHEAD.uid, "HolyProtec") estoy tentando fazer sume todos os attrubutes em todos los slots para sacar % do reflection by damage xD u can helpme?
  19. function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and isPlayer(attacker) and type == STATSCHANGE_HEALTHLOSS then value = value - 10 doTargetCombatHealth(attacker, cid, combat, -value, -value, type) end return true end e reduzir os danos para os jogadores? que pode ser reduzida através de elementos? bump
  20. Coming soon new productions/ Proximamente nuevas producciones escuchalas: https://t.co/bis1GXr9W1
  • Quem Está Navegando   0 membros estão online

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