Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.26 KB | None | 0 0
  1. #include <interval.h>
  2. #include <item.h>
  3. #include <realtime.h>
  4.  
  5. inherit "/std/item";
  6. inherit "/mod/effect/melange";
  7.  
  8. #define Melange_Interval semirandom(300)
  9.  
  10. nosave private descriptor attribute_mod;
  11. nosave private descriptor skill_mod;
  12.  
  13. int melange_recharge() {
  14. object who = query_user();
  15. descriptor elem = who->query_vital_humour_element(Null);
  16. if(elem) {
  17. who->display(([
  18. Message_Content : ({
  19. 0, ({ "feel", 0 }), this_object(), "flooding",
  20. ({ 'r', 0,
  21. Description(([
  22. Description_Type : Description_Type_Element_Name,
  23. Description_Index : elem,
  24. Description_Object : who,
  25. ])),
  26. }),
  27. "with",
  28. Description(([
  29. Description_Type : Description_Type_Subject_Known,
  30. Description_Index : "melange",
  31. Description_Content : "concentrated melange",
  32. ])),
  33. Description(([
  34. Description_Type : Description_Type_Subject_Unknown,
  35. Description_Index : "melange",
  36. Description_Content : "some strange substance",
  37. ])),
  38. }),
  39. Message_Senses : Message_Sense_Tactile,
  40. ]));
  41. who->message(([
  42. Message_Content : ({
  43. this_object(), ({ "quiver", this_object() }), "for a moment",
  44. }),
  45. Message_Senses : Message_Sense_Visual | Message_Sense_Tactile_For_Participants,
  46. ]));
  47. melange_consumed(who, this_object());
  48. return Melange_Interval;
  49. } else {
  50. who->display(([
  51. Message_Content : ({
  52. this_object(), ({ "cannot", this_object() }), "infuse", ({ 's', 0, "humourless body" }), "with melange",
  53. }),
  54. Message_Senses : Message_Sense_Tactile,
  55. ]));
  56. return Interval_Terminate;
  57. }
  58. }
  59.  
  60. void glove_do_equip(mapping args) {
  61. object who = args["who"];
  62. attribute_mod = who->add_attribute_modifier(([
  63. Modifier_Index : ({
  64. Attr_Str,
  65. Attr_Con,
  66. Attr_Dex,
  67. }),
  68. Modifier_Amount : 25,
  69. Modifier_Add_Display : ([
  70. Message_Content : ({
  71. 'a', "feel", 'a', "subtle flow of energy pass",
  72. "into", 'v',
  73. }),
  74. Message_Senses : Message_Sense_Spiritual,
  75. ]),
  76. Modifier_Remove_Display : ([
  77. Message_Content : ({
  78. ({ 't', "flow" }), "of energy ceases to pulse within", 'v',
  79. }),
  80. Message_Senses : Message_Sense_Spiritual,
  81. ]),
  82. ]));
  83. skill_mod = who->add_skill_modifier(([
  84. Modifier_Index : ({
  85. Skill_Centering,
  86. Skill_Channeling,
  87. Skill_Concentration,
  88. Skill_Divination,
  89. Skill_Introspection,
  90. Skill_Quickness,
  91. }),
  92. Modifier_Amount : 40,
  93. Modifier_Add_Display : ([
  94. Message_Content : ({
  95. this_object(), "begins to squirm on", ({'u', 0 }), "hand;",
  96. "elongating, stretching, becoming thin, and quickly covering the entirety of",
  97. ({ 'u', 0 }), "hand",
  98. }),
  99. Message_Senses : Message_Sense_Visual,
  100. ]),
  101. Modifier_Remove_Display : ([
  102. Message_Content : ({
  103. this_object(), "begins to squirm and retract from", ({ 'u', 0 }), "hand as",
  104. ({ 'p', 0 }), "remove it",
  105. }),
  106. Message_Senses : Message_Sense_Visual,
  107. ]),
  108. ]));
  109. Interval_Set(#'melange_recharge, Melange_Interval);
  110. }
  111.  
  112. void glove_do_unequip(mapping args) {
  113. object who = args["who"];
  114. who->remove_skill_modifier(&skill_mod);
  115. who->remove_attribute_modifier(&attribute_mod);
  116. Interval_Remove(#'melange_recharge);
  117. }
  118.  
  119. void configure() {
  120. ::configure();
  121. set_creator("starhound");
  122. set_credits("Frank Herbert");
  123. set_identity(([
  124. Identity_Nouns : ({ "glove", "left glove" }),
  125. Identity_Name : ({ "Fedaykin" }),
  126. Identity_Flags : Identity_Flag_Proper,
  127. Identity_Special_Names : ({ "MELANGE_GLOVE" }),
  128. ]));
  129. set_identify_skills(([
  130. Skill_Armour_Lore : 40,
  131. Skill_Legend_Lore : 50,
  132. Skill_Arcane_Lore : 30,
  133. ]));
  134. armour()->set_armour_type(Armour_Type_Left_Glove);
  135. armour()->set_race("tuatha");
  136. set_craft(Craft_Exquisite);
  137. set_melange_content(100);
  138. add_description(({
  139. "This is", 'a', Description(Description_Type_Craftsmanship_Adjective),
  140. Description(Description_Type_Armour_Type_Name),
  141. "created from",
  142. Description(([
  143. Description_Type : Description_Type_Element_Name,
  144. Description_Flags : Description_Flag_Noun,
  145. Description_Index : ([
  146. Element_Part : Part_Bulk,
  147. ]),
  148. ])),
  149. }));
  150. add_description(({
  151. 'a',
  152. Description(([
  153. Description_Type : Description_Type_Element_Name,
  154. Description_Flags : Description_Flag_Noun,
  155. Description_Index : ([
  156. Element_Part : Part_Lining,
  157. ]),
  158. ])),
  159. "lining is located inside the",
  160. Description(Description_Type_Armour_Type_Name),
  161. "to provide", 'a', "extra degree of comfort for when it's worn",
  162. }));
  163. add_description(({
  164. "It has", 'a',
  165. Description(([
  166. Description_Type : Description_Type_Element_Name,
  167. Description_Flags : Description_Flag_Noun,
  168. Description_Index : ([
  169. Element_Part : Part_Weave,
  170. ]),
  171. ])),
  172. "woven into it for seams to hold the",
  173. Description(([
  174. Description_Type : Description_Type_Element_Name,
  175. Description_Flags : Description_Flag_Noun,
  176. Description_Index : ([
  177. Element_Part : Part_Lining,
  178. ]),
  179. ])),
  180. "in place",
  181. }));
  182. add_description(({
  183. "There is",
  184. Description(([
  185. Description_Type : Description_Type_Element_Name,
  186. Description_Flags : Description_Flag_Noun,
  187. Description_Index : ([
  188. Element_Part : Part_Inset,
  189. ]),
  190. ])),
  191. "embedded into", ({ 't', "outside" }), "of the",
  192. Description(([
  193. Description_Type : Description_Type_Element_Name,
  194. Description_Flags : Description_Flag_Noun,
  195. Description_Index : ([
  196. Element_Part : Part_Bulk,
  197. ]),
  198. ])),
  199. }));
  200. add_known_description(({
  201. 'v', ({ "recognize", 'v' }), ({ 'v', 0 }), "as", Description(Description_Type_Object_Name),
  202. }));
  203. add_known_description(({
  204. 'v', "know this to be crafted using", ({ 't', "intestines" }), "of",
  205. 'a', "sand trout to provide the most purest spice",
  206. }));
  207. add_known_description(({
  208. "Inside the",
  209. Description(([
  210. Description_Type : Description_Type_Element_Name,
  211. Description_Flags : Description_Flag_Noun,
  212. Description_Index : ([
  213. Element_Part : Part_Lining,
  214. ]),
  215. ])),
  216. "there is", 'a', "highly concentrated",
  217. Description(([
  218. Description_Type : Description_Type_Element_Name,
  219. Description_Flags : Description_Flag_Noun,
  220. Description_Index : ([
  221. Element_Part : Part_Underlayer,
  222. ]),
  223. ])),
  224. "which is released into", ({ 't', "bloodstream" }), "of", ({ 't', "wearer" }),
  225. }));
  226. add_proportion(([
  227. Element_Type : Material_Leather,
  228. Element_Proportion : 1.0,
  229. Element_Color : "gleaming amber",
  230. Element_Part : Part_Bulk,
  231. ]));
  232. add_proportion(([
  233. Element_Type : Material_Melange,
  234. Element_Proportion : 0.5,
  235. Element_Part : Part_Underlayer,
  236. Element_Form : Form_Mesh,
  237. Element_Color : "bright orange",
  238. Element_Flags : Element_Flag_Suppress_Color_Name,
  239. ]));
  240. add_proportion(([
  241. Element_Type : Material_Dweomer,
  242. Element_Proportion : 0.3,
  243. Element_Part : Part_Aura,
  244. ]));
  245. add_proportion(([
  246. Element_Type : Material_Silk,
  247. Element_Proportion : 0.1,
  248. Element_Color : "rose",
  249. Element_Part : Part_Lining,
  250. ]));
  251. add_proportion(([
  252. Element_Type : Material_Silver,
  253. Element_Proportion : 0.1,
  254. Element_Color : "white",
  255. Element_Part : Part_Weave,
  256. Element_Form : Form_Thread,
  257. Element_Flags : Element_Flag_Suppress_Color_Name,
  258. ]));
  259. add_proportion(([
  260. Element_Type : Material_Steel,
  261. Element_Proportion : 0.1,
  262. Element_Color : "bright gray",
  263. Element_Part : Part_Inset,
  264. Element_Form : Form_Studding,
  265. Element_Flags : Element_Flag_Suppress_Part_Description |
  266. Element_Flag_Suppress_Description |
  267. Element_Flag_Suppress_Color_Name |
  268. Element_Flag_Suppress_Material_Name,
  269. ]));
  270. set_global_rarity(Rarity_Very_Exotic);
  271. set_unique(True);
  272. set_keep_cost(Keep_Cost_Unique_High);
  273. add_hook(Do_Equip_Item, #'glove_do_equip);
  274. add_hook(Do_Unequip_Item, #'glove_do_unequip);
  275. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement