Advertisement
Dekita

Untitled

Oct 8th, 2012
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.42 KB | None | 0 0
  1. #==============================================================================
  2. module YEA ; module EQUIP
  3. #==============================================================================
  4.  
  5. # This simple snippet was brought to you by "Dekita"
  6.  
  7. # PLACE THIS "script" BELOW YANFLYS EQUIPMENT SCREEN, (in its own script page)
  8.  
  9. # Simply '#' the beggining of lines you do not want to show
  10. # you can rearrange these any way you want.
  11.  
  12. ATLANDDFLINFO =[
  13. [:atklvl, "Atk Lv:"], # Requires Dekita's Attack and Defence Level's.
  14. [:deflvl, "Def Lv:"], # Requires Dekita's Attack and Defence Level's.
  15.  
  16. # [:vit, "Vit :"], # Requires Dekita's Stat Point Distribution System.
  17. # [:str, "Str :"], # Requires Dekita's Stat Point Distribution System.
  18. # [:dex, "Dex :"], # Requires Dekita's Stat Point Distribution System.
  19. # [:mag, "Mag :"], # Requires Dekita's Stat Point Distribution System.
  20.  
  21. # Standard Params
  22. # [:mhp, "Max HP"],
  23. # [:mmp, "Max MP"],
  24. [:atk, "Attack"],
  25. [:def, "Defence"],
  26. [:mat, "M Attack"],
  27. [:mdf, "M Defence"],
  28. [:agi, "Speed"],
  29. [:luk, "Luck"],
  30. # [:hit, "Hit Rate"],
  31. # [:eva, "Evasion"],
  32. # [:cri, "Critical Hit"],
  33. # [:cev, "Critical Evade"],
  34. # [:mev, "Magic Evasion"],
  35. # [:mrf, "Magic Reflect"],
  36. # [:cnt, "Counter Rate"],
  37. # [:tgr, "Target Rate"],
  38. # [:hrg, "HP Regen"],
  39. # [:mrg, "MP Regen"],
  40. # [:trg, "TP Regen"],
  41. # [:rec, "Recovery"],
  42. # [:grd, "Guard Rate"],
  43. # [:pha, "Item Boost"],
  44. # [:exr, "EXP Rate"],
  45. # [:tcr, "TP Charge"],
  46. # [:hcr, "HP Cost Rate"], # Requires YEA - Skill Cost Manager
  47. # [:mcr, "MP Cost Rate"],
  48. # [:tcr_y, "TP Cost Rate"], # Requires YEA - Skill Cost Manager
  49. # [:cdr, "Cooldown Rate"], # Requires YEA - Skill Restrictions
  50. # [:wur, "Warmup Rate"], # Requires YEA - Skill Restrictions
  51. # [:pdr, "Physical Damage"],
  52. # [:mdr, "Magical Damage"],
  53. # [:fdr, "Floor Damage"],
  54. # [:atkrt, "Attack Speed"],
  55. # [:atktimes,"Attack Times"],
  56.  
  57. ] # Do not remove this.
  58.  
  59. end ; end # EQUIP ; YEA #####################
  60. # CUSTOMISATION END #
  61. #####################
  62.  
  63. #==============================================================================
  64. class Window_EquipStatus < Window_Base
  65. #==============================================================================
  66.  
  67. def refresh
  68. contents.clear
  69. draw_atlanddfl_info if !@actor.nil?
  70. draw_atlanddfl_future_info if !@temp_actor.nil?
  71. end
  72.  
  73. def draw_atlanddfl_info
  74. dx = 0
  75. dw = (window_width - 24)
  76. dy = line_height * 0#DPB::PSS::INFO3LH
  77. for info in YEA::EQUIP::ATLANDDFLINFO
  78. dy = draw_atlanddfl(info, dx, dy, dw)
  79. end
  80. end
  81.  
  82. def draw_atlanddfl_future_info
  83. dx = 0
  84. dw = (window_width - 24)
  85. dy = line_height * 0#DPB::PSS::INFO3LH
  86. for info in YEA::EQUIP::ATLANDDFLINFO
  87. dy = draw_atlanddfl_future(info, dx, dy, dw)
  88. end
  89. end
  90.  
  91. def draw_atlanddfl(info, dx, dy, dw)
  92. # dpb = @actor
  93. fmt = "%1.2f%%"
  94. dpb = "%1.0f"
  95. case info[0]
  96. when :vit
  97. value = sprintf(dpb, @actor.vit)
  98. when :str
  99. value = sprintf(dpb, @actor.str)
  100. when :dex
  101. value = sprintf(dpb, @actor.dex)
  102. when :mag
  103. value = sprintf(dpb, @actor.mag)
  104. when :atklvl
  105. return dy unless $imported["DPB-ATLANDDFL"]
  106. value = @actor.atl.to_i
  107. when :deflvl
  108. return dy unless $imported["DPB-ATLANDDFL"]
  109. value = @actor.dfl.to_i
  110. when :mhp
  111. value = sprintf(dpb, @actor.mhp)
  112. when :mmp
  113. value = sprintf(dpb, @actor.mmp)
  114. when :atk
  115. value = sprintf(dpb, @actor.atk)
  116. when :def
  117. value = sprintf(dpb, @actor.def)
  118. when :mat
  119. value = sprintf(dpb, @actor.mat)
  120. when :mdf
  121. value = sprintf(dpb, @actor.mdf)
  122. when :agi
  123. value = sprintf(dpb, @actor.agi)
  124. when :luk
  125. value = sprintf(dpb, @actor.luk)
  126. when :atkrt
  127. value = sprintf(dpb, @actor.atk_speed)
  128. when :atktimes
  129. value = sprintf(dpb, @actor.atk_times_add)
  130. when :actiontimes
  131. value = @actor.action_plus_set
  132. when :hit
  133. value = sprintf(fmt, @actor.hit * 100)
  134. when :eva
  135. value = sprintf(fmt, @actor.eva * 100)
  136. when :cri
  137. value = sprintf(fmt, @actor.cri * 100)
  138. when :cev
  139. value = sprintf(fmt, @actor.cev * 100)
  140. when :mev
  141. value = sprintf(fmt, @actor.mev * 100)
  142. when :mrf
  143. value = sprintf(fmt, @actor.mrf * 100)
  144. when :cnt
  145. value = sprintf(fmt, @actor.cnt * 100)
  146. when :hrg
  147. value = sprintf(fmt, @actor.hrg * 100)
  148. when :mrg
  149. value = sprintf(fmt, @actor.mrg * 100)
  150. when :trg
  151. value = sprintf(fmt, @actor.trg * 100)
  152. when :tgr
  153. value = sprintf(fmt, @actor.tgr * 100)
  154. when :grd
  155. value = sprintf(fmt, @actor.grd * 100)
  156. when :rec
  157. value = sprintf(fmt, @actor.rec * 100)
  158. when :pha
  159. value = sprintf(fmt, @actor.pha * 100)
  160. when :mcr
  161. value = sprintf(fmt, @actor.mcr * 100)
  162. when :tcr
  163. value = sprintf(fmt, @actor.tcr * 100)
  164. when :pdr
  165. value = sprintf(fmt, @actor.pdr * 100)
  166. when :mdr
  167. value = sprintf(fmt, @actor.mdr * 100)
  168. when :fdr
  169. value = sprintf(fmt, @actor.fdr * 100)
  170. when :exr
  171. value = sprintf(fmt, @actor.exr * 100)
  172. when :hcr
  173. return dy unless $imported["YEA-SkillCostManager"]
  174. value = sprintf(fmt, @actor.hcr * 100)
  175. when :tcr_y
  176. return dy unless $imported["YEA-SkillCostManager"]
  177. value = sprintf(fmt, @actor.tcr_y * 100)
  178. when :gcr
  179. return dy unless $imported["YEA-SkillCostManager"]
  180. value = sprintf(fmt, @actor.gcr * 100)
  181. when :cdr
  182. return dy unless $imported["YEA-SkillRestrictions"]
  183. value = sprintf(fmt, @actor.cdr * 100)
  184. when :wur
  185. return dy unless $imported["YEA-SkillRestrictions"]
  186. value = sprintf(fmt, @actor.wur * 100)
  187.  
  188. else ; return dy
  189. end
  190. colour = Color.new(0, 0, 0, translucent_alpha/2)
  191. rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  192. contents.fill_rect(rect, colour)
  193. change_color(system_color)
  194. draw_text(dx+4, dy, dw-8, line_height, info[1], 0)
  195. change_color(normal_color)
  196. draw_text(dx+4, dy, dw-8, line_height, value, 1)
  197. drx = (contents.width + 22) / 2
  198. draw_right_arrow(drx, dy)
  199. return dy + line_height
  200. end
  201.  
  202. def draw_atlanddfl_future(info, dx, dy, dw)
  203. # dpb = @temp_actor
  204. fmt = "%1.2f%%"
  205. dpb = "%1.0f"
  206. case info[0]
  207. when :vit
  208. value = sprintf(dpb, @temp_actor.vit)
  209. when :str
  210. value = sprintf(dpb, @temp_actor.str)
  211. when :dex
  212. value = sprintf(dpb, @temp_actor.dex)
  213. when :mag
  214. value = sprintf(dpb, @temp_actor.mag)
  215. when :atklvl
  216. return dy unless $imported["DPB-ATLANDDFL"]
  217. value = @temp_actor.atl.to_i
  218. when :deflvl
  219. return dy unless $imported["DPB-ATLANDDFL"]
  220. value = @temp_actor.dfl.to_i
  221. when :mhp
  222. value = sprintf(dpb, @temp_actor.mhp)
  223. when :mmp
  224. value = sprintf(dpb, @temp_actor.mmp)
  225. when :atk
  226. value = sprintf(dpb, @temp_actor.atk)
  227. when :def
  228. value = sprintf(dpb, @temp_actor.def)
  229. when :mat
  230. value = sprintf(dpb, @temp_actor.mat)
  231. when :mdf
  232. value = sprintf(dpb, @temp_actor.mdf)
  233. when :agi
  234. value = sprintf(dpb, @temp_actor.agi)
  235. when :luk
  236. value = sprintf(dpb, @temp_actor.luk)
  237. when :atkrt
  238. value = sprintf(dpb, @temp_actor.atk_speed)
  239. when :atktimes
  240. value = sprintf(dpb, @temp_actor.atk_times_add)
  241. when :actiontimes
  242. value = @temp_actor.action_plus_set
  243. when :hit
  244. value = sprintf(fmt, @temp_actor.hit * 100)
  245. when :eva
  246. value = sprintf(fmt, @temp_actor.eva * 100)
  247. when :cri
  248. value = sprintf(fmt, @temp_actor.cri * 100)
  249. when :cev
  250. value = sprintf(fmt, @temp_actor.cev * 100)
  251. when :mev
  252. value = sprintf(fmt, @temp_actor.mev * 100)
  253. when :mrf
  254. value = sprintf(fmt, @temp_actor.mrf * 100)
  255. when :cnt
  256. value = sprintf(fmt, @temp_actor.cnt * 100)
  257. when :hrg
  258. value = sprintf(fmt, @temp_actor.hrg * 100)
  259. when :mrg
  260. value = sprintf(fmt, @temp_actor.mrg * 100)
  261. when :trg
  262. value = sprintf(fmt, @temp_actor.trg * 100)
  263. when :tgr
  264. value = sprintf(fmt, @temp_actor.tgr * 100)
  265. when :grd
  266. value = sprintf(fmt, @temp_actor.grd * 100)
  267. when :rec
  268. value = sprintf(fmt, @temp_actor.rec * 100)
  269. when :pha
  270. value = sprintf(fmt, @temp_actor.pha * 100)
  271. when :mcr
  272. value = sprintf(fmt, @temp_actor.mcr * 100)
  273. when :tcr
  274. value = sprintf(fmt, @temp_actor.tcr * 100)
  275. when :pdr
  276. value = sprintf(fmt, @temp_actor.pdr * 100)
  277. when :mdr
  278. value = sprintf(fmt, @temp_actor.mdr * 100)
  279. when :fdr
  280. value = sprintf(fmt, @temp_actor.fdr * 100)
  281. when :exr
  282. value = sprintf(fmt, @temp_actor.exr * 100)
  283. when :hcr
  284. return dy unless $imported["YEA-SkillCostManager"]
  285. value = sprintf(fmt, @temp_actor.hcr * 100)
  286. when :tcr_y
  287. return dy unless $imported["YEA-SkillCostManager"]
  288. value = sprintf(fmt, @temp_actor.tcr_y * 100)
  289. when :gcr
  290. return dy unless $imported["YEA-SkillCostManager"]
  291. value = sprintf(fmt, @temp_actor.gcr * 100)
  292. when :cdr
  293. return dy unless $imported["YEA-SkillRestrictions"]
  294. value = sprintf(fmt, @temp_actor.cdr * 100)
  295. when :wur
  296. return dy unless $imported["YEA-SkillRestrictions"]
  297. value = sprintf(fmt, @temp_actor.wur * 100)
  298. else ; return dy
  299. end
  300. change_color(normal_color)
  301. draw_text(dx+4, dy, dw-8, line_height, value, 2)
  302. return dy + line_height
  303. end
  304.  
  305. end # Window_EquipStatus
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement