home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxtools.zip / cr.cmd next >
OS/2 REXX Batch file  |  1999-04-15  |  4KB  |  78 lines

  1. /* Master Of Magic city spy by cygnus, 2:463/62.32 */
  2. /* Tested with MOM v2.3 */
  3.  
  4. parse arg game
  5. game = strip(game)
  6. if game = '' then game = 'save1.gam'
  7. if charin(game, 4) = '10'x then do
  8.     offs=x2d(8aac)+1
  9.     i = 0
  10.     do while city <> '00'x
  11.         city = Charin(game, offs, 14)
  12.         city = substr(city, 1, pos(x2c(00), city))
  13.         call charout , '0d0a0d0a'x city
  14.         pop = c2d(charin(game, offs+20))
  15.         race = c2d(charin(game, offs+14))
  16.         if race <> '' & city <> '00'x then do
  17.             call charout ,'    '||'09'x pop
  18.             select
  19.                 when race = 0 then say '09'x'Barbarian'
  20.                 when race = 1 then say '09'x'Beastmen'
  21.                 when race = 2 then say '09'x'Dark Elf'
  22.                 when race = 3 then say '09'x'Draconian'
  23.                 when race = 4 then say '09'x'Dwarven'
  24.                 when race = 5 then say '09'x'Gnoll'
  25.                 when race = 6 then say '09'x'Halfling'
  26.                 when race = 7 then say '09'x'High Elf'
  27.                 when race = 8 then say '09'x'High Men'
  28.                 when race = 9 then say '09'x'Klackon'
  29.                 when race = 10 then say '09'x'Lizardman'
  30.                 when race = 11 then say '09'x'Nomad'
  31.                 when race = 12 then say '09'x'Orc'
  32.                 when race = 13 then say '09'x'Troll'
  33.                 otherwise say 'Incorrect index'
  34.             end
  35.             call charout ,'Has: '
  36.             if charin(game, offs+34) = '01'x then call charout ,'Barracks; '
  37.             if charin(game, offs+35) = '01'x then call charout ,'Armory; '
  38.             if charin(game, offs+36) = '01'x then call charout ,'Fighters guild; '
  39.             if charin(game, offs+37) = '01'x then call charout ,'Armorers Guild; '
  40.             if charin(game, offs+38) = '01'x then call charout ,'War College; '
  41.             if charin(game, offs+39) = '01'x then call charout ,'Smithy; '
  42.             if charin(game, offs+40) = '01'x then call charout ,'Stables; '
  43.             if charin(game, offs+41) = '01'x then call charout ,'Animist Guild; '
  44.             if charin(game, offs+42) = '01'x then call charout ,'Fantastic Stable; '
  45.             if charin(game, offs+43) = '01'x then call charout ,'Ship Wrights Guild; '
  46.             if charin(game, offs+44) = '01'x then call charout ,'Ship Yard; '
  47.             if charin(game, offs+45) = '01'x then call charout ,'Maritime Guild; '
  48.             if charin(game, offs+46) = '01'x then call charout ,'Sawmill; '
  49.             if charin(game, offs+47) = '01'x then call charout ,'Library; '
  50.             if charin(game, offs+48) = '01'x then call charout ,'Sages Guild; '
  51.             if charin(game, offs+49) = '01'x then call charout ,'Oracle; '
  52.             if charin(game, offs+50) = '01'x then call charout ,'Alchemist Guild; '
  53.             if charin(game, offs+51) = '01'x then call charout ,'University; '
  54.             if charin(game, offs+52) = '01'x then call charout ,'Wizards Guild; '
  55.             if charin(game, offs+53) = '01'x then call charout ,'Shrine; '
  56.             if charin(game, offs+54) = '01'x then call charout ,'Temple; '
  57.             if charin(game, offs+55) = '01'x then call charout ,'Parthenon; '
  58.             if charin(game, offs+56) = '01'x then call charout ,'Cathedral; '
  59.             if charin(game, offs+57) = '01'x then call charout ,'Marketplace; '
  60.             if charin(game, offs+58) = '01'x then call charout ,'Bank; '
  61.             if charin(game, offs+59) = '01'x then call charout ,'Merchants Guild; '
  62.             if charin(game, offs+60) = '01'x then call charout ,'Granary; '
  63.             if charin(game, offs+61) = '01'x then call charout ,'Farmers Market; '
  64.             if charin(game, offs+62) = '01'x then call charout ,'Foresters Guild; '
  65.             if charin(game, offs+63) = '01'x then call charout ,'Builders Hall; '
  66.             if charin(game, offs+64) = '01'x then call charout ,'Mershants Guild; '
  67.             if charin(game, offs+65) = '01'x then call charout ,'Miners Guild; '
  68.             if charin(game, offs+66) = '01'x then call charout ,'City Wall; '
  69.         end
  70.         offs = offs + 114
  71.         i = i + 1
  72.     end
  73.     say
  74.     say i-1 'cities found'
  75. end
  76. else say 'Incorrect save game'
  77. exit
  78.