Advertisement
Dekita

ppw

Nov 7th, 2012
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.22 KB | None | 0 0
  1. =begin =========================================================================
  2. Dekita's v1.0
  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. 27/10/2o12 - started and finished,
  34.  
  35. ================================================================================
  36. Credit and Thanks to :
  37. =======================
  38. Hyde - for sparking my desire to write this ^_^
  39.  
  40. ================================================================================
  41. Known Bugs:
  42. ============
  43. N/A
  44.  
  45. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  46. If a new bug is found please contact me at
  47. http://dekitarpg.wordpress.com/
  48.  
  49. ================================================================================
  50. INSTRUCTIONS:
  51. ==============
  52. Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
  53.  
  54. ================================================================================
  55. Script Calls:
  56. ==============
  57. change_revival_point(map_id, x, y, direction)
  58.  
  59. map_id = the id of the map to transfer to.
  60. x = the x location of the map
  61. y = the y location of the map
  62. direction = the direction you are facing after transfer (2,4,6,8)
  63.  
  64. =end #==========================================================================#
  65.  
  66. module Dekita__Pokémon_Party_wipe
  67.  
  68. #Initial Revival Point Map id.
  69. Map_id = 1
  70. #Initial Revival Point Map x.
  71. Map_x = 9
  72. #Initial Revival Point Map y.
  73. Map_y = 2
  74. #Initial Revival Point Character Direction.( 2 / 4 / 6 / 8 )
  75. Map_Dir = 2
  76.  
  77. #The loss of gold when the party fails, please note that the party's
  78. #TOTAL gold will be devided by this amount...
  79. Gold_Loss = 3
  80.  
  81. #Note, fade time will happen 4 times in a row, scene fadein/out and
  82. #graphics fadein/out
  83. Fade_Time = 60
  84.  
  85. # CUSTOMISATION OPTIONS END
  86.  
  87. end # Dekita__Pokémon_Party_wipe
  88.  
  89. $imported = {} if $imported.nil?
  90. $imported[:Dekita_Pokémon_Party_Wipe] = true
  91.  
  92. #==============================================================================
  93. class Game_Map
  94. #==============================================================================
  95.  
  96. attr_accessor :poke_rev_co_ords
  97.  
  98. alias pokewipe_initiGM initialize
  99. def initialize
  100. pokewipe_initiGM
  101. reviv_mid = Dekita__Pokémon_Party_wipe::Map_id
  102. reviv_x = Dekita__Pokémon_Party_wipe::Map_x
  103. reviv_y = Dekita__Pokémon_Party_wipe::Map_y
  104. reviv_dir = Dekita__Pokémon_Party_wipe::Map_Dir
  105. @poke_rev_co_ords = [reviv_mid, reviv_x, reviv_y, reviv_dir]
  106. end
  107.  
  108. end
  109.  
  110. #==============================================================================
  111. class Scene_Gameover < Scene_Base
  112. #==============================================================================
  113.  
  114. alias pokefaint_startfogo start
  115. def start
  116. pokefaint_startfogo
  117. do_pokefaint_stylee
  118. end
  119.  
  120. def do_pokefaint_stylee
  121. poke_pty_wipe
  122. Graphics.fadeout(Dekita__Pokémon_Party_wipe::Fade_Time)
  123. SceneManager.call(Scene_Map)
  124. Graphics.fadein(Dekita__Pokémon_Party_wipe::Fade_Time)
  125. end
  126.  
  127. def update
  128. super
  129. end
  130.  
  131. def create_background
  132. end
  133.  
  134. def dispose_background
  135. end
  136.  
  137. def fadeout_speed
  138. return Dekita__Pokémon_Party_wipe::Fade_Time
  139. end
  140.  
  141. def fadein_speed
  142. return Dekita__Pokémon_Party_wipe::Fade_Time
  143. end
  144.  
  145. def poke_pty_wipe
  146. poke_revival_point
  147. poke_wipe_GL
  148. poke_rev_heal
  149. end
  150.  
  151. def poke_revival_point
  152. map_i = $game_map.poke_rev_co_ords[0]
  153. map_x = $game_map.poke_rev_co_ords[1]
  154. map_y = $game_map.poke_rev_co_ords[2]
  155. map_d = $game_map.poke_rev_co_ords[3]
  156. $game_map.setup(map_i)
  157. # $game_map.autoplay # < - needed ?
  158. $game_player.moveto(map_x, map_y)
  159. $game_player.set_direction(map_d)
  160. end
  161.  
  162. def poke_wipe_GL
  163. gold_count = ($game_party.gold / Dekita__Pokémon_Party_wipe::Gold_Loss).to_i
  164. $game_party.lose_gold(gold_count)
  165. end
  166.  
  167. def poke_rev_heal
  168. $game_party.members.size.times {|i| $game_party.members[i].recover_all }
  169. end
  170.  
  171. end # Scene_Gameover < Scene_Base
  172.  
  173. #==============================================================================
  174. class Game_Interpreter
  175. #==============================================================================
  176.  
  177. def change_revival_point(map_id, x, y, direction)
  178. $game_map.poke_rev_co_ords = [map_id, x, y, direction]
  179. end
  180.  
  181. end # Game_Interpreter
  182.  
  183. #===============================================================================#
  184. # - SCRIPT END - #
  185. #===============================================================================#
  186. # http://dekitarpg.wordpress.com/ #
  187. #===============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement