Advertisement
L0v0lup

Untitled

Sep 2nd, 2021 (edited)
753
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.61 KB | None | 0 0
  1. function arenareset():
  2.     loop {arena1::loc::*}:
  3.         set {_loc} to first element out of {arena1::loc::*}             #Holt die Location des Blocks aus der Liste
  4.         remove {_loc} from {arena1::loc::*}
  5.         set {_block} to first element out of {arena1::loc::block::*}    #Holt den Block aus der Liste
  6.         remove {_block} from {arena1::loc::block::*}
  7.         set {_block} to {_block} parsed as item                         #Wichtig!
  8.         set block at {_loc} to {_block}
  9.     clear {arena1::*}
  10.  
  11. on block break:
  12.     "%region at event-block%" contains "arena1 in world Farm"
  13.     add event-location to {arena1::loc::*}          #speichert die location des blocks
  14.     add "%event-block%" to {arena1::loc::block::*}  #speichert den typ des blocks
  15.  
  16. command /reset:
  17.     trigger:
  18.         arenareset()
  19.  
  20. command /res:
  21.     trigger:
  22.         clear {arena1::*}                           #Resettet die gespeicherten Blöcke fürn Reset
  23.        
  24.        
  25. #------------------ NEU FÜR DIE 1.14+!!
  26. #------------------ NUR EIN STÜCK CODE NUTZEN! Entweder den oberen - oder den unteren Teil !!
  27.  
  28. function arenareset():
  29.     loop {arena1::*}:
  30.         set {_loc} to first element out of {arena1::*}      #Holt die Location des Blocks aus der Liste
  31.         remove {_loc} from {arena1::*}
  32.         set {_block} to first element out of {arena1::%{_loc}%::*}  #Holt den Block aus der Liste
  33.         remove {_block} from {arena1::%{_loc}%::*}
  34.         set block at {_loc} to {_block}
  35.     clear {arena1::*}
  36.  
  37. on block break:
  38.     add event-location to {arena1::*}
  39.     add type of event-block to {arena1::%event-location%::*}    #speichert den typ des blocks
  40.  
  41. command /reset:
  42.     trigger:
  43.         arenareset()
  44.  
  45. command /res:
  46.     trigger:
  47.         clear {arena1::*}                           #Resettet die gespeicherten Blöcke fürn Reset
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement