Guest User

Untitled

a guest
Apr 25th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.52 KB | None | 0 0
  1. #textdomain wesnoth-NX-RPG
  2.  
  3. # Used in movetos to make sure the item can be picked up once
  4. #define IS_ITEM_TAKEN _ID _WML _WML2
  5. [if]
  6. {SXCON $unit.id|.inventory.picked_{_ID} equals yes}
  7. [or]
  8. {SXCON shared_inventory.inventory.picked_{_ID} equals yes}
  9. [/or]
  10. [then]
  11. [/then]
  12. [else]
  13. {_WML}
  14. [if]
  15. {SXCON continue_with_code equals yes}
  16. [then]
  17. {_WML2}
  18. {VARIABLE continue_with_code no}
  19. [/then]
  20. [/if]
  21. [/else]
  22. [/if]
  23. #enddef
  24.  
  25. #define NX_CHEST_GOLD X Y AMOUNT
  26. [item]
  27. x={X}
  28. y={Y}
  29. image=items/chest-plain-closed.png
  30. [/item]
  31.  
  32. [event]
  33. name=moveto
  34. [filter]
  35. x={X}
  36. y={Y}
  37. side=1
  38. [/filter]
  39.  
  40. [object]
  41. duration=forever
  42. name= _ "Chest with gold"
  43. image=misc/coins_coppers.png
  44. description= _ "You have found a chest containing {AMOUNT} gold."
  45. [effect]
  46. [/effect]
  47. [/object]
  48.  
  49. {MODIFY_SIDE_GOLD 1 {AMOUNT}}
  50.  
  51. [floating_text]
  52. [filter]
  53. side=1,2,3,4,5
  54. role=player
  55. [/filter]
  56. text=_ "<span color='#e1e119'>{AMOUNT}</span>"
  57. [/floating_text]
  58.  
  59. [sound]
  60. name=gold.ogg
  61. [/sound]
  62.  
  63. {PLACE_IMAGE items/chest-plain-open.png {X} {Y}}
  64. [/event]
  65. #enddef
  66.  
  67. # Magical ring that raises it's owner's defense in every terrain by 10%
  68. #define NX_CHEST_DEFRING X Y
  69. {PLACE_IMAGE items/ring-gold.png {X} {Y}}
  70.  
  71. [event]
  72. name=moveto
  73. first_time_only=no
  74. [filter]
  75. x,y={X},{Y}
  76. side=1,2,3,4,5
  77. canrecruit=yes
  78. [/filter]
  79.  
  80. [message]
  81. image=wesnoth-icon.png
  82. speaker=narrator
  83. message= _ "Would you like to take this magical ring?"
  84.  
  85. [option]
  86. message= _ "I'll leave it for another player"
  87. [command]
  88. [/command]
  89. [/option]
  90.  
  91. [option]
  92. message= _ "I think I'll take and use it"
  93. [command]
  94. [if]
  95. {SXCON defense_ring_{X}_{Y} not_equals 1}
  96. [then]
  97. [object]
  98. duration=forever
  99. name= _ "Ring of Defense"
  100. image=misc/bootsagil.png
  101. description= _ "You have found a strange, glowing ring. Wearing it will give its bearer +5% defense on all terrains."
  102. [effect]
  103. apply_to=defense
  104. replace=no
  105. [defense]
  106. deep_water=-5%
  107. shallow_water=-5%
  108. swamp_water=-5%
  109. reef=-5%
  110. flat=-5%
  111. sand=-5%
  112. forest=-5%
  113. hills=-5%
  114. mountains=-5%
  115. village=-5%
  116. castle=-5%
  117. cave=-5%
  118. frozen=-5%
  119. unwalkable=-5%
  120. impassable=-5%
  121. fungus=-5%
  122. [/defense]
  123. [/effect]
  124. [/object]
  125. [/then]
  126. [/if]
  127. [/command]
  128. [/option]
  129.  
  130. [/message]
  131.  
  132. {REMOVE_IMAGE {X} {Y}}
  133.  
  134. [sound]
  135. name=magic-holy-1.ogg
  136. [/sound]
  137.  
  138. [message]
  139. side=$side_number|
  140. message= _ "Ah...I have found a ring of defense. Already I feel more resistant to my foe's attacks."
  141. [/message]
  142. {VARIABLE_OP defring_$side_number add 1}
  143. {VARIABLE defense_ring_{X}_{Y} 1}
  144. [/event]
  145. #enddef
  146.  
  147. # Green cloak that cloak reduces it's owner's movement costs in every category to 1
  148. #define NX_CHEST_CLOAK X Y
  149. {PLACE_IMAGE items/cloak-green.png {X} {Y}}
  150.  
  151. [event]
  152. name=moveto
  153. first_time_only=no
  154. [filter]
  155. x,y={X},{Y}
  156. side=1,2,3,4,5
  157. canrecruit=yes
  158. [/filter]
  159.  
  160. [if]
  161. {SXCON cloak_{X}_{Y} not_equals 1}
  162. [then]
  163. [message]
  164. image=wesnoth-icon.png
  165. speaker=narrator
  166. message= _ "You found a Green Cloak...Would you like to take it?
  167. [option]
  168. message= _ "No thanks, I'll leave it for another player"
  169. [command]
  170. [/command]
  171. [/option]
  172.  
  173. [option]
  174. message= _ "I'll take and use this cloak"
  175. [command]
  176. [object]
  177. duration=forever
  178. name= _ "Green Cloak"
  179. image=items/cloak-green.png
  180. description= _ "You have found a silky green cloak. It seems to hold magic in its folds. It will reduce your Movement Costs in every category to 1."
  181. [effect]
  182. apply_to=movement_costs
  183. replace=yes
  184. [movement_costs]
  185. deep_water=1
  186. shallow_water=1
  187. swamp_water=1
  188. flat=1
  189. sand=1
  190. forest=1
  191. hills=1
  192. mountains=1
  193. village=1
  194. castle=1
  195. cave=1
  196. frozen=1
  197. unwalkable=1
  198. impassable=100
  199. fungus=1
  200. [/movement_costs]
  201. [/effect]
  202. [/object]
  203. [/command]
  204. [/option]
  205. [/message]
  206. [/then]
  207. [/if]
  208.  
  209. {REMOVE_IMAGE {X} {Y}}
  210.  
  211. [sound]
  212. name=magic-holy-1.ogg
  213. [/sound]
  214.  
  215. [message]
  216. side=$side_number|
  217. message= _ "This cloak surely must be magical. Terrain that once impeded my progress now places no obstacle in my way; I can move with such ease I feel sometimes as if I were flying."
  218. [/message]
  219. {VARIABLE cloak_{X}_{Y} 1}
  220. [/event]
  221. #enddef
Add Comment
Please, Sign In to add comment