Postado Novembro 11, 2012 12 anos Sistema de TM faz com que adicione mais um move ao seu pokemon. Olá Pessoal! Eu estava vendo o systema de TM do (PxO) e resolvi juntar os arquivos responsável pelo system para poder melhora-lo, pois até agora só existe um TM para adicionar em pokemons, pois não foi terminado o systema. Então pesso que alguém ajude-nos a terminar isso. Tentei implementar no PDA do slice, mas não consegui porque faltava algum arquivo informações. Mostrar conteúdo oculto data\XML\vocations.xml <vocation id="49" name="TM" description="pokemon trainer" needpremium="0" gaincap="0" gainhp="55" gainmana="0" gainhpticks="0" gainhpamount="0" gainmanaticks="0" gainmanaamount="0" manamultiplier="1.1" attackspeed="-1" soulmax="251" gainsoulticks="-1" fromvoc="1" lessloss="0"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="2" club="2" sword="2" axe="2" distance="2" shielding="2" fishing="2" experience="1.1"/> </vocation> \data\XML\channels.xml <channel id="13" name="[Put on M2]"> <vocation id="49"/> </channel> <channel id="14" name="[Put on M3]"> <vocation id="49"/> </channel> <channel id="15" name="[Put on M4]"> <vocation id="49"/> </channel> <channel id="16" name="[Put on M5]"> <vocation id="49"/> </channel> <channel id="17" name="[Put on M6]"> <vocation id="49"/> </channel> <channel id="18" name="[Put on M7]"> <vocation id="49"/> </channel> <channel id="19" name="[Put on M8]"> <vocation id="49"/> </channel> <channel id="20" name="[Put on M9]"> <vocation id="49"/> </channel> <channel id="21" name="[Put on M10]"> <vocation id="49"/> </channel> <channel id="22" name="[Put on M11]"> <vocation id="49"/> </channel> <channel id="23" name="[Put on M12]"> <vocation id="49"/> </channel> \data\actions\scripts\tm.lua function onUse(cid, item, frompos, item2, topos)[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]local tm = tmabilities[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]local pokemon = getCreatureSummons(cid)[1] local slotball = getPlayerSlotItem(cid, 8).uid local tmname = getItemNameById(item2.itemid) local hms = {Light = 12318, Ride = 12319, Fly = 12320, Surf = 12321, Dig = 12322, Cut = 12323, Rock = 1250} local i = item2.itemid[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] if #getCreatureSummons(cid) == 0 then return doPlayerSendCancel(cid, "Need pokemon to learn a "..tmname..".") end[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] if getItemAttribute(slotball, "TM") == tmname then return doPlayerSendCancel(cid, "Your pokemon was learned this TM.") end[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] if isInArray(tm[""..tmname..""], getPokemonName(pokemon)) then if i == hms.Light or i == hms.Ride or i == hms.Fly or i == hms.Surf or i == hms.Dig or i == hms.Cut or i == hms.Rock then doPlayerSendTextMessage(cid, 27, "Congralutations! Your pokemon learn a new HM("..tmname..").") doItemSetAttribute(slotball, ""..tmname.."", 1) doSendMagicEffect(getThingPosition(pokemon), 28) doSendMagicEffect(getThingPosition(pokemon), 29) --doRemoveItem(item2.uid) else doPlayerSetVocation(cid, 49) openChannelDialog(cid) end else doPlayerSendCancel(cid, "This TM not compatible in your pokemon.") end[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]return true end[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] \data\creaturescripts\scripts\tmsys.lua function onJoinChannel(cid, channelId, users, isTv)[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]if getPlayerVocation(cid) == 49 then else return true end local summon = getCreatureSummons(cid)[1] local moves = movestable[getCreatureName(summon)] local n = 1 for a = 1, 12 do local b = getNewMoveTable(moves, a) if b then n = n + 1 end end[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]for b = 13, 23 do if channelId == b then[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]local tm = tmabilities local pokemon = getCreatureSummons(cid)[1] local slotball = getPlayerSlotItem(cid, 8).uid local slotm = getPlayerSlotItem(cid, 9) local tmname = getItemNameById(slotm.itemid)[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] if n >= channelId - 11 then doPlayerSendTextMessage(cid, 27, "Congralutions! Your "..getPokemonName(pokemon).." learn a new TM ("..tmname..").") doItemSetAttribute(slotball, "TM", tmname) doItemSetAttribute(slotball, "TMN", channelId - 11) doSendMagicEffect(getThingPosition(pokemon), 28) doSendMagicEffect(getThingPosition(pokemon), 29) doRemoveItem(slotm.uid) if useKpdoDlls then doUpdateMoves(cid) end else doPlayerSendCancel(cid, "Put tm on at last empty slot.") end return false end[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]end return true end data\actions\actions.xml <action itemid="5896" event="script" value="tm.lua"/> TM nome: Fire Blast Usado usado em: Charizard Item ID do TM: 5896 System TM pego no open server PxO. Não tenho certeza de quem fez, mas os créditos vão para o Smix, pois eu baixei o server dele.
Postado Novembro 12, 2012 12 anos Testei aqui, consegui! porém as vezes o TM vai embora sem adicionar ao ataque o pokemon, más é uma grande iniciativa, belo trabalho, gostei! Editado Novembro 12, 2012 12 anos por Hyaku (veja o histórico de edições)
Postado Novembro 12, 2012 12 anos Autor Vlw cara Foi Como eu Disse é uma Base Agora Só arrumar oq da erro no seu xD
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.