                                ;adds description
#command popis *128 1
#command desc *128 1
#command DESC *128 1
                                ;PC talking
#command akce *129 1
#command emote *129 1
#command pcecho *129 1
                                ;save selected name
#command uloz_jmeno *130 1
#command save_name *130 1
                                ;load name as selected
#command obnov_jmeno *132 1
#command load_name *132 1
                                ;select random pc (iff)
#command nahodne *133 1
#command rand_pc *133 1
                                ;select random wizard (iff)
#command mag *134 2
#command wizard *134 2
                                ;select random warrior (iff)
#command bojovnik *135 2
#command warrior *135 2
                                ;select random rogue (iff)
#command lucisnik *136 2
#command rogue *136 2
                                ;select npc
#command set_name *137 2
#command nastav_jmeno *137 2
                                ;directly set iff to value (iff)
#command nastav_iff *138 1
#command set_iff *138 1
                                ;negation of iff (iff)
#command inv_iff *131 0
                                ;jump to sentence
#command skok *139 1
#command goto *139 1
                                ;jump if iff is set
#command iff_skok *140 1
#command iff_jump *140 1
                                ;jump if iff is not set
#command niff_skok *141 1
#command niff_jump *141 1
                                ;add switch to dialog
#command volba *142 2
#command case *142 2
                                ;add case if iff is set to value /iff_case (iff,pgf,"text")/
#command iff_volba *143 3
#command iff_case *143 3
                                ;wait for key, then clear dialoge window
#command cekej *144 0
#command halt *144 0
                                ;test pgf's visited flag (iff)
#command test_odstavce *145 1
#command test_pgf *145 1
#command was_visited *145 1
                                ;adds case if pgf wasn't visited (iff)
#command test_volba *146 2
#command test_case *146 2
                                ;assigns dialoge picture
#command obrazek *147 1
#command picture *147 1
#command PICTURE *147 1
                                ;NPC talking
#command echo *148 1
#command npcecho *148 1
                                ;adds text to story.
#command pribeh *149 1
#command story *149 1
                                ;sets pgf to not visited
#command vstup_znova *150 1
#command reenter *150 1
                                ;calculate random iff (iff)
#command nahodny_iff *151 1
#command rnd_iff  *151 1
#command rand *151 1
                                ;lookup item in players inventory (iff)
#command q_item *152 1
#command Q_ITEM *152 1
                                ;creates item, and give it to characters
#command create_item *153 1
                                ;destroys one item in players inventory (iff)
#command destroy_item *154 1
                                ;creates money
#command create_money *155 1
                                ;players must pay (iff)
#command pay *156 1
#command PAY *156 1
                                ;starts battle after finishing dialoge
#command start_battle *157 0
                                ;closes dialoge window
#command bye *255 0
#command BYE *255 0
                                ;sends empty action to specific side
#command send_action *158 2
                                ;waits for moment
#command prodleva *159 1
#command delay *159 1
                                ;teleports players without any effects
#command teleport *160 2
                                ;assigns animation to dialoge
#command animace *161 3
#command play_anm *161 3
                                ;log echo adds textline to savegame story file
#command lecho *162 1
                                ;tests for global flag (iff)
#command q_flag *163 1
#command Q_FLAG *163 1
#command isflag *163 1
                                ;select waits for user response,
                                ;select_jump continues in selected way (use with case)
#command select *164 2
#command select_jump *165 2
                                ;tests for once flag in paragraph
#command once_visited *166 1
                                ;sets local absolute paragraph (iff)
#command local_pgf *167 1
                                ;starts shopping
#command start_shop *168 1

#define if *169
#define and *169
                 ;cislo odpovida prikazu if_not_jump rel
#define not *170
                 ;cislo odpovida prikazu if_jump rel
#define else *171
                 ;cislo odpovida prikazu jump rel

                            ;volba kodu textu
#command code_page *172 1
                        ;alt_sentence(cislo_sentence)
#command ALT_SENTENCE *173 1
#command alt_sentence *173 1
                        ;join(cislo_postavy)
#command JOIN *174 1
#command join *174 1
                        ;select_pc("Prompt",sentence) - skok kdyz nic nevyberou
                        ;pozor !!! 0 neni konec!
#command SELECT_PC *175 2
#command select_pc *175 2
                        ;practice(vlastnost,kolik) - uci vybranou postavu
#command PRACTICE *176 2
#command practice *176 2
                        ;if isvls(vlastnost [ < | <= | == | => | > | != ] cislo)
                        ;pozor mezi hodnotou a operatorem MUSI byt mezera (jako v UNIXU)
                        ;if isvls(VLS_SILA >= 20)  :-) jde napsat if isvls(VLS_SILA) >= 20  :-)
#command isvls *177 3
#command ISVLS *177 3
                        ;give_rune(zivel*10+kouzlo);
#command GIVE_RUNE *178 1
#command give_rune *178 1
                        ;if q_rune(zivel*10+kouzlo) / { /../ }
#command q_rune *179 1
#command Q_RUNE *179 1
                        ;if q_money(obnos)
#command q_money *180 1
#command Q_MONEY *180 1
                        ;practice_add(vlastnost,kolik,max) - kde max je horni omezeni na vlastnost
                        ;MAX_WEAPON_SKILL je nejvyssi weapon_skill ve hre
                        ;prikaz vraci 1 pokud vlastnost byla oriznuta;
#command PRACTICE_ADD *181 1
#command practice_add *181 1

                        ;DARK(realn˜ ‡as, hrac¡ ‡as)
                        ;re ln˜ ‡as je v sekund ch - tj. jak dlouho bude tma
                        ;hrac¡ ‡as je v hodin ch - tj. jak dlouho bude tr‚nink trvat
