Atmospheric Effects

version 6/080508 by Mikael Segercrantz

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter 4(c) - Rules for random messages

    Section 4(c)1 - To say a random

    To say a random scenic message of (tbl - a table-name) running (runtype - a running type):
        let current count be the number of free rows in tbl;
        let maximum be the largest number in tbl;
        let original count be current count;
        if current count is 0:
            clean messages of tbl with maximum;
            let current count be the number of filled rows in tbl minus 1;
            if the number of filled rows in tbl is 1:
                clean last message of tbl;
                let current count be the number of filled rows in tbl;
        let row number be a random number between 1 and current count;
        let current row be 0;
        display row row number in tbl running runtype;
        if the original count is 0 and the number of filled rows in tbl is greater than 0 and maximum is greater than 0:
            choose row with used of maximum in tbl;
            change the used entry to 0.