Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Então pessoal tudo bem?
Eu to com uma DÚVIDA EXTREMA, não sei como posso fazer :c
Eu gostaria de fazer um "Monster Maker" de um jogo e que fosse assim:
A pessoa clicava nos botões e ia gerando o CÓDIGO do MONSTRO como abaixo...
> <?xml version="1.0" encoding="UTF-8"?><monster name="NOME DO MONSTRO - ESCREVIA EM UM LOCAL E SAIA AQUI" nameDescription="a NOME DO MONSTRO" race="fire" experience="EXPERIÊNCIA DO MONSTRO - ESCREVIA EM UM LOCAL E SAIA AQUI" speed="VELOCIDADE DO MONSTRO - ESCREVIA EM UM LOCAL E SAIA AQUI" manacost="0">
<health now="VIDA DO MONSTRO - ESCREVIA EM UM LOCAL E SAIA AQUI" max="VIDA MAXIMA DO BIXO - ESCREVIA EM UM LOCAL E SAIA AQUI"/>
<look type="ROUPA DO MONSTRO" head="ROUPA" body="ROUPA" legs="ROUPA" feet="ROUPA" corpse="CORPO DELE MORTO"/>
<targetchange interval="60000" chance="0"/>
<strategy attack="65" defense="20"/>
<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 runonhealth="3000"/>
</flags>
<attacks>
<attack name="melee" interval="2000" skill="200" attack="250"/>
<attack name="manadrain" interval="1000" chance="7" range="7" min="-100" max="-1000">
<attribute key="shootEffect" value="energy"/>
<attribute key="areaEffect" value="poff"/>
</attack>
<attack name="drunkness" interval="1000" chance="7" range="7">
<attribute key="shootEffect" value="energy"/>
<attribute key="areaEffect" value="energyarea"/>
</attack>
<attack name="strength" interval="1000" chance="9" range="7">
<attribute key="shootEffect" value="largerock"/>
<attribute key="areaEffect" value="energyarea"/>
</attack>
<attack name="lifedrain" interval="1000" chance="13" radius="8" target="0" min="-400" max="-700">
<attribute key="areaEffect" value="bluebubble"/>
</attack>
<attack name="manadrain" interval="1000" chance="10" radius="8" target="0" min="-400" max="-700">
<attribute key="areaEffect" value="greenshimmer"/>
</attack>
<attack name="speed" interval="1000" chance="12" radius="6" target="0" speedchange="-1900" duration="60000">
<attribute key="areaEffect" value="poison"/>
</attack>
<attack name="strength" interval="1000" chance="8" radius="5" target="0">
<attribute key="areaEffect" value="blackspark"/>
</attack>
<attack name="outfit" interval="1000" chance="2" radius="8" target="0" monster="demon" duration="5000">
<attribute key="areaEffect" value="bluebubble"/>
</attack>
<attack name="outfit" interval="1000" chance="2" radius="8" target="0" item="3058" duration="5000">
<attribute key="areaEffect" value="bluebubble"/>
</attack>
<attack name="fire" interval="1000" chance="34" range="7" radius="7" target="1" min="-100" max="-900">
<attribute key="shootEffect" value="fire"/>
<attribute key="areaEffect" value="firearea"/>
</attack>
<attack name="lifedrain" interval="1000" chance="15" length="8" spread="0" min="-500" max="-850">
<attribute key="areaEffect" value="redshimmer"/>
</attack>
</attacks>
<defenses armor="160" defense="160">
<defense name="healing" interval="1000" chance="15" min="5000" max="10000">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
<defense name="healing" interval="1000" chance="25" min="2000" max="3000">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
<defense name="speed" interval="1000" chance="8" speedchange="1901" duration="5000">
<attribute key="areaEffect" value="redshimmer"/>
</defense>
<defense name="invisible" interval="1000" chance="17" duration="2000">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
<defense name="outfit" interval="1000" chance="2" item="2916" duration="7000">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
</defenses>
<immunities>
<immunity physical="0"/>
<immunity energy="1"/>
<immunity fire="1"/>
<immunity poison="1"/>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity outfit="1"/>
<immunity drunk="1"/>
<immunity invisible="1"/>
</immunities>
<summons max="3">
<summon name="Demon" interval="1000" chance="15" max="3"/>
</summons>
<voices interval="5000" chance="10">
<voice sentence="BOW TO THE POWER OF THE RUTHLESS SEVEN!" yell="1"/>
<voice sentence="Slay your friends and I will spare you!"/>
<voice sentence="DON'T BE AFRAID, I AM COMING IN PEACE!" yell="1"/>
<voice sentence="COME HERE! FREE ITEMS FOR EVERYONE!" yell="1"/>
</voices>
<loot capacity="5000">
<item id="2162" countmax="1" chance="11500"/>
<item id="2472" countmax="1" chance="3000"/>
<item id="2514" countmax="1" chance="7500"/>
<item id="2164" countmax="1" chance="5000"/>
<item id="1982" countmax="1" chance="2600"/>
<item id="2214" countmax="1" chance="13000"/>
<item id="2123" countmax="1" chance="3500"/>
<item id="2170" countmax="1" chance="13000"/>
<item id="2143" countmax="15" chance="12500"/>
</loot>
</monster>
Isso ai :s
É muita coisa, eu vou ficar em cima disso um BOM tempo!
Tenho DÚVIDA de COMO eu posso fazer para aparecer direto em um arquivo txt
Ué, use um stringReader ou um StreamWriter e um conjunto de ifs para cada opção, ai para cada coisa que for colocada no valor você cria uma variável que receberá o valor deste componente, depois disso você pede para o streamWriter salvar tudo em txt.
Não entendi o seu problema cara.