passa o link ai pra mim então porfavor
para nao criar muitos post e floodar
vo editar esse
vlws god gniu
esse ai servio
agora so falta eu achar onde muda o nivel dos pokes tipo na pokedex e o nivel para evolução mudar all nivel deles
Por lucashgas, 10 de jan. de 2012 em Tópicos Sem Resposta
info
Grupo: Artesão
Registrado: 02/07/11
Posts: 129
Reputação: +6

passa o link ai pra mim então porfavor
para nao criar muitos post e floodar
vo editar esse
vlws god gniu
esse ai servio
agora so falta eu achar onde muda o nivel dos pokes tipo na pokedex e o nivel para evolução mudar all nivel deles
Editado Janeiro 17 por pocotozinho
...
ealguem pode me dizer o boddy do mark que esta usando no seu map? o meus aqui so dao errado
se for isso que quer ta ae..
não tenho certeza sobre os creditos mais creio que seria GMHealOT
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Mark" script="default.lua" walkinterval="350000" floorchange="0" speed="0">
<health now="150" max="150"/>
<look type="606" head="91" body="114" legs="86" feet="0"/>
<parameters>
<parameter key="message_greet" value="Hello dear customer! Are you here to see my offers? Come on, lets {trade}!"/>
<parameter key="message_farewell" value="Good bye!"/>
<parameter key="message_idletimeout" value="Good bye!"/>
<parameter key="message_walkaway" value="Good bye!"/>
<parameter key="module_shop" value="1"/>
<parameter key="shop_buyable" value="pokeball,2394,550;super ball,2393,770;great ball,2391,660;ultraball,2392,11000;potion,12346,400;super potion,12347,1500;ultra potion,12345,8000;recording camera,12330,10000;revive,12344,500"/>
<parameter key="shop_sellable" value="nail,12157,1250;future orb,12194,2000;pot of lava,12152,2250;essence of fire,12162,200;sandbag,12177,950;stone orb,12196,2050;small stone,12337,90;pot of moss bug,12171,250;electric box,12176,1300;screw,12164,85;imam,12198,900;bug antenna,12184,1600;straw,10604,65;water gems,12161,20;remains of magikarp,12334,100;water pendant,12170,800;bird beak,12172,1300;feather,12200,500;pair of leaves,12155,500;bag of polem,12153,1000;bitten apple,12173,450;rat tail,12174,1300;bat wing,12182,550;garrafa veneno,12165,40;gosme,12202,2000;"/>
</parameters>
</npc>
info
Grupo: Campones
Registrado: 05/09/10
Posts: 58
Reputação: +3

@pocotozinho
muda la na libs configuration
info
Grupo: Conde
Registrado: 06/08/11
Posts: 752
Reputação: +112

@brun123
BUG:
Quando clica no PC, você não pode falar no help, game chat, ou outros
Apenas pm e default, se falar no help ou game chat sai no default
Editado Janeiro 17 por ZerefShirou
info
Grupo: Campones
Registrado: 18/03/11
Posts: 59
Reputação: +6
Char no Tibia: Nao tenho

Zeref posta ai sua cooldown bar ai ;]
Alguém sabe como se faz para não ter erro de cap ao comprar coisas no npc quando estiver sem pokémon ?
Será que fazendo a moda antiga, quando não se comprava pelo trade e sim falando igual no pxg vai funcionar no servidor ?
Zeref posta ai sua cooldown bar ai ;]
Provavelmente ele ainda não terminou a cooldown bar e deve demorar lekão, isso dá muito trabalho.
Editado Janeiro 17 por CabritenhO
Eu fiz as scripts da cooldown bar aqui, mas tem que desativar o portrait do servidor, pois tem aquele bug de que se uma bola vai direto pro slot do player, o server da crash ![]()
cria um arquivo chamado cooldownbar.lua em data/lib e adicione:
function getPlayerPokeballs(cid)
local ret = {}
local container = 0
if isCreature(cid) then
container = getPlayerSlotItem(cid, 3).uid
local myball = getPlayerSlotItem(cid, 8)
if myball.uid > 0 then
table.insert(ret, myball)
end
else
container = cid
end
if isContainer(container) and getContainerSize(container) > 0 then
for slot = 0, (getContainerSize(container) - 1) do
local item = getContainerItem(container, slot)
if isContainer(item.uid) then
local itemsbag = getPlayerPokeballs(item.uid)
if itemsbag and #itemsbag > 0 then
for i = 0, #itemsbag do
table.insert(ret, itemsbag[i])
end
end
elseif isPokeball(item.itemid) then
table.insert(ret, item)
end
end
end
return ret
end
function doUpdatePokemonsBar(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)
end
function getNewMoveTable(table, n)
if n == 1 and table.move1 then
return table.move1
elseif n == 2 and table.move2 then
return table.move2
elseif n == 3 and table.move3 then
return table.move3
elseif n == 4 and table.move4 then
return table.move4
elseif n == 5 and table.move5 then
return table.move5
elseif n == 6 and table.move6 then
return table.move6
elseif n == 7 and table.move7 then
return table.move7
elseif n == 8 and table.move8 then
return table.move8
elseif n == 9 and table.move9 then
return table.move9
elseif n == 10 and table.move10 then
return table.move10
elseif n == 11 and table.move11 then
return table.move11
elseif n == 12 and table.move12 then
return table.move12
else
return false
end
end
function doUpdateMoves(cid)
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
function doUpdateCooldowns(cid)
local a = getPlayerSlotItem(cid, 8)
local ret = "12|,"
if a.uid <= 0 or #getCreatureSummons(cid) <= 0 then
for cds = 1, 12 do
ret = ret.."-1,"
end
doPlayerSendCancel(cid, ret)
return true
end
for cds = 1, 12 do
local cdzin = "move"..cds
if getCD(a.uid, cdzin) > 0 then
ret = ret..""..(getCD(a.uid, cdzin) - 1)..","
else
ret = ret.."0,"
end
end
doPlayerSendCancel(cid, ret)
end
function getBallsAttributes(item)
local t = {"boffense", "bdefense", "bagility", "bsattack",
"offense", "defense", "speed", "level", "specialattack",
"poke", "gender", "vitality", "nick", "boost", "happy", "hunger",
"burn", "burndmg", "poison", "poisondmg", "confuse", "blind",
"sleep", "hp", "description", "exp", "nextlevelexp", "transBegin",
"transLeft", "transTurn", "transOutfit", "transName", "trans",
"light", "blink", "move1", "move2", "move3", "move4", "move5",
"move6", "move7", "move8", "move9", "move10", "move11", "move12",
"ballorder",}
local ret = {}
for a = 1, #t do
ret[t[a]] = getItemAttribute(item, t[a])
end
return ret
end
function doChangeBalls(cid, item1, item2)
if not isCreature(cid) then return true end
if item1.uid == item2.uid then
if #getCreatureSummons(cid) <= 0 then
doGoPokemon(cid, getPlayerSlotItem(cid, 8))
else
doReturnPokemon(cid, getCreatureSummons(cid)[1], getPlayerSlotItem(cid, 8), pokeballs[getPokeballType(getPlayerSlotItem(cid, 8).itemid)].effect)
end
return true
end
if item1.uid > 0 and item2.uid > 0 then
local io = getBallsAttributes(item1.uid)
local it = getBallsAttributes(item2.uid)
for a, b in pairs (io) do
if b then
doItemSetAttribute(item2.uid, a, b)
end
end
for a, b in pairs (it) do
if b then
doItemSetAttribute(item1.uid, a, b)
end
end
local id = item2.itemid
doTransformItem(item2.uid, item1.itemid)
doTransformItem(item1.uid, id)
doGoPokemon(cid, getPlayerSlotItem(cid, 8))
else
local a = doCreateItemEx(item2.itemid, 1)
local b = getBallsAttributes(item2.uid)
for c, d in pairs (b) do
if d then
doItemSetAttribute(a, c, d)
end
end
doPlayerAddItemEx(cid, a, true)
for i, x in pairs(fotos) do
if string.lower(getItemAttribute(getPlayerSlotItem(cid, 8).uid, "poke")) == string.lower(i) then
doTransformItem(getPlayerSlotItem(cid, 7).uid, x)
end
end
doGoPokemon(cid, getPlayerSlotItem(cid, 8))
doRemoveItem(item2.uid, 1)
end
end
Agora adicione essas tags no talkactions.xml (data/talkactions/):
<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 crie um arquivo chamado cdbar.lua em data/talkactions/scripts e coloque isso dentro:
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 words == "!code64" then 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 if param == "null" then return 0 end if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 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
Abra o seu goback.lua (data/actions/scripts) nas duas últimas linhas você encontra isso:
return true end
adicione acima do return true:
doUpdateMoves(cid)
agora abra o goback.lua (data/creaturescripts/scripts) e procure por isso no final:
doRemoveCreature(cid) return false end
Adicione entre o return false e o doRemoveCreature:
doUpdateMoves(owner)
Agora em move1.lua (data/talkactions/scripts) procure por "docastspell", e embaixo dessa linha, adicione:
doUpdateCooldowns(cid)
agora abra o somefunctions.lua (data/lib) e procure pela função:
function doReturnPokemon(cid, pokemon, pokeball, effects, hideeffects, blockevo)
e substitua ela todinha por essa:
function doReturnPokemon(cid, pokemon, pokeball, effect, hideeffects, blockevo)
local edit = true
if not pokeball then
pokeball = getPlayerSlotItem(cid, 8)
end
if blockevo then
edit = false
doPlayerSendCancel(cid, "Your pokemon couldn't evolve due to server mistakes, please wait until we fix the problem.")
end
local happy = getPlayerStorageValue(pokemon, 1008)
local hunger = getPlayerStorageValue(pokemon, 1009)
local pokelife = (getCreatureHealth(pokemon) / getCreatureMaxHealth(pokemon))
if edit then
doItemSetAttribute(pokeball.uid, "happy", happy)
doItemSetAttribute(pokeball.uid, "hunger", hunger)
doItemSetAttribute(pokeball.uid, "hp", pokelife)
end
if getCreatureName(pokemon) == "Ditto" then
if isTransformed(pokemon) then
local left = getItemAttribute(pokeball.uid, "transLeft") - (os.clock() - getItemAttribute(pokeball.uid, "transBegin"))
doItemSetAttribute(pokeball.uid, "transLeft", left)
end
end
if hideeffects then
doRemoveCreature(pokemon)
return true
end
local pokename = getPokeName(pokemon)
local mbk = gobackmsgs[math.random(1, #gobackmsgs)].back:gsub("doka", pokename)
if getCreatureCondition(cid, CONDITION_INFIGHT) then
if isCreature(getCreatureTarget(cid)) then
doItemSetAttribute(pokeball.uid, "happy", happy - 5)
else
doItemSetAttribute(pokeball.uid, "happy", happy - 2)
end
end
doTransformItem(pokeball.uid, pokeball.itemid-1)
doCreatureSay(cid, mbk, TALKTYPE_SAY)
doSendMagicEffect(getCreaturePosition(pokemon), effect)
doRemoveCreature(pokemon)
doUpdateMoves(cid)
end
e bem no final desse mesmo arquivo adicione essa função:
function doGoPokemon(cid, item)
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.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") 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())
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)
doUpdateMoves(cid)
end
testem ai...
Editado Janeiro 17 por brun123
Vou testar brun123, quando chegar em casa eu testo !
Teria um jeito de evitar que desse esse crash por causa da potrait ?
Eu fiz as scripts da cooldown bar aqui, mas tem que desativar o portrait do servidor, pois tem aquele bug de que se uma bola vai direto pro slot do player, o server da crash
Por que não fazer a ball ir para a bag em vez de ir para o slot? Isso ai resolveria.
info
Grupo: Conde
Registrado: 06/08/11
Posts: 752
Reputação: +112

O brun123 ta fazendo ela po, eu vi a lib que ele fez pra ela, o Deus, ainda dizem que eu sou bom scripter
-- EDIT --
postei isso antes e.e vou testar
VISCONDEEEEEE!
-- EDIT 2 --
Quando solta poke o cd fica altissimo na barra uns 6k por ai
-- EDIT 3 --
Vou editar depois uma parte pra shinys pois, quando usa com shiny aparece outras fotos, no caso do meu aparece o corpse do shiny kakuna no portrait do shiny beedrill
-- EDIT 4 --
Bola direto no slot realmente causa crash
Para a galera que usa portrait dos shinys do psoul, noticia boa, vou fazer os portraits shinys e postarei
Editado Janeiro 17 por ZerefShirou
Vou testar brun123, quando chegar em casa eu testo !
Teria um jeito de evitar que desse esse crash por causa da potrait ?
Brun123, mas o erro acontece por causa daquelas potraits usadas na bar ? Ou a do slot do armor ?
Por que se no caso de for na slot do armor, derrepente n vale nem mais apena usa ela pela potrait que já vai ter no bar, então ainda poderia ter mais um slot do player útil pra alguma coisa!
@OFF
Como sou burro KKKKKKKKKKKK
Era pra da edite, dei quote em mim mesmo! KKKKKKKKK
Editado Janeiro 17 por CabritenhO
Ou então eu faço uma função na source que faz o player usar o item, e faz ele mover pra determinada posição, só não se vai ser fácil fazer ele mover um item pra certo slot...
Alguém podia por favor postar o Default.lua (data/npc/scripts) da primeira versão PO Dash Advanced, pois eu fiz o MARK e o HUGH aqui em casa, com quase todos itens, porem quando testo da erro na Lib (050-function linha 222) e no default, então peço esse favor, porque se funfar posto os npcs aqui. Obrigado!
O Erro é esse, qualquer de venda que eu faça da esse erro:
[17/01/2012 17:01:03] [Error - Npc interface]
[17/01/2012 17:01:03] data/npc/scripts/default.lua
[17/01/2012 17:01:03] Description:
[17/01/2012 17:01:03] data/lib/050-function.lua:222: attempt to index a boolean value
[17/01/2012 17:01:03] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/default.lua
PS: Já li e reli o script do meu várias vezes e não tem NADA errado.
Alguém sabe arrumar?
Editado Janeiro 17 por GreenOak
Ou então eu faço uma função na source que faz o player usar o item, e faz ele mover pra determinada posição, só não se vai ser fácil fazer ele mover um item pra certo slot...
Ou. Você faz com que não se possa capturar poke sem ter uma ball com poke no slot.
EDIT: Percebi o erro nisso ai ^. Da para tira a ball durante a captura do poke.
Editado Janeiro 17 por Zawe
info
Grupo: Visconde
Registrado: 07/06/11
Posts: 359
Reputação: +37
ja tem config o GMHareaOT Configuro mt temp atras