Postado Janeiro 21, 2015 10 anos Eu estou montando um server de digimon, alguns digimons vieram prontos, e outros eu criei, a sprite funcionou, porem eu n sei muito o que fazer na script, e o catch n funciona mas tambem não da erro. OBS:Não faço ideia de onde achar os numeros e pra que servem em "body","head","legs","feet","corpse". Script do Digimon: <?xml version="1.0" encoding="UTF-8"?> <monster name="Flamedramon" nameDescription="a flamedramon" race="fire" experience="876" speed="250" manacost="0"> <health now="270" max="300"/> <look type="293" head="75" body="105" legs="95" feet="113" corpse="11840"/> <targetchange interval="0" chance="0"/> <strategy attack="500" defense="0"/> <flags> <flag summonable="1"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="1"/> <flag convinceable="1"/> <flag pushable="1"/> <flag canpushitems="0"/> <flag canpushcreatures="0"/> <flag targetdistance="5"/> <flag staticattack="100"/> <flag runonhealth="0"/> <flag hungerdelay="20"/> </flags> <attacks> <attack name="Fire Fang" interval="2000" chance="100" range="6" min="-50" max="-100"> <attribute key="shootEffect" value="eartharrow"/> </attack> <attack name="Pin Missile" interval="2617" chance="30" range="6"/> <attack name="Magma Storm" interval="4920" chance="20" range="6"/> <attack name="Flare Blitz" interval="2852" chance="29" range="6"/> <attack name="Psycho Shift" interval="3040" chance="28" range="8"/> <attack name="Extreme Speed" interval="3275" chance="26" range="6"/> <attack name="Flamethrower" interval="5625" chance="18" range="6"/> <attack name="Lava Plume" interval="3510" chance="25" range="6"/> <attack name="Ember" interval="6330" chance="17" range="6"/> <attack name="Fire Spin" interval="3980" chance="22" range="6"/> <attack name="Fire Punch" interval="4544" chance="19" range="50"/> </attacks> <defenses armor="0" defense="0"/> <voices interval="5000" chance="10"> <voice sentence="Flamedramon,a Coragem Flamejante!"/> </voices> <loot> <item id="12194" chance="4000" count="1" countmax="1"/> <item id="12193" chance="4000" count="1" countmax="1"/> <item id="11452" chance="100" count="1" countmax="1"/> </loot> <script> <event name="Spawn"/> </script> </monster> Script Catch: local ballcatch = { [2394] = {cr = 20, on = 200, off = 199, ball = 11829, send = 49}, [2391] = {cr = 10000, on = 200, off = 199, ball = 11829, send = 49}, [2393] = {cr = 15, on = 200, off = 199, ball = 11829, send = 49}, [2392] = {cr = 18, on = 200, off = 199, ball = 11829, send = 49}, } function onUse(cid, item, frompos, item3, topos) local item2 = getTopCorpse(topos) if item2 == null then return true end if getItemAttribute(item2.uid, "catching") == 1 then return true end if getItemAttribute(item2.uid, "golden") and getItemAttribute(item2.uid, "golden") == 1 then return doPlayerSendCancel(cid, "You can't try to catch a pokemon in the Golden Arena!") end local name = string.lower(getItemNameById(item2.itemid)) name = string.gsub(name, "fainted ", "") name = string.gsub(name, "defeated ", "") local x = pokecatches[doCorrectPokemonName(name)] if not x then return true end local owner = getItemAttribute(item2.uid, "corpseowner") if owner and isCreature(owner) and isPlayer(owner) and cid ~= owner and isInArray({1,8}, getPlayerGroupId(cid)) then doPlayerSendCancel(cid, "You are not allowed to catch this pokemon.") return true end local catchinfo = {} catchinfo.rate = ballcatch[item.itemid].cr catchinfo.catch = ballcatch[item.itemid].on catchinfo.fail = ballcatch[item.itemid].off catchinfo.newid = ballcatch[item.itemid].ball catchinfo.name = doCorrectPokemonName(name) catchinfo.topos = topos catchinfo.chance = x.chance doSendDistanceShoot(getThingPos(cid), topos, ballcatch[item.itemid].send) doRemoveItem(item.uid, 1) local d = getDistanceBetween(getThingPos(cid), topos) addEvent(doSendPokeBall, d * 70 + 100 - (d * 14) , cid, catchinfo, false, false) addEvent(doSendMagicEffect, (d * 70 + 100 - (d * 14)) - 100, topos, 3) return true end Editado Janeiro 21, 2015 10 anos por andreswmsoto (veja o histórico de edições)
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.