Advertisement
antonsavov

tell raw test

Oct 5th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.48 KB | None | 0 0
  1.     local linkURL = 'http://www.20000blocks.com/viewer.html?mode=model&ver=1&X=8&Y=0'
  2.     print("link is: "..linkURL)
  3.     if linkURL then
  4.         --message text
  5.         local msg_EN = 'The latest game result has been uploaded to the webviewer. ' --' and can be seen at:'..link.readAll()
  6.         local msg_DE = 'Die neueste Runde wurde in den Webviewer geladen. ' -- und kann hier angeschaut werden: '..link.readAll()
  7.         local linkText_EN = 'See it and share it!'
  8.         local linkText_DE = 'Schau es und teile es!'
  9.         local hoverText_EN = 'Click here to see and share the last game!'
  10.         local hoverText_DE = 'Click here to see and share the last game!'
  11.         --message text with the link
  12.         local linkmsg_EN = '["",'..
  13.         '{"text":"'..msg_EN..'","color":"white","bold":false},'..
  14.         '{"text":"'..linkText_EN..'","color":"blue","underlined":true,"clickEvent":'..
  15.         '{"action":"open_url","value":"'..linkURL..'"},"hoverEvent":'..
  16.         '{"action":"show_text","value":{"text":"","extra":'..
  17.         '[{"text":"'..hoverText_EN..'","color":"gold"}]}},"bold":false}]'
  18.        
  19.         local linkmsg_DE = '["",{"text":"'..msg_EN..'","color":"gold","bold":false},{"text":"'..linkText_DE..'","color":"blue","underlined":true,"clickEvent":{"action":"open_url","value":"'..linkURL..'"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"'..hoverText_DE..'","color":"gold"}]}},"bold":false}]'
  20.         -- announce success in English
  21.         commands.async.tellraw('@a',linkmsg_EN)
  22.         --announce success in German
  23.         commands.async.tellraw('@a',linkmsg_DE)
  24.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement