Postado Março 28, 2013 12 anos no meu item.xml ta assim: Mostrar conteúdo oculto <item id="2414" article="a" name="dragon lance"> <attribute key="description" value="The extraordinary sharp blade penetrates every armor." /> <attribute key="weight" value="6700" /> <attribute key="defense" value="16" /> <attribute key="charges" value="500" /> <attribute key="showcharges" value="1" /> <attribute key="attack" value="47" /> <attribute key="weaponType" value="axe" /> <attribute key="slotType" value="two-handed" /> </item> com 500 de cargas, mais no ot tem apenas 100 de cargas, não teria um script pra mudar isso ? Obrigado desde ja! +REP
Postado Março 28, 2013 12 anos Eu acho que o máximo é 100 mesmo '-' >>> Baiak Slayer <<< Baiak Slayer 24h PVP 8.6 Site e IP: baiakslayer.org Informações: » 24 Horas Online » Mapa próprio da equipe Slayer (Spawns próprias) » Vocações balanceadas » Use o Cliente Baiak Slayer » 40+ Raids Automáticas » Grupo de Tutores Competentes » Excelente Suporte In-Game » 10.173+ Spawns » War System full » Sem Corrupção » Task Completa » EXP Rate: 250x Inicial (Estagiada) » Skill Rate: 30 x » Magic Rate: 15 x » Loot Rate: Própria do Servidor (Eventos Double Loot) Não perca mais tempo! Entre e divirta-se!! Citar
Postado Março 28, 2013 12 anos Autor mais exsite scripts q dão 500 de carga eu cheguei a config aqui mais ele não gastava estava com problema
Postado Março 28, 2013 12 anos Posta o script aí então >>> Baiak Slayer <<< Baiak Slayer 24h PVP 8.6 Site e IP: baiakslayer.org Informações: » 24 Horas Online » Mapa próprio da equipe Slayer (Spawns próprias) » Vocações balanceadas » Use o Cliente Baiak Slayer » 40+ Raids Automáticas » Grupo de Tutores Competentes » Excelente Suporte In-Game » 10.173+ Spawns » War System full » Sem Corrupção » Task Completa » EXP Rate: 250x Inicial (Estagiada) » Skill Rate: 30 x » Magic Rate: 15 x » Loot Rate: Própria do Servidor (Eventos Double Loot) Não perca mais tempo! Entre e divirta-se!! Citar
Postado Março 28, 2013 12 anos Autor durWeapons.lua: Mostrar conteúdo oculto function onStatsChange(cid, attacker, type, combat, value) chance = 970 if type == STATSCHANGE_HEALTHLOSS then if isPlayer(attacker) then local slotWeapon = nil if weapons[getPlayerSlotItem(attacker, CONST_SLOT_RIGHT).itemid] then slotWeapon = CONST_SLOT_RIGHT elseif weapons[getPlayerSlotItem(attacker, CONST_SLOT_LEFT).itemid] then slotWeapon = CONST_SLOT_LEFT end if slotWeapon == nil then return true end if (getItemAttribute(getPlayerSlotItem(attacker, slotWeapon).uid, "Charges") == "Broken") then doPlayerSendTextMessage(attacker, 22, "Sua weapon esta quebrada.") return false elseif (math.random(1,1000) > chance) then setDurabilidade(attacker, slotWeapon, weapons) end end elseif type == STATSCHANGE_HEALTHGAIN then return false end return true end function onCombat(cid, target) registerCreatureEvent(target, "DurGain") return true endfunction onStatsChange(cid, attacker, type, combat, value) chance = 970 if type == STATSCHANGE_HEALTHLOSS then if isPlayer(attacker) then local slotWeapon = nil if weapons[getPlayerSlotItem(attacker, CONST_SLOT_RIGHT).itemid] then slotWeapon = CONST_SLOT_RIGHT elseif weapons[getPlayerSlotItem(attacker, CONST_SLOT_LEFT).itemid] then slotWeapon = CONST_SLOT_LEFT end if slotWeapon == nil then return true end if (getItemAttribute(getPlayerSlotItem(attacker, slotWeapon).uid, "Charges") == "Broken") then doPlayerSendTextMessage(attacker, 22, "Sua weapon esta quebrada.") return false elseif (math.random(1,1000) > chance) then setDurabilidade(attacker, slotWeapon, weapons) end end elseif type == STATSCHANGE_HEALTHGAIN then return false end return true end function onCombat(cid, target) registerCreatureEvent(target, "DurGain") return true end durItens.lua: Mostrar conteúdo oculto local slotShield = nil local slotArmor = nil local slotLegs = nil local slotHelmet = nil local slotBoots = nil local slots = { [1] = {slot=slotHelmet, lib=helmets}, [4] = {slot=slotArmor, lib=armors}, [5] = {slot=slotShield, lib=shields}, [6] = {slot=slotShield, lib=shields}, [7] = {slot=slotLegs, lib=legs}, [8] = {slot=slotBoots, lib=boots} } function onThink(cid, interval) if (isPlayer(cid)) then for i=1, 8 do if slots ~= nil then if slots.lib[getPlayerSlotItem(cid, i).itemid] then slots.slot = i if setDurMaxHit(cid, slots.slot, slots.lib) then return true end end end end local slotWeapon = nil if weapons[getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid] then slotWeapon = CONST_SLOT_RIGHT elseif weapons[getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid] then slotWeapon = CONST_SLOT_LEFT end if slotWeapon ~= nil then if setDurMaxHit(cid, slotWeapon, weapons) then return true end end if getPlayerStorageValue(cid, 456431) < 0 then chance = math.random(15,30) setPlayerStorageValue(cid, 456432, chance) end chance = getPlayerStorageValue(cid, 456432) if(getCreatureCondition(cid, CONDITION_INFIGHT)) and getPlayerStorageValue(cid, 456431) < chance then local health = getCreatureHealth(cid) setPlayerStorageValue(cid, 456431, getPlayerStorageValue(cid, 456431)+1) if getPlayerStorageValue(cid, 456431) == chance-1 then addEvent(verificaLife, 1000, health, cid) setPlayerStorageValue(cid, 456431, -1) end end end end function verificaLife(health, cid) if (isPlayer(cid)) then if getCreatureHealth(cid) < health then for i=1, 8 do if slots ~= nil then if slots.lib[getPlayerSlotItem(cid, i).itemid] then slots.slot = i addEvent(setDurabilidade, math.random(10000,60000), cid, slots.slot, slots.lib) end end end end end end creaturescripts.xml: Mostrar conteúdo oculto <event type="think" name="DurabTime" event="script" value="durItens.lua"/> <event type="statschange" name="DurGain" event="script" value="durWeapons.lua"/> <event type="combat" name="Durab" event="script" value="durWeapons.lua"/> login.lua: Mostrar conteúdo oculto registerCreatureEvent(cid, "Durab") registerCreatureEvent(cid, "DurabTime") 039-durabilidade.lua: Mostrar conteúdo oculto weapons = { [2421] = {charge=100}, [2415] = {charge=50}, [2404] = {charge=50} } shields = { [2516] = {charge=50, def=31}, -- dragon shield [2520] = {charge=50, def=35} -- demon shield } armors = { [2486] = {charge=50, arm=15} } legs = { [7894] = {charge=50, arm=8} } helmets = { [2501] = {charge=50, arm=7} } boots = { [11113] = {charge=50, arm=3} } -- Não configurar daqui para baixo -- function isWeapon(uid) -- Function by Mock the bear. uid = uid or 0 local f = getItemWeaponType(uid) if f == 1 or f == 2 or f == 3 then return TRUE end return FALSE end function isShield(uid) -- Function by Mock the bear. uid = uid or 0 if getItemWeaponType(uid) == 4 then return TRUE end return FALSE end function setItemName(uid,name) -- Function by Mock the bear. return doItemSetAttribute(uid,'name',name) end function setItemDefense(uid,name) -- Function by Mock the bear. return doItemSetAttribute(uid,'defense',name) end function setItemArmor(uid,name) -- Function by Mock the bear. return doItemSetAttribute(uid,'armor',name) end function setDurabilidade(cid, slot, lib) if (isPlayer(cid)) then if getPlayerSlotItem(cid, slot).uid > 0 then if (getItemAttribute(getPlayerSlotItem(cid, slot).uid, "Charges")) ~= "Broken" then doItemSetAttribute(getPlayerSlotItem(cid, slot).uid, "Charges", (getItemAttribute(getPlayerSlotItem(cid, slot).uid, "Charges")) - 1) setItemName(getPlayerSlotItem(cid, slot).uid, getItemNameById(getPlayerSlotItem(cid, slot).itemid)..' [Dur: '.. (getItemAttribute(getPlayerSlotItem(cid, slot).uid, "Charges")) ..'/'.. lib[getPlayerSlotItem(cid, slot).itemid].charge ..']') if getItemAttribute(getPlayerSlotItem(cid, slot).uid, "Charges") <= 0 then doPlayerSendTextMessage(cid, 22, "Your item has broken.") if (isShield(getPlayerSlotItem(cid, slot).uid)) then setItemDefense(getPlayerSlotItem(cid, slot).uid, 0) end if (not isShield(getPlayerSlotItem(cid, slot).uid) and not isWeapon(getPlayerSlotItem(cid, slot).uid)) then setItemArmor(getPlayerSlotItem(cid, slot).uid, 0) end doSendMagicEffect(getPlayerPosition(cid), 2) doItemSetAttribute(getPlayerSlotItem(cid, slot).uid, "Charges", "Broken") return true end else doSendMagicEffect(getPlayerPosition(cid), 2) return false end end end end function setDurMaxHit(cid, slot, lib) if (getItemAttribute(getPlayerSlotItem(cid, slot).uid, "Charges")) ~= "Broken" then if (getItemAttribute(getPlayerSlotItem(cid, slot).uid, "Charges") == nil or getItemAttribute(getPlayerSlotItem(cid, slot).uid, "Charges") == 0 and slot ~= nil) then doItemSetAttribute(getPlayerSlotItem(cid, slot).uid, "Charges", lib[getPlayerSlotItem(cid, slot).itemid].charge) setItemName(getPlayerSlotItem(cid, slot).uid, getItemNameById(getPlayerSlotItem(cid, slot).itemid)..' [Dur: '.. (getItemAttribute(getPlayerSlotItem(cid, slot).uid, "Charges")) ..'/'.. lib[getPlayerSlotItem(cid, slot).itemid].charge ..']') return true end end return false end São esses. Creditos á:Jhon992
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.