Advertisement
jargon

Roe2js :: Ini Stats

Jun 7th, 2024
475
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. var entities = [];
  3. var defaultStats = [];
  4.  
  5. function loadStats(){
  6.    
  7.     entities = loadJSON(`http://${host}/test%20dictionary/settings/entities.json`);
  8.    
  9.     defaultStats = [];
  10.  
  11.     for (let index = 0; index < entities.critter.length; index++) {
  12.        
  13.         let crit = `${sections(entities.critter[index])[0]}`;
  14.        
  15.         const url = `http://${host}/entity%20dictionary/json/${crit}.json`;
  16.    
  17.         console.log(url);
  18.    
  19.         const jsonData = loadJSON(url);
  20.        
  21.         defaultStats[`${crit}`] = jsonData[`${crit}`];
  22.        
  23.     }
  24.    
  25.     console.log(defaultStats);
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement