scrolls.lua 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. local scroll_teleport = --Scorpion boss, Dungeon Master,
  2. 'size[6,6]'..
  3. 'no_prepend[]'..
  4. 'bgcolor[#080808BB;true]'..
  5. 'background[0,0;6,6;stations_scroll_bg.png]'..
  6. 'hypertext[0,.2;6.5,1;;<center><style color=black size=32>~~ Teleport Powder ~~</style></center>]'..
  7. 'hypertext[0.75,.75;5,1;;<left><style color=black size=20>Required to run the /tpr and /tphr commands.</style></left>]'..
  8. 'item_image_button[1,1.5;1,1;default:mese_crystal_fragment;1;]'..
  9. 'item_image_button[1,2.5;1,1;flowers:mushroom_red;2;]'..
  10. 'item_image_button[1,3.5;1,1;zombies:tooth;3;]'..
  11. 'item_image_button[1,4.5;1,1;epic:float_crystal_shard 4;4;]'..
  12. 'item_image_button[2,1.5;1,1;stations:coal_dust;5;]'..
  13. 'item_image_button[2,2.5;1,1;default:blueberries;6;]'..
  14. 'item_image_button[4,1.5;1,1;stations:mortar;mortar;]'..
  15. 'item_image_button[4,4;1,1;epic:teleport_powder;output;]'
  16. --Required to use the Teleport commands
  17. local scroll_healing = --Pyramid treasure, Dungeon Master
  18. 'size[6,6]'..
  19. 'no_prepend[]'..
  20. 'bgcolor[#080808BB;true]'..
  21. 'background[0,0;6,6;stations_scroll_bg.png]'..
  22. 'hypertext[0,.2;6.5,1;;<center><style color=black size=32>~~ Healing Powder ~~</style></center>]'..
  23. 'hypertext[0.75,.75;5,1;;<left><style color=black size=20>Use this for a quick health boost. Bystanders will also get a small boost.</style></left>]'..
  24. 'item_image_button[1,1.5;1,1;epic:bloodstone_powder 2;1;]'..
  25. 'item_image_button[1,2.5;1,1;flowers:mushroom_brown;2;]'..
  26. 'item_image_button[1,3.5;1,1;farming:coffee_beans 2;3;]'..
  27. 'item_image_button[4,1.5;1,1;stations:mortar;mortar;]'..
  28. 'item_image_button[4,4;1,1;epic:healing_powder;output;]'
  29. --Using will instantly provide the user with 20 HP, and bystanders get a boost as well.
  30. local scroll_bloodstone_powder = --Pyramid treasure
  31. 'size[6,6]'..
  32. 'no_prepend[]'..
  33. 'bgcolor[#080808BB;true]'..
  34. 'background[0,0;6,6;stations_scroll_bg.png]'..
  35. 'hypertext[0,.2;6.5,1;;<center><style color=black size=32>~~ Bloodstone Powder ~~</style></center>]'..
  36. 'hypertext[0.75,.75;5,1;;<left><style color=black size=20>Used in recipes.</style></left>]'..
  37. 'item_image_button[1,1.5;1,1;epic:bloodstone_shard;1;]'..
  38. 'item_image_button[4,1.5;1,1;stations:mortar;mortar;]'..
  39. 'item_image_button[4,4;1,1;epic:bloodstone_powder 3;output;]'
  40. local scroll_anti_fire = --Goblins,
  41. 'size[6,6]'..
  42. 'no_prepend[]'..
  43. 'bgcolor[#080808BB;true]'..
  44. 'background[0,0;6,6;stations_scroll_bg.png]'..
  45. 'hypertext[0,.2;6.5,1;;<center><style color=black size=32>~~ Anti Fire Powder ~~</style></center>]'..
  46. 'hypertext[0.75,.75;5,1;;<left><style color=black size=20>Place to form fire lanes. When it burns it will extinguish surrounding flames.</style></left>]'..
  47. 'item_image_button[1,1.5;1,1;earthbuild:quicklime 4;1;]'..
  48. 'item_image_button[1,2.5;1,1;epic:ash;2;]'..
  49. 'item_image_button[1,3.5;1,1;epic:salt;3;]'..
  50. 'item_image_button[4,1.5;1,1;stations:mortar;mortar;]'..
  51. 'item_image_button[4,4;1,1;epic:fire_extinguishing_powder;output;]'
  52. --Place on the ground to form fire lanes. When it burns it extinguishes surrounding flames.
  53. local scroll_wood_ash = --Goblins,
  54. 'size[6,6]'..
  55. 'no_prepend[]'..
  56. 'bgcolor[#080808BB;true]'..
  57. 'background[0,0;6,6;stations_scroll_bg.png]'..
  58. 'hypertext[0,.2;6.5,1;;<center><style color=black size=32>~~ Wood Ash ~~</style></center>]'..
  59. 'hypertext[0.75,.75;5,1;;<left><style color=black size=20>Used in other recipes.</style></left>]'..
  60. 'item_image_button[1,1.5;1,1;epic:wood_ash;1;]'..
  61. 'item_image_button[4,1.5;1,1;stations:mortar;mortar;]'..
  62. 'item_image_button[4,4;1,1;epic:ash;output;]'
  63. local scroll_chitin = --Pyramid treasure
  64. 'size[6,6]'..
  65. 'no_prepend[]'..
  66. 'bgcolor[#080808BB;true]'..
  67. 'background[0,0;6,6;stations_scroll_bg.png]'..
  68. 'hypertext[0,.2;6.5,1;;<center><style color=black size=32>~~ Chitin ~~</style></center>]'..
  69. 'hypertext[0.75,.75;5,1;;<left><style color=black size=20>Used as a binder in various crystal recipes.</style></left>]'..
  70. 'item_image_button[1,1.5;1,1;scorpion:shell;1;]'..
  71. 'item_image_button[4,1.5;1,1;stations:mortar;mortar;]'..
  72. 'item_image_button[4,4;1,1;stations:chitin 4;output;]'
  73. local scroll_sulfur_dust = --Goblins,
  74. 'size[6,6]'..
  75. 'no_prepend[]'..
  76. 'bgcolor[#080808BB;true]'..
  77. 'background[0,0;6,6;stations_scroll_bg.png]'..
  78. 'hypertext[0,.2;6.5,1;;<center><style color=black size=32>~~ Sulfur Dust ~~</style></center>]'..
  79. 'hypertext[0.75,.75;5,1;;<left><style color=black size=20>Used in other recipes.</style></left>]'..
  80. 'item_image_button[1,1.5;1,1;epic:sulfur_lump;1;]'..
  81. 'item_image_button[4,1.5;1,1;stations:mortar;mortar;]'..
  82. 'item_image_button[4,4;1,1;epic:sulfur_dust 4;output;]'
  83. local scroll_gunpowder = --Zombies, Pyramid treasure, Goblins,
  84. 'size[6,6]'..
  85. 'no_prepend[]'..
  86. 'bgcolor[#080808BB;true]'..
  87. 'background[0,0;6,6;stations_scroll_bg.png]'..
  88. 'hypertext[0,.2;6.5,1;;<center><style color=black size=32>~~ Gunpowder ~~</style></center>]'..
  89. 'hypertext[0.75,.75;5,1;;<left><style color=black size=20>Used to make explosives.</style></left>]'..
  90. 'item_image_button[1,1.5;1,1;epic:potassium_nitrate 4;1;]'..
  91. 'item_image_button[1,2.5;1,1;stations:coal_dust;2;]'..
  92. 'item_image_button[1,3.5;1,1;epic:sulfur_dust;3;]'..
  93. 'item_image_button[4,1.5;1,1;stations:mortar;mortar;]'..
  94. 'item_image_button[4,4;1,1;tnt:gunpowder 6;output;]'
  95. local scroll_poison = --Pyramid treasure,
  96. 'size[6,6]'..
  97. 'no_prepend[]'..
  98. 'bgcolor[#080808BB;true]'..
  99. 'background[0,0;6,6;stations_scroll_bg.png]'..
  100. 'hypertext[0,.2;6.5,1;;<center><style color=black size=32>~~ Poison ~~</style></center>]'..
  101. 'hypertext[0.75,.75;5,1;;<left><style color=black size=20>When animals eat this they die.</style></left>]'..
  102. 'item_image_button[1,1.5;1,1;flowers:mushroom_red;1;]'..
  103. 'item_image_button[1,2.5;1,1;flowers:tulip_black;2;]'..
  104. 'item_image_button[1,3.5;1,1;default:leaves;3;]'..
  105. 'item_image_button[4,1.5;1,1;stations:mortar;mortar;]'..
  106. 'item_image_button[4,4;1,1;epic:poison;output;]'
  107. local scroll_coffee_grounds = --gnomes,
  108. 'size[6,6]'..
  109. 'no_prepend[]'..
  110. 'bgcolor[#080808BB;true]'..
  111. 'background[0,0;6,6;stations_scroll_bg.png]'..
  112. 'hypertext[0,.2;6.5,1;;<center><style color=black size=32>~~ Coffee Grounds ~~</style></center>]'..
  113. 'hypertext[0.75,.75;5,1;;<left><style color=black size=20>Used to create wood stain.</style></left>]'..
  114. 'item_image_button[1,1.5;1,1;farming:coffee_beans;1;]'..
  115. 'item_image_button[4,1.5;1,1;stations:mortar;mortar;]'..
  116. 'item_image_button[4,4;1,1;stations:coffee_grounds 4;output;]'
  117. local all_scrolls = {
  118. {'teleport', 'Teleport powder', scroll_teleport},
  119. {'healing', 'Healing powder', scroll_healing},
  120. {'bloodstone_powder', 'Bloodstone powder', scroll_bloodstone_powder},
  121. {'anti_fire', 'Anti fire powder', scroll_anti_fire},
  122. {'wood_ash', 'Wood Ash', scroll_wood_ash},
  123. {'chitin', 'Chitin', scroll_chitin},
  124. {'sulfur_dust', 'Sulfur Dust', scroll_sulfur_dust},
  125. {'gunpowder', 'Gunpowder', scroll_gunpowder},
  126. {'poison', 'Poison', scroll_poison},
  127. {'coffee_grounds', 'Coffee Grounds', scroll_coffee_grounds},
  128. }
  129. for i in ipairs (all_scrolls) do
  130. local string = all_scrolls[i][1]
  131. local name = all_scrolls[i][2]
  132. local form = all_scrolls[i][3]
  133. minetest.register_craftitem('stations:scroll_'..string, {
  134. description = name..' recipe',
  135. inventory_image = 'stations_scroll.png',
  136. groups = {not_in_creative_inventory=1},
  137. on_use = function(itemstack, user, pointed_thing)
  138. local player_name = user:get_player_name()
  139. minetest.show_formspec(player_name, 'stations:scroll_'..string, form)
  140. end
  141. })
  142. minetest.register_craft({
  143. type = 'fuel',
  144. recipe = 'stations:scroll_'..string,
  145. burntime = 1,
  146. })
  147. end