#command dark *182 2
#command DARK *182 2
                        ;sleep(pocet hodin)
                        ;uspi postavy na urceny pocet hodin.
#command sleep *183 1
#command SLEEP *183 1
                        ;najist(cena za postavu)
                        ;nasiti postavy. Pokud nemaji dostatek penez,
                        ;neprovede nic, pouze vrati 1.
#command najist *184 1
#command NAJIST *184 1
                        ;funkce isall vraci 1 pokud postavy nejsou rozdeleny
                        ;(existuje jen jedna skupina). V ostatnich pripadech
                        ;vraci 0.
#command isall *185 1
                        ;prikaz enable_map <cislo> povoluje (1) nebo
                        ;zakazuje (0) pouzivani globalni mapy
#command enable_map *186 1
#command ENABLE_MAP *186 1
                        ;if cursector <znam> cislo
                        ;napriklad: if cursector == 100
                        ;              {
                        ;              }
#command cursector *187 2

#command drop_char 200 0
#command select_xicht 201 1

#define MAX_WEAPON_SKILL 10
#define MAX_VLS_VALUE 100


#define cp_latin 2
#define cp_kamenici 1

#define muz 0
#define zena 1

#define sever 0
#define vychod 1
#define jih 2
#define zapad 3

#define == 32
#define = 32
#define < 33
#define <= 34
#define > 35
#define >= 36
#define <> 37

#define VLS_SILA    0
#define VLS_UM      1
#define VLS_POHYB   2
#define VLS_OBRAT   3
#define VLS_MAXHIT  4
#define VLS_KONDIC  5
#define VLS_MAXMANA 6
#define VLS_OBRAN_L 7
#define VLS_OBRAN_H 8
#define VLS_UTOK_L  9
#define VLS_UTOK_H  10
#define VLS_OHEN    11
#define VLS_VODA    12
#define VLS_ZEME    13
#define VLS_VZDUCH  14
#define VLS_MYSL    15
#define VLS_HPREG   16
#define VLS_MPREG   17
#define VLS_KPREG   18
#define VLS_MGSIL_L 19
#define VLS_MGSIL_H 20
#define VLS_MGZIVEL 21

#define WPN_MEC     100
#define WPN_SEKERA  101
#define WPN_KLADIVO 102
#define WPN_HUL     103
#define WPN_DYKA     105
#define WPN_STRELNE   104
#define WPN_SPECIALNI 106

                                ;declare dialoge
#command DIALOG *512 1
#command dialog *512 1
                                ;define basic symbols
#define { *-2
#define } *-1
#define begin *-2
#define end *-1
                                ;step at first
#command FIRST *513 1
#command first *513 1
                                ;step at item
#command WHEN_ITEM *514 2
#command when_item *514 2
                                ;step at flag
#command WHEN_FLAG *515 2
#command when_flag *515 2
                                ;step otherwise
#command STANDARD *516 1
#command standard *516 1
                                ;echo or case
#command SUB *517 2
#command sub *517 2
                                ;create_item
#command GET *153 1
#command get *153 1
                                ;destroy_item
#command PUT *154 1
#command put *154 1
                                ;set_global_flag
#command SET *518 1
#command set *518 1
                                ;reset_global_flag
#command RESET *519 1
#command reset *519 1
                                ;sentence - select sub mode;
#command sentence *520 2
#command SENTENCE *520 2

#command JOIN *174 1
                                ;pripoji postavu pr. JOIN (2) pripoji treti postavu

!32767
bye

!32766
echo "Z technick˜ch d–vodu nelze tento p©¡kaz implementovat pou‘it¡m"
"pravidel Jindrova scriptu. Je toti‘ nutn‚ zadat ID ‡¡slo obchodu"
"Pou‘ij pros¡m p©¡kaz 'start_shop(id)' p©ed ukon‡en¡m dialogu!"
bye

!32765
start_battle
bye


;Mapovani flagu.
;FLAG  0 Visited - nastaven, kdyz mluvis s nestvurou podruhe
;FLAG  1 Attacked - nastavem, kdyz postavy na nestvuru zautocili
;FLAG  2 Working - teoreticky... potvore je mozne dat ukol. 1 znaci ze ukol provadi (napriklad bude muset nekam dojit na nejake misto).
;FLAG 3-7 Unused - zatim pro volnou potrebu. Doporucuju obsazovat od zadu (FLAG 7)
;FLAG  8 Walking - Nastaveni na jedna zacne potvora chodit
;FLAG  9 Watching - Nastavenim na jednicku zacne potvora sledovat pozici postav a vhodne zautoci
;FLAG 10 Listening - Nastavenim na jednicku zacne potvora naslouchat. Pokud neco uslysi nastavi si FLAG 8.
;FLAG 11 Big - Jednicka znaci ze potvora muze byt jen jedna na policku.
;FLAG 12 Guard - Nastavenim se potvora vrati na svoji Home pozici a zacne ji strazit.
;FLAG 13 Pick - Nastavenim potvora sebere vsechny predmety na policku (a pak se flag vynuluje).
;FLAG 14 Picking - Potvora muze sbirat ze zeme predmety, pokud nema plny inv.
;FLAG 15 Rogue - Jednicka znamena ze potvora strili sipi
;FLAH 16-255 Globalni.



;zapis programu s pouzitim if else endif
;
;  if <prikaz>
;    {
;    <prikazy>
;     .....
;    }
;  else
;    {
;     <prikazy>
;     ....
;    }
;
;nebo
;
;  if not <prikaz>
;    {
;    <prikazy>
;     .....
;    }
;  else
;    {
;     <prikazy>
;     ....
;    }
;
;kde <prikaz> je posloupnost akci jenz vedou k modifikaci iff
;
