Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1.  
  2. function self_command(command)
  3. if command == "page3book1"
  4. set_macro_page(3, 1)
  5. end
  6. end
  7. function set_macro_page(set,book)
  8. if not tonumber(set) then
  9. add_to_chat(123,'Error setting macro page: Set is not a valid number ('..tostring(set)..').')
  10. return
  11. end
  12. if set < 1 or set > 10 then
  13. add_to_chat(123,'Error setting macro page: Macro set ('..tostring(set)..') must be between 1 and 10.')
  14. return
  15. end
  16.  
  17. if book then
  18. if not tonumber(book) then
  19. add_to_chat(123,'Error setting macro page: book is not a valid number ('..tostring(book)..').')
  20. return
  21. end
  22. if book < 1 or book > 20 then
  23. add_to_chat(123,'Error setting macro page: Macro book ('..tostring(book)..') must be between 1 and 20.')
  24. return
  25. end
  26. send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(set))
  27. else
  28. send_command('@input /macro set '..tostring(set))
  29. end
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement