analyse.txt 1017 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. map = map.new();
  2. player = read.player("marvinius");
  3. if(player == null) {
  4. msg("dev", "marvinius ist nicht online");
  5. term();
  6. }
  7. loc = entity.getLocation(player);
  8. world = loc.getWorld(loc);
  9. list = world.getEntities(world);
  10. size = list.getSize(list);
  11. living = 0;
  12. for(i = 0; i < size; i++) {
  13. element = list.getIndex(list, i);
  14. if(isLiving(element)) {
  15. living++;
  16. //living.removeAi(element);
  17. entity_type = entity.getType(element);
  18. n = map.get(map, entity_type);
  19. if(n == null) {
  20. map.add(map, entity_type, 1);
  21. } else {
  22. map.add(map, entity_type, n + 1);
  23. }
  24. }
  25. }
  26. msg("dev", "§0-------------------------------------------------");
  27. msg("dev", "Living: ", living);
  28. iter = map.iterator(map);
  29. table = table.new("§b", 14, 14);
  30. msg("dev", table.getStart(table));
  31. while(hasNext(iter)) {
  32. element1 = next(iter);
  33. if(hasNext(iter)) {
  34. element2 = next(iter);
  35. } else {
  36. element2 = "";
  37. }
  38. msg("dev", table.get(table, element1, element2));
  39. }
  40. msg("dev", table.getEnd(table));