Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- str FountainAreaNames[4] = { "\cjnorth-west", "\cjnorth-east", "\cjsouth-west", "\cjsouth-east" };
- int FountainsOrder[4] = { 1, 1, 1, 1 };
- script "S_FountainOrder" ( void )
- {
- // reset the order to begin with (everything at 1 (blue))
- for(int i=0; i<4; i++) {
- FountainsOrder[i] = 1;
- }
- // set a random index to 2 (red)
- int f1 = random(0,3);
- FountainsOrder[f1] = 2;
- // choose another random index that's not the first
- int f2 = random(0,3);
- until(f2!=f1) {
- f2 = random(0,3);
- }
- FountainsOrder[f2] = 2;
- // change the grid symbols to the right flats
- for(int k=0; k<4; k++) {
- str c = "B";
- if(FountainsOrder[k]==2) { c = "R"; }
- str s = StrParam(s:"TOMB", d:k+1, s:c, d:1);
- ChangeFloor(80+k, s);
- }
- // debug
- //Print(d:FountainsOrder[0], s:" ",
- //d:FountainsOrder[1], s:" ",
- //d:FountainsOrder[2], s:" ",
- //d:FountainsOrder[3]);
- str firstblue, secondblue, firstred, secondred;
- // this doesn't work, replace
- if(FountainsOrder[0]==1) { firstblue = FountainAreaNames[0]; } else { firstred = FountainAreaNames[0]; }
- if(FountainsOrder[1]==1) { firstblue = FountainAreaNames[1]; } else { firstred = FountainAreaNames[1]; }
- if(FountainsOrder[2]==1) { secondblue = FountainAreaNames[2]; } else { secondred = FountainAreaNames[2]; }
- if(FountainsOrder[3]==1) { secondblue = FountainAreaNames[3]; } else { secondred = FountainAreaNames[3]; }
- AmbientSound("misc/chat", 127);
- Print(s:"\chLet water flow at...\n\n", s:firstblue, s:"\n\n", s:secondblue);
- delay(120);
- AmbientSound("misc/chat", 127);
- Print(s:"\cgLet blood flow at...\n\n", s:firstred, s:"\n\n", s:secondred);
- delay(120);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement