Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $${
- Unsafe(0);
- #life_checker = 10;
- #hunger_checker = 8;
- #oxygen_checker = 100;
- #helmdurab = 50;
- #chestdurab = 80;
- #leggdurab = 70;
- #bootsdurab = 60;
- &danger_blocks = "^8$|^9$|^10$|^11$|^17$|^79$|^81$|^82$|^86$|^111$";
- unset(@dangerous);
- Do();
- IF(%HEALTH% < %#life_checker%); set(@low_life); ELSE;unset(@low_life);ENDIF;
- IF(%HUNGER% < %#hunger_checker%); set(@hunger); ELSE;unset(@hunger);ENDIF;
- IF(%OXYGEN% < %#oxygen_checker%); set(@low_oxygen); ELSE;unset(@low_oxygen);ENDIF;
- IF(%HELMDURABILITY% < %#helmdurab%); set(@low_helmet); ELSE;unset(@low_helmet);ENDIF;
- IF(%CHESTPLATEDURABILITY% < %#chestdurab%); set(@low_chest); ELSE;unset(@low_chest);ENDIF;
- IF(%LEGGINGSDURABILITY% < %#leggdurab%); set(@low_legging); ELSE;unset(@low_legging);ENDIF;
- IF(%BOOTSDURABILITY% < %#bootsdurab%); set(@low_boots); ELSE;unset(@low_boots);ENDIF;
- IF(%DIRECTION% == "N");
- @&front = "north";
- @&back = "south";
- @&left = "east";
- @&right = "west";
- #zfront = -1; #xfront = 0;
- #zback = +1; #xback = 0;
- #zright = 0; #xright = -1;
- #zleft = 0; #xleft = +1;
- ELSEIF(%DIRECTION% == "S");
- @&front = "south";
- @&back = "north";
- @&left = "west";
- @&right = "east";
- #zfront = +1; #xfront = 0;
- #zback = -1; #xback = 0;
- #zright = 0; #xright = +1;
- #zleft = 0; #xleft = -1;
- ELSEIF(%DIRECTION% == "E");
- @&front = "east";
- @&back = "west";
- @&left = "south";
- @&right = "north";
- #xfront = +1; #zfront = 0;
- #xback = -1; #zback = 0;
- #xright = 0; #zright = +1;
- #xleft = 0; #zleft = -1;
- ELSEIF(%DIRECTION% == "W");
- @&front = "west";
- @&back = "east";
- @&left = "north";
- @&right = "south";
- #xfront = -1; #zfront = 0;
- #xback = +1; #zback = 0;
- #xright = 0; #zright = -1;
- #xleft = 0; #zleft = +1;
- ENDIF;
- @xfront1 = %#xfront% * 1; @zfront1 = %#zfront% * 1;
- @xfront2 = %#xfront% * 2; @zfront2 = %#zfront% * 2;
- @xfront3 = %#xfront% * 3; @zfront3 = %#zfront% * 3;
- @xfront4 = %#xfront% * 4; @zfront4 = %#zfront% * 4;
- @xfront5 = %#xfront% * 5; @zfront5 = %#zfront% * 5;
- @xfront6 = %#xfront% * 6; @zfront6 = %#zfront% * 6;
- @#xback1 = %#xback% * 1; @#zback1 = %#zback% * 1;
- @#xback2 = %#xback% * 2; @#zback2 = %#zback% * 2;
- @#xback3 = %#xback% * 3; @#zback3 = %#zback% * 3;
- @#xright1 = %#xright% * 1; @#zright1 = %#zright% * 1;
- @#xright2 = %#xright% * 2; @#zright2 = %#zright% * 2;
- @#xright3 = %#xright% * 3; @#zright3 = %#zright% * 3;
- @#xleft1 = %#xleft% * 1; @#zleft1 = %#zleft% * 1;
- @#xleft2 = %#xleft% * 2; @#zleft2 = %#zleft% * 2;
- @#xleft3 = %#xleft% * 3; @#zleft3 = %#zleft% * 3;
- unset(#terrain_blocks[]);
- For(#terrain_checker,1,6);
- #xrel_front = %@#xfront% * %#terrain_checker%;
- #zrel_front = %@#zfront% * %#terrain_checker%;
- #xrel_back = %@#xback% * %#terrain_checker%;
- #zrel_back = %@#zback% * %#terrain_checker%;
- #xrel_right = %@#xright% * %#terrain_checker%;
- #zrel_right = %@#zright% * %#terrain_checker%;
- #xrel_left = %@#xleft% * %#terrain_checker%;
- #zrel_left = %@#zleft% * %#terrain_checker%;
- getidrel(%#xrel_front%,0,%#zrel_front%,#current_idfront);
- getidrel(%#xrel_back%,0,%#zrel_back%,#current_idback);
- getidrel(%#xrel_right%,0,%#zrel_right%,#current_idright);
- getidrel(%#xrel_left%,0,%#zrel_left%,#current_idleft);
- put(#terrain_blocks[],%#current_idfront%);
- if(#terrain_checker <= 2);
- put(#terrain_blocks[],%#current_idback%);
- put(#terrain_blocks[],%#current_idright%);
- put(#terrain_blocks[],%#current_idleft%);
- endif;
- Next;
- Foreach(#terrain_blocks[],#current_block);
- ifmatches(%&danger_blocks%,%#current_block%);
- set(@dangerous);
- endif;
- Next;
- if(@request_verifs);
- unset(@request_coord);
- @#xcoord = %XPOS%;
- @#ycoord = %YPOS%;
- @#zcoord = %ZPOS%;
- @#hitid = %HITID%;
- endif;
- //trndsttr
- //flute
- IF(%GUI% == "GUIINVENTORY");
- unset(#inv_itens[]);
- @#free_sl = 0;
- For(#inv_checker,9,44);
- getslotitem(%#inv_checker%,#id,#stk,#dat);
- put(#inv_itens[],%#id%);
- if(#id == 0);
- inc(@#free_sl,1);
- endif;
- Next;
- unset(&inv_it);unset(ok);
- Foreach(#inv_itens[],#current_item);
- if(ok);
- &inv_it = "%&inv_itens% %#current_item%";
- else;
- &inv_it = "%¤t_item%";
- set(ok);
- endif;
- next;
- if(&inv_it != "%@&inv_itens%");
- @&inv_itens = %&inv_it%;
- endif;
- if(@#free_slots != "%#free_sl%");
- @#free_slots = %#free_sl%;
- endif;
- ENDIF;
- Until(@adv_f1_end);
- Endunsafe;
- unset(@adv_f1_end);
- }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement