Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.25 KB | None | 0 0
  1. $${
  2. Unsafe(0);
  3. #life_checker = 10;
  4. #hunger_checker = 8;
  5. #oxygen_checker = 100;
  6. #helmdurab = 50;
  7. #chestdurab = 80;
  8. #leggdurab = 70;
  9. #bootsdurab = 60;
  10. &danger_blocks = "^8$|^9$|^10$|^11$|^17$|^79$|^81$|^82$|^86$|^111$";
  11. unset(@dangerous);
  12.  
  13. Do();
  14.  
  15. IF(%HEALTH% < %#life_checker%); set(@low_life); ELSE;unset(@low_life);ENDIF;
  16. IF(%HUNGER% < %#hunger_checker%); set(@hunger); ELSE;unset(@hunger);ENDIF;
  17. IF(%OXYGEN% < %#oxygen_checker%); set(@low_oxygen); ELSE;unset(@low_oxygen);ENDIF;
  18. IF(%HELMDURABILITY% < %#helmdurab%); set(@low_helmet); ELSE;unset(@low_helmet);ENDIF;
  19. IF(%CHESTPLATEDURABILITY% < %#chestdurab%); set(@low_chest); ELSE;unset(@low_chest);ENDIF;
  20. IF(%LEGGINGSDURABILITY% < %#leggdurab%); set(@low_legging); ELSE;unset(@low_legging);ENDIF;
  21. IF(%BOOTSDURABILITY% < %#bootsdurab%); set(@low_boots); ELSE;unset(@low_boots);ENDIF;
  22.  
  23. IF(%DIRECTION% == "N");
  24. @&front = "north";
  25. @&back = "south";
  26. @&left = "east";
  27. @&right = "west";
  28. #zfront = -1; #xfront = 0;
  29. #zback = +1; #xback = 0;
  30. #zright = 0; #xright = -1;
  31. #zleft = 0; #xleft = +1;
  32. ELSEIF(%DIRECTION% == "S");
  33. @&front = "south";
  34. @&back = "north";
  35. @&left = "west";
  36. @&right = "east";
  37. #zfront = +1; #xfront = 0;
  38. #zback = -1; #xback = 0;
  39. #zright = 0; #xright = +1;
  40. #zleft = 0; #xleft = -1;
  41. ELSEIF(%DIRECTION% == "E");
  42. @&front = "east";
  43. @&back = "west";
  44. @&left = "south";
  45. @&right = "north";
  46. #xfront = +1; #zfront = 0;
  47. #xback = -1; #zback = 0;
  48. #xright = 0; #zright = +1;
  49. #xleft = 0; #zleft = -1;
  50. ELSEIF(%DIRECTION% == "W");
  51. @&front = "west";
  52. @&back = "east";
  53. @&left = "north";
  54. @&right = "south";
  55. #xfront = -1; #zfront = 0;
  56. #xback = +1; #zback = 0;
  57. #xright = 0; #zright = -1;
  58. #xleft = 0; #zleft = +1;
  59. ENDIF;
  60.  
  61. @xfront1 = %#xfront% * 1; @zfront1 = %#zfront% * 1;
  62. @xfront2 = %#xfront% * 2; @zfront2 = %#zfront% * 2;
  63. @xfront3 = %#xfront% * 3; @zfront3 = %#zfront% * 3;
  64. @xfront4 = %#xfront% * 4; @zfront4 = %#zfront% * 4;
  65. @xfront5 = %#xfront% * 5; @zfront5 = %#zfront% * 5;
  66. @xfront6 = %#xfront% * 6; @zfront6 = %#zfront% * 6;
  67.  
  68. @#xback1 = %#xback% * 1; @#zback1 = %#zback% * 1;
  69. @#xback2 = %#xback% * 2; @#zback2 = %#zback% * 2;
  70. @#xback3 = %#xback% * 3; @#zback3 = %#zback% * 3;
  71.  
  72. @#xright1 = %#xright% * 1; @#zright1 = %#zright% * 1;
  73. @#xright2 = %#xright% * 2; @#zright2 = %#zright% * 2;
  74. @#xright3 = %#xright% * 3; @#zright3 = %#zright% * 3;
  75.  
  76. @#xleft1 = %#xleft% * 1; @#zleft1 = %#zleft% * 1;
  77. @#xleft2 = %#xleft% * 2; @#zleft2 = %#zleft% * 2;
  78. @#xleft3 = %#xleft% * 3; @#zleft3 = %#zleft% * 3;
  79.  
  80. unset(#terrain_blocks[]);
  81. For(#terrain_checker,1,6);
  82. #xrel_front = %@#xfront% * %#terrain_checker%;
  83. #zrel_front = %@#zfront% * %#terrain_checker%;
  84.  
  85. #xrel_back = %@#xback% * %#terrain_checker%;
  86. #zrel_back = %@#zback% * %#terrain_checker%;
  87.  
  88. #xrel_right = %@#xright% * %#terrain_checker%;
  89. #zrel_right = %@#zright% * %#terrain_checker%;
  90.  
  91. #xrel_left = %@#xleft% * %#terrain_checker%;
  92. #zrel_left = %@#zleft% * %#terrain_checker%;
  93.  
  94. getidrel(%#xrel_front%,0,%#zrel_front%,#current_idfront);
  95. getidrel(%#xrel_back%,0,%#zrel_back%,#current_idback);
  96. getidrel(%#xrel_right%,0,%#zrel_right%,#current_idright);
  97. getidrel(%#xrel_left%,0,%#zrel_left%,#current_idleft);
  98.  
  99. put(#terrain_blocks[],%#current_idfront%);
  100. if(#terrain_checker <= 2);
  101. put(#terrain_blocks[],%#current_idback%);
  102. put(#terrain_blocks[],%#current_idright%);
  103. put(#terrain_blocks[],%#current_idleft%);
  104. endif;
  105. Next;
  106.  
  107. Foreach(#terrain_blocks[],#current_block);
  108. ifmatches(%&danger_blocks%,%#current_block%);
  109. set(@dangerous);
  110. endif;
  111. Next;
  112.  
  113. if(@request_verifs);
  114. unset(@request_coord);
  115. @#xcoord = %XPOS%;
  116. @#ycoord = %YPOS%;
  117. @#zcoord = %ZPOS%;
  118. @#hitid = %HITID%;
  119. endif;
  120.  
  121. //trndsttr
  122. //flute
  123.  
  124. IF(%GUI% == "GUIINVENTORY");
  125. unset(#inv_itens[]);
  126. @#free_sl = 0;
  127. For(#inv_checker,9,44);
  128. getslotitem(%#inv_checker%,#id,#stk,#dat);
  129. put(#inv_itens[],%#id%);
  130. if(#id == 0);
  131. inc(@#free_sl,1);
  132. endif;
  133. Next;
  134. unset(&inv_it);unset(ok);
  135. Foreach(#inv_itens[],#current_item);
  136. if(ok);
  137. &inv_it = "%&inv_itens% %#current_item%";
  138. else;
  139. &inv_it = "%&current_item%";
  140. set(ok);
  141. endif;
  142. next;
  143. if(&inv_it != "%@&inv_itens%");
  144. @&inv_itens = %&inv_it%;
  145. endif;
  146. if(@#free_slots != "%#free_sl%");
  147. @#free_slots = %#free_sl%;
  148. endif;
  149. ENDIF;
  150.  
  151.  
  152.  
  153.  
  154. Until(@adv_f1_end);
  155. Endunsafe;
  156.  
  157. unset(@adv_f1_end);
  158.  
  159.  
  160.  
  161. }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement