Advertisement
Astfgl

TsbrdainRequest

Sep 29th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //=============================================================================
  2. // TsbrdainRequest
  3. // by Astfgl
  4. // Date: 29/09/2016  
  5. // Creates a 2 dimensional array and allows to change and refer to those values.
  6. // Free for commercial and non commercial use. Free to edit, and redistribute.
  7. // Credit Astfgl, non required.
  8. //=============================================================================
  9.  
  10.  
  11. /*:
  12.  * @plugindesc Request
  13.  * @author Astfgl
  14.  *
  15.  * @param No params are available.
  16.  * @desc -
  17.  * @default -  
  18.  
  19.  */
  20.  
  21.  (function() {
  22.  
  23.     var parameters = PluginManager.parameters('TsbrdainRequest');
  24.     var _AstfglGSI = Game_System.prototype.initialize
  25.     Game_System.prototype.initialize = function() {
  26.         _AstfglGSI.call(this);
  27.         var i = 1;
  28.         var ar = [0];
  29.         while (i < $dataActors.length) {
  30.             ar.push([]);
  31.             var ii = 0;
  32.             while (ii < $dataClasses.length) {
  33.                 ar[i].push(0);
  34.                 ii++;
  35.             }
  36.             i++;
  37.         }
  38.         this.classExp = ar;
  39.        
  40.        
  41.         i = 1;
  42.         ar = [0];
  43.         while (i < $dataActors.length) {
  44.             ar.push([]);
  45.             ii = 0;
  46.             while (ii < $dataSkills.length) {
  47.                 ar[i].push(0);
  48.                 ii++;
  49.             }
  50.             i++;
  51.         }
  52.         this.skillExp = ar;
  53.        
  54.         i = 1;
  55.         ar = [0];
  56.         while (i < $dataActors.length) {
  57.             ar.push([]);
  58.             ii = 0;
  59.             while (ii < $dataWeapons.length) {
  60.                 ar[i].push(0);
  61.                 ii++;
  62.             }
  63.             i++;
  64.         }
  65.         this.weaponExp = ar;
  66.        
  67.         i = 1;
  68.         ar = [0];
  69.         while (i < $dataActors.length) {
  70.             ar.push([]);
  71.             ii = 0;
  72.             while (ii < $dataStates.length) {
  73.                 ar[i].push(0);
  74.                 ii++;
  75.             }
  76.             i++;
  77.         }
  78.         this.statesExp = ar;
  79.     }
  80.    
  81.     Game_System.prototype.changeClassExp = function (actorId, classId, change) {
  82.         if (change === undefined) { return this.classExp[actorId][classId]};
  83.         this.classExp[actorId][classId] += change;
  84.     }
  85.    
  86.     Game_System.prototype.changeSkillExp = function (actorId, skillId, change) {
  87.         if (change === undefined) { return this.skillExp[actorId][skillId]};
  88.         this.skillExp[actorId][skillId] += change;
  89.     }
  90.    
  91.     Game_System.prototype.changeWeaponExp = function (actorId, weaponId, change) {
  92.         if (change === undefined) { return this.weaponExp[actorId][weaponId]};
  93.         this.weaponExp[actorId][weaponId] += change;
  94.     }
  95.    
  96.     Game_System.prototype.changeStateExp = function (actorId, stateId, change) {
  97.         if (change === undefined) { return this.statesExp[actorId][stateId]};
  98.         this.statesExp[actorId][stateId] += change;
  99.     }
  100.  
  101.  })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement