Advertisement
Dekita

party wipe v 1.1

Jan 14th, 2013
754
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.25 KB | None | 0 0
  1. =begin =========================================================================
  2. Dekita's v1.1
  3. ★ Pokémon Party Wipe™ ★
  4.  
  5. ================================================================================
  6. Script Information:
  7. ====================
  8. This script replicates the party wipe feature from pokemon, e.g party wipe's
  9. and transfers to last used pokemon center (set by script calls)
  10. and you lose a fraction of your current gold.
  11.  
  12. ================================================================================
  13. ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  14. ================================================================================
  15. 1. You must give credit to "Dekita"
  16. 2. You are NOT allowed to repost this script.(or modified versions)
  17. 3. You are NOT allowed to convert this script.(into other game engines e.g RGSS2)
  18. 4. You are NOT allowed to use this script for Commercial games.
  19. 5. ENJOY!
  20.  
  21. "FINE PRINT"
  22. By using this script you hereby agree to the above terms and conditions,
  23. if any violation of the above terms occurs "legal action" may be taken.
  24. Not understanding the above terms and conditions does NOT mean that
  25. they do not apply to you.
  26. If you wish to discuss the terms and conditions in further detail you can
  27. contact me at http://dekitarpg.wordpress.com/ or DekitaRPG@gmail.com
  28.  
  29. ================================================================================
  30. History:
  31. =========
  32. D /M /Y
  33. 13/o1/2o13 - Compatability update, (RealTime Effects)
  34. 27/10/2o12 - started and finished,
  35.  
  36. ================================================================================
  37. Credit and Thanks to :
  38. =======================
  39. Hyde - for sparking my desire to write this ^_^
  40.  
  41. ================================================================================
  42. Known Bugs:
  43. ============
  44. N/A
  45.  
  46. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  47. If a new bug is found please contact me at
  48. http://dekitarpg.wordpress.com/
  49.  
  50. ================================================================================
  51. INSTRUCTIONS:
  52. ==============
  53. Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
  54.  
  55. ================================================================================
  56. Script Calls:
  57. ==============
  58. change_revival_point(map_id, x, y, direction)
  59.  
  60. map_id = the id of the map to transfer to.
  61. x = the x location of the map
  62. y = the y location of the map
  63. direction = the direction you are facing after transfer (2,4,6,8)
  64.  
  65. =end #==========================================================================#
  66.  
  67. module Dekita__Pokémon_Party_wipe
  68.  
  69. # Initial Revival Point Map id.
  70. Map_id = 2
  71. # Initial Revival Point Map x.
  72. Map_x = 12
  73. # Initial Revival Point Map y.
  74. Map_y = 5
  75. # Initial Revival Point Character Direction.( 2 / 4 / 6 / 8 )
  76. Map_Dir = 2
  77.  
  78. # The loss of gold when the party fails, please note that the party's
  79. # TOTAL gold will be divided by this amount, then the party will
  80. # lose that value of gold...
  81. Gold_Loss = 3
  82.  
  83. # Note, fade time will happen 4 times in a row, scene fadein/out and
  84. # graphics fadein/out
  85. Fade_Time = 30
  86.  
  87. #####################
  88. # CUSTOMISATION END #
  89. end #####################
  90. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  91. # #
  92. # http://dekitarpg.wordpress.com/ #
  93. # #
  94. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  95. #===============================================================================#
  96. # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
  97. # YES?\.\. #
  98. # OMG, REALLY? \| #
  99. # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
  100. # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
  101. #===============================================================================#
  102.  
  103. $imported = {} if $imported.nil?
  104. $imported[:Dekita_Pokémon_Party_Wipe] = true
  105.  
  106. #==============================================================================
  107. class Game_Map
  108. #==============================================================================
  109.  
  110. attr_accessor :poke_rev_co_ords
  111.  
  112. alias pokewipe_initiGM initialize
  113. def initialize
  114. pokewipe_initiGM
  115. reviv_mid = Dekita__Pokémon_Party_wipe::Map_id
  116. reviv_x = Dekita__Pokémon_Party_wipe::Map_x
  117. reviv_y = Dekita__Pokémon_Party_wipe::Map_y
  118. reviv_dir = Dekita__Pokémon_Party_wipe::Map_Dir
  119. @poke_rev_co_ords = [reviv_mid, reviv_x, reviv_y, reviv_dir]
  120. end
  121.  
  122. end
  123.  
  124. #==============================================================================
  125. class Scene_Gameover < Scene_Base
  126. #==============================================================================
  127.  
  128. alias pokefaint_startfogo start
  129. def start
  130. pokefaint_startfogo
  131. do_pokefaint_stylee
  132. end
  133.  
  134. def do_pokefaint_stylee
  135. Graphics.fadeout(Dekita__Pokémon_Party_wipe::Fade_Time)
  136. poke_pty_wipe
  137. SceneManager.call(Scene_Map)
  138. Graphics.fadein(Dekita__Pokémon_Party_wipe::Fade_Time)
  139. end
  140.  
  141. def update
  142. super
  143. end
  144.  
  145. def create_background
  146. end
  147.  
  148. def dispose_background
  149. end
  150.  
  151. def fadeout_speed
  152. return Dekita__Pokémon_Party_wipe::Fade_Time
  153. end
  154.  
  155. def fadein_speed
  156. return Dekita__Pokémon_Party_wipe::Fade_Time
  157. end
  158.  
  159. def poke_pty_wipe
  160. poke_revival_point
  161. poke_wipe_GL
  162. poke_rev_heal
  163. end
  164.  
  165. def poke_revival_point
  166. $game_map.screen.start_fadeout(Dekita__Pokémon_Party_wipe::Fade_Time)
  167. map_i = $game_map.poke_rev_co_ords[0]
  168. map_x = $game_map.poke_rev_co_ords[1]
  169. map_y = $game_map.poke_rev_co_ords[2]
  170. map_d = $game_map.poke_rev_co_ords[3]
  171. $game_player.reserve_transfer(map_i, map_x, map_y, map_d)
  172. $game_player.perform_transfer
  173. if $imported[:Dekita_Pokémon_RealTime_Clock]
  174. if $mog_rgss3_weather_ex == true ; $game_system.weather.clear ; end
  175. $game_system.screen_tint = $game_system.update_time_light
  176. $game_system.refresh_the_map_for_tint = true
  177. Time_Tint.updt
  178. end
  179. $game_map.screen.start_fadein(Dekita__Pokémon_Party_wipe::Fade_Time)
  180. end
  181.  
  182. def poke_wipe_GL
  183. if $imported[:Dekita_Game_Settings]
  184. case $game_settings.difficulty_lv
  185. when 0
  186. g_c = ($game_party.gold/Dekita_Game_Settings::Gold_Loss_On_Wipe[0]).to_i
  187. when 1
  188. g_c = ($game_party.gold/Dekita_Game_Settings::Gold_Loss_On_Wipe[1]).to_i
  189. when 2
  190. g_c = ($game_party.gold/Dekita_Game_Settings::Gold_Loss_On_Wipe[2]).to_i
  191. end
  192. else
  193. g_c = ($game_party.gold/Dekita__Pokémon_Party_wipe::Gold_Loss).to_i
  194. end
  195. $game_party.lose_gold(g_c)
  196. end
  197.  
  198. def poke_rev_heal
  199. $game_party.members.size.times {|i| $game_party.members[i].recover_all }
  200. end
  201.  
  202. end # Scene_Gameover < Scene_Base
  203.  
  204. #==============================================================================
  205. class Game_Interpreter
  206. #==============================================================================
  207.  
  208. def change_revival_point(map_id, x, y, direction)
  209. $game_map.poke_rev_co_ords = [map_id, x, y, direction]
  210. end
  211.  
  212. end # Game_Interpreter
  213.  
  214. #===============================================================================#
  215. # - SCRIPT END - #
  216. #===============================================================================#
  217. # http://dekitarpg.wordpress.com/ #
  218. #===============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement