Jump to content
×
×
  • Create New...

action [PDA] Held Items Com Tiers [Eternamente 22/34]


Recommended Posts

Sistema Refeito :D
Derp: Mas você apagou tudo?
Eu: Sim
Derp: :o
Eu: Refazendo com Tiers :D

Held Items Com Tiers

Tutorial do necessário:

 

  • Passo 1:

Vá em Configuration.lua(data/lib) e no fim adicione isso:

 

--> [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:

 

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.

 

 

  • Passo 2:

No Actions.xml(Data/Actions) adicione esta tag:

 

<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:


X-Attack:


Função: Cada tier adiciona uma porcentagem de ataque.

  • Passo 1:

Vá no Heldsystem.lua(data/actions/scripts) e tire os "--" dos X-Attack, ficando assim:

 

[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.

 

  • Passo 2:

Agora, vá em Exp2.lua(Data/Creaturescripts/Scripts) e procure por:

 

elseif combat == COMBAT_PHYSICALDAMAGE then

 


E em cima coloque:

 

-- 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), 8)
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 --

 

 

  • Passo 3:

Configure as %(porcentagens) no Configuration.lua(Data/Lib).
Nessa parte:

 

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:


Função: Aumenta uma porcentagem do Burn/Poison dependendo do tier.

  • Passo 1:

Vá no Heldsystem.lua(Data/Actions/Scripts) e tire os "--" do X-Poison e do X-Hellfire, Ficando assim:

 

[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.

 

  • Passo 2:

Agora, vá no Exp2.lua(data/Creaturescripts/Scripts) e procure por:

 

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:

 

if damageCombat == FIREDAMAGE and not isBurning(cid) then
    -- Helfire --
    local hellfire = {}
    if isSummon(attacker) and isPlayer(getCreatureMaster(attacker)) then
local ball = getPlayerSlotItem(getCreatureMaster(attacker), 8)
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 and Tier > 21 and Tier < 29 then
hellfire = Tiers[Tier].bonus
else
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), 8)
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 and Tier > 28 and Tier < 36 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

 

 

  • Passo 3:

Configure as porcentagens no Configuration.lua(Data/Lib) nessa parte:

 

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:


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

  • Passo 1:

Vamos lá, primeiro vá no Heldsystem.lua(Data/Actions/Scripts) e tire os "--" do return, ficando assim:

 

[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.

 

  • Passo 2:

Vá no Exp2.lua(Data/Creaturescripts/Scripts) e procure por:

 

 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:

 

       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), 8)
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), 8)
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

 

 

  • Passo 3:

Defina as porcentagens no Configuration.lua(Data/Lib) nessa parte:

 

DmgReturn1 = 0.04
DmgReturn2 = 0.05
DmgReturn3 = 0.06
DmgReturn4 = 0.07
DmgReturn5 = 0.08
DmgReturn6 = 0.09
DmgReturn7 = 0.10

 



Y-Regeneration:


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

  • Passo 1:

Pra começar tire os "--" do Regeneration no Heldsystem.lua(Data/Actions/Scripts), Ficando assim:

 

[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.

 

  • Passo 2:

Agora, vá no Some Functions.lua(Data/Lib) e no final adicione isto:

 

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), 8)
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

 

 

  • Passo 3:

Agora, vá no Goback.lua(Data/Actions/Scripts) e Procure por:

 

adjustStatus(pk, item.uid, true, true, true)

 


E deixe assim:

 

	adjustStatus(pk, item.uid, true, true, true)
	doRegenerateWithY(getCreatureMaster(pk), pk)

 

 

  • Passo 4:

Pronto, você pode configurar os bonus no Configuration.lua(Data/Lib), nessa parte:

 

Regen1 = 700
Regen2 = 1000
Regen3 = 1500
Regen4 = 2000
Regen5 = 2500
Regen6 = 3000
Regen7 = 3500

 



X-Defense:


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

  • Passo 1:

Pra começar é como sempre, vá no Heldsystem.lua(Data/Actions/Scripts) e tire os "--" do defense, ficando assim:

 

[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).

 

  • Passo 2:

Depois, vá em Level System.lua(Data/Lib) e procure por:

 

    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:

 

-- 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)))

 

 

  • Passo 3:

Agora é só configurar os valores no Configuration.lua(Data/Lib), nessa parte:

 

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:


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

  • Passo 1:

Começa como sempre, tire os "--" do Heldsystem.lua(Data/Actions/Scripts), ficando assim:

 

