- 0
tfs 0.3.4 X-Boost n ta funfando e ajuda no Look!
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
-
Conteúdo Similar
-
- 0 respostas
- 749 visualizações
-
- 0 respostas
- 722 visualizações
-
- 4 respostas
- 1158 visualizações
-
- 4 respostas
- 1131 visualizações
-
- 6 respostas
- 1605 visualizações
-
Pergunta
Josegvb 87
Ola, entao enquanto o LOOK, quando eu dou look em outro player aparesce 3 veces:
22:37 You see Nork Zoolder. He is a Seavell King from Viridian City. He is watching TV.
22:37 This player is Stylist.
22:37 You see Nork Zoolder. He is a pokemon trainer and Stylist (Level 1).
oque eu queria?
22:37 You see Nork Zoolder. He is a Seavell King and a Stylist
e quando eu der look em min
22:37 You see yourself. You are a Seavell King and an Stylist.
ja procurei e nunca achei onde modificar o 1º look
meu Look do creaturescripts
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 shinys = {
["Shiny Abra"] = "Dark Abra",
["Shiny Onix"] = "Crystal Onix",
["Shiny Gyarados"] = "Red Gyarados",
["Shiny Charizard"] = "Elder Charizard",
["Shiny Venusaur"] = "Ancient Venusaur",
["Shiny Blastoise"] = "Ancient Blastoise",
["Shiny Farfetch'd"] = "Elite Farfetch'd",
["Shiny Hitmonlee"] = "Elite Hitmonlee",
["Shiny Himonchan"] = "Elite Hitmonchan",
["Shiny Snorlax"] = "Big Snorlax",
}
-- tabela adicionado ao configuration s・procura por price = ..--
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-Experience(Tier: 1)"},
[44] = {name = "X-Experience(Tier: 2)"},
[45] = {name = "X-Experience(Tier: 3)"},
[46] = {name = "X-Experience(Tier: 4)"},
[47] = {name = "X-Experience(Tier: 5)"},
[48] = {name = "X-Experience(Tier: 6)"},
[49] = {name = "X-Experience(Tier: 7)"},
[50] = {name = "X-Critical(Tier: 1)"},
[51] = {name = "X-Critical(Tier: 2)"},
[52] = {name = "X-Critical(Tier: 3)"},
[53] = {name = "X-Critical(Tier: 4)"},
[54] = {name = "X-Critical(Tier: 5)"},
[55] = {name = "X-Critical(Tier: 6)"},
[56] = {name = "X-Critical(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
if getItemAttribute(thing.uid, "ehditto") == 1 then
table.insert(str, "\nIt contains "..getArticle(pokename).." "..pokename.." (Ditto).\n")
else
if getItemAttribute(thing.uid, "ehditto") == 1 then
table.insert(str, "\nIt contains "..getArticle(pokename).." "..pokename.." (Ditto).\n")
elseif getItemAttribute(thing.uid, "ehshinyditto") == 1 then
table.insert(str, "\nIt contains "..getArticle(pokename).." "..pokename.." (Shiny Ditto).\n")
else
table.insert(str, "\nIt contains "..getArticle(pokename).." "..pokename..".\n")
end
end
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..").")
end
if getItemAttribute(thing.uid, "nick") then
table.insert(str, "("..getItemAttribute(thing.uid, "nick")..").")
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 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
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getPlayerDesc(cid, thing.uid, true))
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, true))
return true
end
if getCreatureName(thing.uid) == "Evolution" then return false end
if not isSummon(thing.uid) then --monstros
table.insert(str, "You see a "..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
criei um arquevo tb onlook como diz aquele topico da profesoes
local t = {
{name = "engenheiro", storage = 12012, value = 1},
{name = "professor", storage = 12013, value = 1},
{name = "Stylist", storage = 12014, value = 1},
{name = "viado", storage = 12015, value = 1},
}
function onLook(cid, thing, position, lookDistance)
for _, prof in ipairs(t) do
if isPlayer(thing.uid) then
if getPlayerStorageValue(thing.uid, prof.storage) >= prof.value and thing.uid ~= cid then
local textx = "This player is "..prof.name.."."
doPlayerSendTextMessage(cid, 22, textx)
end
if getPlayerStorageValue(thing.uid, prof.storage) >= prof.value and thing.uid == cid then
local text = "You are "..prof.name.."."
doPlayerSendTextMessage(cid, 22, text)
end
end
end
return true
end
enquanto o meu x-boost nem esta pegando
sua funçao é:
ele deberia hitar como se vc tiver 36 lvls + no caso do tier 7, mas estou usando com a leech seed e ela só ta drainando a hp dele no meu mesmo lvl, alias nao esta pegando direito o held, acho q seia um error na minhas configuraçoes, tentei achar mas nao encontrei, se alguem tiver como ajudar agradesço desde ja
meu Level System:
function adjustWildPoke(cid, optionalLevel)
if isMonster(cid) and pokes[getCreatureName(cid)] then
local level = (optionalLevel and optionalLevel >= 1) and optionalLevel or getPokemonLevel(cid) --alterado v1.8
local level = 0
local b = getCreatureOutfit(cid).lookBody
local shiny = 100
local lvl = getPokemonLevel(cid)
local monstrinho = getCreatureName(cid)
--alterado v1.4
if optionalLevel then
level = optionalLevel
elseif b > lvl then
level = b
elseif string.find(monstrinho, "Shiny") then
level = lvl * 01.0
else
level = lvl
end
legendarios = { "Ho-oh", "Lugia", "Mew", "Mewtwo", "Suicune", "Raikou", "Entei", "Moltres", "Zapdos", "Articuno", "Celebi"}
shinyspoderosos = { "Shiny Gyarados", "Shiny Snorlax"}
if isInArray(legendarios, getCreatureName(cid)) and not isNpcSummon(cid) then
setPlayerStorageValue(cid, 1000, level) --alterado v1.8
setPlayerStorageValue(cid, 1001, pokes[getCreatureName(cid)].offense * level)
setPlayerStorageValue(cid, 1002, pokes[getCreatureName(cid)].defense)
setPlayerStorageValue(cid, 1003, pokes[getCreatureName(cid)].agility)
setPlayerStorageValue(cid, 1004, pokes[getCreatureName(cid)].vitality * level*20)
setPlayerStorageValue(cid, 1005, pokes[getCreatureName(cid)].specialattack * level)
elseif isInArray(shinyspoderosos, getCreatureName(cid)) and not isNpcSummon(cid) then
setPlayerStorageValue(cid, 1000, level) --alterado v1.8
setPlayerStorageValue(cid, 1001, pokes[getCreatureName(cid)].offense * level)
setPlayerStorageValue(cid, 1002, pokes[getCreatureName(cid)].defense)
setPlayerStorageValue(cid, 1003, pokes[getCreatureName(cid)].agility)
setPlayerStorageValue(cid, 1004, pokes[getCreatureName(cid)].vitality * level*10)
setPlayerStorageValue(cid, 1005, pokes[getCreatureName(cid)].specialattack * level)
else
setPlayerStorageValue(cid, 1000, level) --alterado v1.8
setPlayerStorageValue(cid, 1001, pokes[getCreatureName(cid)].offense * level)
setPlayerStorageValue(cid, 1002, pokes[getCreatureName(cid)].defense)
setPlayerStorageValue(cid, 1003, pokes[getCreatureName(cid)].agility)
setPlayerStorageValue(cid, 1004, pokes[getCreatureName(cid)].vitality * level)
setPlayerStorageValue(cid, 1005, pokes[getCreatureName(cid)].specialattack * level)
end
doRegainSpeed(cid) --alterado!
setCreatureMaxHealth(cid, (getVitality(cid) * HPperVITwild))
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
if pokes[getCreatureName(cid)].exp then
local exp = pokes[getCreatureName(cid)].exp * baseExpRate + pokes[getCreatureName(cid)].vitality * pokemonExpPerLevelRate
setPlayerStorageValue(cid, 1006, (exp * generalExpRate/2)*10)
if getPlayerStorageValue(cid, 22546) == 1 then
setPlayerStorageValue(cid, 1006, 750)
doSetCreatureDropLoot(cid, false)
end
end
end
end
function getPokemonXMLOutfit(name) --alterado v1.9 \/
local path = "data/monster/pokes/Shiny/"..name..".xml"
local tpw = io.type(io.open(path))
if not tpw then
path = "data/monster/pokes/geracao 2/"..name..".xml"
tpw = io.type(io.open(path))
end
if not tpw then
path = "data/monster/pokes/geracao 1/"..name..".xml"
tpw = io.type(io.open(path))
end
if not tpw then
path = "data/monster/pokes/"..name..".xml"
tpw = io.type(io.open(path))
end
if not tpw then
return print("[getPokemonXMLOutfit] Poke with name: "..name.." ins't in any paste on monster/pokes/") and 2
end
local arq = io.open(path, "a+")
local txt = arq:read("*all")
arq:close()
local a, b = txt:find('look type="(.-)"')
txt = string.sub(txt, a + 11, b - 1)
return tonumber(txt)
end
function doEvolutionOutfit(cid, oldout, outfit)
if not isCreature(cid) then return true end
if getCreatureOutfit(cid).lookType == oldout then
doSetCreatureOutfit(cid, {lookType = outfit}, -1)
else
doSetCreatureOutfit(cid, {lookType = oldout}, -1)
end
end
function doSendEvolutionEffect(cid, pos, evolution, turn, ssj, evolve, f, h)
if not isCreature(cid) then
doSendAnimatedText(pos, "CANCEL", 215)
return true
end
if evolve then
doEvolvePokemon(getCreatureMaster(cid), {uid = cid}, evolution, 0, 0)
return true
end
doSendMagicEffect(pos, 18)
if ssj then
sendSSJEffect(evo)
end
doEvolutionOutfit(cid, f, h)
addEvent(doSendEvolutionEffect, math.pow(1900, turn/20), cid, getThingPos(cid), evolution, turn - 1, turn == 19, turn == 2, f, h)
end
function sendSSJEffect(cid)
if not isCreature(cid) then return true end
local pos1 = getThingPos(cid)
local pos2 = getThingPos(cid)
pos2.x = pos2.x + math.random(-1, 1)
pos2.y = pos2.y - math.random(1, 2)
doSendDistanceShoot(pos1, pos2, 37)
addEvent(sendSSJEffect, 45, cid)
end
function sendFinishEvolutionEffect(cid, alternate)
if not isCreature(cid) then return true end
local pos1 = getThingPos(cid)
if alternate then
local pos = {
[1] = {-2, 0},
[2] = {-1, -1},
[3] = {0, -2},
[4] = {1, -1},
[5] = {2, 0},
[6] = {1, 1},
[7] = {0, 2},
[8] = {-1, 1}}
for a = 1, 8 do
local pos2 = getThingPos(cid)
pos2.x = pos2.x + pos[a][1]
pos2.y = pos2.y + pos[a][2]
local pos = getThingPos(cid)
doSendDistanceShoot(pos2, pos, 37)
addEvent(doSendDistanceShoot, 300, pos, pos2, 37)
end
else
for a = 0, 3 do
doSendDistanceShoot(pos1, getPosByDir(pos1, a), 37)
end
for a = 4, 7 do
addEvent(doSendDistanceShoot, 600, pos1, getPosByDir(pos1, a), 37)
end
end
end
function doEvolvePokemon(cid, item2, theevo, stone1, stone2)
if not isCreature(cid) then return true end
if not pokes[theevo] or not pokes[theevo].offense then
doReturnPokemon(cid, item2.uid, getPlayerSlotItem(cid, 8), pokeballs[getPokeballType(getPlayerSlotItem(cid, 8).itemid)].effect, false, true)
return true
end
local owner = getCreatureMaster(item2.uid)
local pokeball = getPlayerSlotItem(cid,
local description = "Contains a "..theevo.."."
local pct = getCreatureHealth(item2.uid) / getCreatureMaxHealth(item2.uid)
doItemSetAttribute(pokeball.uid, "hp", pct)
doItemSetAttribute(pokeball.uid, "poke", theevo)
doItemSetAttribute(pokeball.uid, "description", "Contains a "..theevo..".")
doPlayerSendTextMessage(cid, 27, "Congratulations! Your "..getPokeName(item2.uid).." evolved into a "..theevo.."!")
doSendMagicEffect(getThingPos(item2.uid), 18)
doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos[theevo])
doSendMagicEffect(getThingPos(cid), 173)
local oldpos = getThingPos(item2.uid)
local oldlod = getCreatureLookDir(item2.uid)
doRemoveCreature(item2.uid)
doSummonMonster(cid, theevo)
local pk = getCreatureSummons(cid)[1]
doTeleportThing(pk, oldpos, false)
doCreatureSetLookDir(pk, oldlod)
sendFinishEvolutionEffect(pk, true)
addEvent(sendFinishEvolutionEffect, 550, pk, true)
addEvent(sendFinishEvolutionEffect, 1050, pk)
doPlayerRemoveItem(cid, stone1, 1)
doPlayerRemoveItem(cid, stone2, 1)
doAddPokemonInOwnList(cid, theevo)
local happy = getItemAttribute(pokeball.uid, "happy")
doItemSetAttribute(pokeball.uid, "happy", happy + happyGainedOnEvolution)
if happy + happyGainedOnEvolution > 255 then
doItemSetAttribute(pokeball.uid, "happy", 255)
end
adjustStatus(pk, pokeball.uid, true, false)
if useKpdoDlls then
doUpdateMoves(cid)
end
end
function doMathDecimal(number, casas)
if math.floor(number) == number then return number end
local c = casas and casas + 1 or 3
for a = 0, 10 do
if math.floor(number) < math.pow(10, a) then
local str = string.sub(""..number.."", 1, a + c)
return tonumber(str)
end
end
return number
end
function doAdjustWithDelay(cid, pk, health, vit, status)
if isCreature(cid) then
adjustStatus(pk, getPlayerSlotItem(cid, 8).uid, health, vir, status)
end
end
function adjustStatus(pk, item, health, vite, conditions)
if not isCreature(pk) then return true end
local gender = getItemAttribute(item, "gender") and getItemAttribute(item, "gender") or 0
addEvent(doCreatureSetSkullType, 10, pk, gender)
-- 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 --
if (getItemAttribute(item, "ehditto") == 1) then
setPlayerStorageValue(pk, 1001, (pokes[getCreatureName(pk)].offense * (getMasterLevel(pk) + getPokemonBoost(pk))) * 0.50)
setPlayerStorageValue(pk, 1002, (pokes[getCreatureName(pk)].defense) * 0.75)
setPlayerStorageValue(pk, 1003, pokes[getCreatureName(pk)].agility)
setPlayerStorageValue(pk, 1004, (pokes[getCreatureName(pk)].vitality * (getMasterLevel(pk) + getPokemonBoost(pk))) * 0.50)
setPlayerStorageValue(pk, 1005, (pokes[getCreatureName(pk)].specialattack * (getMasterLevel(pk) + getPokemonBoost(pk))) * 0.50)
elseif (getItemAttribute(item, "ehshinyditto") == 1) then
setPlayerStorageValue(pk, 1001, (pokes[getCreatureName(pk)].offense * (getMasterLevel(pk) + getPokemonBoost(pk))) * 0.75)
setPlayerStorageValue(pk, 1002, (pokes[getCreatureName(pk)].defense) * 0.50)
setPlayerStorageValue(pk, 1003, pokes[getCreatureName(pk)].agility)
setPlayerStorageValue(pk, 1004, (pokes[getCreatureName(pk)].vitality * (getMasterLevel(pk) + getPokemonBoost(pk))) * 0.75)
setPlayerStorageValue(pk, 1005, (pokes[getCreatureName(pk)].specialattack * (getMasterLevel(pk) + getPokemonBoost(pk))) * 0.75)
else
-- 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)
end
if vite == true then
local pct = getCreatureHealth(pk) / getCreatureMaxHealth(pk)
local vit = getVitality(pk)
setCreatureMaxHealth(pk, ( vit * HPperVITsummon ))
doCreatureAddHealth(pk, pct * vit * HPperVITsummon)
end
doRegainSpeed(pk)
local nick = getItemAttribute(item, "poke")
if isGhostPokemon(pk) then
setPlayerStorageValue(pk, 8981, 1)
updateGhostWalk(pk)
end
if string.find(tostring(nick), "Shiny") then
nick = tostring(nick):match("Shiny (.*)")
end
if getItemAttribute(item, "nick") then
nick = getItemAttribute(item, "nick")
end
setPlayerStorageValue(pk, 1007, nick)
doCreatureSetNick(pk, nick)
if not getItemAttribute(item, "happy") then
doItemSetAttribute(item, "happy", 120)
end
if not getItemAttribute(item, "hunger") then
doItemSetAttribute(item, "hunger", 5)
end
local happy = getItemAttribute(item, "happy")
if happy < 0 then
happy = 1
end
setPlayerStorageValue(pk, 1008, happy)
local hunger = getItemAttribute(item, "hunger")
setPlayerStorageValue(pk, 1009, hunger)
if health == true then
local mh = HPperVITsummon * getVitality(pk)
local rd = 1 - (tonumber(getItemAttribute(item, "hp")))
setCreatureMaxHealth(pk, mh)
doCreatureAddHealth(pk, getCreatureMaxHealth(pk))
doCreatureAddHealth(pk, -(getCreatureMaxHealth(pk) * rd))
end
if isSummon(pk) and conditions then
local burn = getItemAttribute(item, "burn")
if burn and burn >= 0 then
local ret = {id = pk, cd = burn, check = false, damage = getItemAttribute(item, "burndmg"), cond = "Burn"}
addEvent(doCondition2, 3500, ret)
end
local poison = getItemAttribute(item, "poison")
if poison and poison >= 0 then
local ret = {id = pk, cd = poison, check = false, damage = getItemAttribute(item, "poisondmg"), cond = "Poison"}
addEvent(doCondition2, 1500, ret)
end
local confuse = getItemAttribute(item, "confuse")
if confuse and confuse >= 0 then
local ret = {id = pk, cd = confuse, check = false, cond = "Confusion"}
addEvent(doCondition2, 1200, ret)
end
local sleep = getItemAttribute(item, "sleep")
if sleep and sleep >= 0 then
local ret = {id = pk, cd = sleep, check = false, first = true, cond = "Sleep"}
doCondition2(ret)
end
local miss = getItemAttribute(item, "miss")
if miss and miss >= 0 then
local ret = {id = pk, cd = miss, eff = getItemAttribute(item, "missEff"), check = false, spell = getItemAttribute(item, "missSpell"), cond = "Miss"}
doCondition2(ret)
end
local fear = getItemAttribute(item, "fear")
if fear and fear >= 0 then
local ret = {id = pk, cd = fear, check = false, skill = getItemAttribute(item, "fearSkill"), cond = "Fear"}
doCondition2(ret)
end
local silence = getItemAttribute(item, "silence")
if silence and silence >= 0 then
local ret = {id = pk, cd = silence, eff = getItemAttribute(item, "silenceEff"), check = false, cond = "Silence"}
doCondition2(ret)
end
local stun = getItemAttribute(item, "stun")
if stun and stun >= 0 then
local ret = {id = pk, cd = stun, eff = getItemAttribute(item, "stunEff"), check = false, spell = getItemAttribute(item, "stunSpell"), cond = "Stun"}
doCondition2(ret)
end
local paralyze = getItemAttribute(item, "paralyze")
if paralyze and paralyze >= 0 then
local ret = {id = pk, cd = paralyze, eff = getItemAttribute(item, "paralyzeEff"), check = false, first = true, cond = "Paralyze"}
doCondition2(ret)
end
local slow = getItemAttribute(item, "slow")
if slow and slow >= 0 then
local ret = {id = pk, cd = slow, eff = getItemAttribute(item, "slowEff"), check = false, first = true, cond = "Slow"}
doCondition2(ret)
end
local leech = getItemAttribute(item, "leech")
if leech and leech >= 0 then
local ret = {id = pk, cd = leech, attacker = 0, check = false, damage = getItemAttribute(item, "leechdmg"), cond = "Leech"}
doCondition2(ret)
end
for i = 1, 3 do
local buff = getItemAttribute(item, "Buff"..i)
if buff and buff >= 0 then
local ret = {id = pk, cd = buff, eff = getItemAttribute(item, "Buff"..i.."eff"), check = false,
buff = getItemAttribute(item, "Buff"..i.."skill"), first = true, attr = "Buff"..i}
doCondition2(ret)
end
end
end
--alterado v1.9
if getItemAttribute(item, "boost") and getItemAttribute(item, "boost") >= 50 and getItemAttribute(item, "aura") then
sendAuraEffect(pk, auraSyst[getItemAttribute(item, "aura")])
end
if getPlayerStorageValue(getCreatureMaster(pk), 6598754) >= 1 then
setPlayerStorageValue(pk, 6598754, 1)
elseif getPlayerStorageValue(getCreatureMaster(pk), 6598755) >= 1 then
setPlayerStorageValue(pk, 6598755, 1)
end
return true
end
function getOffense(cid)
if not isCreature(cid) then return 0 end
return tonumber(getPlayerStorageValue(cid, 1001))
end
function getDefense(cid)
if not isCreature(cid) then return 0 end
return tonumber(getPlayerStorageValue(cid, 1002))
end
function getSpeed(cid)
if not isCreature(cid) then return 0 end
return tonumber(getPlayerStorageValue(cid, 1003))
end
function getVitality(cid)
if not isCreature(cid) then return 0 end
return tonumber(getPlayerStorageValue(cid, 1004))
end
function getSpecialAttack(cid)
if not isCreature(cid) then return 0 end
return tonumber(getPlayerStorageValue(cid, 1005))
end
function getHappiness(cid)
if not isCreature(cid) then return 0 end
return tonumber(getPlayerStorageValue(cid, 1008))
end
function getSpecialDefense(cid)
if not isCreature(cid) then return 0 end
return getSpecialAttack(cid) * 0.85 + getDefense(cid) * 0.2
end
function getPokemonLevel(cid, dex)
if not isCreature(cid) or not pokes[getCreatureName(cid)] then return 0 end
if not dex then --alterado v1.9
if ehMonstro(cid) and getPlayerStorageValue(cid, 1000) > 0 then
return getPlayerStorageValue(cid, 1000)
elseif ehMonstro(cid) then
return pokes[getCreatureName(cid)].wildLvl
end
end
return pokes[getCreatureName(cid)].level
end
function getPokemonLevelByName(name)
return pokes[name] and pokes[name].level or 0 --alterado v1.9
end
function getMasterLevel(poke)
if not isSummon(poke) then return 0 end
return getPlayerLevel(getCreatureMaster(poke))
end
function getPokemonBoost(poke)
if not isSummon(poke) then return 0 end
return getItemAttribute(getPlayerSlotItem(getCreatureMaster(poke), 8).uid, "boost") or 0
end
function getPokeballBoost(ball)
if not isPokeball(ball.itemid) then return 0 end --alterado v1.8
return getItemAttribute(ball.uid, "boost") or 0
end
function getPokeName(cid)
if not isSummon(cid) then return getCreatureName(cid) end
if getCreatureName(cid) == "Evolution" then return getPlayerStorageValue(cid, 1007) end
local item = getPlayerSlotItem(getCreatureMaster(cid),
if getItemAttribute(item.uid, "nick") then
return getItemAttribute(item.uid, "nick")
end
if string.find(tostring(getCreatureName(cid)), "Shiny") then
local newName = tostring(getCreatureName(cid)):match("Shiny (.*)")
return newName
end
return getCreatureName(cid)
end
function getPokeballName(item, truename)
if not truename and getItemAttribute(item, "nick") then
return getItemAttribute(item, "nick")
end
return getItemAttribute(item, "poke")
end
function getPokemonName(cid)
return getCreatureName(cid)
end
function getPokemonGender(cid) --alterado v1.9
return getCreatureSkullType(cid)
end
function setPokemonGender(cid, gender)
if isCreature(cid) and gender then --alterado v1.8
doCreatureSetSkullType(cid, gender)
return true
end
return false
end
function getWildPokemonExp(cid)
return getPlayerStorageValue(cid, 1006)
end
Link para o comentário
Compartilhar em outros sites
15 respostass a esta questão
Posts Recomendados