Autor Zpráva
anonymní
Profil *
Potřebuji poradit. Mám v programu tenhle řádek.

<sec fontData="MV_FontBold"><HERO_NAME/></sec> ( id: <HERO_ID/> )<br/>

Vypíše mi to tučně v okně.

Pepa 1111

Tj. <HERO_NAME/> vypíše Pepa
a <HERO_ID/> vypíše 1111

Potřebuji k tomu přidělat podmínku co bude probíhat nějak takhle.
Pokud je jméno Pepa pak ho vždy přepiš na Jozef a pak vypiš <HERO_ID/>
Pokud je nějaké jiné tak ho vypiš normálně a pak <HERO_ID/>.

Poradíte mi jak to tam napsat?
peta
Profil
Co je to za program?
anonymní
Profil *
Je to program který zobrazuje www hru u mě doma v okně programu.
Zdroják je tady-http://www.edisk.sk/sk/stahni/89662/Kopie_-_FaTool.rar_3.04MB.html
Upravu se pokouším spáchat v souboru
/lng/czech-texts.lng
10 řádek.
anonymní
Profil *
Takhle vypadá.

<!-- file containing various texts used in fa-tool -->
<!-- each text has to be parsed individualy -->
<!-- first element's node name of each text will be changed to the name provided in change_to attribute -->
<!-- if the text should be breakable ( line-breaking ) then a break="1" attribute has to be added into main text node -->
<TEXTS_MAIN>

<DETAILED_HERO_INFO_TEXT change_to="table" spacing="1" align="0">
    <row>
    <column>
        <sec fontData="MV_FontBold"><HERO_NAME/></sec> ( id: <HERO_ID/> )<br/>
        <NOTE_SEC>Note: <HERO_NOTE/><br/></NOTE_SEC>
        <sec color_name="MV_Info"><HERO_RACE/></sec>, <sec color_name="MV_Info_Number"> <HERO_AGE/></sec> years old.<br/>
        Level: <sec color_name="MV_Info_Number"><HERO_LEVEL/></sec>, XP: <sec color_name="MV_Info_Number"><HERO_XP/></sec><br/>
        Value: <sec color_name="MV_Info_Number"><HERO_VALUE/></sec>, salary: <sec color_name="MV_Info_Number"><HERO_SALARY/></sec><br/>
        Owner: <sec color_name="MV_Info"><HERO_OWNER/></sec><br/>
        HP: <sec color_name="MV_Info_Number"><HERO_HP/></sec>, MP: <sec color_name="MV_Info_Number"><HERO_MP/></sec><br/>
        <br/>
    </column>
    </row>    
    <row>
    <column>
    <table padding_x="4" border_offset_y="2" bcg_image="DarkField">
        <row>
            <column>Strength</column><column><sec color_name="MV_Info_Number"><HERO_STR/></sec></column><column>Intelligence</column><column><sec color_name="MV_Info_Number"><HERO_INT/></sec></column>
        </row>
        <row>
            <column>Dexterity</column><column><sec color_name="MV_Info_Number"><HERO_DEX/></sec></column><column>Willpower</column><column><sec color_name="MV_Info_Number"><HERO_WIL/></sec></column>
        </row>
        <row>
            <column>Constitution</column><column><sec color_name="MV_Info_Number"><HERO_CON/></sec></column><column>Charisma</column><column><sec color_name="MV_Info_Number"><HERO_CHA/></sec></column>
        </row>
        <row>
            <column>Speed</column><column><sec color_name="MV_Info_Number"><HERO_SPD/></sec></column><column>Luck</column><column><sec color_name="MV_Info_Number"><HERO_LUC/></sec></column>
        </row>
    </table>    
    </column>
    </row>    
    <!-- will be included in next version
    <row>
    <column>
    <table border_offset_y="2">
        <row>
        <column>
        <table padding_x="4">
            <row>
            <column>Attack</column><column><sec color_name="MV_Info_Number"><HERO_ATT/></sec></column><column>Defense</column><column><sec color_name="MV_Info_Number"><HERO_DEF/></sec></column>
            </row>
            <row>
            <column>Mag. Attack</column><column><sec color_name="MV_Info_Number"><HERO_MATT/></sec></column><column>Mag. Defense</column><column><sec color_name="MV_Info_Number"><HERO_MDEF/></sec></column>
            </row>
        </table>
        </column>
        </row>
        <row align="0">
        <column>        
            <table padding_x="4"><row><column>Armor class</column><column><sec color_name="MV_Info_Number"><HERO_AC/></sec></column></row></table>
        </column>
        </row>
    </table>
    </column>        
    </row>        -->
    <row>
    <column>
    <br/>
    <table border_offset_y="2">
        <row><column>
        <table border_offset="3" bcg_image="DarkField">
        <row align="0"><column><sec fontData="MV_FontBold">Weapon skills</sec></column></row>
        <row>
        <column>
        <table padding_x="4">
            <row><column>Sword</column><column><sec color_name="MV_Info_Number"><HERO_SWORD/></sec></column><column>Spear</column><column><sec color_name="MV_Info_Number"><HERO_SPEAR/></sec></column></row>
            <row><column>Axe</column><column><sec color_name="MV_Info_Number"><HERO_AXE/></sec></column><column>Bow</column><column><sec color_name="MV_Info_Number"><HERO_BOW/></sec></column></row>
            <row><column>Crushing</column><column><sec color_name="MV_Info_Number"><HERO_CRUSHING/></sec></column><column>Crossbow</column><column><sec color_name="MV_Info_Number"><HERO_XBOW/></sec></column></row>
        </table>
        </column>
        </row>
        </table>
        </column></row>
        <row><column>
        <br/>
        <table border_offset="3" bcg_image="DarkField">
        <row align="0"><column><sec fontData="MV_FontBold">Magic skills</sec></column></row>
        <row align="0">
        <column>
        <table padding_x="4">
            <row><column>Life</column><column><sec color_name="MV_Info_Number"><HERO_LIFE/></sec></column><column>Death</column><column><sec color_name="MV_Info_Number"><HERO_DEATH/></sec></column></row>
            <row><column>Order</column><column><sec color_name="MV_Info_Number"><HERO_ORDER/></sec></column><column>Chaos</column><column><sec color_name="MV_Info_Number"><HERO_CHAOS/></sec></column></row>            
        </table>
        </column>
        </row>
        <row align="12"><column><table  padding_x="4"><row><column>Nature</column><column><sec color_name="MV_Info_Number"><HERO_NATURE/></sec></column></row></table></column></row>
        </table>
        </column></row>
        <row><column><br/>
            <table border_offset="3" padding_x="4" bcg_image="DarkField">
            <row>
            <column>Season kills: </column><column><sec color_name="MV_Info_Number"> <SEASON_KILLS/></sec></column>
            </row><row>
            <column>Season deaths: </column><column><sec color_name="MV_Info_Number"> <SEASON_DEATHS/></sec></column>        
            </row><row>
            <column>Career kills: </column><column><sec color_name="MV_Info_Number"> <CAREER_KILLS/></sec></column>
            </row><row>
            <column>Career deaths: </column><column><sec color_name="MV_Info_Number"> <CAREER_DEATHS/></sec></column>                    
            </row><row>
            <column>Career matches: </column><column><sec color_name="MV_Info_Number"> <CAREER_MATCHES/></sec></column>
            </row>
        </table></column></row>
    </table>
    </column>
    </row>
</DETAILED_HERO_INFO_TEXT>


<AWAY_HERO_INFO_TEXT change_to="table" spacing="1" align="0">
    <row>
    <column>
        <sec fontData="MV_FontBold"><HERO_NAME/></sec> ( id: <HERO_ID/> )<br/>        
        <sec color_name="MV_Info"><HERO_RACE/></sec>, <sec color_name="MV_Info_Number"> <HERO_AGE/></sec> years old.<br/>
        Level: <sec color_name="MV_Info_Number"><HERO_LEVEL/><br/></sec>
        Value: <sec color_name="MV_Info_Number"><HERO_VALUE/></sec>, salary: <sec color_name="MV_Info_Number"><HERO_SALARY/></sec><br/>
        Owner: <sec color_name="MV_Info"><HERO_OWNER/></sec><br/>        
        <br/>
    </column>
    </row>        
    <row>
    <column>    
    <table border_offset="3" padding_x="4" bcg_image="DarkField">
        <row>
        <column>Season kills: </column><column><sec color_name="MV_Info_Number"> <SEASON_KILLS/></sec></column>
        </row><row>
        <column>Season deaths: </column><column><sec color_name="MV_Info_Number"> <SEASON_DEATHS/></sec></column>        
        </row><row>
        <column>Career kills: </column><column><sec color_name="MV_Info_Number"> <CAREER_KILLS/></sec></column>
        </row><row>
        <column>Career deaths: </column><column><sec color_name="MV_Info_Number"> <CAREER_DEATHS/></sec></column>                    
        </row><row>
        <column>Career matches: </column><column><sec color_name="MV_Info_Number"> <CAREER_MATCHES/></sec></column>
        </row>
    </table>
    </column>
    </row>    
