Ir para conteúdo

Líderes

Conteúdo Popular

Exibindo conteúdo com a maior reputação em 10/06/11 em todas áreas

  1. Infinity Aol

    Hue e um outro reagiu a Aluccard por uma resposta no tópico

    2 pontos
    Olá! A pedidos de usuarios, resolvi fazer esse script simples e eficaz. Como o própio nome do tópico diz: Aol Inifinito. No script possui um config onde pode ser alterado o ammyID = id do amuleto, lossExp = player perder exp, lossItems = player perder items. newAol.lua local config = { ammyID = 2130, lossExp = false, lossItems = false } function onDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) then if (getPlayerSlotItem(cid, 2).itemid == config.ammyID) then if (config.lossExp == false) then doPlayerSetLossPercent(cid, experience, 0) end doCreatureSetDropLoot(cid, config.lossItems) return true end end return true end creaturescripts.xml <event type="death" name="NewAol" event="script" value="newAol.lua"/> Adicione no login.lua essa linha perto dos outros registercreatures. registerCreatureEvent(cid, "NewAol") Obs¹: Esse script serve para todos os players inclusive RedSkulls/BlackSkulls. Qualquer dúvida é só postar! Atenciosamente, Aluccard.
  2. [MOD] Reflect System 0.1

    Reds reagiu a Aluccard por uma resposta no tópico

    1 ponto
    Olá Tibia King's! Reflect System[0.1] Função Ao ser obtido um item que possua o atributo Reflect o player será capaz de refletir danos Fisicos e Mágicos ao mesmo tempo. A idéia geral desse script é bem simples mesmo. Quando o player receber um damage de uma criatura (monstro ou player) esse attack será refletido em uma certa porcentagem. Exemplo: 22:46 You see a golden amulet. It weighs 8.30 oz. [Reflect: 80%] <?xml version="1.0" encoding="UTF-8"?> <mod name="Reflect System" version="0.1" author="Aluccard" contact="" enabled="yes"> <description> Script que funciona para refletir danos para as creatures que o atacar. </description> <event type="login" name="regReflectDamage" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid,"ReflectDamage") return true end ]]></event> <event type="statschange" name="ReflectDamage" event="script"><![CDATA[ local slotPos = {CONST_SLOT_NECKLACE, CONST_SLOT_FEET, CONST_SLOT_RING} function onStatsChange(cid, attacker, type, combat, value) local reflectPercent = 0 local dmg = value local playerPos = getCreaturePosition(cid) local attackerPos = getCreaturePosition(attacker) for i = 1, #slotPos do if getPlayerSlotItem(cid, slotPos[i]).uid > 1 then if getItemReflectPercent(getPlayerSlotItem(cid, slotPos[i]).uid) then reflectPercent = reflectPercent + getItemReflectPercent(getPlayerSlotItem(cid, slotPos[i]).uid) end end end if reflectPercent > 0 then dmg = math.ceil(-value*((100-reflectPercent)/100)) if (dmg < 0) then doCreatureAddHealth(cid, dmg) doSendAnimatedText(playerPos, -dmg, COLOR_RED) doSendMagicEffect(playerPos, 0) else doSendMagicEffect(playerPos, 3) end dmg = math.ceil(-value*(reflectPercent/100)) if (dmg < 0) then doCreatureAddHealth(attacker, dmg) doSendAnimatedText(attackerPos, -dmg, COLOR_RED) doSendDistanceShoot(playerPos, attackerPos, CONST_ANI_SMALLHOLY) end else return true end end]]></event> </mod> function getItemReflectPercent(itemuid) return getItemAttribute(itemuid, "reflectPercent") end function doPlayerAddReflectedItem(cid, itemid, percent) local item = doPlayerAddItem(cid, itemid) doItemSetAttribute(item, "description", "[Reflect: "..percent.."%]") doItemSetAttribute(item, "reflectPercent", percent) end Obs³: Para adicionarmos novos items com o atributo Reflect usamos o comando doPlayerAddReflectedItem(cid,itemid,percent). {itemid = id do item escolhido / percent = porcentagem do reflect} Creio que não esqueci de nada. Qualquer dúvida é só postar! Sem mais, Aluccard. Edit: Npc que vende Reflect Item Obs¹: Os items pode ser acumulativo. Ou seja, se o amuleto der 10% de reflect e o ring der 35%. O player possuirá um Reflect = 45%. [MOD]reflectSystem.xml Obs²: O código está meio enferrujado, mas funciona. Como podes ver o sistema está na versão 0.1 e irá ser atualizada com o tempo. ReflectLib.lua
  3. [RESOLVIDO]Item protection

    Underewar reagiu a Kimoszin por uma resposta no tópico

    1 ponto
    <movevent type="Equip" itemid="ItemID" slot="body" event="function" value="onEquipItem"/> <movevent type="DeEquip" itemid="ItemID" slot="body" level="100" event="function" value="onDeEquipItem"> <vocation id="1"/> <vocation id="2" showInDescription="0"/> <vocation id="3"/> <vocation id="4" showInDescription="0"/> </movevent> <item id="ItemID" name="nome"> <attribute key="weight" value="1800" /> <attribute key="armor" value="8" /> <attribute key="slotType" value="armor" /> <attribute key="absorbPercentAll" value="40"/> obs: Nao testei, nao tenho Ot aqui :/
  4. Client chooser

    klipstyle reagiu a Guilherme. por uma resposta no tópico

    1 ponto
    Bom, você vai entrar no VB e importar a TibiaAPI.dll, agora você vai seguir alguns passos do Tutorial do Renato sobre como criar 1 BOT, logo você vai colocar isso no Form1_Load: c = clientchooser.showbox p = c.getclients Isso vai te servir de ajuda: http://tibiaking.com/forum/topic/628-tibiaapi-editando-o-clientchooser/ http://tibiaking.com/forum/topic/627-tibiaapi-definindo-client-e-player/
Líderes está configurado para São Paulo/GMT-03:00

Informação Importante

Confirmação de Termo