MOG Treasure Name Skript auf gain_item umschreiben
Hallo zusammen,
Hoffentlich kann mir jemand weiterhelfen.
Ich möchte das MOG Treasure Name Skript von Moghunter nutzen. Es zeigt ja die Items an, welche man bekommt, wenn man als Eventbefehl "Change Item/Weapon/Armor" nutzt. Ich bräuchte das aber auch, wenn man als Skriptbefehl $game_party.gain_item(item_id, anzahl) usw. ausführt.
Kann man das ein- bzw. umbauen?
Liebe Grüße
Azura
Hier das Skript:
Hoffentlich kann mir jemand weiterhelfen.
Ich möchte das MOG Treasure Name Skript von Moghunter nutzen. Es zeigt ja die Items an, welche man bekommt, wenn man als Eventbefehl "Change Item/Weapon/Armor" nutzt. Ich bräuchte das aber auch, wenn man als Skriptbefehl $game_party.gain_item(item_id, anzahl) usw. ausführt.
Kann man das ein- bzw. umbauen?
Liebe Grüße
Azura
Hier das Skript:
|
|
Ruby Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
#_________________________________________________ # MOG_Treasure_Name V1.7 #_________________________________________________ # By Moghunter # http://www.atelier-rgss.com #_________________________________________________ module MOG #Font Name. MPFONT = "Georgia" #Fade ON/OFF (True - False). MPITFD = true #Fade Time. MPITTM = 7 #Window Position. # 0 = Upper. # 1 = Left. # 2 = Right. # 3 = Lower. MPITPS = 0 # Disable Window Switch. MPITVIS = 5 # SE. MPITSE = "056-Right02" end #=============================================================================== # Game_Temp #=============================================================================== class Game_Temp attr_accessor :fdittm attr_accessor :mpit_x attr_accessor :mpit_y attr_accessor :it_id attr_accessor :item_typ attr_accessor :item_qua #-------------------------------------------------------------------------- # Update Status #-------------------------------------------------------------------------- alias mog25_initialize initialize def initialize mog25_initialize @fdittm = 0 @it_id = 1 @wp_id = 1 @ar_id = 1 @item_typ = 0 @mpit_x = 0 @mpit_y = 0 @item_qua = 1 end end #=============================================================================== # Interpreter #=============================================================================== class Interpreter #-------------------------------------------------------------------------- # Update Status #-------------------------------------------------------------------------- alias mog25_command126 command_126 def command_126 mog25_command126 $game_temp.item_typ = 1 $game_temp.fdittm = 255 + 40 * MOG::MPITTM $game_temp.it_id = @parameters[0] value = operate_value(@parameters[1], @parameters[2], @parameters[3]) $game_temp.item_qua = value unless $game_switches[MOG::MPITVIS] == true Audio.se_play("Audio/SE/" + MOG::MPITSE, 100,100) rescue nil end $ref = true end #-------------------------------------------------------------------------- # command_127 #-------------------------------------------------------------------------- alias mog25_command127 command_127 def command_127 mog25_command127 $game_temp.item_typ = 2 $game_temp.fdittm = 255 + 40 * MOG::MPITTM $game_temp.it_id = @parameters[0] value = operate_value(@parameters[1], @parameters[2], @parameters[3]) $game_temp.item_qua = value unless $game_switches[MOG::MPITVIS] == true Audio.se_play("Audio/SE/" + MOG::MPITSE, 100,100) rescue nil end $ref = true end #-------------------------------------------------------------------------- # command_128 #-------------------------------------------------------------------------- alias mog25_command128 command_128 def command_128 mog25_command128 $game_temp.item_typ = 3 $game_temp.fdittm = 255 + 40 * MOG::MPITTM $game_temp.it_id = @parameters[0] value = operate_value(@parameters[1], @parameters[2], @parameters[3]) $game_temp.item_qua = value unless $game_switches[MOG::MPITVIS] == true Audio.se_play("Audio/SE/" + MOG::MPITSE, 100,100) rescue nil end $ref = true end end #=============================================================================== # Game_Map #=============================================================================== class Game_Map attr_reader :map_id #-------------------------------------------------------------------------- # mpitnm #-------------------------------------------------------------------------- def mpitnm $mpitnm = load_data("Data/Items.rxdata") $mpitnm[$game_temp.it_id].name end #-------------------------------------------------------------------------- # mpwpnm #-------------------------------------------------------------------------- def mpwpnm $mpwpnm = load_data("Data/Weapons.rxdata") $mpwpnm[$game_temp.it_id].name end #-------------------------------------------------------------------------- # mparnm #-------------------------------------------------------------------------- def mparnm $mparnm = load_data("Data/Armors.rxdata") $mparnm[$game_temp.it_id].name end end #=============================================================================== # Window_Base #=============================================================================== class Window_Base < Window #-------------------------------------------------------------------------- # nd_itpic #-------------------------------------------------------------------------- def nd_itpic mapic = RPG::Cache.picture("") end #-------------------------------------------------------------------------- # draw_mpitem #-------------------------------------------------------------------------- def draw_mpitem(x,y) mapic = RPG::Cache.picture("Itname") rescue nd_itpic cw = mapic.width ch = mapic.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x , y - ch + 65, mapic, src_rect) self.contents.font.name = MOG::MPFONT self.contents.font.size = 22 if $game_temp.item_typ == 1 self.contents.font.color = Color.new(0,0,0,255) self.contents.draw_text(x - 19, y + 19, 110, 32, $game_temp.item_qua.to_s + "X",1) self.contents.draw_text(x + 80, y + 29, 110, 32, $game_map.mpitnm.to_s,1) self.contents.font.color = Color.new(255,255,255,255) self.contents.draw_text(x - 20, y + 18, 110, 32, $game_temp.item_qua.to_s + "X",1) self.contents.draw_text(x + 81, y + 30, 110, 32, $game_map.mpitnm.to_s,1) icon_name = $data_items[$game_temp.it_id].icon_name icon_pic = RPG::Cache.icon(icon_name.to_s) self.contents.blt(x + 55, y + 34, icon_pic, Rect.new(0, 0, 24, 24), 255) elsif $game_temp.item_typ == 2 self.contents.font.color = Color.new(0,0,0,255) self.contents.draw_text(x - 19, y + 19, 110, 32, $game_temp.item_qua.to_s + "X",1) self.contents.draw_text(x + 80, y + 30, 110, 32, $game_map.mpwpnm.to_s,1) self.contents.font.color = Color.new(255,255,255,255) self.contents.draw_text(x + 81, y + 29, 110, 32, $game_map.mpwpnm.to_s,1) self.contents.draw_text(x - 20, y + 18, 110, 32, $game_temp.item_qua.to_s + "X",1) icon_name = $data_weapons[$game_temp.it_id].icon_name icon_pic = RPG::Cache.icon(icon_name.to_s) self.contents.blt(x + 55, y + 34, icon_pic, Rect.new(0, 0, 24, 24), 255) elsif $game_temp.item_typ == 3 self.contents.font.color = Color.new(0,0,0,255) self.contents.draw_text(x + 80, y + 30, 110, 32, $game_map.mparnm.to_s,1) self.contents.draw_text(x - 19, y + 19, 110, 32, $game_temp.item_qua.to_s + "X",1) self.contents.font.color = Color.new(255,255,255,255) self.contents.draw_text(x + 81, y + 29, 110, 32, $game_map.mparnm.to_s,1) self.contents.draw_text(x - 20, y + 18, 110, 32, $game_temp.item_qua.to_s + "X",1) icon_name = $data_armors[$game_temp.it_id].icon_name icon_pic = RPG::Cache.icon(icon_name.to_s) self.contents.blt(x + 55, y + 34, icon_pic, Rect.new(0, 0, 24, 24), 255) else end end end #=============================================================================== # Mpitem #=============================================================================== class Mpitem < Window_Base #-------------------------------------------------------------------------- # initialize #-------------------------------------------------------------------------- def initialize super($game_temp.mpit_x, $game_temp.mpit_y, 250, 100) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = 0 refresh end #-------------------------------------------------------------------------- # refresh #-------------------------------------------------------------------------- def refresh self.contents.clear draw_mpitem(10,0) end end #=============================================================================== # Scene_Map #=============================================================================== class Scene_Map #-------------------------------------------------------------------------- # main #-------------------------------------------------------------------------- alias mog25_main main def main @mpit = Mpitem.new if $game_switches[MOG::MPITVIS] == true @mpit.visible = false else @mpit.visible = true end @mpit.contents_opacity = $game_temp.fdittm mog25_main @mpit.dispose end #-------------------------------------------------------------------------- # update #-------------------------------------------------------------------------- alias mog25_update update def update mog25_update if $ref == true @mpit.refresh if MOG::MPITPS == 0 @mpit.x = 200 @mpit.y = -150 elsif MOG::MPITPS == 1 @mpit.x = -240 @mpit.y = 200 elsif MOG::MPITPS == 2 @mpit.x = 640 @mpit.y = 200 else @mpit.x = 200 @mpit.y = 480 end $ref = false end if $game_switches[MOG::MPITVIS] == true or $game_temp.fdittm <= 0 @mpit.visible = false else @mpit.visible = true end $game_temp.mpit_x = @mpit.x $game_temp.mpit_y = @mpit.y if MOG::MPITPS == 0 if @mpit.y < 0 @mpit.y += 8 elsif @mpit.x >= 0 @mpit.y = 0 end elsif MOG::MPITPS == 1 if @mpit.x < 0 @mpit.x += 10 elsif @mpit.x >= 0 @mpit.x = 0 end elsif MOG::MPITPS == 2 if @mpit.x > 400 @mpit.x -= 10 elsif @mpit.x >= 400 @mpit.x = 400 end else if @mpit.y > 380 @mpit.y -= 8 elsif @mpit.y >= 380 @mpit.y = 380 end end @mpit.contents_opacity = $game_temp.fdittm if MOG::MPITFD == true $game_temp.fdittm -= 3 if $game_temp.fdittm > 0 end end end $mog_rgss_Treasure_Name = true |
zum Lesen den Text mit der Maus markieren
Hallo, ich habe dir entsprechendes Script mal erstellt. Ich habe es nicht umfangreich getestet, aber sollte so klappen. Probier es mal aus.
Ich vermute, es geht um Event-Scripte? Dann einfach nach deinem gain_item, noch display_mog_Treasure aufrufen.
Ich vermute, es geht um Event-Scripte? Dann einfach nach deinem gain_item, noch display_mog_Treasure aufrufen.
|
|
Ruby Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
#============================================================================== # ** Interpreter Erweiterung von Playm #------------------------------------------------------------------------------ # Benötigt das MOG_Treasure_Name V1.7 #------------------------------------------------------------------------------ # Bietet die Möglichkeit Moghunters TreasureInfo beliebig anzuzeigen. # Einfach in Events mit # display_mog_Treasure( :item, 1, 25 ) # aufrufen. #============================================================================== class Interpreter #-------------------------------------------------------------------------- # * Zeige die TreasureInfo von Moghunter mit folgenden Informationen an # kind : Entweder 1 bis 3, oder :item, :weapon oder :armor # Bestimmt, welche Art von Gegenstand gefunden wurde # id : Die ID des Gegenstandes in der Database # amount : Die Anzahl der Funde #-------------------------------------------------------------------------- def display_mog_Treasure( kind, id, amount ) kind = [nil,:item,:weapon,:armor].index(kind) if kind.is_a?( Symbol ) $game_temp.item_typ = kind $game_temp.fdittm = 255 + 40 * MOG::MPITTM $game_temp.it_id = id $game_temp.item_qua = amount $ref = true end end |
zum Lesen den Text mit der Maus markieren
Ähnliche Themen
-
Skript-Anfragen »-
Mog Location für Ace?
(24. Dezember 2013, 20:23)
-
Skript-Anfragen »-
[Request] Benachrichtigungen in der linken oberen Ecke, Skyrim-Style
(18. Juli 2013, 10:06)
-
RGSS 1 Probleme & Talk »-
Nur spezielle Items im Itemwindow während Kampf anzeigen
(16. August 2012, 15:05)
-
RGSS 1 Probleme & Talk »-
Problem mit Questlog 3.0!
(31. August 2008, 16:57)
-
RGSS 1 Probleme & Talk »-
MOG
(3. Juli 2007, 21:45)
