Ir para conteúdo

[Encerrado] [Pokemon] Dúvidas? - Pda


lucashgas

Posts Recomendados

@Slicer

 

Você sabe se o brun abandonou o projeto? Se ele abandonou podia liberar a source pra nós =/ ... E caso ele nao liberasse, a gente podia pegar uma versão estável e implementar algumas coisas boas que ele fez e retirar outras ruins que só dao bug... Porque esse bug da ball ta me tirando o sono ja =s ... E sobre o bug de sumir itens aleatoriamente dos players, isso acontece com outros servers também ou é só com esse?

Se não tivesse esses 2 problemas o servidor seria perfeito...Aí a gente não ia nem precisar das sources, só editava os scripts

Link para o comentário
Compartilhar em outros sites

Aff, Slicer não é aquele newtype não ://

Galera como eu vejo o newtype dos npcs pelo dat editor???? ou algo parecido preciso do newtype do capitao, e do mark igual do PXG!

Link para o comentário
Compartilhar em outros sites

Eae galera , como eu vi muitas duvidas no Cooldown bar e Pokemon Bar. eu resolvi ajudar...

eu coloquei no meu servidor , deu tudo certo.

as funçoes que eu coloquei , estao no Login.lua (ele faz o update no pokemon bar , moves bar e cooldown)

no heal.lua (a nurse tambem faz os updates) , no love.lua (tambem...) .

 

entao vou postar aqui....

 

Vá em PastadoOT/Data/Action/Scripts/GOBACK.LUA

e Substitua por esse

 

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

doUpdatePokemonsBar(cid)

doUpdateMoves(cid)

doUpdateCooldowns(cid)

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

doUpdatePokemonsBar(cid)

doUpdateMoves(cid)

doUpdateCooldowns(cid)

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

 

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

doUpdatePokemonsBar(cid)

doUpdateMoves(cid)

doUpdateCooldowns(cid)

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)

doUpdatePokemonsBar(cid)

doUpdateMoves(cid)

doUpdateCooldowns(cid)

doCreatureSay(cid, mgo, TALKTYPE_SAY)

 

doSendMagicEffect(getCreaturePosition(pk), effect)

 

else

 

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

 

end

return true

end

 

 

 

Depois disso , vá em PastadoOT/Data/CreatureScript/Login.lua

e Substitua por esse

 

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

 

 

 

Depois disso , vá em PastadoOT/Data/NPC/Scripts/HEAL.LUA

Substitua por esse

 

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 vá em PastadoOT/Data/Talkactions/Love.lua

Substitua por esse

 

 

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) <= 0 then

doPlayerSendCancel(cid, "You need a pokemon to use this command.")

return true

end

 

doSendMagicEffect(getThingPos(cid), 180)

 

local function doLovePokemon(cid)

if not isCreature(cid) then return true end

if #getCreatureSummons(cid) <= 0 then return true end

if exhaustion.get(cid, 88727) and exhaustion.get(cid, 88727) > 3 then return true end

local a = getCreatureSummons(cid)[1]

local b = getPlayerStorageValue(a, 1008)

doSendMagicEffect(getThingPos(a), 180)

doUpdateMoves(cid)

doUpdateCooldowns(cid)

doUpdatePokemonsBar(cid)

setPlayerStorageValue(a, 1008, b + 45)

exhaustion.set(cid, 88727, 60)

end

 

exhaustion.set(cid, 88727, 3)

addEvent(doLovePokemon, 1150, cid)

 

return true

end

 

 

 

Continua na pasta Talkactions , Crie 1 arquivo.lua , renomeie para cdbar e dentro dele coloque

 

local function ChangeBalls(cid, param, cancelequal)

local balls = getPlayerPokeballs(cid)

for a = 1, #balls do

local item = balls[a]

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

if name == param then

if cancelequal and item.uid == getPlayerSlotItem(cid, 8).uid then return true end

doChangeBalls(cid, getPlayerSlotItem(cid, 8), item)

return 0

end

end

end

 

function onSay(cid, words, param)

 

if not useKpdoDlls then return true end

 

if words == "!code64" then

doUpdatePokemonsBar(cid)

return 0

end

 

if words == "/pokeread" then

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)

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á no Talkactions.xml e adicione 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"/>

 

 

Feito isso , logue no seu servidor . teste tudo , se nao funcionar...

me adicione no MSN

 

tony.plyson@hotmail.com

 

FLW GALERA

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

@bizao030188

oiia mano.. n sei se ele abandono ou n.. mas como ele n ta mais se pronunciando... achu q deve ter parado sei la... soh fica olhando o topico aki sei la.. ;x

e n adianta tenta ir pra outro serv.. pq a maioria das functions fodonas tao na source.. ;x sistema TV, NICK e afins...

 

@n3tt3rz1

tenta usa essa datEditor...

TibiaEditorV67A6.rar

 

no lado esquerdo mostra o type certinhu... e fica dividido em janela de itens, outfits, effects, distance effects

 

@Snokiuthu

....

 

 

• to fazendo todos os moves o mais parecido q eu consigo com os moves do PXG da 1* geraçao.

•adicionei sistema de MISS aos moves

•fiz sistema de aura com npc pra por ela q nem no PXG tb

•sair efeito quando o magmar e jynx andarem e no fly do porygon tb

•e agora o sistema de PVP em time q nem o PXG tb... q to terminando aki agora...

 

Link para o comentário
Compartilhar em outros sites

@ Slicer tem como aprimorar os script do toni ao seus arquivos pra ver se funciona, pois eu uso seus arquivos que foram editados, entao nem vo mecher pq nao quero perde os passives.

Link para o comentário
Compartilhar em outros sites

Se voce está falando do GOBACK, ele nao vai peder o passive. pode usar :)

 

Eu fiz os arquivos , em base do Passive.

Tipow o do Slicer tem uns negocio do lee e do chan.

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...