</AWAY_HERO_INFO_TEXT>

<SPELL_INFO_TEXT change_to="table" spacing="1" align="0">
    <row><column><sec fontData="MV_FontBold">Spell details</sec><br/></column></row>
    <row>
    <column><table padding_x="4">
        <row><column>Spell name: </column><column><SPELL_NAME/></column></row>
        <CASTER_SEC><row><column>Caster:</column><column><sec color_name="MV_Info"><HERO_NAME/></sec></column></row></CASTER_SEC>
        <row><column>Spell type:</column><column><TYPE/></column></row>
        <row><column>Spell school:</column><column><SCHOOL/></column></row>
        <row><column>Mana cost:</column><column><MANA/> mana</column></row>
        <row><column>Target:</column><column><TARGET/></column></row>
        <DURATION_SEC><row><column>Duration:</column><column><DURATION/></column></row></DURATION_SEC>
        <EFFECT_CHANCE_SEC><row><column>Effect chance:</column><column><EFFECT_CHANCE/></column></row></EFFECT_CHANCE_SEC>
        <row><column><USABLE_BY_STRING/>:</column><column><USABLE_BY/></column></row>
        <IMMUNE_RACES_SEC><row><column>Immune races: </column><column><IMMUNE_RACES/></column></row></IMMUNE_RACES_SEC>
        <STR_MOD_SEC><row><column>Strength:</column><column><STR_MOD/></column></row></STR_MOD_SEC>
        <DEX_MOD_SEC><row><column>Dexterity:</column><column><DEX_MOD/></column></row></DEX_MOD_SEC>
        <CON_MOD_SEC><row><column>Constitution:</column><column><CON_MOD/></column></row></CON_MOD_SEC>
        <SPD_MOD_SEC><row><column>Speed:</column><column><SPD_MOD/></column></row></SPD_MOD_SEC>
        <INT_MOD_SEC><row><column>Intelligence:</column><column><INT_MOD/></column></row></INT_MOD_SEC>
        <WIL_MOD_SEC><row><column>Willpower:</column><column><WIL_MOD/></column></row></WIL_MOD_SEC>
        <CHA_MOD_SEC><row><column>Charisma:</column><column><CHA_MOD/></column></row></CHA_MOD_SEC>
        <LUC_MOD_SEC><row><column>Luck:</column><column><LUC_MOD/></column></row></LUC_MOD_SEC>
        <ATT_MOD_SEC><row><column>Attack mod.:</column><column><ATT_MOD/></column></row></ATT_MOD_SEC>
        <DEF_MOD_SEC><row><column>Defense mod.:</column><column><DEF_MOD/></column></row></DEF_MOD_SEC>
        <MATT_MOD_SEC><row><column>Mag. attack mod.:</column><column><MATT_MOD/></column></row></MATT_MOD_SEC>
        <MDEF_MOD_SEC><row><column>Mag. defense mod.:</column><column><MDEF_MOD/></column></row></MDEF_MOD_SEC>
        <AC_MOD_SEC><row><column>AC:</column><column><AC_MOD/></column></row></AC_MOD_SEC>
        <row><column>Int. min.:</column><column><sec color_name="MV_Number"><INT_MIN/></sec></column></row>
        <row><column>Level min.:</column><column><sec color_name="MV_Number"><LEVEL_MIN/></sec></column></row>
        <row><column>Skill min.:</column><column><sec color_name="MV_Number"><SKILL_MIN/></sec></column></row>
        <row><column>Speed:</column><column><SPEED/></column></row>
        <DMG_SEC><row><column><DMG>Damage:</DMG><HEALING>Healing:</HEALING></column><column><SPELL_DMG/></column></row></DMG_SEC>
        <CAST_CHANCE_SEC><row><column>Casting chance:</column><column><sec color_name="MV_Number"><CAST_CHANCE/></sec> %</column></row></CAST_CHANCE_SEC>
        <SPECIAL_EFFECT_SEC><row><column>Special effect: </column><column><SPECIAL_EFFECT/></column></row></SPECIAL_EFFECT_SEC>
        </table>
    </column>
    </row>
</SPELL_INFO_TEXT>
</TEXTS_MAIN>
peta
Profil
Zda se, ze jsi nepochopil otazku.
"Je to program který zobrazuje www hru u mě doma v okně programu."
Kazdy program ma urcitou dokumentaci a v ni je napsane, jak se dana vec da provest. Pokud nevis nazev programu, nemuzes dat do google hledat dokumentaci a tudiz je dotaz neresitelny.

To, co jsi vypsal, je jakysi XML soubor. V ukazce neni pouzita zadna podminka, obvykle pojmenovani je IF, takze neni mozne takovy neexistujici radek pouzit jako vzor pro to, co potrebujes. Pravdepodobne se do toho XML pouze dosazuji hodnoty.
Teoreticky by slo do toho pridat javascript. Zkus tam dat <script>document.write('ahoj');</script>, co to udela? Prakticky javascript nemusi zpracovat jako html kod, ale jako xml tag. Pokud by js fungoval, slo by to napsat
<script>var name = ("<HERO_NAME/>"=="Pepa") ? "<HERO_ID/>" : "<HERO_NAME/>"; document.write(name);</script>

http://www.edisk.sk/sk/stahni/89662/Kopie_-_FaTool.rar_3.04MB.html
To stahnout nejde. Chce to sms, mozna registraci. Google mi na Fatool vyhodi odkazy na osobu Nick Fatool, jazz.
Aha, download slow, funguje.
Dokumentace zadna. Mno, nic noveho to neprineslo.
V images.cnf jsem narazil na kod s |, ale je v komentu, takze to bude spis navodne nez funkcni.
<!-- used images. Do not delete anything!-->
<!-- *****************HELP***************

Usege: 
            //adding new images into fa-tool
            <image name="name of the image in the tool"
             src="source image name in \img\ directory"
             [resizable="1"]  //-the image is resizable
             [repeat="1"]      //-the image can repeat itself over larger surfaces
             [useAlpha="1"] //-use alpha chanel of the source image
    >
      - <image> childElements:
        //source rectangle of the source image which will be used to make the final image
        <src_rect x="x-coordinate"
             y="y-coordinate"
             w="width"
             h="height"/>
        //dynamic rectangle of the source image used for resizable images ( only the part in the dynamic rect is resized )
        <dynamic_rect ..( same as src_rect)/>

    //adding new selection masks for the elements - currently works only for 32bit src images
    <selection_mask name="name of the selection mask"
                    src="source image in \img\ directory from which the mask is created"
                                        [treshold="[0-255]"]    //treshold value of the alpha channel used for creating the mask (default 128 )
                    [wrapMode="ONLY_INSIDE" | "CLAMP" | "REPEAT"]     //mode used to handle selection outside of the element rectangle ( default=ONLY_INSIDE )
        -<selection_mask> childElement
            //source rectangle of the input image used for the mask creation ( default is the whole image )
            <src_rect ...> //same as in the image src_rect element
******************************************************-->
anonymní
Profil *
Tak se mi to povedlo zprovoznit.
Ve Firefoxu jsem si nainstaloval plugin FoxReplace - nahrazuje na definovaném www všechny slova podle tabulky. (Něco jako osobní translátor.)
Ve FaToolu jsem to udělal tak že jsem smazal HERO_NAME a místo něho tam dal HERO_NOTE - což je libovolná poznámka k hrdinovi kterou mohu definovat.
Tam stačilo dát jméno které chci zobrazit.
Je to připouštím takovej rovnák na ohejbák ale fungluje to :)

Díky Ti moc za pomoc s vyřešením.

Vaše odpověď


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm: