Ir para conteúdo

Cooldown Bar E Pokemon Bar 93%


tonynamoral

Posts Recomendados

Olá galera. eu vi muitos pedidos de cooldown e pokemon bar no servidor [Pokemon Dash Advanced]

 

Client Necessário

Link : Clica Aqui

 

Cygnus Hex Editor

Link : Clica Aqui

 

 

Baixe Os 2 Arquivos Acima.

 

Vá a sua PastadoOT/DATA/Actions/Scripts/GOBACK.LUA

Apague tudo o que contém dentro , e troque por esse *Ele ja está adaptado para o move (Elemental Hand)*

 

local hitmonchans = {

["Hitmonchan"] = {

[0] = {out = 559, eff = 112, type = FIGHTINGDAMAGE}, --outfit normal

[1] = {out = 1075, eff = 35, type = FIREDAMAGE}, --outfit fogo

[2] = {out = 1077, eff = 48, type = ELECTRICDAMAGE}, --outfit raio

[3] = {out = 1078, eff = 43, type = ICEDAMAGE}, --outfit gelo

[4] = {out = 1076, eff = 140, type = GHOSTDAMAGE} --outfit ghost

},

 

["Shiny Hitmonchan"] = {

--aconcelho trocar a outfit do shiny hitmonchan pela do elite hitmonchan do PO...

[0] = {out = 837, eff = 112, type = FIGHTINGDAMAGE}, --outfit normal

[1] = {out = 1080, eff = 35, type = FIREDAMAGE}, --outfit fogo

[2] = {out = 1081, eff = 48, type = ELECTRICDAMAGE}, --outfit raio

[3] = {out = 1082, eff = 43, type = ICEDAMAGE}, --outfit gelo

[4] = {out = 1079, eff = 140, type = GHOSTDAMAGE} --outfit ghost

}

}

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

 

if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end

 

local owner = getItemAttribute(item.uid, "firstpoke")

 

if owner and owner ~= getCreatureName(cid) then

doPlayerSendCancel(cid, "This pokemon belongs to "..owner..", it is his first pokemon. Please, give it back to him.")

return true

end

 

if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then

return true

end

 

local btype = getPokeballType(item.itemid)

 

local effect = pokeballs[btype].effect

if not effect then

effect = 21

end

 

if item.itemid == pokeballs[btype].use then

 

if getPlayerStorageValue(cid, 990) == 1 then -- GYM

doPlayerSendCancel(cid, "You can't return your pokemon during gym battles.")

return true

end

 

if #getCreatureSummons(cid) <= 0 then

if isInArray(pokeballs[btype].all, item.itemid) then

doTransformItem(item.uid, pokeballs[btype].off)

doItemSetAttribute(item.uid, "hp", 0)

doPlayerSendCancel(cid, "This pokemon is fainted.")

return true

end

end

 

local z = getCreatureSummons(cid)[1]

 

if getCreatureCondition(z, CONDITION_INVISIBLE) and not isGhostPokemon(z) then

return true

end

 

doReturnPokemon(cid, z, item, effect)

 

elseif item.itemid == pokeballs[btype].on then

 

if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then

doPlayerSendCancel(cid, "You must put your pokeball in the correct place!")

return TRUE

end

 

local thishp = getItemAttribute(item.uid, "hp")

 

if thishp <= 0 then

if isInArray(pokeballs[btype].all, item.itemid) then

doTransformItem(item.uid, pokeballs[btype].off)

doItemSetAttribute(item.uid, "hp", 0)

doPlayerSendCancel(cid, "This pokemon is fainted.")

return true

end

end

 

local pokemon = getItemAttribute(item.uid, "poke")

 

if not pokes[pokemon] then

return true

end

 

local x = pokes[pokemon]

local boosts = getItemAttribute(item.uid, "boost") or 0

 

if getPlayerLevel(cid) + pokemonMaxLevelAbovePlayer < getItemAttribute(item.uid, "level") + boosts then

doPlayerSendCancel(cid, "Your pokemon's level is much higher than yours, you can't use him.")

return true

end

 

doSummonMonster(cid, pokemon)

 

local pk = getCreatureSummons(cid)[1]

if not isCreature(pk) then return true end

------------------------passiva hitmonchan------------------------------

if isSummon(pk) then

--local e = getCreatureMaster(cid)

local nameHIT = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "poke")

local hands = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "hands")

if nameHIT == "Shiny Hitmonchan" or nameHIT == "Hitmonchan" then

if getItemAttribute(getPlayerSlotItem(cid, 8).uid, "hands") then

doSetCreatureOutfit(pk, {lookType = hitmonchans[nameHIT][hands].out}, -1)

else

doPlayerSendTextMessage(cid, 27, "Contact a GameMaster! Error in passive system! Attribute \"hands\" missing")

end

end

end

-------------------------------------------------------------------------

 

if getCreatureName(pk) == "Ditto" then

 

local left = getItemAttribute(item.uid, "transLeft")

local name = getItemAttribute(item.uid, "transName")

 

if left and left > 0 then

setPlayerStorageValue(pk, 1010, name)

doSetCreatureOutfit(pk, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1)

addEvent(deTransform, left * 1000, pk, getItemAttribute(item.uid, "transTurn"))

doItemSetAttribute(item.uid, "transBegin", os.clock())

else

setPlayerStorageValue(pk, 1010, "Ditto")

end

end

 

if isGhostPokemon(pk) then doTeleportThing(pk, getPosByDir(getThingPos(cid), math.random(0, 7)), false) end

 

doCreatureSetLookDir(pk, 2)

 

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

doAddPokemonInOwnList(cid, pokemon)

 

doTransformItem(item.uid, item.itemid+1)

 

local pokename = getItemAttribute(item.uid, "nick") or getCreatureName(pk)

 

local mgo = gobackmsgs[math.random(1, #gobackmsgs)].go:gsub("doka", pokename)

doCreatureSay(cid, mgo, TALKTYPE_SAY)

 

doSendMagicEffect(getCreaturePosition(pk), effect)

 

else

 

doPlayerSendCancel(cid, "This pokemon is fainted.")

 

end

 

if useKpdoDlls then

doUpdateMoves(cid)

doUpdatePokemonsBar(cid)

end

return true

end

 

 

 

 

Agora , Vamos por para quando o player logar , fazer o UPDATE Automaticamente nos pokemons

Vá PastadoOT/Data/CreatureScript/scripts/Login.LUA

Apague Tudo o que tiver dentro e Troque por esse (Adaptado Para Aura Boost)

 

local config = {

loginMessage = getConfigValue('loginMessage'),

useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))

}

 

local flys = {

["Moltres"] = {229, 2300}, -- moltres

["Articuno"] = {230, 2100}, -- artic

["Zapdos"] = {224, 2600}, -- zapdos

["Mew"] = {232, 2200}, -- 1000

["Mewtwo"] = {233, 2200},-- two

["Dragonite"] = {221, 1300},-- nite

["Pidgeot"] = {222, 900}, -- geot

["Fearow"] = {226, 800}, -- fearow

["Aerodactyl"] = {227, 1100}, -- aero

["Charizard"] = {216, 1000}, -- chari

["Porygon"] = {316, 600}, -- porygon

["Shiny Moltres"] = {229, 2300}, -- Shiny moltres

["Shiny Articuno"] = {1018, 2100}, -- Shiny artic

["Shiny Zapdos"] = {1019, 2600}, -- Shiny zapdos

["Shiny Mew"] = {1022, 2200}, -- Shiny 1000

["Shiny Mewtwo"] = {1021, 2200},-- Shiny two

["Shiny Dragonite"] = {1020, 1300},-- Shiny nite

["Shiny Pidgeot"] = {996, 900}, -- Shiny geot

["Shiny Fearow"] = {997, 800}, -- Shiny fearow

["Shiny Aerodactyl"] = {1017, 1100}, -- Shiny aero

["Shiny Charizard"] = {995, 1000}, -- Shiny chari

["Shiny Porygon"] = {1016, 600}, -- Shiny porygon

["Porygon2"] = {648, 890}, -- 2

["Skarmory"] = {649, 1000}, -- skarmory

["Crobat"] = {652, 1190}, -- crobat

}

 

 

local rides = {

["Tauros"] = {128, 580}, -- tauros

["Ninetales"] = {129, 800}, -- kyuubi

["Rapidash"] = {130, 800}, -- rapid

["Ponyta"] = {131, 410}, -- ponyta

["Rhyhorn"] = {132, 400}, -- rhyhorn

["Arcanine"] = {12, 900}, -- arcan

["Onix"] = {126, 450}, -- onix

["Venusaur"] = {134, 390}, -- venu

["Dodrio"] = {133, 750}, -- dodrio

["Doduo"] = {135, 420}, -- doduo

["Shiny Tauros"] = {1024, 580}, -- tauros

["Shiny Ninetales"] = {999, 800}, -- kyuubi

["Shiny Rapidash"] = {1005, 800}, -- rapid

["Shiny Ponyta"] = {1004, 410}, -- ponyta

["Shiny Rhyhorn"] = {1023, 400}, -- rhyhorn

["Shiny Arcanine"] = {1003, 900}, -- arcan

["Shiny Onix"] = {126, 450}, -- onix

["Shiny Venusaur"] = {1040, 390}, -- venu

["Shiny Dodrio"] = {1007, 750}, -- dodrio

["Shiny Doduo"] = {1006, 420}, -- doduo

["Crystal Onix"] = {293, 480}, -- cristal onix

["Steelix"] = {646, 750}, -- steelix

["Meganium"] = {685, 720}, -- meganium

["Bayleef"] = {686, 555}, -- bayleef

["Stantler"] = {687, 595}, -- stantler

["Houndoom"] = {647, 820}, -- houndoom

["Piloswine"] = {689, 450}, -- piloswine

["Mareep"] = {688, 400}, -- marip

}

 

local surf = {

["Poliwag"] = {lookType=278, speed = 320},

["Poliwhirl"] = {lookType=137, speed = 480},

["Seaking"] = {lookType=269, speed = 520},

["Dewgong"] = {lookType=183, speed = 700},

["Blastoise"] = {lookType=184, speed = 850},

["Tentacruel"] = {lookType=185, speed = 750},

["Lapras"] = {lookType=186, speed = 960},

["Gyarados"] = {lookType=187, speed = 1050},

["Omastar"] = {lookType=188, speed = 680},

["Kabutops"] = {lookType=189, speed = 840},

["Poliwrath"] = {lookType=190, speed = 680},

["Vaporeon"] = {lookType=191, speed = 800},

["Staryu"] = {lookType=266, speed = 385},

["Starmie"] = {lookType=267, speed = 685},

["Goldeen"] = {lookType=268, speed = 355},

["Seadra"] = {lookType=270, speed = 655},

["Golduck"] = {lookType=271, speed = 760},

["Squirtle"] = {lookType=273, speed = 365},

["Wartortle"] = {lookType=275, speed = 605},

["Tentacool"] = {lookType=277, speed = 340},

["Snorlax"] = {lookType=300, speed = 500},

 

["Shiny Poliwag"] = {lookType=1010, speed = 320},

["Shiny Poliwhirl"] = {lookType=1011, speed = 480},

["Shiny Seaking"] = {lookType=1027, speed = 520},

["Shiny Dewgong"] = {lookType=1015, speed = 700},

["Shiny Blastoise"] = {lookType=1002, speed = 850},

["Shiny Tentacruel"] = {lookType=1014, speed = 750},

["Shiny Lapras"] = {lookType=1031, speed = 960},

["Shiny Gyarados"] = {lookType=1030, speed = 1050},

["Shiny Omastar"] = {lookType=1033, speed = 680},

["Shiny Kabutops"] = {lookType=1034, speed = 840},

["Shiny Poliwrath"] = {lookType=1012, speed = 680},

["Shiny Vaporeon"] = {lookType=1032, speed = 800},

["Shiny Staryu"] = {lookType=1028, speed = 385},

["Shiny Starmie"] = {lookType=1029, speed = 685},

["Shiny Goldeen"] = {lookType=1026, speed = 355},

["Shiny Seadra"] = {lookType=1025, speed = 655},

["Shiny Golduck"] = {lookType=1009, speed = 760},

["Shiny Squirtle"] = {lookType=1000, speed = 365},

["Shiny Wartortle"] = {lookType=1001, speed = 605},

["Shiny Tentacool"] = {lookType=1013, speed = 340},

["Shiny Snorlax"] = {lookType=1035, speed = 500},

 

["Mantine"] = {lookType=636, speed = 820},

["Totodile"] = {lookType=637, speed = 360},

["Croconow"] = {lookType=638, speed = 590},

["Feraligatr"] = {lookType=645, speed = 900},

["Marill"] = {lookType=639, speed = 340},

["Azumarill"] = {lookType=642, speed = 680},

["Quagsire"] = {lookType=643, speed = 740},

["Kingdra"] = {lookType=644, speed = 1020},

["Octillery"] = {lookType=641, speed = 600},

["Wooper"] = {lookType=640, speed = 315},

}

 

function onLogin(cid)

 

doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 100)

doCreatureSetDropLoot(cid, false)

 

local accountManager = getPlayerAccountManager(cid)

 

if(accountManager == MANAGER_NONE) then

local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage

if(lastLogin > 0) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."

else

str = str

end

 

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

 

elseif(accountManager == MANAGER_NAMELOCK) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")

elseif(accountManager == MANAGER_ACCOUNT) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")

end

 

if getCreatureName(cid) == "Account Manager" then

local outfit = {}

if accountManagerRandomPokemonOutfit then

outfit = {lookType = getPokemonXMLOutfit(oldpokedex[math.random(151)][1])}

else

outfit = accountManagerOutfit

end

 

doSetCreatureOutfit(cid, outfit, -1)

return true

end

 

if(not isPlayerGhost(cid)) then

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)

end

 

local outfit = {}

 

if getPlayerVocation(cid) == 0 then

doPlayerSetMaxCapacity(cid, 0)

doPlayerSetVocation(cid, 1)

setCreatureMaxMana(cid, 6)

doPlayerAddSoul(cid, -getPlayerSoul(cid))

setPlayerStorageValue(cid, 19898, 0)

if getCreatureOutfit(cid).lookType == 128 then

outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}

elseif getCreatureOutfit(cid).lookType == 136 then

outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}

end

doCreatureChangeOutfit(cid, outfit)

end

 

registerCreatureEvent(cid, "WatchTv")

registerCreatureEvent(cid, "StopWatchingTv")

registerCreatureEvent(cid, "WalkTv")

registerCreatureEvent(cid, "RecordTv")

--registerCreatureEvent(cid, "Death")

registerCreatureEvent(cid, "PlayerLogout")

registerCreatureEvent(cid, "WildAttack")

registerCreatureEvent(cid, "Idle")

registerCreatureEvent(cid, "PokemonIdle")

registerCreatureEvent(cid, "EffectOnAdvance")

registerCreatureEvent(cid, "GeneralConfiguration")

registerCreatureEvent(cid, "ReportBug")

registerCreatureEvent(cid, "LookSystem")

registerCreatureEvent(cid, "T1")

registerCreatureEvent(cid, "T2")

registerCreatureEvent(cid, "AuraBoost")

 

if getPlayerStorageValue(cid, 99284) == 1 then

setPlayerStorageValue(cid, 99284, -1)

end

 

doChangeSpeed(cid, -(getCreatureSpeed(cid)))

 

if getPlayerStorageValue(cid, 17000) >= 1 then -- fly

 

local item = getPlayerSlotItem(cid, 8)

local poke = getItemAttribute(item.uid, "poke")

doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))

doRemoveCondition(cid, CONDITION_OUTFIT)

doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1)

 

local apos = getFlyingMarkedPos(cid)

apos.stackpos = 0

if getTileThingByPos(apos).itemid <= 2 then

doCombatAreaHealth(cid, FIREDAMAGE, getFlyingMarkedPos(cid), 0, 0, 0, CONST_ME_NONE)

doCreateItem(460, 1, getFlyingMarkedPos(cid))

end

 

doTeleportThing(cid, apos, false)

 

elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf

 

if not isInArray({4820, 4821, 4822, 4823, 4824, 4825}, getTileInfo(getThingPos(cid)).itemid) then

setPlayerStorageValue(cid, 63215, -1)

doChangeSpeed(cid, PlayerSpeed)

doRemoveCondition(cid, CONDITION_OUTFIT)

return true

end

 

local item = getPlayerSlotItem(cid, 8)

local poke = getItemAttribute(item.uid, "poke")

doSetCreatureOutfit(cid, {lookType = surf[poke].lookType + 351}, -1)

doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))

 

elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride

 

local item = getPlayerSlotItem(cid, 8)

local poke = getItemAttribute(item.uid, "poke")

if rides[poke] then

doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))

doRemoveCondition(cid, CONDITION_OUTFIT)

doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1)

else

setPlayerStorageValue(cid, 17001, -1)

doUpdatePokemonsBar(cid)

doUpdateCooldowns(cid)

doUpdateMoves(cid)

doChangeSpeed(cid, PlayerSpeed)

end

 

elseif getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 7 then

doChangeSpeed(cid, 140*getPlayerGroupId(cid))

else

doChangeSpeed(cid, PlayerSpeed)

end

doUpdatePokemonsBar(cid)

doUpdateCooldowns(cid)

doUpdateMoves(cid)

 

return true

end

 

 

 

 

Agora , Vamos por cada vez que voce for healar seu pokemon na nurse , ele fazer o UPDATE Nos Pokemons

Vá PastadoOT/Data/NPC/Scripts/Heal.lua

Apague Tudo o que tiver dentro , Troque Por Esse . (Não ligue para essas pokebolas que contém a mais do necessário)

 

local pokeballs = {

[1] = {effect = 188, on = 11826, use = 11827, off = 11828, all = {11826, 11827, 11828}},

[2] = {effect = 191, on = 11829, use = 11830, off = 11831, all = {11829, 11830, 11831}},

[3] = {effect = 190, on = 11835, use = 11836, off = 11837, all = {11835, 11836, 11837}},

[4] = {effect = 189, on = 11832, use = 11833, off = 11834, all = {11832, 11833, 11834}},

[5] = {effect = 188, on = 11737, use = 11738, off = 11739, all = {11737, 11738, 11739}},

[6] = {effect = 189, on = 11740, use = 11741, off = 11742, all = {11740, 11741, 11742}},

[7] = {effect = 190, on = 11743, use = 11744, off = 11745, all = {11743, 11744, 11745}},

[8] = {effect = 191, on = 11746, use = 11747, off = 11748, all = {11746, 11747, 11748}},

[9] = {effect = 177, on = 2428, use = 2429, off = 2430, all = {11746, 11747, 11748}},

[10] = {effect = 194, on = 2431, use = 2432, off = 2433, all = {2431, 2432, 2433}}, -- LOVE

[11] = {effect = 181, on = 2451, use = 2450, off = 2449, all = {2451, 2450, 2449}},

[12] = {effect = 193, on = 2448, use = 2447, off = 2446, all = {2448, 2447, 2446}},

[13] = {effect = 196, on = 2445, use = 2444, off = 2443, all = {2445, 2444, 2443}},

[14] = {effect = 176, on = 2442, use = 2441, off = 2440, all = {2442, 2441, 2440}},

[15] = {effect = 179, on = 2439, use = 2438, off = 2437, all = {2439, 2438, 2437}},

[16] = {effect = 192, on = 2436, use = 2435, off = 2434, all = {2436, 2435, 2434}}, -- GOLDEN

}

 

function onThingMove(creature, thing, oldpos, oldstackpos)

end

 

function onCreatureAppear(creature)

end

 

function onCreatureDisappear(cid, pos)

if focus == cid then

selfSay('Good bye sir!')

focus = 0

talk_start = 0

end

end

 

function onCreatureTurn(creature)

end

 

function msgcontains(txt, str)

return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))

end

 

function onCreatureSay(cid, type, msg)

local msg = string.lower(msg)

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

 

for a, b in pairs(gobackmsgs) do

local gm = string.gsub(b.go, "doka!", "")

local bm = string.gsub(b.back, "doka!", "")

if string.find(string.lower(msg), string.lower(gm)) or string.find(string.lower(msg), string.lower(bm)) then

return true

end

end

 

if((msgcontains(msg, 'hi') or msgcontains(msg, 'heal') or msgcontains(msg, 'help')) and (getDistanceToCreature(cid) <= 3)) then

if exhaustion.get(cid, 9211) then

selfSay('Please wait a few moment before asking me to heal your pokemons again!')

return true

end

 

if not getTileInfo(getThingPos(cid)).protection and nurseHealsOnlyInPZ then

selfSay("Please, get inside the pokémon center to heal your pokemons!")

return true

end

 

exhaustion.set(cid, 9211, 5)

 

doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid))

doCureStatus(cid, "all", true)

doSendMagicEffect(getThingPos(cid), 132)

 

local mypb = getPlayerSlotItem(cid, 8)

if #getCreatureSummons(cid) >= 1 then

 

if not nurseHealsPokemonOut then

selfSay("Please, return your pokemon to his ball!")

return true

end

 

local s = getCreatureSummons(cid)[1]

doCreatureAddHealth(s, getCreatureMaxHealth(s))

doSendMagicEffect(getThingPos(s), 13)

doCureStatus(s, "all", false)

if getPlayerStorageValue(s, 1008) < baseNurseryHappiness then

setPlayerStorageValue(s, 1008, baseNurseryHappiness)

end

if getPlayerStorageValue(s, 1009) > baseNurseryHunger then

setPlayerStorageValue(s, 1009, baseNurseryHunger)

end

else

if mypb.itemid >= 1 then

doItemSetAttribute(mypb.uid, "hp", 1)

if getItemAttribute(mypb.uid, "hunger") and getItemAttribute(mypb.uid, "hunger") > baseNurseryHunger then

doItemSetAttribute(mypb.uid, "hunger", baseNurseryHunger)

end

 

if getItemAttribute(mypb.uid, "happy") and getItemAttribute(mypb.uid, "happy") < baseNurseryHappiness then

doItemSetAttribute(mypb.uid, "happy", baseNurseryHappiness)

end

if getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 and getPlayerStorageValue(cid, 63215) <= 0 then

doUpdatePokemonsBar(cid)

doUpdateMoves(cid)

doUpdateCooldowns(cid)

for a, b in pairs (pokeballs) do

if isInArray(b.all, mypb.itemid) then

doTransformItem(mypb.uid, b.on)

end

end

end

end

end

 

local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK)

 

for balls = 1, 8 do

for times = 1, 3 do

local items = getItemsInContainerById(bp.uid, pokeballs[balls].all[times])

if #items >= 1 then

for _, uid in pairs(items) do

doItemSetAttribute(uid, "hp", 1)

doTransformItem(uid, pokeballs[balls].on)

if getItemAttribute(uid, "hunger") and getItemAttribute(uid, "hunger") > baseNurseryHunger then

doItemSetAttribute(uid, "hunger", baseNurseryHunger)

end

if getItemAttribute(uid, "happy") and getItemAttribute(uid, "happy") < baseNurseryHappiness then

doItemSetAttribute(uid, "happy", baseNurseryHappiness)

end

end

end

end

end

 

 

selfSay('There you go! You and your pokemons are healthy again.')

 

end

end

 

 

 

 

Agora , Vamos Colocar para cada vez que voce usar algum ataque , ele atualizar sua barra de Pokemons e Moves

Vá em PastadoOT/Data/Talkaction/Scripts/Move1.lua

Apaque tudo o que tiver dentro , e troque por esse

 

local msgs = {"use ", ""}

 

function doAlertReady(cid, id, movename, n, cd)

if not isCreature(cid) then return true end

local myball = getPlayerSlotItem(cid, 8)

if myball.itemid > 0 and getItemAttribute(myball.uid, cd) == id then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPokeballName(myball.uid).." - "..movename.." (m"..n..") is ready!")

return true

end

local p = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid)

if not p or #p 3 then return true end

 

if #getCreatureSummons(cid) == 0 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need a pokemon to use moves.")

return 0

end

 

if getCreatureCondition(getCreatureSummons(cid)[1], CONDITION_INVISIBLE) and not isGhostPokemon(getCreatureSummons(cid)[1]) then

return 0

end

 

local mypoke = getCreatureSummons(cid)[1]

 

if getCreatureCondition(cid, CONDITION_EXHAUST) then return true end

if getCreatureName(mypoke) == "Evolution" then return true end

 

local name = getCreatureName(mypoke) == "Ditto" and getPlayerStorageValue(mypoke, 1010) or getCreatureName(mypoke)

 

local it = string.sub(words, 2, 3)

local move = movestable[name].move1

local cdzin = "move"..it..""

 

if it == "2" then

move = movestable[name].move2

elseif it == "3" then

move = movestable[name].move3

elseif it == "4" then

move = movestable[name].move4

elseif it == "5" then

move = movestable[name].move5

elseif it == "6" then

move = movestable[name].move6

elseif it == "7" then

move = movestable[name].move7

elseif it == "8" then

move = movestable[name].move8

elseif it == "9" then

move = movestable[name].move9

elseif it == "10" then

move = movestable[name].move10

elseif it == "11" then

move = movestable[name].move11

elseif it == "12" then

move = movestable[name].move12

elseif it == "13" then

move = movestable[name].move13

end

 

if not move then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.")

return true

end

 

if getLevel(mypoke) < move.level then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't have enough level to use this move.")

return 0

 

end

 

if getCD(getPlayerSlotItem(cid, 8).uid, cdzin) > 0 and getCD(getPlayerSlotItem(cid, 8).uid, cdzin) < (move.cd + 2) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to wait "..getCD(getPlayerSlotItem(cid, 8).uid, cdzin).." seconds to use this move again.")

return 0

end

 

if getTileInfo(getThingPos(mypoke)).protection then

doPlayerSendCancel(cid, "Your pokemon cannot use moves while in protection zone.")

return 0

end

 

 

if move.target == 1 then

 

if not isCreature(getCreatureTarget(cid)) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don\'t have any targets.")

return 0

end

 

if getCreatureCondition(getCreatureTarget(cid), CONDITION_INVISIBLE) then

return 0

end

 

if getCreatureHealth(getCreatureTarget(cid)) move.dist then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Get closer to the target to use this move.")

return 0

end

 

if not isSightClear(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid)), false) then

return 0

end

end

 

doCreatureSay(cid, ""..getPokeName(mypoke)..", "..msgs[math.random(#msgs)]..""..move.name.."!", TALKTYPE_SAY)

 

if isSleeping(mypoke) then

setCD(getPlayerSlotItem(cid, 8).uid, cdzin, 8)

doCreatureSay(mypoke, "zZzZ", TALKTYPE_MONSTER)

return 0

else

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

end

 

if move.name ~= "Metronome" then

doCreatureSay(mypoke, ""..string.upper(move.name).."!", TALKTYPE_MONSTER)

end

 

addEvent(doAlertReady, move.cd * 1000, cid, newid, move.name, it, cdzin)

doUpdateMoves(cid)

doUpdatePokemonsBar(cid)

doUpdateCooldowns(cid)

docastspell(mypoke, move.name)

doCreatureAddCondition(cid, playerexhaust)

 

return 0

end

 

 

 

Continuando no Scripts da pasta Talkaction , Procure Por Love.lua

Apague tudo e Coloque esse (Lembrando : eu diminui o tempo de Delay para 1 minuto)

 

function onSay(cid, words, param)

 

if param ~= "" then

return false

end

 

if string.len(words) ~= 5 then

return false

end

 

local cd = exhaustion.get(cid, 88727)

 

if not cd then

cd = 0

end

 

if cd > 0 then

doPlayerSendCancel(cid, "You can only use this command every 1 minutes.")

return true

end

 

if #getCreatureSummons(cid) = 1 then

local pokemon = getCreatureSummons(cid)[1]

local pokelife = (getCreatureHealth(pokemon) / getCreatureMaxHealth(pokemon))

doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", pokelife)

end

doUpdatePokemonsBar(cid)

end

 

if words == "/goaction" then

doUpdatePokemonsBar(cid)

if param == "null" then return 0 end

if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end

if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then return true end

if #getCreatureSummons(cid) >= 1 then

addEvent(doReturnPokemon, 100, cid, getCreatureSummons(cid)[1], false, pokeballs[getPokeballType(getPlayerSlotItem(cid, 8).itemid)].effect)

addEvent(doPlayerAddMana, 300, cid, -getPlayerMana(cid))

if param ~= getItemAttribute(getPlayerSlotItem(cid, 8).uid, "poke") .. getItemAttribute(getPlayerSlotItem(cid, 8).uid, "ballorder") then

addEvent(ChangeBalls, 1200, cid, param, true)

end

else

addEvent(ChangeBalls, 100, cid, param)

end

exhaustion.set(cid, 6666, 2)

return 0

end

 

return 0

end

 

 

 

e Vá na Talkactions.xml , e Adicione essas tags lá

    <talkaction words="!code64" event="script" value="cdbar.lua"/>
    <talkaction words="/pokeread" event="script" value="cdbar.lua"/>
    <talkaction words="/goaction" event="script" value="cdbar.lua"/>

 

 

 

 

 

 

 

 

Agora , Vou Ensinar como mudar o IP do Client

 

Se voce baixo os 2 arquivos.

Voce irá abrir o seu iniciar e lá irá ter o Cygnus Hex Editor

Abra-o, Depois Vá em uma pastazinha e lá procure o client que voce baixo.

 

Aperte CTRL + F e Digite 127.0.0.1 e Aperte Enter

Irá Aparecer o Primeiro , Aperte CTRL + F de novo e Aperte Enter.

 

Irá Aparecer esse numero várias vezes mais ou menos assim

127.0.0.1 .127.0.0.1

.127.0.0.1

 

 

Voce muda todos esses 127.0.0.1 pelo seu IP (Lembrando : Não Pode Ter mais que 19 letras)

Quando terminar de editar tudo, Aperter CTRL + S . e Pronto! Seja Feliz.

Ajudei? REP+ ! Não cai o dedo.

 

 

Se algo nao der certo : Me Adicione MSN (Estou quase o tempo todo online)

MSN : tony.plyson@hotmail.com

 

 

Obrigado

Editado por tonynamoral
Link para o comentário
Compartilhar em outros sites

@SubWat

Irei postar as prints.Obrigado por lembrar

 

@Edit

Galera se ocorrer bugs , ou alguma falha no funcionamento do sistema

so avisar ai ou mandar PM ou tambem me adicionar msn

 

tony.plyson@hotmail.com

Editado por tonynamoral
Link para o comentário
Compartilhar em outros sites

Os bugs citados abaixo foram corrigidos re-instalando o server

 

aqui não adianto, o nurse, login, m1

 

só o love pego D;

 

Edit, O go pego sim maus. D:

 

Edit2, eu adc aquela tag

 

"doUpdateMoves(cid)

doUpdatePokemonsBar(cid)"

 

por todo o npc nurse joy/login/m1

 

no login, n acontece nada, m1 mesma coisa,

 

Mas no Nurse joy atualiza

 

Se tiver fora de pz

 

if not getTileInfo(getThingPos(cid)).protection and nurseHealsOnlyInPZ then

selfSay("Please, get inside the pokémon center to heal your pokemons!")

doUpdateMoves(cid)

doUpdatePokemonsBar(cid)

return true

end

 

se ficar falando hi muito rapido

 

 

 

if exhaustion.get(cid, 9211) then

selfSay('Please wait a few moment before asking me to heal your pokemons again!')

doUpdateMoves(cid)

doUpdatePokemonsBar(cid)

return true

end

 

E sim testei com player

 

Bom para testar a funcionalidade dos comando eu fiz um pequeno script

 

 

<talkaction words="!reload" case-sensitive="no" event="script" value="atualizar.lua"/>

 

 

function onSay(cid, words, param, channel)
doUpdatePokemonsBar(cid)
doUpdateMoves(cid)
return true
end

 

ele não atualizo a barra do pokemon, MAS a barra de cooldown atualizo normal ?

 

Será que é alguma coisa que eu deletei ? se sim, pode me dizer o que foi ?

 

não sei se é só aqui mais os comando

 

doUpdateMoves(cid)

doUpdatePokemonsBar(cid)

 

não funcionam juntos, ou um funciona ou o outro funciona... mais nunca os 2. ja tentei re instalar o ot e n adianto,

 

tentei criar um comando com os 2 juntos, mais n mudo nada

 

 

 

function doUpdateAll(cid)

local ret = "p#,"

local balls = getPlayerPokeballs(cid)

local times = 0

for a = 1, #balls do

times = times + 1

local item = balls[a]

local hp = math.ceil(getItemAttribute(item.uid, "hp") * 100)

local name = getItemAttribute(item.uid, "poke")

local foto = fotos[name] - 928

doItemSetAttribute(item.uid, "ballorder", times)

ret = ret..""..foto..","..name..""..times..","..hp..","

end

doPlayerSendCancel(cid, ret)

 

local summon = getCreatureSummons(cid)[1]

local ret = "12&,"

if not summon then

for a = 1, 12 do

ret = ret.."n/n,"

end

doPlayerSendCancel(cid, ret)

addEvent(doUpdateCooldowns, 100, cid)

return true

end

local ret = "12&,"

local moves = movestable[getCreatureName(summon)]

for a = 1, 12 do

local b = getNewMoveTable(moves, a)

if b then

ret = ret..""..b.name..","

else

ret = ret.."n/n,"

end

end

doPlayerSendCancel(cid, ret)

addEvent(doUpdateCooldowns, 100, cid)

end

Editado por eduardobean
Link para o comentário
Compartilhar em outros sites

  • 3 weeks later...

Link do Cliente Está off ... toda vez que eu MUDEI o 127.0.0.1 para o meu IP lumiar.no-ip.info ele não funciona fica com problema, o Poke.exe vira um arquivo em branco sabe o pq ?

 

Obrigado! no aguardo REP..

Editado por Chumi
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...