Postado Julho 27, 2013 11 anos Bom, vi que algumas pessoas estão com problemas com coisas muito simples em scripting, então resolvi fazer esse tutorial ensinando o básico. Criando um novo monstro Vá em otserv/data/monster e escolha com qual monstro vc quer que o seu novo pareça ex. demon. Copie o aqruivo do monstro e renomeie para o nome do seu monstro e em seguida abra-o. aparecerá mais ou menos isso: <?xml version="1.0" encoding="UTF-8"?> <monster name="Demon" nameDescription="a demon" race="fire" experience="6000" speed="280" manacost="0"> <health now="8200" max="8200"/> <look type="35" corpse="5995"/> <targetchange interval="5000" chance="8"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="40"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" skill="70" attack="130"/> <attack name="manadrain" interval="3000" chance="13" range="7" min="-80" max="-300"/> <attack name="fire" interval="2000" chance="14" range="7" radius="7" target="1" min="-160" max="-350"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="firearea"/> </attack> <attack name="firefield" interval="1000" chance="15" range="7" radius="1" target="1"> <attribute key="shootEffect" value="fire"/> </attack> <attack name="energy" interval="3000" chance="30" length="8" spread="0" min="-220" max="-460"> <attribute key="areaEffect" value="energy"/> </attack> </attacks> <defenses armor="50" defense="55"> <defense name="healing" interval="1000" chance="15" min="90" max="200"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="speed" interval="1000" chance="15" speedchange="200" duration="20000"> <attribute key="areaEffect" value="redshimmer"/> </defense> </defenses> <elements> <element physicalPercent="30"/> <element deathPercent="30"/> <element energyPercent="50"/> <element earthpercent="40"/> <element icePercent="-12"/> <element holyPercent="-12"/> </elements> <immunities> <immunity fire="1"/> <immunity down="1"/> <immunity lifedrain="1"/> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <summons maxSummons="2"> <summon name="fire elemental" interval="2000" chance="10" max="2"/> </summons> <voices interval="5000" chance="10"> <voice sentence="Your soul will be mine!"/> <voice sentence="MUHAHAHAHA!"/> <voice sentence="CHAMEK ATH UTHUL ARAK!"/> <voice sentence="I SMELL FEEEEAAAAAR!"/> <voice sentence="Your resistance is futile!"/> </voices> <loot> <item id="2148" countmax="100" chance="100000"/><!-- gold coin --> <item id="2148" countmax="99" chance="100000"/><!-- gold coin --> <item id="2152" chance="50000"/><!-- platinum coin --> <item id="2795" countmax="5" chance="20000"/><!-- fire mushroom --> <item id="8473" countmax="3" chance="20000"/><!-- ultimate health potion --> <item id="7590" countmax="3" chance="14285"/><!-- great mana potion --> <item id="2387" chance="14285"/><!-- double axe --> <item id="2149" chance="10000"/><!-- small emerald --> <item id="7368" countmax="5" chance="5263"/><!-- assassin star --> <item id="2432" chance="3703"/><!-- fire axe --> <item id="2151" chance="3571"/><!-- talon --> <item id="2176" chance="2854"/><!-- orb --> <item id="2393" chance="2000"/><!-- giant sword --> <item id="2418" chance="1428"/><!-- golden sickle --> <item id="2165" chance="1333"/><!-- stealth ring --> <item id="2462" chance="1204"/><!-- devil helmet --> <item id="1982" chance="1190"/><!-- purple tome --> <item id="2179" chance="1010"/><!-- gold ring --> <item id="2171" chance="813"/><!-- platinum amulet --> <item id="2396" chance="666"/><!-- ice rapier --> <item id="2520" chance="649"/><!-- demon shield --> <item id="2214" chance="473"/><!-- ring of healing --> <item id="5954" chance="467"/><!-- demon horn --> <item id="2470" chance="413"/><!-- golden legs --> <item id="2514" chance="389"/><!-- mastermind shield --> <item id="2164" chance="170"/><!-- might ring --> <item id="2472" chance="91"/><!-- magic plate armor --> <item id="7393" chance="78"/><!-- demon trophy --> <item id="7382" chance="60"/><!-- demonrage sword --> </loot> </monster> Vamos aprender como editar linha por linha, vou usar como um exemplo o nome do meu monstro Platers. Edite a primeira linha: <monster name="NOMEDOMONSTRO" nameDescription="a NOMEDOMONSTRO" race="RAÇA(fire,holy,dead,etc)" experience="EXPQUEOMONSTRODA" speed="VELOCIDADEDOMONSTRO" manacost="0"> Preencha tudo sem erros se não da erro no fim! Agora as próximas 4 linhas: <health now="VIDADOMONSTRO" max="VIDADOMONSTRO"/> <look type="35" corpse="5995"/> <targetchange interval="5000" chance="8"/> <strategy attack="100" defense="0"/> Só iremos editar isso nessas linhas... Agora nas próximas linhas, as FLAGS.(próximas 13 linhas) <flags> <flag summonable="0"/> -- se pode sumonar o monstro coloque 1 <flag attackable="1"/> -- se pode atacar o monstro coloque 1 <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> -- se pode empurrar o monstro coloque 1 <flag canpushitems="1"/> -- se o monstro puder arrastar itens coloque 1 <flag canpushcreatures="1"/> -- se o monstro pode empurrar criaturas coloque 1 <flag targetdistance="1"/> -- coloque a distancia em SQM's em que o monstro ataca <flag staticattack="40"/> <flag runonhealth="0"/> </flags> Está quase pronto! Agora vamos aos ataques.(próximas 15 linhas) <attacks> <attack name="melee" interval="2000" skill="70" attack="130"/> <attack name="manadrain" interval="3000" chance="13" range="7" min="-80" max="-300"/> <attack name="fire" interval="2000" chance="14" range="7" radius="7" target="1" min="-160" max="-350"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="firearea"/> </attack> <attack name="firefield" interval="1000" chance="15" range="7" radius="1" target="1"> <attribute key="shootEffect" value="fire"/> </attack> <attack name="energy" interval="3000" chance="30" length="8" spread="0" min="-220" max="-460"> <attribute key="areaEffect" value="energy"/> </attack> </attacks> Bom, na maioria das linhas tem interval,chance,range,min e max. interval - inervalo para o próximo ataque em milisegundos (1000=1seg). chance - a chance que o monstro tem de usar o ataque. range - a distancia que o monstro "joga" o ataque em SQM's. tibiaking.com min - o mínimo que o monstro pode bater nesse ataque. max - o máximo que o monstro pode bater nesse ataque. Edite do seu jeito, agora vamos para as imunites(imunidades) onde terá assim: <immunities> <immunity fire="1"/> -- se o monstro for imune a fogo coloque 1. <immunity down="1"/> -- não sei pra que serve. <immunity lifedrain="1"/> -- se o monstro for imune a absorção de vida coloque 1 <immunity paralyze="1"/> -- se o monstro for imune a paralyse coloque 1 <immunity invisible="1"/> -- se o monstro encherga o utana vid coloque 1 </immunities> Após editar as imunidades, vamos para o loot! aonde tem: <loot> <item id="2148" countmax="100" chance="100000"/><!-- gold coin --> </loot> Editar o loot do monstro é bem simples, cada linha tem: item id,countmax,chance,e o nome do item. Item id - cooque o ID do item que vai dropar. countmax - quantidade que vai dropar (se o item não der para acumular ex. uma sword não tera essa parte). chance - a chance de dropar o item (coloque 100000000 para cair toda vez). nome do item - a ultima parte em vermelha, coloque o nome do item. Pronto! O monstro está criado! Agora falra só um pouquinho.. Vá em Otserv/data/monsters/ e abra o monsters.xml De ctrl+F e digite o montro que usou como base, no meu caso demon. Aparecerá algo mais ou menos assim: <monster name="Demon" file="demons/demon.xml"/> Agora vc tem que saber em que pasta está seu monstro, edite: <monster name="NOMEDOMONSTRO" file="PASTA/NOMEDOMONSTRO.xml"/> Prontinho! seu monstro está criado. Crétios: 100% eu joaotmed Editado Julho 27, 2013 11 anos por joaotmed (veja o histórico de edições)
Postado Julho 27, 2013 11 anos tá bastante útil, dava pra levar mais a fundo e ficar melhor ainda, mas obrigado por contribuir, rep+ Movido para a área correta. Ot Design: https://discord.gg/VgtVRNmCD7
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.