Advertisement
tyler569

Untitled

Sep 28th, 2012
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. bind(player_interact,null,array(item: data_values(sponge)),@event,
  2. if(or(equals(@event['action'],'left_click_block'),equals(@event['action'],'left_click_air'))){
  3. call_alias('/type')
  4. }
  5. if(or(equals(@event['action'],'right_click_block'),equals(@event['action'],'right_click_air'))){
  6. call_alias('/spot')
  7. }
  8. cancel()
  9. )
  10.  
  11.  
  12.  
  13.  
  14.  
  15. *:/spot = >>>
  16. assign(@proc,_spot())
  17. msg('That block is:')
  18. msg(@proc[0] @proc[1] @proc[2])
  19. <<<
  20.  
  21. *:/type = >>>
  22. assign(@proc,_spot())
  23. msg('That block is:')
  24. msg(@proc[5] @proc[4])
  25. <<<
  26.  
  27.  
  28.  
  29.  
  30. proc(_spot,
  31. try(
  32. assign(@spot,pcursor(player()))
  33. if(equals(@spot[1],0),
  34. throw(RangeException,'You spoted outside the world')
  35. )
  36. ,#CATCH
  37. die('That block is too far away or is not a valid block')
  38. )
  39. assign(@output,@spot)
  40. array_push(@output,get_block_at(@spot))
  41. array_push(@output,data_name(@output[4]))
  42. return(@output)
  43. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement