Downloads containing BLGempire.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Forgotten empire Rysice Capture the flag 7.4 Download file

File preview

  1. const bool MLLESetupSuccessful = MLLE::Setup(); ///@MLLE-Generated
  2. #include "MLLE-Include-1.5.asc" ///@MLLE-Generated
  3. #pragma require "BLGempire-MLLE-Data-1.j2l" ///@MLLE-Generated
  4. #pragma require "BLGempire.j2l" ///@MLLE-Generated
  5. #pragma require "SEroller.asc"
  6. #include "SEroller.asc"
  7. jjSTREAM snowsave("blgempire.asdat");
  8. bool snowfall = true;
  9.  
  10. se::DefaultWeaponHook weaponHook;
  11.  
  12. void onLevelLoad() {
  13.  
  14.         se::roller.loadAnims(jjAnimSets[ANIM::CUSTOM[99]]);
  15.         se::roller.loadSamples(array<SOUND::Sample> = {SOUND::P2_FART});
  16.         se::roller.setAsWeapon(2, weaponHook);
  17.         jjUseLayer8Speeds = true;
  18.  
  19.         while (!snowsave.isEmpty()) {
  20.                 snowsave.pop(snowfall);
  21.         }
  22.         if (snowfall == true){
  23.         jjConsole("The snow is currently on! Type !snow if you wish to turn it |off.");
  24.         }
  25.         else if (snowfall == false)
  26.         jjConsole("The snow is currently |off!||||||| Type !snow if you wish to turn it on.");
  27. }
  28.  
  29. void onPlayer(jjPLAYER@ play) {
  30.         weaponHook.processPlayer(play);
  31. }
  32.  
  33. void onPlayerInput(jjPLAYER@ play) {
  34.         weaponHook.processPlayerInput(play);
  35. }
  36.  
  37. void onReceive(jjSTREAM &in packet, int clientID) {
  38.         weaponHook.processPacket(packet, clientID);
  39. }
  40.  
  41. bool onDrawAmmo(jjPLAYER@ play, jjCANVAS@ canvas) {
  42.         return weaponHook.drawAmmo(play, canvas);
  43. }
  44.  
  45. void onMain() {
  46. if (snowfall == true) {
  47.         jjIsSnowing = true;
  48.         jjSnowingType = SNOWING::FLOWER;
  49.         jjSnowingIntensity = 1;
  50. }
  51. else if (snowfall == false) {
  52.         jjIsSnowing = false;
  53. }
  54. for (int i = 1; i < jjObjectCount; i++) {
  55.         jjOBJ@ o = jjObjects[i];
  56.         if (o.isActive && o.xPos >= 91*32 && o.xPos <= 93*32 && o.yPos >= 10*32  && o.yPos <= 12*32) {
  57.         if (o.eventID == OBJECT::RFPOWERUP || o.eventID == OBJECT::GENERATOR) {
  58.                 o.direction = -1;
  59.                 o.xPos = 92*32 + 32;
  60.                 }
  61.         }
  62. }
  63. }
  64.  
  65. bool onLocalChat(string &in text, CHAT::Type type) {
  66.         if (jjRegexMatch(text, "!snow", true)) {
  67.                 if (snowfall == true) {
  68.                         snowfall = false;
  69.                         snowsave.push(snowfall);
  70.                         snowsave.save("blgempire.asdat");
  71.                         jjConsole("|||You have turned ||||||off|| the snow");
  72.                 }
  73.                 else {
  74.                         snowfall = true;
  75.                         snowsave.push(snowfall);
  76.                         snowsave.save("blgempire.asdat");
  77.                         jjConsole("|||You have turned |||||on||| the snow");
  78.                 }
  79.         return true;
  80.         }
  81.         else return false;
  82. }