[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.

 

  • Passo 2:

Agora, vá no Some Functions.lua(Data/Lib) e no final adicione isto:

 

function doCureWithY(cid, sid)
if isPlayerOnline(cid) then
local ball = getPlayerSlotItem(cid, 8) or getPlayerSlotItem(getCreatureMaster(cid), 8)
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:

 

function isPlayerOnline(uid)
	return isInArray(getPlayersOnline(), uid)
end

 

 

  • Passo 3:

Agora, vá no Goback.lua(Data/Actions/Scripts) e procure por:

 

adjustStatus(pk, item.uid, true, true, true)

 


E em baixo adicione:

 

doCureWithY(getCreatureMaster(pk), pk)

 

 

  • Passo 4:

Sempre a mesma coisa, pra configurar as chances, vá no Configuration.lua(Data/Lib), nessa parte:

 

Cure1 = 10
Cure2 = 20
Cure3 = 30
Cure4 = 40
Cure5 = 50
Cure6 = 60
Cure7 = 70

10 = 10%
70 = 70%



X-Boost:


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

  • Passo 1:

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:

 

[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.

  • Passo 2:

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:

 

-- 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:

 

-- 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)

 

 

  • Passo 3:

Pronto, mas agora falta ir no Configuration.lua(Data/Lib) e depois de:

 

PoisonBonus1 = 2.50
PoisonBonus2 = 2.60
PoisonBonus3 = 2.70
PoisonBonus4 = 2.80
PoisonBonus5 = 2.90
PoisonBonus6 = 3
PoisonBonus7 = 3.50

 


Bote isso:

 

BoostBonus1 = 5
BoostBonus2 = 8
BoostBonus3 = 12
BoostBonus4 = 15
BoostBonus5 = 18
BoostBonus6 = 22
BoostBonus7 = 25

 


Ai é só configurar os valores e.e


X-Agility - X-Strafe - X-Rage - X-Harden (Bugs Reslvidos):


Função: Tem uma chance determinada pelos tier de usar o ataque(rage, strafe, agility, harden) dependendo do held.

  • Passo 1:

Bom, como eu disse no X-Boost como adicionar novos helds no Heldsystem.lua(Data/Actions/Scripts), não vejo muita necessidade de dizer de novo que é só adicionar na tabela(eu acabei de dizer), então:

 

[ID1] = {attribute = "heldx", ident = 43}, -- Agility 1
[ID2] = {attribute = "heldx", ident = 44}, -- Agility 2
[ID3] = {attribute = "heldx", ident = 45}, -- Agility 3
[ID4] = {attribute = "heldx", ident = 46}, -- Agility 4
[ID5] = {attribute = "heldx", ident = 47}, -- Agility 5
[ID6] = {attribute = "heldx", ident = 48}, -- Agility 6
[ID7] = {attribute = "heldx", ident = 49}, -- Agility 7
[ID1] = {attribute = "heldx", ident = 50}, -- Strafe 1
[ID2] = {attribute = "heldx", ident = 51}, -- Strafe 2
[ID3] = {attribute = "heldx", ident = 52}, -- Strafe 3
[ID4] = {attribute = "heldx", ident = 53}, -- Strafe 4
[ID5] = {attribute = "heldx", ident = 54}, -- Strafe 5
[ID6] = {attribute = "heldx", ident = 55}, -- Strafe 6
[ID7] = {attribute = "heldx", ident = 56}, -- Strafe 7
[ID1] = {attribute = "heldx", ident = 57}, -- Rage 1
[ID2] = {attribute = "heldx", ident = 58}, -- Rage 2
[ID3] = {attribute = "heldx", ident = 59}, -- Rage 3
[ID4] = {attribute = "heldx", ident = 60}, -- Rage 4
[ID5] = {attribute = "heldx", ident = 61}, -- Rage 5
[ID6] = {attribute = "heldx", ident = 62}, -- Rage 6
[ID7] = {attribute = "heldx", ident = 63}, -- Rage 7
[ID1] = {attribute = "heldx", ident = 64}, -- Harden 1
[ID2] = {attribute = "heldx", ident = 65}, -- Harden 2
[ID3] = {attribute = "heldx", ident = 66}, -- Harden 3
[ID4] = {attribute = "heldx", ident = 67}, -- Harden 4
[ID5] = {attribute = "heldx", ident = 68}, -- Harden 5
[ID6] = {attribute = "heldx", ident = 69}, -- Harden 6
[ID7] = {attribute = "heldx", ident = 70}, -- Harden 7

Cada ID é um item e cada item um tier...
Adicione tambem no Actions.xml

 

  • Passo 2:

Pronto, agora, vamos ao que interessa, vá no Exp2.lua(Data/Creaturescripts/Scripts) e procure por:

 

if combat == COMBAT_PHYSICALDAMAGE then
   if getCreatureName(attacker) == "Crobat" then                    
      doCreatureAddHealth(attacker, math.floor(valor))
      doSendAnimatedText(getThingPos(attacker), "+ "..math.floor(valor), 30)
   end
end

 


E em baixo bote isso:

 

--- X-Agility/X-Strafe/X-Rage/X-Harden ---
if combat == COMBAT_PHYSICALDAMAGE then
local TierAgi = {
[43] = {chance = Agility1},
[44] = {chance = Agility2},
[45] = {chance = Agility3},
[46] = {chance = Agility4},
[47] = {chance = Agility5},
[48] = {chance = Agility6},
[49] = {chance = Agility7},
}
local TierStra = {
[50] = {chance = Strafe1},
[51] = {chance = Strafe2},
[52] = {chance = Strafe3},
[53] = {chance = Strafe4},
[54] = {chance = Strafe5},
[55] = {chance = Strafe6},
[56] = {chance = Strafe7},
}
local TierRage = {
[57] = {chance = Rage1},
[58] = {chance = Rage2},
[59] = {chance = Rage3},
[60] = {chance = Rage4},
[61] = {chance = Rage5},
[62] = {chance = Rage6},
[63] = {chance = Rage7},
}
if isPlayer(getCreatureMaster(attacker)) and isSummon(attacker) then
local Tier = getItemAttribute(getPlayerSlotItem(getCreatureMaster(attacker), 8).uid, "heldx")
if Tier and Tier > 42 and Tier < 50 and getPlayerStorageValue(attacker, 22666) ~= 1 then
if math.random(1,100) <= TierAgi[Tier].chance then
docastspell(attacker, "Agility")
setPlayerStorageValue(attacker, 22666, 1)
addEvent(function() setPlayerStorageValue(attacker, 22666, 0) end, 15 * 1000)
end
elseif Tier and Tier > 49 and Tier < 57 and getPlayerStorageValue(attacker, 22666) ~= 2 then
if math.random(1,100) <= TierStra[Tier].chance then
docastspell(attacker, "Strafe")
setPlayerStorageValue(attacker, 22666, 2)
addEvent(function() setPlayerStorageValue(attacker, 22666, 0) end, 15 * 1000)
end
elseif Tier and Tier > 56 and Tier < 64 and getPlayerStorageValue(attacker, 22666) ~= 3 then
if math.random(1,100) <= TierRage[Tier].chance then
docastspell(attacker, "Rage")
setPlayerStorageValue(attacker, 22666, 3)
addEvent(function() setPlayerStorageValue(attacker, 22666, 0) end, 15 * 1000)
end
end
end
if isPlayer(getCreatureMaster(cid)) and isSummon(cid) then
local TierHarden = {
[64] = {chance = Harden1},
[65] = {chance = Harden2},
[66] = {chance = Harden3},
[67] = {chance = Harden4},
[68] = {chance = Harden5},
[69] = {chance = Harden6},
[70] = {chance = Harden7},
}
local Tier = getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "heldx")
if Tier and Tier > 63 and Tier < 71 and getPlayerStorageValue(cid, 22666) ~= 4 then
if math.random(1,100) <= TierHarden[Tier].chance then
docastspell(cid, "Harden")
setPlayerStorageValue(cid, 22666, 4)
addEvent(function() setPlayerStorageValue(cid, 22666, 0) end, 8 * 1000)
end
end
end
end
--- X-Agility/Strafe/Rage/Harden ---

 

 

  • Passo 3:

Pronto, agora é só ir no Configuration.lua(Data/Lib) e em baixo de:

 

BoostBonus1 = 5
BoostBonus2 = 8
BoostBonus3 = 12
BoostBonus4 = 15
BoostBonus5 = 18
BoostBonus6 = 22
BoostBonus7 = 25

 


Adicionar:

 

Agility1 = 10
Agility2 = 15
Agility3 = 20
Agility4 = 25
Agility5 = 30
Agility6 = 35
Agility7 = 50
Strafe1 = 10
Strafe2 = 15
Strafe3 = 20
Strafe4 = 25
Strafe5 = 30
Strafe6 = 35
Strafe7 = 50
Rage1 = 10
Rage2 = 15
Rage3 = 20
Rage4 = 25
Rage5 = 30
Rage6 = 35
Rage7 = 50
Harden1 = 10
Harden2 = 15
Harden3 = 20
Harden4 = 25
Harden5 = 30
Harden6 = 35
Harden7 = 50

10 = 10%
50= 50%



X-Experience:


Função: Adiciona exp á + de acordo com o tier.
Bug: Adiciona exp + em quests... Também :s

  • Passo 1:

Vamos lá, primeiramente, no Heldsystem.lua(Data/Actions/Scripts) e na tabela Heldtable, depois do ultimo held adicione isso:

 

[ID1] = {attribute = "heldx", ident = 71}, -- Experience 1
[ID2] = {attribute = "heldx", ident = 72}, -- Experience 2
[ID3] = {attribute = "heldx", ident = 73}, -- Experience 3
[ID4] = {attribute = "heldx", ident = 74}, -- Experience 4
[ID5] = {attribute = "heldx", ident = 75}, -- Experience 5
[ID6] = {attribute = "heldx", ident = 76}, -- Experience 6
[ID7] = {attribute = "heldx", ident = 77}, -- Experience 7

Cada id é um item e cada item um tier...
Adicione também no Actions.xml.

 

  • Passo 2:

Agora, vá em Pokeexp.lua(Data/Creaturescripts/Scripts) e substitua isso:

 

local function playerAddExp(cid, exp)
	doPlayerAddExp(cid, exp)
	doSendAnimatedText(getThingPos(cid), exp, 215)
end

 


Por isso:

 

local function playerAddExp(cid, exp)
local Tiers = {
[71] = {bonus = Exp1},
[72] = {bonus = Exp2},
[73] = {bonus = Exp3},
[74] = {bonus = Exp4},
[75] = {bonus = Exp5},
[76] = {bonus = Exp6},
[77] = {bonus = Exp7},
}
local ball = getPlayerSlotItem(cid, 8)
local Tier = getItemAttribute(ball.uid, "heldx")
if Tier and Tier > 70 and Tier < 78 then
doPlayerAddExp(cid, math.floor(exp * Tiers[Tier].bonus))
	doSendAnimatedText(getThingPos(cid), exp * Tiers[Tier].bonus, 215)
else
doPlayerAddExp(cid, exp)
	doSendAnimatedText(getThingPos(cid), exp, 215)
end
end

 

 

  • Passo 3:

Pronto, agora é só ir no Configuration.lua(Data/Lib) e depois do ultimo held adicionar:

 

Exp1 = 1.08
Exp2 = 1.15
Exp3 = 1.20
Exp4 = 1.25
Exp5 = 1.30
Exp6 = 1.35
Exp7 = 1.50

1.08 = 8%
1.50 = 50%



X-Elemental(Arrumado 07/04/2014):


Função: Tem chance de dar uma passive do seu elemento :D

  • Passo 1:

Pra variar, começamos com o de sempre(kk), Heldsystem.lua(Data/Actions/Scripts) e em baixo do ultimo held adicione:

 

[ID1] = {attribute = "heldx", ident = 78}, -- Elemental 1
[ID2] = {attribute = "heldx", ident = 79}, -- Elemental 2
[ID3] = {attribute = "heldx", ident = 80}, -- Elemental 3
[ID4] = {attribute = "heldx", ident = 81}, -- Elemental 4
[ID5] = {attribute = "heldx", ident = 82}, -- Elemental 5
[ID6] = {attribute = "heldx", ident = 83}, -- Elemental 6
[ID7] = {attribute = "heldx", ident = 84}, -- Elemental 7

Ja sabem né? Cada id um item, cada item um tier.
Adicione no Actions.xml tbm.

 

  • Passo 2:

Agora, vamos começar o trabalho, vá em Pokemon Moves.lua(Data/Lib) e antes do ultimo end return true adicione:

 

-- X elemental --
elseif spell == "Elemental" then
local types = {
["dark"] = {efct = 87, dmg = DARKDAMAGE},
["ghost"] = {efct = 138, dmg = GHOSTDAMAGE},
["poison"] = {efct = 114, dmg = POISONDAMAGE},
["grass"] = {efct = 45, dmg = GRASSDAMAGE},
["bug"] = {efct = 105, dmg = BUGDAMAGE},
["rock"] = {efct = 44, dmg = ROCKDAMAGE},
["ground"] = {efct = 100, dmg = GROUNDDAMAGE},
["steel"] = {efct = 77, dmg = STEELDAMAGE},
["ice"] = {efct = 43, dmg = ICEDAMAGE},
["water"] = {efct = 154, dmg = WATERDAMAGE},
["electric"] = {efct = 48, dmg = ELECTRICDAMAGE},
["fire"] = {efct = 35, dmg = FIREDAMAGE},
["psychic"] = {efct = 133, dmg = PSYCHICDAMAGE},
["flying"] = {efct = 41, dmg = FLYINGDAMAGE},
["dragon"] = {efct = 143, dmg = DRAGONDAMAGE},
["normal"] = {efct = 111, dmg = NORMALDAMAGE},
["fighting"] = {efct = 112, dmg = FIGHTINGDAMAGE},
}
local ptype = pokes[getCreatureName(cid)].type
local ptype2 = pokes[getCreatureName(cid)].type2
local eff = {}
local damag = {}
if ptype2 ~= "no type" then
local math = math.random(1,100)
if math <= 50 then
eff = types[ptype].efct
damag = types[ptype].dmg
else
eff = types[ptype2].efct
damag = types[ptype2].dmg
end
else
eff = types[ptype].efct
damag = types[ptype].dmg
end
local function sendStickEff(cid, dir)
    if not isCreature(cid) then return true end
       doAreaCombatHealth(cid, damag, getPosByDir(getThingPosWithDebug(cid), dir), 0, -5000, -5000, eff)
    end

    local function doStick(cid)
    if not isCreature(cid) then return true end
    local t = {
          [1] = SOUTHWEST,
          [2] = SOUTH,
          [3] = SOUTHEAST,
          [4] = EAST,
          [5] = NORTHEAST,
          [6] = NORTH,
          [7] = NORTHWEST,
          [8] = WEST,
          [9] = SOUTHWEST,
        }
        for a = 1, 9 do
            addEvent(sendStickEff, a * 200, cid, t[a])
        end
    end
    
    stopNow(cid, 1800)
    doStick(cid, false, cid)
-- X elemental --   

Os efeitos você configura na tabela de tipos.
Ex: efct = o efeito aqui.

 

  • Passo 3:

Agora, vá na pasta "spells" e abra o spells.xml e antes do </instant> adicione isto:

 

<instant name="Elemental" words="spellXXX" lvl="1000" mana="0" event="script" value="ps/Elemental.lua"></instant>

Onde está "XXX" bote o numero que vem depois do ultimo spell.


Vá em "Data/Spells/scripts/ps" e crie um arquivo.lua com nome de Elemental, e dentro bote:

 

function onCastSpell(cid, var)

	if isSummon(cid) then return true end

	docastspell(cid, "Elemental")

return true
end

 

 

  • Passo 4:

Agora, vá no Exp2.lua(Data/Creaturescripts/Scripts) e procure por:

 

if Tier and Tier > 63 and Tier < 71 and getPlayerStorageValue(cid, 22666) ~= 4 then
if math.random(1,100) <= TierHarden[Tier].chance then
docastspell(cid, "Harden")
setPlayerStorageValue(cid, 22666, 4)
addEvent(function() setPlayerStorageValue(cid, 22666, 0) end, 8 * 1000)
end 
end

 



E em baixo bote:

 

if Tier and Tier > 77 and Tier < 85 and getPlayerStorageValue(cid, 22666) ~= 5 then
if math.random(1,100) <= TierEle[Tier].chance then
docastspell(cid, "Elemental", -1000, -5000)
setPlayerStorageValue(cid, 22666, 5)
addEvent(function() setPlayerStorageValue(cid, 22666, 0) end, 1 * 1800)
end
end

 



E em baixo de:

 

local TierHarden = {
[64] = {chance = Harden1},
[65] = {chance = Harden2},
[66] = {chance = Harden3},
[67] = {chance = Harden4},
[68] = {chance = Harden5},
[69] = {chance = Harden6},
[70] = {chance = Harden7},
}

 



Adicione:

 

local TierEle = {
[78] = {chance = Elemen1},
[79] = {chance = Elemen2},
[80] = {chance = Elemen3},
[81] = {chance = Elemen4},
[82] = {chance = Elemen5},
[83] = {chance = Elemen6},
[84] = {chance = Elemen7},
}

 



Ainda no Exp2.0.lua em cima de:

 

doSendMagicEffect(getThingPos(cid), 3)     

 



Bote:

 

	   if isSummon(cid) and isPlayer(getCreatureMaster(cid))then
	   local TierEle = {
[78] = {chance = Elemen1},
[79] = {chance = Elemen2},
[80] = {chance = Elemen3},
[81] = {chance = Elemen4},
[82] = {chance = Elemen5},
[83] = {chance = Elemen6},
[84] = {chance = Elemen7},
}
local Tier = getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "heldx")
if Tier and Tier > 77 and Tier < 85 and getPlayerStorageValue(cid, 22666) ~= 5 then
if math.random(1,100) <= TierEle[Tier].chance then
docastspell(cid, "Elemental", -1000, -5000)
setPlayerStorageValue(cid, 22666, 5)
addEvent(function() setPlayerStorageValue(cid, 22666, 0) end, 1 * 1800)
end
end	 
end

 

 

  • Passo 5:

Pronto, agora é só ir no Configuration.lua(Data/Lib) e depois do ultimo held adicionar:

 

Elemen1 = 8
Elemen2 = 12
Elemen3 = 15
Elemen4 = 18
Elemen5 = 20
Elemen6 = 24
Elemen7 = 30

8 = 8%
30 = 30%




Y-Wing:


Função: Aumenta a velocidade do fly.

  • Passo 1:

Vamos lá, primeiro, no Heldsystem.lua(Data/Actions/Scripts) depois do ultimo held(y) adicione:

 

[ID1] = {attribute = "heldy", ident = 15}, -- Wing 1
[ID2] = {attribute = "heldy", ident = 16}, -- Wing 2
[ID3] = {attribute = "heldy", ident = 17}, -- Wing 3
[ID4] = {attribute = "heldy", ident = 18}, -- Wing 4
[ID5] = {attribute = "heldy", ident = 19}, -- Wing 5
[ID6] = {attribute = "heldy", ident = 20}, -- Wing 6
[ID7] = {attribute = "heldy", ident = 21}, -- Wing 7

Cada id é um item e cada item um tier...
Adicione o Id no Actions.xml

 

  • Passo 2:

Vá em Order.lua(Data/Lib) e procure por:

 

local speed = 500 + PlayerSpeed/5 + getSpeed(sid) * 6 * speedRate

Ou

local speed = 20 + PlayerSpeed + getSpeed(sid) * speedRate

 



E deixe assim:

 

		if Tier and Tier > 14 and Tier < 22 then
		Wingspeed = Tiers[Tier].speed
		else
		Wingspeed = 0
		end
		local speed = (20 + PlayerSpeed + getSpeed(sid) + Wingspeed) * speedRate

 



Ainda no Order.lua, depois de:

 

	elseif skill == "fly" then

 



Adicione:

 

		local Tiers = {
[15] = {speed = Wing1},
[16] = {speed = Wing2},
[17] = {speed = Wing3},
[18] = {speed = Wing4},
[19] = {speed = Wing5},
[20] = {speed = Wing6},
[21] = {speed = Wing7},
}
local Tier = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "heldy")
local Wingspeed = {}

 

 

  • Passo 3:

Pronto, agora é só ir no Configuration.lua(Data/Lib) e depois do ultimo held(y) adicionar:

 

Wing1 = 50
Wing2 = 80
Wing3 = 130
Wing4 = 150
Wing5 = 200
Wing6 = 500
Wing7 = 1000

50 = +50 de Velocidade
1000 = + 1000 de Velocidade




X-Critical:


Função: Chance de ataque critico.

  • Passo 1:

Pra começar, vá em Heldsystem.lua(Data/Actions/Scripts) e depois do ultimo held(x) adicione:

 

[ID1] = {attribute = "heldx", ident = 85}, -- Critical 1
[ID2] = {attribute = "heldx", ident = 86}, -- Critical 2
[ID3] = {attribute = "heldx", ident = 87}, -- Critical 3
[ID4] = {attribute = "heldx", ident = 88}, -- Critical 4
[ID5] = {attribute = "heldx", ident = 89}, -- Critical 5
[ID6] = {attribute = "heldx", ident = 90}, -- Critical 6
[ID7] = {attribute = "heldx", ident = 91}, -- Critical 7

Cada id é um item, e cada item um tier.
Adicione no Actions.xml também.

 

  • Passo 2:

Agora, vá no Exp2.lua(Data/Creaturescripts/Scripts) e procure por:

 

valor = valor / getDefense(cid)
end

 



Logo em cima bote:

 

-- Critical -- 
if isSummon(attacker) and isPlayer(getCreatureMaster(attacker)) then
local Tiers = {
[85] = {chance = Critical1},
[86] = {chance = Critical2},
[87] = {chance = Critical3},
[88] = {chance = Critical4},
[89] = {chance = Critical5},
[90] = {chance = Critical6},
[91] = {chance = Critical7},
}
local ball = getPlayerSlotItem(getCreatureMaster(attacker), 8)
local Tier = getItemAttribute(ball.uid, "heldx")
if Tier and Tier > 84 and Tier < 92 then
if math.random(1,100) <= Tiers[Tier].chance then
valor = valor * 2
doSendAnimatedText(getThingPos(cid), "STK "..(valor * 0.25), 115)
end
end
end
-- Critical --

 

 

  • Passo 3:

Agora, é só ir no Configuration.lua(Data/Lib) e depois do ultimo held(x) adicionar:

 

Critical1 = 18
Critical2 = 22
Critical3 = 25
Critical4 = 28
Critical5 = 30
Critical6 = 33
Critical7 = 35

18 = 18%
35 = 35%



X-Vitality - X-Haste:


Função:
Vitality - Aumenta a life do pokemon em uma porcentagem dependendo do tier.
Haste - Aumenta a velocidade do pokemon.

  • Passo 1:

Pra começar é como sempre, Heldsystem.lua(Data/Actions/Scripts) e depois do ultimo Held(x) adicionar:

 

[ID1] = {attribute = "heldx", ident = 92}, -- Vitality 1
[ID2] = {attribute = "heldx", ident = 93}, -- Vitality 2
[ID3] = {attribute = "heldx", ident = 94}, -- Vitality 3
[ID4] = {attribute = "heldx", ident = 95}, -- Vitality 4
[ID5] = {attribute = "heldx", ident = 96}, -- Vitality 5
[ID6] = {attribute = "heldx", ident = 97}, -- Vitality 6
[ID7] = {attribute = "heldx", ident = 98}, -- Vitality 7
[ID1] = {attribute = "heldx", ident = 99}, -- Haste 1
[ID2] = {attribute = "heldx", ident = 100}, -- Haste 2
[ID3] = {attribute = "heldx", ident = 101}, -- Haste 3
[ID4] = {attribute = "heldx", ident = 102}, -- Haste 4
[ID5] = {attribute = "heldx", ident = 103}, -- Haste 5
[ID6] = {attribute = "heldx", ident = 104}, -- Haste 6
[ID7] = {attribute = "heldx", ident = 105}, -- Haste 7

Cada id é um item e cada item um tier.
Adicione no Actions.xml também.

 

  • Passo 2:

Bom, agora vá no Level System.lua(Data/Lib) e em baixo de:

 

-- Boost -- 

Esperou um script imenso né? HAEAHUAE



Adicione:

 

-- Haste -- 
local hastespeed = {}
local Tiers3 = {
[99] = {bonus = Hasteadd1},
[100] = {bonus = Hasteadd2},
[101] = {bonus = Hasteadd3},
[102] = {bonus = Hasteadd4},
[103] = {bonus = Hasteadd5},
[104] = {bonus = Hasteadd6},
[105] = {bonus = Hasteadd7},
}
if Tier and Tier > 98 and Tier < 106 then
hastespeed = Tiers3[Tier].bonus
else
hastespeed = 0
end
-- Haste -- 
-- Vitality -- 
local vitapoint = {}
local Tiers4 = {
[92] = {bonus = Vitality1},
[93] = {bonus = Vitality2},
[94] = {bonus = Vitality3},
[95] = {bonus = Vitality4},
[96] = {bonus = Vitality5},
[97] = {bonus = Vitality6},
[98] = {bonus = Vitality7},
}
if Tier and Tier > 91 and Tier < 99 then
vitapoint = Tiers4[Tier].bonus
else
vitapoint = 1
end
-- Vitality -- 

 



Agora, logo em baixo tem isso:

 

    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)

 



Deixe assim:

 

    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 + hastespeed)
	setPlayerStorageValue(pk, 1004, (pokes[getCreatureName(pk)].vitality * (getMasterLevel(pk) + getPokemonBoost(pk)) + bonusboost) * vitapoint) 
	setPlayerStorageValue(pk, 1005, pokes[getCreatureName(pk)].specialattack * (getMasterLevel(pk) + getPokemonBoost(pk)) + bonusboost)

 

 

  • Passo 3:

Agora é só ir no Configuration.lua(Data/Lib) e em baixo do ultimo held(x) adicionar:

 

Hasteadd1 = 100
Hasteadd2 = 200
Hasteadd3 = 300
Hasteadd4 = 400
Hasteadd5 = 500
Hasteadd6 = 600
Hasteadd7 = 700
Vitality1 = 1.05
Vitality2 = 1.08
Vitality3 = 1.12
Vitality4 = 1.15
Vitality5 = 1.19
Vitality6 = 1.22
Vitality7 = 1.25

100 = Pontos de velocidade.
1.05 = 5%




X-Accuracy:


Função: Diminui a chance de "bater no boost" em um valor dependendo do tier.

  • Passo 1:

Começar, ja sabem né? Heldsystem.lua(Data/Actions/Scripts) e em baixo do ultimo held adicione:

 

[ID1] = {attribute = "heldx", ident = 106}, -- Accuracy 1
[ID2] = {attribute = "heldx", ident = 107}, -- Accuracy 2
[ID3] = {attribute = "heldx", ident = 108}, -- Accuracy 3
[ID4] = {attribute = "heldx", ident = 109}, -- Accuracy 4
[ID5] = {attribute = "heldx", ident = 110}, -- Accuracy 5
[ID6] = {attribute = "heldx", ident = 111}, -- Accuracy 6
[ID7] = {attribute = "heldx", ident = 112}, -- Accuracy 7

Cada ID é um item e cada item um tier.
Adicione no Actions.xml também.

 

  • Passo 2:

Agora, vá no Pokemon moves.lua(Data/Lib) e em baixo de:

 

function docastspell(cid, spell, mina, maxa)

 



Adicione:

 

Pkattacker = cid

 

 

  • Passo 3:

Agora, vá em newStatusSyst.lua(Data/Lib) e procure por:

 

if isSummon(ret.id) and getPokemonBoost(ret.id) ~= 0 and math.random(1, 100) <= getPokemonBoost(ret.id) then   --sistema "pegou no boost"
   if ret.cond and not isInArray({"Poison", "Leech", "Fear"}, ret.cond) then 
      doSendAnimatedText(getThingPosWithDebug(ret.id), "BOOST", 215)   --alterado v1.8     
      return true
   end
end

 



Deixe assim:

 

if isSummon(ret.id) and getPokemonBoost(ret.id) ~= 0 and math.random(1, 100) <= getPokemonBoost(ret.id) then   --sistema "pegou no boost"
local Tiers = {
[106] = {chance = Accuracy1},
[107] = {chance = Accuracy2},
[108] = {chance = Accuracy3},
[109] = {chance = Accuracy4},
[110] = {chance = Accuracy5},
[111] = {chance = Accuracy6},
[112] = {chance = Accuracy7},
}
   if ret.cond and not isInArray({"Poison", "Leech", "Fear"}, ret.cond) then 
   if isSummon(Pkattacker) and isPlayer(getCreatureMaster(Pkattacker)) then
local Tier = getItemAttribute(getPlayerSlotItem(getCreatureMaster(Pkattacker), 8).uid, "heldx")
if Tier and Tier > 105 and Tier < 113 and math.random(1,100) <= Tiers[Tier].chance then
doSendAnimatedText(getThingPosWithDebug(Pkattacker), "ACCURACY", 215)
else
      doSendMagicEffect(getThingPosWithDebug(ret.id), 114)
	  doSendAnimatedText(getThingPosWithDebug(ret.id), "BOOST", 215)
	  return false
end
end    
end
end

 

 

  • Passo 4:

Agora, é só ir no Configuration.lua(Data/Lib) e em baixo do ultimo held adicionar:

 

Accuracy1 = 10
Accuracy2 = 15
Accuracy3 = 20
Accuracy4 = 25
Accuracy5 = 30
Accuracy6 = 35
Accuracy7 = 40

10 = 10% Chance
40 = 40% Chance




X-Cooldown:


Função: Diminui o tempo de todos os cds em um valor dependendo do tier.

  • Passo 1:

Vá no Heldsystem.lua(Data/Actions/Scripts) e depois do ultimo held adicione:

 

[ID1] = {attribute = "heldx", ident = 113}, -- Cooldown 3
[ID2] = {attribute = "heldx", ident = 114}, -- Cooldown 5
[ID3] = {attribute = "heldx", ident = 115}, -- Cooldown 7

Cada id é um item e cada item um tier.
Adicione os ids no Actions.xml também.

 

  • Passo 2:

Agora, vá em Move1.lua(Data/Talkactions/Scripts) e procure por:

 

local newid = 0

 



Em baixo adicione:

 

-- Cooldown -- 
local Tiers = {
[113] = {bonus = Cdown1},
[114] = {bonus = Cdown2},
[115] = {bonus = Cdown3},
}
local Tier = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "heldx")
local cdzao = {}
if Tier and Tier > 112 and Tier < 116 then
cdzao = math.ceil(move.cd - (move.cd * Tiers[Tier].bonus))
else
cdzao = move.cd
end
-- Cooldown -- 

 



Ainda no Move1.lua, substitua:

 

newid = setCD(getPlayerSlotItem(cid, 8).uid, cdzin, move.cd)

 



Por:

 

newid = setCD(getPlayerSlotItem(cid, 8).uid, cdzin, cdzao) 

 

 

  • Passo 3:

Agora é só ir no Configuration.lua(Data/Lib) e depois do ultimo held adicionar:

 

Cdown1 = 0.08
Cdown2 = 0.12
Cdown3 = 0.16

0.08 = Diminui 8%
0.16 = Diminui 16%




X-Blink:


Função: Diminui o tempo do blink em 25%.

  • Passo 1:

Vamos la, vá no Heldsystem.lua(Data/Actions/Scripts) e depois do ultimo held(x) adicione:

 

[ID1] = {attribute = "heldx", ident = 116}, -- Blink 5

Id é o item.
Adicione também no Actions.xml.

 

  • Passo 2:

Agora, vá em Order.lua(Data/Actions/Scripts) e procure por:

 

local CD = isShinyName(getCreatureName(mysum)) and 20 or 30

 



Deixe assim:

 

-- X-Blink -- 
	local CD = {}
		   local Tiers = {
[116] = {bonus = Blink1},
}
local Tier = getItemAttribute(thisball.uid, "heldx")
if Tier and Tier == 116 then
CD = math.ceil((isShinyName(getCreatureName(mysum)) and 20 or 30) - (isShinyName(getCreatureName(mysum)) and 20 or 30) * Tiers[Tier].bonus)
else
CD = isShinyName(getCreatureName(mysum)) and 20 or 30
end
-- X-Blink --

 

 

  • Passo 3:

Agora é só ir no Configuration.lua(Data/Lib) e depois do ultimo held adicionar:

 

Blink1 = 0.25

0.25 = Diminui 25%




Y-Ghost:


Função: Dá habilidade de fantasma ao pokemon(atravessar paredes).

  • Passo 1:

Vamos começar, vá no Heldsystem.lua(Data/Actions/Scripts) e depois do ultimo Helds(y) adicione:

 

[ID1] = {attribute = "heldy", ident = 22}, -- Ghost 4

Id é o id do held.
Adicione tambem no Actions.xml.

 

  • Passo 2:

Agora vá no Some Functions.lua(Data/Lib) e procure por:

 

function isGhostPokemon(cid)
if not isCreature(cid) then return false end
local ghosts = {"Gastly", "Haunter", "Gengar", "Shiny Gengar", "Misdreavus", "Shiny Abra"}
return isInArray(ghosts, getCreatureName(cid))
end

 



E deixe assim:

 

function isGhostPokemon(cid)
	if not isCreature(cid) then return false end
	local isGhost = {}
	local ghosts = {"Gastly", "Haunter", "Gengar", "Shiny Gengar", "Misdreavus", "Shiny Abra"}
local Tier = getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "heldy")
if Tier and Tier == 22 or isInArray(ghosts, getCreatureName(cid)) then
isGhost = true
else
isGhost = false
end
return isGhost
end

 

 

  • Passo 3:

Agora vá no Exp2.0.lua(Data/Creaturescripts/Scripts) e procure por:

 

doSendMagicEffect(getThingPos(cid), 3)

 



E deixe assim:

 

if isSummon(cid) and isPlayer(getCreatureMaster(cid)) and getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "heldy") and getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "heldy") == 22 then
return true
else   
   doSendMagicEffect(getThingPos(cid), 3)  
end		

 




PS: Os items dos helds devem ser do tipo "Usar Em".


Look e Trade(Todos os Helds até 02:52 de 04/04/2014):


PDA 1.9.1 Sem level:


Look:

 

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)"},
[36] = {name = "X-Boost(Tier: 1)"},
[37] = {name = "X-Boost(Tier: 2)"},
[38] = {name = "X-Boost(Tier: 3)"},
[39] = {name = "X-Boost(Tier: 4)"},
[40] = {name = "X-Boost(Tier: 5)"},
[41] = {name = "X-Boost(Tier: 6)"},
[42] = {name = "X-Boost(Tier: 7)"},
[43] = {name = "X-Agility(Tier: 1)"},
[44] = {name = "X-Agility(Tier: 2)"},
[45] = {name = "X-Agility(Tier: 3)"},
[46] = {name = "X-Agility(Tier: 4)"},
[47] = {name = "X-Agility(Tier: 5)"},
[48] = {name = "X-Agility(Tier: 6)"},
[49] = {name = "X-Agility(Tier: 7)"},
[50] = {name = "X-Strafe(Tier: 1)"},
[51] = {name = "X-Strafe(Tier: 2)"},
[52] = {name = "X-Strafe(Tier: 3)"},
[53] = {name = "X-Strafe(Tier: 4)"},
[54] = {name = "X-Strafe(Tier: 5)"},
[55] = {name = "X-Strafe(Tier: 6)"},
[56] = {name = "X-Strafe(Tier: 7)"},
[57] = {name = "X-Rage(Tier: 1)"},
[58] = {name = "X-Rage(Tier: 2)"},
[59] = {name = "X-Rage(Tier: 3)"},
[60] = {name = "X-Rage(Tier: 4)"},
[61] = {name = "X-Rage(Tier: 5)"},
[62] = {name = "X-Rage(Tier: 6)"},
[63] = {name = "X-Rage(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), 8).uid, "boost") or 0
   if getCreatureMaster(thing.uid) == cid then
      local myball = getPlayerSlotItem(cid, 8).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):

 

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)"},
[36] = {name = "X-Boost(Tier: 1)"},
[37] = {name = "X-Boost(Tier: 2)"},
[38] = {name = "X-Boost(Tier: 3)"},
[39] = {name = "X-Boost(Tier: 4)"},
[40] = {name = "X-Boost(Tier: 5)"},
[41] = {name = "X-Boost(Tier: 6)"},
[42] = {name = "X-Boost(Tier: 7)"},
[43] = {name = "X-Agility(Tier: 1)"},
[44] = {name = "X-Agility(Tier: 2)"},
[45] = {name = "X-Agility(Tier: 3)"},
[46] = {name = "X-Agility(Tier: 4)"},
[47] = {name = "X-Agility(Tier: 5)"},
[48] = {name = "X-Agility(Tier: 6)"},
[49] = {name = "X-Agility(Tier: 7)"},
[50] = {name = "X-Strafe(Tier: 1)"},
[51] = {name = "X-Strafe(Tier: 2)"},
[52] = {name = "X-Strafe(Tier: 3)"},
[53] = {name = "X-Strafe(Tier: 4)"},
[54] = {name = "X-Strafe(Tier: 5)"},
[55] = {name = "X-Strafe(Tier: 6)"},
[56] = {name = "X-Strafe(Tier: 7)"},
[57] = {name = "X-Rage(Tier: 1)"},
[58] = {name = "X-Rage(Tier: 2)"},
[59] = {name = "X-Rage(Tier: 3)"},
[60] = {name = "X-Rage(Tier: 4)"},
[61] = {name = "X-Rage(Tier: 5)"},
[62] = {name = "X-Rage(Tier: 6)"},
[63] = {name = "X-Rage(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

 



Pda Com level 2.9.1:


Look:

 

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 v2.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)"},
[36] = {name = "X-Boost(Tier: 1)"},
[37] = {name = "X-Boost(Tier: 2)"},
[38] = {name = "X-Boost(Tier: 3)"},
[39] = {name = "X-Boost(Tier: 4)"},
[40] = {name = "X-Boost(Tier: 5)"},
[41] = {name = "X-Boost(Tier: 6)"},
[42] = {name = "X-Boost(Tier: 7)"},
[43] = {name = "X-Agility(Tier: 1)"},
[44] = {name = "X-Agility(Tier: 2)"},
[45] = {name = "X-Agility(Tier: 3)"},
[46] = {name = "X-Agility(Tier: 4)"},
[47] = {name = "X-Agility(Tier: 5)"},
[48] = {name = "X-Agility(Tier: 6)"},
[49] = {name = "X-Agility(Tier: 7)"},
[50] = {name = "X-Strafe(Tier: 1)"},
[51] = {name = "X-Strafe(Tier: 2)"},
[52] = {name = "X-Strafe(Tier: 3)"},
[53] = {name = "X-Strafe(Tier: 4)"},
[54] = {name = "X-Strafe(Tier: 5)"},
[55] = {name = "X-Strafe(Tier: 6)"},
[56] = {name = "X-Strafe(Tier: 7)"},
[57] = {name = "X-Rage(Tier: 1)"},
[58] = {name = "X-Rage(Tier: 2)"},
[59] = {name = "X-Rage(Tier: 3)"},
[60] = {name = "X-Rage(Tier: 4)"},
[61] = {name = "X-Rage(Tier: 5)"},
[62] = {name = "X-Rage(Tier: 6)"},
[63] = {name = "X-Rage(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, "Observa:  "..iname.name..".")
      if getItemAttribute(thing.uid, "unique") then               
         table.insert(str, " Item unique.")   
      end
      table.insert(str, "\nPokemon: "..pokename.." [level "..getItemAttribute(thing.uid, "level").."].\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 heldx and heldy then
table.insert(str, "Holding: "..(xhelds[heldx].name).." and "..(yhelds[heldy].name).."./n")
elseif heldx then
table.insert(str, "Holding: "..(xhelds[heldx].name).."./n")
elseif heldy then
table.insert(str, "Holding: "..(yhelds[heldy].name).."./n")
end
      if getItemAttribute(thing.uid, "nick") then
         table.insert(str, "Conhecido como: "..getItemAttribute(thing.uid, "nick")..".\n")
      end
      if getItemAttribute(thing.uid, "gender") == SEX_MALE then
         table.insert(str, "Sexo: male.")
      elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then
         table.insert(str, "Sexo: female.")      
      else
         table.insert(str, "It is genderless.")
      end
	   table.insert(str, "\n--- Status ---")    
      table.insert(str, "\nAtaque: "..math.floor(getItemAttribute(thing.uid, "offense")).." \nDefesa: "..math.floor(getItemAttribute(thing.uid, "defense")).."\n")
      table.insert(str, "Velocidade: "..math.floor(getItemAttribute(thing.uid, "speed")).." \nSp. Attack: "..math.floor(getItemAttribute(thing.uid, "specialattack")).."\n")
      table.insert(str, "Vitalidade: "..math.floor(getItemAttribute(thing.uid, "vitality")).."")	
      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).." ["..getItemAttribute(thing.uid, "level").."]. ")    
      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, "Observa uma pessoa morta (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    --alterado v2.8 \/
      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 isNpc(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    --npcs de TV
   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    
   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
   table.insert(str, "You see a wild "..string.lower(getCreatureName(thing.uid)).." [level "..getPokemonLevel(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
   local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0
   local boostshow = " + "..boostlevel.."]"
   if showBoostSeparated then
      boostshow = "] [+"..boostlevel.."]"
   end
   local levelinfo = "["..getPokemonLevel(thing.uid)..""..boostshow..""
   if getCreatureMaster(thing.uid) == cid then
      local myball = getPlayerSlotItem(cid, 8).uid
      local nexp = getItemAttribute(myball, "nextlevelexp")
      table.insert(str, "Voce olha o seu "..string.lower(getCreatureName(thing.uid)).." "..levelinfo..".")
      table.insert(str, "\nPontos de felicidades: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".")

      if getItemAttribute(myball, "level") <= 99 then
         table.insert(str, "\nExperiencia para subir de level: "..nexp..".")
      end
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
   else
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..string.lower(getCreatureName(thing.uid)).." "..levelinfo..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid))..".")
   end
   return false
end
return true
end

 


Trade:

 

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)"},
[36] = {name = "X-Boost(Tier: 1)"},
[37] = {name = "X-Boost(Tier: 2)"},
[38] = {name = "X-Boost(Tier: 3)"},
[39] = {name = "X-Boost(Tier: 4)"},
[40] = {name = "X-Boost(Tier: 5)"},
[41] = {name = "X-Boost(Tier: 6)"},
[42] = {name = "X-Boost(Tier: 7)"},
[43] = {name = "X-Agility(Tier: 1)"},
[44] = {name = "X-Agility(Tier: 2)"},
[45] = {name = "X-Agility(Tier: 3)"},
[46] = {name = "X-Agility(Tier: 4)"},
[47] = {name = "X-Agility(Tier: 5)"},
[48] = {name = "X-Agility(Tier: 6)"},
[49] = {name = "X-Agility(Tier: 7)"},
[50] = {name = "X-Strafe(Tier: 1)"},
[51] = {name = "X-Strafe(Tier: 2)"},
[52] = {name = "X-Strafe(Tier: 3)"},
[53] = {name = "X-Strafe(Tier: 4)"},
[54] = {name = "X-Strafe(Tier: 5)"},
[55] = {name = "X-Strafe(Tier: 6)"},
[56] = {name = "X-Strafe(Tier: 7)"},
[57] = {name = "X-Rage(Tier: 1)"},
[58] = {name = "X-Rage(Tier: 2)"},
[59] = {name = "X-Rage(Tier: 3)"},
[60] = {name = "X-Rage(Tier: 4)"},
[61] = {name = "X-Rage(Tier: 5)"},
[62] = {name = "X-Rage(Tier: 6)"},
[63] = {name = "X-Rage(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 v2.6
	      return false
       end     
	elseif getItemAttribute(item.uid, "unique") then    --alterado v2.6
	   doPlayerSendCancel(cid, "It is a Unique Item, you can't trade this item.")
	   return false
	end 
    
    if getPlayerStorageValue(cid, 52480) >= 1 then             --alterado v2.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 v2.8 \/
       local boost = getItemAttribute(item.uid, "boost") or 0
       local nick = getItemAttribute(item.uid, "nick") or ""
       local level = getItemAttribute(item.uid, "level")
	   	   local heldx = getItemAttribute(item.uid, "heldx")
       local heldy = getItemAttribute(item.uid, "heldy")
    
       local str = "Pokemon in trade: "
       str = str.."Nome: "..name.."   Level: "..level.."   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
    
    if isContainer(item.uid) then                         --alterado v2.8 \/
	   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 level = getItemAttribute(itens[i], "level")
				 local heldx = getItemAttribute(itens[i], "heldx")
       local heldy = getItemAttribute(itens[i], "heldy")
    
                 local str = "Pokemon in trade: "
                 str = str.."Nome: "..name.."   Level: "..level.."   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 v2.6
	   cancel = true
	   p1 = cid
    end
    if getPlayerMana(target) + targetItemPokeball > 6 then  --alterado v2.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 

 


E qualquer bug do tipo: Ficar tudo na mesma linha... É só adicionar um "/n".
Em ambos, é só ir adicionando items na tabela com seu ident.



Fila:


X-Lucky(sem sources :s)
Y-Ghost
Y-Antiself
Y-Teleport
X-Accuracy


Créditos:


Slicer(ajudou no Regeneration)
Zipter98(Ajudou no Regeneration)
Stylo Maldoso(ajudou na organização)
Pokemonultimatetwo(Base do Y-Ghost, X-Haste, Y-Cooldown)

Ao Usar Esse Sistema, Peço Que Botem Créditos.Não Exijo, Mas Aprecio.

 

NÃO DOU MAIS SUPORTE NESSE SISTEMA. ESTÁ ULTRAPASSADO E MAL FEITO.

Edited by Featzen
Link to post
Share on other sites

Muito, Bom Apesar de eu ja ter conseguido, antes fazer 6 held's, O Tutorial Vai ajudar quem precisa! :p

Sim.

Eu também sei fazer os outros, mas é muito enjoado mexer com actionid, e ainda não tive necessidade de fazer outros helds.

Link to post
Share on other sites

@gabriel deu um error aki quando vai soltar o poke sem held

 

 

 

[31/03/2014 01:06:59] [Error - Action Interface]
[31/03/2014 01:06:59] data/actions/scripts/goback.lua:onUse
[31/03/2014 01:06:59] Description:
[31/03/2014 01:06:59] data/lib/level system.lua:248: attempt to perform arithmetic on global 'defheld' (a nil value)
[31/03/2014 01:06:59] stack traceback:
[31/03/2014 01:06:59] data/lib/level system.lua:248: in function 'adjustStatus'
[31/03/2014 01:06:59] data/actions/scripts/goback.lua:190: in function <data/actions/scripts/goback.lua:13>

ele meio que deixa a ball como on e vai soltando pokes sem parar kkk
Edited by jeanflamengo
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share