Sua Comunidade de servidores derivados


Você não está conectado. Conecte-se ou registre-se

Ver o tópico anterior Ver o tópico seguinte Ir em baixo  Mensagem [Página 1 de 1]

#1
 RenataPT


Membro
Membro
Held Items Com Tiers[/size]



Tutorial do necessário:
Vá em Configuration.lua(data/lib) e no fim adicione isso:
Spoiler:
--> [HELDS] <--
-- X --
AtkBonus1 = 1.10
AtkBonus2 = 1.20
AtkBonus3 = 1.30
AtkBonus4 = 1.40
AtkBonus5 = 1.50
AtkBonus6 = 1.60
AtkBonus7 = 1.70
DefBonus1 = 1.10
DefBonus2 = 1.20
DefBonus3 = 1.30
DefBonus4 = 1.40
DefBonus5 = 1.50
DefBonus6 = 1.60
DefBonus7 = 1.70
DmgReturn1 = 0.04
DmgReturn2 = 0.05
DmgReturn3 = 0.06
DmgReturn4 = 0.07
DmgReturn5 = 0.08
DmgReturn6 = 0.09
DmgReturn7 = 0.10
HellBonus1 = 2.50
HellBonus2 = 2.60
HellBonus3 = 2.70
HellBonus4 = 2.80
HellBonus5 = 2.90
HellBonus6 = 3
HellBonus7 = 3.50
PoisonBonus1 = 2.50
PoisonBonus2 = 2.60
PoisonBonus3 = 2.70
PoisonBonus4 = 2.80
PoisonBonus5 = 2.90
PoisonBonus6 = 3
PoisonBonus7 = 3.50
-- Y --
Regen1 = 700
Regen2 = 1000
Regen3 = 1500
Regen4 = 2000
Regen5 = 2500
Regen6 = 3000
Regen7 = 3500
Cure1 = 10
Cure2 = 20
Cure3 = 30
Cure4 = 40
Cure5 = 50
Cure6 = 60
Cure7 = 70

--> [HELDS] <--

Bom, esses são os bonus dos helds, a medida que for criando helds, deve-se adicionar os bonus.


Agora vá em "Data/Actions/Scripts" e crie um arquivo.lua com nome de HeldSystem, e dentro bote:
Spoiler:
local heldTable = {
-- X --
--[ID] = {attribute = "heldx", ident = 1}, -- Defense 1
--[ID2] = {attribute = "heldx", ident = 2}, -- Defense 2
--[ID3] = {attribute = "heldx", ident = 3}, -- Defense 3
--[ID4] = {attribute = "heldx", ident = 4}, -- Defense 4
--[ID5] = {attribute = "heldx", ident = 5}, -- Defense 5
--[ID6] = {attribute = "heldx", ident = 6}, -- Defense 6
--[ID7] = {attribute = "heldx", ident = 7}, -- Defense 7
--[ID] = {attribute = "heldx", ident = 8}, -- Attack 1
--[ID2] = {attribute = "heldx", ident = 9}, -- Attack 2
--[ID3] = {attribute = "heldx", ident = 10}, -- Attack 3
--[ID4] = {attribute = "heldx", ident = 11}, -- Attack 4
--[ID5] = {attribute = "heldx", ident = 12}, -- Attack 5
--[ID6] = {attribute = "heldx", ident = 13}, -- Attack 6
--[ID7] = {attribute = "heldx", ident = 14}, -- Attack 7
--[ID] = {attribute = "heldx", ident = 15}, -- Return 1
--[ID2] = {attribute = "heldx", ident = 16}, -- Return 2
--[ID3] = {attribute = "heldx", ident = 17}, -- Return 3
--[ID4] = {attribute = "heldx", ident = 18}, -- Return 4
--[ID5] = {attribute = "heldx", ident = 19}, -- Return 5
--[ID6] = {attribute = "heldx", ident = 20}, -- Return 6
--[ID7] = {attribute = "heldx", ident = 21}, -- Return 7
--[ID] = {attribute = "heldx", ident = 22}, -- Hellfire 1
--[ID2] = {attribute = "heldx", ident = 23}, -- Hellfire 2
--[ID3] = {attribute = "heldx", ident = 24}, -- Hellfire 3
--[ID4] = {attribute = "heldx", ident = 25}, -- Hellfire 4
--[ID5] = {attribute = "heldx", ident = 26}, -- Hellfire 5
--[ID6] = {attribute = "heldx", ident = 27}, -- Hellfire 6
--[ID7] = {attribute = "heldx", ident = 28}, -- Hellfire 7
--[ID] = {attribute = "heldx", ident = 29}, -- Poison 1
--[ID2] = {attribute = "heldx", ident = 30}, -- Poison 2
--[ID3] = {attribute = "heldx", ident = 31}, -- Poison 3
--[ID4] = {attribute = "heldx", ident = 32}, -- Poison 4
--[ID5] = {attribute = "heldx", ident = 33}, -- Poison 5
--[ID6] = {attribute = "heldx", ident = 34}, -- Poison 6
--[ID7] = {attribute = "heldx", ident = 35}, -- Poison 7
-- Y --
--[ID] = {attribute = "heldy", ident = 1}, -- Regeneration 1
--[ID2] = {attribute = "heldy", ident = 2}, -- Regeneration 2
--[ID3] = {attribute = "heldy", ident = 3}, -- Regeneration 3
--[ID4] = {attribute = "heldy", ident = 4}, -- Regeneration 4
--[ID5] = {attribute = "heldy", ident = 5}, -- Regeneration 5
--[ID6] = {attribute = "heldy", ident = 6}, -- Regeneration 6
--[ID7] = {attribute = "heldy", ident = 7}, -- Regeneration 7
--[ID] = {attribute = "heldy", ident = 8}, -- Cure 1
--[ID2] = {attribute = "heldy", ident = 9}, -- Cure 2
--[ID3] = {attribute = "heldy", ident = 10}, -- Cure 3
--[ID4] = {attribute = "heldy", ident = 11}, -- Cure 4
--[ID5] = {attribute = "heldy", ident = 12}, -- Cure 5
--[ID6] = {attribute = "heldy", ident = 13}, -- Cure 6
--[ID7] = {attribute = "heldy", ident = 14}, -- Cure 7
}

function onUse(cid, item, frompos, item2, topos)

if not isPokeball(item2.itemid) or #getCreatureSummons(cid) > 0 then return false end
if not heldTable[item.itemid] then return false end

held = heldTable[item.itemid]
pokename = getItemAttribute(item2.uid, "poke")
heldname = getItemInfo(item.itemid).name

doSetItemAttribute(item2.uid, held.attribute, held.ident)
doRemoveItem(item.uid, 1)
doSendMagicEffect(getThingPos(cid), 14)
sendMsgToPlayer(cid, 27, "Your "..pokename.." has gained a "..heldname..".")
return true
end


Na tabela HeldTable, que está no começo do script, você ve tudo que precisará para os proximos passos, no caso a inserção dos helds.
Attribute = Atributo(Heldx ou Heldy)
Ident = Valor Do Attribute(identificará o held e o tier)
EX: Ident 27 = Hellfire tier 6.
ID = Id do item, cada id deve ser um Held e um Tier.
Todos estão com "--" para que não seja lido até que o held seja inserido.


No Actions.xml(Data/Actions) adicione esta tag:
Spoiler:
<action itemid="ID;ID2;ID3" event="script" value="heldsystem.lua"/>

Vá adicionando IDS a medida que for adicionando helds, cada ID desse deve estar no Heldsystem.lua, na HeldTable.


Adicionando Helds:
Spoiler:
X-Attack:
Spoiler:
Função: Cada tier adiciona uma porcentagem de ataque.
Vá no Heldsystem.lua(data/actions/scripts) e tire os "--" dos X-Attack, ficando assim:
Spoiler:
[ID] = {attribute = "heldx", ident = 8}, -- Attack 1
[ID2] = {attribute = "heldx", ident = 9}, -- Attack 2
[ID3] = {attribute = "heldx", ident = 10}, -- Attack 3
[ID4] = {attribute = "heldx", ident = 11}, -- Attack 4
[ID5] = {attribute = "heldx", ident = 12}, -- Attack 5
[ID6] = {attribute = "heldx", ident = 13}, -- Attack 6
[ID7] = {attribute = "heldx", ident = 14}, -- Attack 7

Em cada ID adicione o id do held e seu respectivo tier.
Adicione os ids no Actions.xml.


Agora, vá em Exp2.lua(Data/Creaturescripts/Scripts) e procure por:
Spoiler:
elseif combat == COMBAT_PHYSICALDAMAGE then

E em cima coloque:
Spoiler:
-- X-Attack --
   if isSummon(attacker) and isPlayer(getCreatureMaster(attacker)) then
   local TierArray = {8, 9, 10, 11, 12, 13, 14}
   local Tiers = {
[8] = {bonus = AtkBonus1},
[9] = {bonus = AtkBonus2},
[10] = {bonus = AtkBonus3},
[11] = {bonus = AtkBonus4},
[12] = {bonus = AtkBonus5},
[13] = {bonus = AtkBonus6},
[14] = {bonus = AtkBonus7},
}
local ball = getPlayerSlotItem(getCreatureMaster(attacker), Cool
local Tier = getItemAttribute(ball.uid, "heldx")
   local bonusatk = {}
   if isInArray(TierArray, getItemAttribute(ball.uid, "heldx")) then
   bonusatk = Tiers[Tier].bonus
   else
   bonusatk = 1
   end
       multiplier = multiplier * bonusatk
   end
   -- X-Attack --

Configure as %(porcentagens) no Configuration.lua(Data/Lib).
Nessa parte:
Spoiler:
AtkBonus1 = 1.10
AtkBonus2 = 1.20
AtkBonus3 = 1.30
AtkBonus4 = 1.40
AtkBonus5 = 1.50
AtkBonus6 = 1.60
AtkBonus7 = 1.70

1.10 = 10%
1.70 = 70%
E assim vai.

X-Hellfire e X-Poison:
Spoiler:
Função: Aumenta uma porcentagem do Burn/Poison dependendo do tier.

Vá no Heldsystem.lua(Data/Actions/Scripts) e tire os "--" do X-Poison e do X-Hellfire, Ficando assim:
Spoiler:
[ID] = {attribute = "heldx", ident = 22}, -- Hellfire 1
[ID2] = {attribute = "heldx", ident = 23}, -- Hellfire 2
[ID3] = {attribute = "heldx", ident = 24}, -- Hellfire 3
[ID4] = {attribute = "heldx", ident = 25}, -- Hellfire 4
[ID5] = {attribute = "heldx", ident = 26}, -- Hellfire 5
[ID6] = {attribute = "heldx", ident = 27}, -- Hellfire 6
[ID7] = {attribute = "heldx", ident = 28}, -- Hellfire 7
[ID] = {attribute = "heldx", ident = 29}, -- Poison 1
[ID2] = {attribute = "heldx", ident = 30}, -- Poison 2
[ID3] = {attribute = "heldx", ident = 31}, -- Poison 3
[ID4] = {attribute = "heldx", ident = 32}, -- Poison 4
[ID5] = {attribute = "heldx", ident = 33}, -- Poison 5
[ID6] = {attribute = "heldx", ident = 34}, -- Poison 6
[ID7] = {attribute = "heldx", ident = 35}, -- Poison 7

Em cada ID adicione o id do item e seu respectivo tier.
Adicione os Ids no Actions.xml.

Agora, vá no Exp2.lua(data/Creaturescripts/Scripts) e procure por:
Spoiler:
if damageCombat == FIREDAMAGE and not isBurning(cid) then
  local ret = {}
  ret.id = cid
  ret.cd = math.random(5, 12)
  ret.check = getPlayerStorageValue(cid, conds["Burn"])
  ret.damage = isSummon(attacker) and getMasterLevel(attacker)+getPokemonBoost(attacker) or getPokemonLevel(attacker)
  ret.cond = "Burn"

  doCondition2(ret)
   elseif damageCombat == POISONDAMAGE and not isPoisoned(cid) then
      local ret = {}
  ret.id = cid
  ret.cd = math.random(6, 15)
  ret.check = getPlayerStorageValue(cid, conds["Poison"])
  local lvl = isSummon(attacker) and getMasterLevel(attacker) or getPokemonLevel(attacker)
      ret.damage = math.floor((getPokemonLevel(attacker)+lvl)/2)
  ret.cond = "Poison"

  doCondition2(ret)
   end

E deixe assim:
Spoiler:
if damageCombat == FIREDAMAGE and not isBurning(cid) then
   -- Helfire --
   local hellfire = {}
   if isSummon(attacker) and isPlayer(getCreatureMaster(attacker)) then
local ball = getPlayerSlotItem(getCreatureMaster(attacker), Cool
local TierArray = {22, 23, 24, 25, 26, 27, 28}
local Tiers = {
[22] = {bonus = HellBonus1},
[23] = {bonus = HellBonus2},
[24] = {bonus = HellBonus3},
[25] = {bonus = HellBonus4},
[26] = {bonus = HellBonus5},
[27] = {bonus = HellBonus6},
[28] = {bonus = HellBonus7},
}
local Tier = getItemAttribute(ball.uid, "heldx")
if Tier then
hellfire = Tiers[Tier].bonus
elseif not isInArray(TierArray, getItemAttribute(ball.uid, "heldx")) then
hellfire = 1
   end
   end
   -- Hellfire --
      local ret = {}
      ret.id = cid
      ret.cd = math.random(5, 12)
      ret.check = getPlayerStorageValue(cid, conds["Burn"])
      ret.damage = isSummon(attacker) and (getMasterLevel(attacker)+getPokemonBoost(attacker)) * hellfire or getPokemonLevel(attacker)
      ret.cond = "Burn"
     
      doCondition2(ret)
   elseif damageCombat == POISONDAMAGE and not isPoisoned(cid) then
   -- Poison --
   local xpoison = {}
   if isSummon(attacker) and isPlayer(getCreatureMaster(attacker)) then
local ball = getPlayerSlotItem(getCreatureMaster(attacker), Cool
local TierArray = {29, 30, 31, 32, 33, 34, 35}
local Tiers = {
[29] = {bonus = PoisonBonus1},
[30] = {bonus = PoisonBonus2},
[31] = {bonus = PoisonBonus3},
[32] = {bonus = PoisonBonus4},
[33] = {bonus = PoisonBonus5},
[34] = {bonus = PoisonBonus6},
[35] = {bonus = PoisonBonus7},
}
local Tier = getItemAttribute(ball.uid, "heldx")
if Tier then
xpoison = Tiers[Tier].bonus
elseif not isInArray(TierArray, getItemAttribute(ball.uid, "heldx")) then
xpoison = 1
end
   end
   -- Poison --
      local ret = {}
      ret.id = cid
      ret.cd = math.random(6, 15)
      ret.check = getPlayerStorageValue(cid, conds["Poison"])
      local lvl = isSummon(attacker) and (getMasterLevel(attacker)) * xpoison or getPokemonLevel(attacker)
      ret.damage = math.floor((getPokemonLevel(attacker)+lvl)/2)
      ret.cond = "Poison"
     
      doCondition2(ret)
   end

Configure as porcentagens no Configuration.lua(Data/Lib) nessa parte:
Spoiler:
HellBonus1 = 2.50
HellBonus2 = 2.60
HellBonus3 = 2.70
HellBonus4 = 2.80
HellBonus5 = 2.90
HellBonus6 = 3
HellBonus7 = 3.50
PoisonBonus1 = 2.50
PoisonBonus2 = 2.60
PoisonBonus3 = 2.70
PoisonBonus4 = 2.80
PoisonBonus5 = 2.90
PoisonBonus6 = 3
PoisonBonus7 = 3.50

X-Return:
Spoiler:
Função: Retorna o dano recebido multiplicado por um valor de acordo com o tier.

Vamos lá, primeiro vá no Heldsystem.lua(Data/Actions/Scripts) e tire os "--" do return, ficando assim:
Spoiler:
[ID] = {attribute = "heldx", ident = 15}, -- Return 1
[ID2] = {attribute = "heldx", ident = 16}, -- Return 2
[ID3] = {attribute = "heldx", ident = 17}, -- Return 3
[ID4] = {attribute = "heldx", ident = 18}, -- Return 4
[ID5] = {attribute = "heldx", ident = 19}, -- Return 5
[ID6] = {attribute = "heldx", ident = 20}, -- Return 6
[ID7] = {attribute = "heldx", ident = 21}, -- Return 7

Cada ID deve ser um item com seu respectivo tier.
Adicione o id no actions.xml também.

Vá no Exp2.lua(Data/Creaturescripts/Scripts) e procure por:
Spoiler:
if isInArray(specialabilities["counter"], getCreatureName(cid)) then
     if math.random(1, 100) <= 10 then
        doCreatureAddHealth(attacker, -valor, 3, 180)    
        valor = 0
        doSendAnimatedText(getThingPosWithDebug(cid), "COUNTER", 215)
         end
      end      
   else
      valor = valor / getDefense(cid)
   end

E deixem assim:
Spoiler:
     if isInArray(specialabilities["counter"], getCreatureName(cid)) then
         if math.random(1, 100) <= 10 then
            doCreatureAddHealth(attacker, -valor, 3, 180)    
            valor = 0
            doSendAnimatedText(getThingPosWithDebug(cid), "COUNTER", 215)
         end
      end  
-- Return --        
if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then
local returnbonus = {}
local ball = getPlayerSlotItem(getCreatureMaster(cid), Cool
local Tiers = {
[15] = {bonus = DmgReturn1},
[16] = {bonus = DmgReturn2},
[17] = {bonus = DmgReturn3},
[18] = {bonus = DmgReturn4},
[19] = {bonus = DmgReturn5},
[20] = {bonus = DmgReturn6},
[21] = {bonus = DmgReturn7},
}
local Tier = getItemAttribute(ball.uid, "heldx")
if Tier and Tier > 14 and Tier < 22 then
returnbonus = math.floor((valor * Tiers[Tier].bonus))
elseif not isInArray(Tiers, Tier) then
returnbonus = 0
end
doCreatureAddHealth(attacker, -returnbonus)
end
-- Return --
else
-- Return --        
if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then
local returnbonus = {}
local ball = getPlayerSlotItem(getCreatureMaster(cid), Cool
local Tiers = {
[15] = {bonus = DmgReturn1},
[16] = {bonus = DmgReturn2},
[17] = {bonus = DmgReturn3},
[18] = {bonus = DmgReturn4},
[19] = {bonus = DmgReturn5},
[20] = {bonus = DmgReturn6},
[21] = {bonus = DmgReturn7},
}
local Tier = getItemAttribute(ball.uid, "heldx")
if Tier and Tier > 14 and Tier < 22 then
returnbonus = math.floor((valor * Tiers[Tier].bonus))
elseif not isInArray(Tiers, Tier) then
returnbonus = 0
end
doCreatureAddHealth(attacker, -returnbonus)
end
-- Return --
valor = valor / getDefense(cid)
end

Defina as porcentagens no Configuration.lua(Data/Lib) nessa parte:
Spoiler:
DmgReturn1 = 0.04
DmgReturn2 = 0.05
DmgReturn3 = 0.06
DmgReturn4 = 0.07
DmgReturn5 = 0.08
DmgReturn6 = 0.09
DmgReturn7 = 0.10

Y-Regeneration:
Spoiler:
Função: Regenera uma quantidade de life/segundo definida no script de acordo com o held.

Pra começar tire os "--" do Regeneration no Heldsystem.lua(Data/Actions/Scripts), Ficando assim:
Spoiler:
[ID] = {attribute = "heldy", ident = 1}, -- Regeneration 1
[ID2] = {attribute = "heldy", ident = 2}, -- Regeneration 2
[ID3] = {attribute = "heldy", ident = 3}, -- Regeneration 3
[ID4] = {attribute = "heldy", ident = 4}, -- Regeneration 4
[ID5] = {attribute = "heldy", ident = 5}, -- Regeneration 5
[ID6] = {attribute = "heldy", ident = 6}, -- Regeneration 6
[ID7] = {attribute = "heldy", ident = 7}, -- Regeneration 7

Cada ID é um item e um tier.
Adicione o id no actions.xml tambem.

Agora, vá no Some Functions.lua(Data/Lib) e no final adicione isto:
Spoiler:
function isPlayerOnline(uid)
return isInArray(getPlayersOnline(), uid)
end

function doRegenerateWithY(cid, sid)
if isPlayerOnline(cid) then
local ball = getPlayerSlotItem(cid, 8)or getPlayerSlotItem(getCreatureMaster(cid), Cool
local Tiers = {
[1] = {bonus = Regen1},
[2] = {bonus = Regen2},
[3] = {bonus = Regen3},
[4] = {bonus = Regen4},
[5] = {bonus = Regen5},
[6] = {bonus = Regen6},
[7] = {bonus = Regen7},
}
if isPlayer(cid) and #getCreatureSummons(cid) > 0 then
local Tier = getItemAttribute(ball.uid, "heldy")
if Tier and Tier > 0 and Tier < 8 then
if not getCreatureCondition(cid, CONDITION_INFIGHT) then
if getCreatureHealth(sid) < getCreatureMaxHealth(sid) then
addEvent(function() doCreatureAddHealth(sid,Tiers[Tier].bonus) doSendAnimatedText(getThingPos(sid), "+ "..Tiers[Tier].bonus, 30) end, 0)
end
addEvent(doRegenerateWithY, 1000, cid, sid)  
else
addEvent(doRegenerateWithY, 1000, cid, sid)
end
end  
end
end
end

Agora, vá no Goback.lua(Data/Actions/Scripts) e Procure por:
Spoiler:
adjustStatus(pk, item.uid, true, true, true)

E deixe assim:
Spoiler:
adjustStatus(pk, item.uid, true, true, true)
doRegenerateWithY(getCreatureMaster(pk), pk)

Pronto, você pode configurar os bonus no Configuration.lua(Data/Lib), nessa parte:
Spoiler:
Regen1 = 700
Regen2 = 1000
Regen3 = 1500
Regen4 = 2000
Regen5 = 2500
Regen6 = 3000
Regen7 = 3500

X-Defense:
Spoiler:
Função: Aumenta a defesa do pokemon em um valor definido no script.

Pra começar é como sempre, vá no Heldsystem.lua(Data/Actions/Scripts) e tire os "--" do defense, ficando assim:
Spoiler:
[ID] = {attribute = "heldx", ident = 1}, -- Defense 1
[ID2] = {attribute = "heldx", ident = 2}, -- Defense 2
[ID3] = {attribute = "heldx", ident = 3}, -- Defense 3
[ID4] = {attribute = "heldx", ident = 4}, -- Defense 4
[ID5] = {attribute = "heldx", ident = 5}, -- Defense 5
[ID6] = {attribute = "heldx", ident = 6}, -- Defense 6
[ID7] = {attribute = "heldx", ident = 7}, -- Defense 7

Cada ID é um item e cada item tem seu respectivo tier.
Não esqueça de adicionar no Actions.xml(Data/Actions).

Depois, vá em Level System.lua(Data/Lib) e procure por:
Spoiler:
setPlayerStorageValue(pk, 1001, pokes[getCreatureName(pk)].offense * (getMasterLevel(pk) + getPokemonBoost(pk)))
setPlayerStorageValue(pk, 1002, pokes[getCreatureName(pk)].defense)            
setPlayerStorageValue(pk, 1003, pokes[getCreatureName(pk)].agility)
setPlayerStorageValue(pk, 1004, pokes[getCreatureName(pk)].vitality * (getMasterLevel(pk) + getPokemonBoost(pk)))
setPlayerStorageValue(pk, 1005, pokes[getCreatureName(pk)].specialattack * (getMasterLevel(pk) + getPokemonBoost(pk)))

E deixe assim:
Spoiler:
-- Defense --
local bonusdef = {}
local Tiers = {
[1] = {bonus = DefBonus1},
[2] = {bonus = DefBonus2},
[3] = {bonus = DefBonus3},
[4] = {bonus = DefBonus4},
[5] = {bonus = DefBonus5},
[6] = {bonus = DefBonus6},
[7] = {bonus = DefBonus7},
}
local Tier = getItemAttribute(item, "heldx")
if Tier and Tier > 0 and Tier < 8 then
bonusdef = Tiers[Tier].bonus
else
bonusdef = 1
end
-- Defense --
   setPlayerStorageValue(pk, 1001, pokes[getCreatureName(pk)].offense * (getMasterLevel(pk) + getPokemonBoost(pk)))
setPlayerStorageValue(pk, 1002, (pokes[getCreatureName(pk)].defense) * bonusdef)            
setPlayerStorageValue(pk, 1003, pokes[getCreatureName(pk)].agility)
setPlayerStorageValue(pk, 1004, pokes[getCreatureName(pk)].vitality * (getMasterLevel(pk) + getPokemonBoost(pk)))
setPlayerStorageValue(pk, 1005, pokes[getCreatureName(pk)].specialattack * (getMasterLevel(pk) + getPokemonBoost(pk)))

Agora é só configurar os valores no Configuration.lua(Data/Lib), nessa parte:
Spoiler:
DefBonus1 = 1.10
DefBonus2 = 1.20
DefBonus3 = 1.30
DefBonus4 = 1.40
DefBonus5 = 1.50
DefBonus6 = 1.60
DefBonus7 = 1.70

1.10 = 10%
1.70 = 70%

Y-Cure:
Spoiler:
Função: Seu pokemon tem chance de auto-medicine.

Começa como sempre, tire os "--" do Heldsystem.lua(Data/Actions/Scripts), ficando assim:
Spoiler:
[ID] = {attribute = "heldy", ident = 8}, -- Cure 1
[ID2] = {attribute = "heldy", ident = 9}, -- Cure 2
[ID3] = {attribute = "heldy", ident = 10}, -- Cure 3
[ID4] = {attribute = "heldy", ident = 11}, -- Cure 4
[ID5] = {attribute = "heldy", ident = 12}, -- Cure 5
[ID6] = {attribute = "heldy", ident = 13}, -- Cure 6
[ID7] = {attribute = "heldy", ident = 14}, -- Cure 7

Sempre tenho que lembrar? KK
Cada ID é um item, e cada item tem seu Tier.
Adicione no Actions.xml(Data/Actions) também.

Agora, vá no Some Functions.lua(Data/Lib) e no final adicione isto:
Spoiler:
function doCureWithY(cid, sid)
if isPlayerOnline(cid) then
local ball = getPlayerSlotItem(cid, 8)or getPlayerSlotItem(getCreatureMaster(cid), Cool
local Tiers = {
[8] = {chance = Cure1},
[9] = {chance = Cure2},
[10] = {chance = Cure3},
[11] = {chance = Cure4},
[12] = {chance = Cure5},
[13] = {chance = Cure6},
[14] = {chance = Cure7},
}
local Tier = getItemAttribute(ball.uid, "heldy")
if isPlayer(cid) and #getCreatureSummons(cid) > 0  and Tier then
if Tier > 7 and Tier < 15 then
if math.random(1,100) <= Tiers[Tier].chance then
doCureStatus(sid, "all")
doSendMagicEffect(getThingPosWithDebug(sid), 14)
end
addEvent(doCureWithY, 1000, cid, sid)  
end
end
end  
end

Se ainda não tiver a função "isPlayerOnline", adicione em baixo:
Spoiler:
function isPlayerOnline(uid)
return isInArray(getPlayersOnline(), uid)
end

Agora, vá no Goback.lua(Data/Actions/Scripts) e procure por:
Spoiler:
adjustStatus(pk, item.uid, true, true, true)

E em baixo adicione:
Spoiler:
doCureWithY(getCreatureMaster(pk), pk)

Sempre a mesma coisa, pra configurar as chances, vá no Configuration.lua(Data/Lib), nessa parte:
Spoiler:
Cure1 = 10
Cure2 = 20
Cure3 = 30
Cure4 = 40
Cure5 = 50
Cure6 = 60
Cure7 = 70

10 = 10%
70 = 70%

X-Boost:
Spoiler:
Função: Aumenta o boost do pokemon em um valor definido pelo tier.

Bom, agora as coisas começam a mudar, ja que o Heldsystem.lua(Data/Actions/Scripts) não tem o X-Boost, vocês vão aprender a adicionar held lá(MUUUUITO DIFICIL). É assim, la no Heldsystem.lua, vai depois do ultimo held do tipo(x/y) e adiciona isso:
Spoiler:
[ID1] = {attribute = "heldx", ident = 36}, -- Boost 1
[ID2] = {attribute = "heldx", ident = 37}, -- Boost 2
[ID3] = {attribute = "heldx", ident = 38}, -- Boost 3
[ID4] = {attribute = "heldx", ident = 39}, -- Boost 4
[ID5] = {attribute = "heldx", ident = 40}, -- Boost 5
[ID6] = {attribute = "heldx", ident = 41}, -- Boost 6
[ID7] = {attribute = "heldx", ident = 42}, -- Boost 7

Ident é a identificaçao, logo, a cada held vai aumentando, o boost fica depois do poison.
Cada id é um item, e cada item, um tier diferente.

Dificil né? Agora, vamos ao que importa, vá no Level System.lua(Data/Lib), e, levando em conta que você está aqui, creio que ja adicionou o X-Defense, então deve estar assim:
Spoiler:
-- Defense --
local bonusdef = {}
local Tiers = {
[1] = {bonus = DefBonus1},
[2] = {bonus = DefBonus2},
[3] = {bonus = DefBonus3},
[4] = {bonus = DefBonus4},
[5] = {bonus = DefBonus5},
[6] = {bonus = DefBonus6},
[7] = {bonus = DefBonus7},
}
local Tier = getItemAttribute(item, "heldx")

if Tier and Tier > 0 and Tier < 8 then
bonusdef = Tiers[Tier].bonus
else
bonusdef = 1
end
-- Defense --
   setPlayerStorageValue(pk, 1001, pokes[getCreatureName(pk)].offense * (getMasterLevel(pk) + getPokemonBoost(pk)))
setPlayerStorageValue(pk, 1002, (pokes[getCreatureName(pk)].defense) * bonusdef)            
setPlayerStorageValue(pk, 1003, pokes[getCreatureName(pk)].agility)
setPlayerStorageValue(pk, 1004, pokes[getCreatureName(pk)].vitality * (getMasterLevel(pk) + getPokemonBoost(pk)))
setPlayerStorageValue(pk, 1005, pokes[getCreatureName(pk)].specialattack * (getMasterLevel(pk) + getPokemonBoost(pk)))

É só deixar assim:
Spoiler:
-- Defense --
local bonusdef = {}
local Tiers = {
[1] = {bonus = DefBonus1},
[2] = {bonus = DefBonus2},
[3] = {bonus = DefBonus3},
[4] = {bonus = DefBonus4},
[5] = {bonus = DefBonus5},
[6] = {bonus = DefBonus6},
[7] = {bonus = DefBonus7},
}
local Tier = getItemAttribute(item, "heldx")

if Tier and Tier > 0 and Tier < 8 then
bonusdef = Tiers[Tier].bonus
else
bonusdef = 1
end
-- Defense --
-- Boost --
local bonusboost = {}
local Tiers2 = {
[36] = {bonus = BoostBonus1},
[37] = {bonus = BoostBonus2},
[38] = {bonus = BoostBonus3},
[39] = {bonus = BoostBonus4},
[40] = {bonus = BoostBonus5},
[41] = {bonus = BoostBonus6},
[42] = {bonus = BoostBonus7},
}
if Tier and Tier > 35 and Tier < 43 then
bonusboost = Tiers2[Tier].bonus
else
bonusboost = 0
end
-- Boost --
   setPlayerStorageValue(pk, 1001, pokes[getCreatureName(pk)].offense * (getMasterLevel(pk) + getPokemonBoost(pk)) + bonusboost)
setPlayerStorageValue(pk, 1002, (pokes[getCreatureName(pk)].defense) * bonusdef + bonusboost)            
setPlayerStorageValue(pk, 1003, pokes[getCreatureName(pk)].agility)
setPlayerStorageValue(pk, 1004, pokes[getCreatureName(pk)].vitality * (getMasterLevel(pk) + getPokemonBoost(pk)) + bonusboost)
setPlayerStorageValue(pk, 1005, pokes[getCreatureName(pk)].specialattack * (getMasterLevel(pk) + getPokemonBoost(pk)) + bonusboost)

Pronto, mas agora falta ir no Configuration.lua(Data/Lib) e depois de:
Spoiler:
PoisonBonus1 = 2.50
PoisonBonus2 = 2.60
PoisonBonus3 = 2.70
PoisonBonus4 = 2.80
PoisonBonus5 = 2.90
PoisonBonus6 = 3
PoisonBonus7 = 3.50

Bote isso:
Spoiler:
BoostBonus1 = 5
BoostBonus2 = 8
BoostBonus3 = 12
BoostBonus4 = 15
BoostBonus5 = 18
BoostBonus6 = 22
BoostBonus7 = 25

Ai é só configurar os valores e.e

Por enquanto é só, vou adicionando os que ja tinham sem Tier assim que possivel.
PS: Os items dos helds devem ser do tipo "Usar Em".


Look:
Spoiler:
PDA 1.9.1 Sem level.
Adapte ao seu servidor:
Spoiler:
local NPCBattle = {
["Brock"] = {artig = "He is", cidbat = "Pewter"},
["Misty"] = {artig = "She is", cidbat = "Cerulean"},
["Blaine"] = {artig = "He is", cidbat = "Cinnabar"},
["Sabrina"] = {artig = "She is", cidbat = "Saffron"},         --alterado v1.9 \/ peguem tudo!
["Kira"] = {artig = "She is", cidbat = "Viridian"},
["Koga"] = {artig = "He is", cidbat = "Fushcia"},
["Erika"] = {artig = "She is", cidbat = "Celadon"},
["Surge"] = {artig = "He is", cidbat = "Vermilion"},
}

local xhelds = {
[1] = {name = "X-Defense(Tier: 1)"},
[2] = {name = "X-Defense(Tier: 2)"},
[3] = {name = "X-Defense(Tier: 3)"},
[4] = {name = "X-Defense(Tier: 4)"},
[5] = {name = "X-Defense(Tier: 5)"},
[6] = {name = "X-Defense(Tier: 6)"},
[7] = {name = "X-Defense(Tier: 7)"},
[8] = {name = "X-Attack(Tier : 1)"},
[9] = {name = "X-Attack(Tier : 2)"},
[10] = {name = "X-Attack(Tier: 3)"},
[11] = {name = "X-Attack(Tier: 4)"},
[12] = {name = "X-Attack(Tier: 5)"},
[13] = {name = "X-Attack(Tier: 6)"},
[14] = {name = "X-Attack(Tier: 7)"},
[15] = {name = "X-Return(Tier: 1)"},
[16] = {name = "X-Return(Tier: 2)"},
[17] = {name = "X-Return(Tier: 3)"},
[18] = {name = "X-Return(Tier: 4)"},
[19] = {name = "X-Return(Tier: 5)"},
[20] = {name = "X-Return(Tier: 6)"},
[21] = {name = "X-Return(Tier: 7)"},
[22] = {name = "X-Hellfire(Tier: 1)"},
[23] = {name = "X-Hellfire(Tier: 2)"},
[24] = {name = "X-Hellfire(Tier: 3)"},
[25] = {name = "X-Hellfire(Tier: 4)"},
[26] = {name = "X-Hellfire(Tier: 5)"},
[27] = {name = "X-Hellfire(Tier: 6)"},
[28] = {name = "X-Hellfire(Tier: 7)"},
[29] = {name = "X-Poison(Tier: 1)"},
[30] = {name = "X-Poison(Tier: 2)"},
[31] = {name = "X-Poison(Tier: 3)"},
[32] = {name = "X-Poison(Tier: 4)"},
[33] = {name = "X-Poison(Tier: 5)"},
[34] = {name = "X-Poison(Tier: 6)"},
[35] = {name = "X-Poison(Tier: 7)"},
}

local yhelds = {
[1] = {name = "Y-Regeneration(Tier: 1)"},
[2] = {name = "Y-Regeneration(Tier: 2)"},
[3] = {name = "Y-Regeneration(Tier: 3)"},
[4] = {name = "Y-Regeneration(Tier: 4)"},
[5] = {name = "Y-Regeneration(Tier: 5)"},
[6] = {name = "Y-Regeneration(Tier: 6)"},
[7] = {name = "Y-Regeneration(Tier: 7)"},
[8] = {name = "Y-Cure(Tier: 1)"},
[9] = {name = "Y-Cure(Tier: 2)"},
[10] = {name = "Y-Cure(Tier: 3)"},
[11] = {name = "Y-Cure(Tier: 4)"},
[12] = {name = "Y-Cure(Tier: 5)"},
[13] = {name = "Y-Cure(Tier: 6)"},
[14] = {name = "Y-Cure(Tier: 7)"},
}

function onLook(cid, thing, position, lookDistance)
                                                         
local str = {}
                                             
if not isCreature(thing.uid) then
  local iname = getItemInfo(thing.itemid)
  if isPokeball(thing.itemid) and getItemAttribute(thing.uid, "poke") then
     
     unLock(thing.uid)
     local lock = getItemAttribute(thing.uid, "lock")        
     local pokename = getItemAttribute(thing.uid, "poke")
     local heldx = getItemAttribute(thing.uid, "heldx")
local heldy = getItemAttribute(thing.uid, "heldy")
     table.insert(str, "You see "..iname.article.." "..iname.name..".")  
     if getItemAttribute(thing.uid, "unique") then              
        table.insert(str, " It's an unique item.")  
     end
     table.insert(str, "\nIt contains "..getArticle(pokename).." "..pokename..".\n")  
     if lock and lock > 0 then
        table.insert(str, "It will unlock in ".. os.date("%d/%m/%y %X", lock)..".\n")  
     end
     local boost = getItemAttribute(thing.uid, "boost") or 0
     if boost > 0 then
        table.insert(str, "Boost level: +"..boost..".\n")
     end
     if getItemAttribute(thing.uid, "nick") then
        table.insert(str, "It's nickname is: "..getItemAttribute(thing.uid, "nick")..".\n")
     end
     if heldx and heldy then
table.insert(str, "Holding: "..(xhelds[heldx].name).." and "..(yhelds[heldy].name)..". ")
elseif heldx then
table.insert(str, "Holding: "..(xhelds[heldx].name)..". ")
elseif heldy then
table.insert(str, "Holding: "..(yhelds[heldy].name)..". ")
end
     if getItemAttribute(thing.uid, "gender") == SEX_MALE then
        table.insert(str, "It is male.")
     elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then
        table.insert(str, "It is female.")
     else
        table.insert(str, "It is genderless.")
     end
     doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
     return false
     
  elseif string.find(iname.name, "fainted") or string.find(iname.name, "defeated") then    

     table.insert(str, "You see a "..string.lower(iname.name)..". ")    
     if isContainer(thing.uid) then
        table.insert(str, "(Vol: "..getContainerCap(thing.uid)..")")
     end
     table.insert(str, "\n")
     if getItemAttribute(thing.uid, "gender") == SEX_MALE then
        table.insert(str, "It is male.")
     elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then
        table.insert(str, "It is female.")
     else
        table.insert(str, "It is genderless.")
     end
     doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
     return false

  elseif isContainer(thing.uid) then     --containers

     if iname.name == "dead human" and getItemAttribute(thing.uid, "pName") then
        table.insert(str, "You see a dead human (Vol:"..getContainerCap(thing.uid).."). ")
        table.insert(str, "You recognize ".. getItemAttribute(thing.uid, "pName")..". ".. getItemAttribute(thing.uid, "article").." was killed by a ")
        table.insert(str, getItemAttribute(thing.uid, "attacker")..".")
     else  
        table.insert(str, "You see "..iname.article.." "..iname.name..". (Vol:"..getContainerCap(thing.uid)..").")
     end
     if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then
        table.insert(str, "\nItemID: ["..thing.itemid.."]")    
        local pos = getThingPos(thing.uid)
        table.insert(str, "\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]")  
     end
     doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
     return false
     
  elseif getItemAttribute(thing.uid, "unique") then    
     local p = getThingPos(thing.uid)
 
     table.insert(str, "You see ")
     if thing.type > 1 then
        table.insert(str, thing.type.." "..iname.plural..".")
     else
        table.insert(str, iname.article.." "..iname.name..".")
     end
     table.insert(str, " It's an unique item.\n"..iname.description)
     
     if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then
        table.insert(str, "\nItemID: ["..thing.itemid.."]")
        table.insert(str, "\nPosition: ["..p.x.."]["..p.y.."]["..p.z.."]")
     end
 
     sendMsgToPlayer(cid, MESSAGE_INFO_DESCR, table.concat(str))
     return false
  else
     return true
  end
end

local npcname = getCreatureName(thing.uid)
if ehNPC(thing.uid) and NPCBattle[npcname] then    --npcs duel
  table.insert(str, "You see "..npcname..". "..NPCBattle[npcname].artig.." leader of the gym from "..NPCBattle[npcname].cidbat..".")
  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
  return false
end
if getPlayerStorageValue(thing.uid, 697548) ~= -1 then    
  table.insert(str, getPlayerStorageValue(thing.uid, 697548))                                  
  local pos = getThingPos(thing.uid)
  if youAre[getPlayerGroupId(cid)] then
     table.insert(str, "\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]")
  end
  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))  
  return false
end

if not isPlayer(thing.uid) and not isMonster(thing.uid) then    --outros npcs
  table.insert(str, "You see "..getCreatureName(thing.uid)..".")
  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
  return false
end

if isPlayer(thing.uid) then     --player
  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getPlayerDesc(cid, thing.uid, false))  
return false
end

if getCreatureName(thing.uid) == "Evolution" then return false end

if not isSummon(thing.uid) then   --monstros
 
  table.insert(str, "You see a wild "..string.lower(getCreatureName(thing.uid))..".\n")
  table.insert(str, "Hit Points: "..getCreatureHealth(thing.uid).." / "..getCreatureMaxHealth(thing.uid)..".\n")
  if getPokemonGender(thing.uid) == SEX_MALE then
     table.insert(str, "It is male.")
  elseif getPokemonGender(thing.uid) == SEX_FEMALE then
     table.insert(str, "It is female.")
  else
     table.insert(str, "It is genderless.")
  end
  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
  return false

elseif isSummon(thing.uid) and not isPlayer(thing.uid) then  --summons

  local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), Cool.uid, "boost") or 0
  if getCreatureMaster(thing.uid) == cid then
     local myball = getPlayerSlotItem(cid, Cool.uid
     table.insert(str, "You see your "..string.lower(getCreatureName(thing.uid))..".")
     if boostlevel > 0 then
        table.insert(str, "\nBoost level: +"..boostlevel..".")
     end
     table.insert(str, "\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".")
     table.insert(str, "\n"..getPokemonHappinessDescription(thing.uid))
     doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
  else
     doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..string.lower(getCreatureName(thing.uid))..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid))..".")
  end
  return false
end
return true
end

Trade System.lua(Data/Creaturescripts/Scripts):
Spoiler:
local xhelds = {
[1] = {name = "X-Defense(Tier: 1)"},
[2] = {name = "X-Defense(Tier: 2)"},
[3] = {name = "X-Defense(Tier: 3)"},
[4] = {name = "X-Defense(Tier: 4)"},
[5] = {name = "X-Defense(Tier: 5)"},
[6] = {name = "X-Defense(Tier: 6)"},
[7] = {name = "X-Defense(Tier: 7)"},
[8] = {name = "X-Attack(Tier : 1)"},
[9] = {name = "X-Attack(Tier : 2)"},
[10] = {name = "X-Attack(Tier: 3)"},
[11] = {name = "X-Attack(Tier: 4)"},
[12] = {name = "X-Attack(Tier: 5)"},
[13] = {name = "X-Attack(Tier: 6)"},
[14] = {name = "X-Attack(Tier: 7)"},
[15] = {name = "X-Return(Tier: 1)"},
[16] = {name = "X-Return(Tier: 2)"},
[17] = {name = "X-Return(Tier: 3)"},
[18] = {name = "X-Return(Tier: 4)"},
[19] = {name = "X-Return(Tier: 5)"},
[20] = {name = "X-Return(Tier: 6)"},
[21] = {name = "X-Return(Tier: 7)"},
[22] = {name = "X-Hellfire(Tier: 1)"},
[23] = {name = "X-Hellfire(Tier: 2)"},
[24] = {name = "X-Hellfire(Tier: 3)"},
[25] = {name = "X-Hellfire(Tier: 4)"},
[26] = {name = "X-Hellfire(Tier: 5)"},
[27] = {name = "X-Hellfire(Tier: 6)"},
[28] = {name = "X-Hellfire(Tier: 7)"},
[29] = {name = "X-Poison(Tier: 1)"},
[30] = {name = "X-Poison(Tier: 2)"},
[31] = {name = "X-Poison(Tier: 3)"},
[32] = {name = "X-Poison(Tier: 4)"},
[33] = {name = "X-Poison(Tier: 5)"},
[34] = {name = "X-Poison(Tier: 6)"},
[35] = {name = "X-Poison(Tier: 7)"},
}

local yhelds = {
[1] = {name = "Y-Regeneration(Tier: 1)"},
[2] = {name = "Y-Regeneration(Tier: 2)"},
[3] = {name = "Y-Regeneration(Tier: 3)"},
[4] = {name = "Y-Regeneration(Tier: 4)"},
[5] = {name = "Y-Regeneration(Tier: 5)"},
[6] = {name = "Y-Regeneration(Tier: 6)"},
[7] = {name = "Y-Regeneration(Tier: 7)"},
[8] = {name = "Y-Cure(Tier: 1)"},
[9] = {name = "Y-Cure(Tier: 2)"},
[10] = {name = "Y-Cure(Tier: 3)"},
[11] = {name = "Y-Cure(Tier: 4)"},
[12] = {name = "Y-Cure(Tier: 5)"},
[13] = {name = "Y-Cure(Tier: 6)"},
[14] = {name = "Y-Cure(Tier: 7)"},
}

function onTradeRequest(cid, target, item)

for a, b in pairs (pokeballs) do
if b.use == item.itemid then
doPlayerSendCancel(cid, "You can't trade this item.")
return false
end
end

if isContainer(item.uid) then
  local bagItems = getItensUniquesInContainer(item.uid)
  if #bagItems >= 1 then
     doPlayerSendCancel(cid, "Has a Unique Item in this bag, you can't trade this item.")     --alterado v1.6
     return false
      end    
elseif getItemAttribute(item.uid, "unique") then    --alterado v1.6
  doPlayerSendCancel(cid, "It is a Unique Item, you can't trade this item.")
  return false
end  

if isContainer(item.uid) then
  local itens = getPokeballsInContainer(item.uid)
  if #itens >= 1 then                            
     for i = 1, #itens do
         local lvl = getItemAttribute(itens[i], "level")
         local name = getItemAttribute(itens[i], "poke")
         if not lvl then
            doItemSetAttribute(itens[i], "level", pokes[name].level)     --alterado v1.6
             end
          end
      end
   elseif isPokeball(item.itemid) then
  local lvl = getItemAttribute(item.uid, "level")
  local name = getItemAttribute(item.uid, "poke")
  if not lvl then
     doItemSetAttribute(item.uid, "level", pokes[name].level)
      end
   end
   
   if getPlayerStorageValue(cid, 52480) >= 1 then             --alterado v1.6.1
      doPlayerSendTextMessage(cid, 20, "You can't do that while be in a duel!")
      return false
   end
   
   if isPokeball(item.itemid) then
      local name = getItemAttribute(item.uid, "poke")            --alterado v1.8 \/
      local boost = getItemAttribute(item.uid, "boost") or 0
      local nick = getItemAttribute(item.uid, "nick") or ""
   
      local str = "Pokemon in trade: "
      str = str.."•Name: "..name.."   •Boost: "..boost.."   "
      if nick ~= "" then str = str.."•Nick: "..nick.."" end
  local heldx = getItemAttribute(item.uid, "heldx")
      local heldy = getItemAttribute(item.uid, "heldy")
  if heldx and heldy then
str = str.."Holding: "..(xhelds[heldx].name).." and "..(yhelds[heldy].name)..". "
elseif heldx then
str = str.."Holding: "..(xhelds[heldx].name)..". "
elseif heldy then
str = str.."Holding: "..(yhelds[heldy].name)..". "
end
      sendMsgToPlayer(target, 20, str)
   end
                                                           --alterado v1.8 \/
   if isContainer(item.uid) then
  local itens = getPokeballsInContainer(item.uid)
  if #itens >= 1 then                            
     for i = 1, #itens do
         if isPokeball(getThing(itens[i]).itemid) then
            local name = getItemAttribute(itens[i], "poke")            
                local boost = getItemAttribute(itens[i], "boost") or 0
                local nick = getItemAttribute(itens[i], "nick") or ""
  local heldx = getItemAttribute(itens[i], "heldx")
      local heldy = getItemAttribute(itens[i], "heldy")
   
                local str = "Pokemon in trade: "
                str = str.."•Name: "..name.."   •Boost: "..boost.."   "
                if nick ~= "" then str = str.."•Nick: "..nick.."" end
 if heldx and heldy then
str = str.."Holding: "..(xhelds[heldx].name).." and "..(yhelds[heldy].name)..". "
elseif heldx then
str = str.."Holding: "..(xhelds[heldx].name)..". "
elseif heldy then
str = str.."Holding: "..(yhelds[heldy].name)..". "
end
                sendMsgToPlayer(target, 20, str)
             end
         end
  end      
   end
   

return true
end

local function noCap(cid, sid)
if isCreature(cid) then
doPlayerSendCancel(cid, "You can't carry more than six pokemons, trade cancelled.")
end
if isCreature(sid) then
doPlayerSendCancel(sid, "You can't carry more than six pokemons, trade cancelled.")
end
end

function onTradeAccept(cid, target, item, targetItem)

local pbs = #getPokeballsInContainer(item.uid)
local cancel = false
local p1 = 0
local p2 = 0
local itemPokeball = isPokeball(item.itemid) and 1 or 0
local targetItemPokeball = isPokeball(targetItem.itemid) and 1 or 0

   if getPlayerMana(cid) + itemPokeball > 6 then  --alterado v1.6
  cancel = true
  p1 = cid
   end
   if getPlayerMana(target) + targetItemPokeball > 6 then  --alterado v1.6
  cancel = true
  p2 = target
   end
   
if pbs > 0 and getCreatureMana(target) + pbs > 6 + targetItemPokeball then
cancel = true
p1 = target
end

pbs = #getPokeballsInContainer(targetItem.uid)

if pbs > 0 and getCreatureMana(cid) + pbs > 6 + itemPokeball then
cancel = true
p2 = cid
end

if cancel then
addEvent(noCap, 20, p1, p2)
return false
end

if itemPokeball == 1 and targetItemPokeball == 1 then
setPlayerStorageValue(cid, 8900, 1)
setPlayerStorageValue(target, 8900, 1)
end

return true
end

Em ambos, é só ir adicionando items na tabela com seu ident.

Fila:
Spoiler:
X-Lucky(sem sources :s)
X-Agility(Coming)
X-Rage(Coming)
X-Strafe(Coming)

Créditos:
Spoiler:
Gabrielbsales(post Do tibiaking)
Slicer(ajudou no Regeneration)
Zipter98(Ajudou no Regeneration)
Stylo Maldoso(ajudou na organização)
Renatapt(Copiar post para aqui)


Ao Usar Esse Sistema, Peço Que Botem Créditos.
Não Exijo, Mas Aprecio.
Ver perfil do usuário

#2
 AnnaFeeh

avatar
Membro
Membro
Vai ajudar varias pessoas esse tutorial Very Happy Obrigado
Ver perfil do usuário http://www.EmBreve.com

#3
 RenataPT


Membro
Membro
De nada Smile  Very Happy  so Quero ajudar povo brasileiro Razz
Ver perfil do usuário

#4
 gabrielbsales


Membro
Membro
Obrigado por disponibilizar MEU trabalho, mas os créditos seriam bem vindos.
Ver perfil do usuário

#5
 RenataPT


Membro
Membro
Smile bem vindo no forum Gabrielbsales Smile
Ver perfil do usuário

#6
 gabrielbsales


Membro
Membro
Obrigado  Very Happy
Ver perfil do usuário

#7
 Conteúdo patrocinado


Ver o tópico anterior Ver o tópico seguinte Voltar ao Topo  Mensagem [Página 1 de 1]


Permissão deste fórum:
Você não pode responder aos tópicos neste fórum