Vai al contenuto

Rilevato Ad-Blocker. Per favore disabilita il tuo adblocker quando navighi su makerando.com - Non c'è nessun annuncio invasivo.

Ally

Utente
  • Numero contenuti

    1074
  • Iscritto

  • Ultima visita

  • Days Won

    17

Tutti i contenuti di Ally

  1. Titolo: Titolo differente Versione: 1.01 Autore/i: Sconosciuto Informazioni: Script che permette di avere un titolo non di default ^^ Istruzioni: Inserire lo script sopra main. Dopodichè creare le immagini che abbiano come nome: *Continue *Continue_active *newgame *newgame_active *shutdown *shutdown_active ...e inserirle nella cartella Titles... Script: #============================================================================== # ++ ???????????? ver. 1.01 ++ # Script by ??? # http://rpg.para.s3p.net/ #------------------------------------------------------------------------------ # ????????????????????????????????? #============================================================================== module PARA_TITLE_CUSTOM # ??????????????( true / false ) IMG_MENU = true #?---????????????????????--- # ???????????? MENU_NEWGAME = "??????" # ?????? MENU_LOAD = "???????" # ??????? MENU_END = "???????" # ??????? # ??????????( true / false ) WINDOW_TRANS = false # ?????????(?????????????????) WINDOW_OPACITY = 160 # ?????????? WINDOW_WIDTH = 192 # ?????????( 0:???? / 1:?? / 2:?? / 3:?? ) WINDOW_ALIGN = 2 # ?????????????????? WINDOW_POS_X = 0 # ?????????( 0:???? / 1:?? / 2:?? / 3:?? ) WINDOW_VALIGN = 0 # ?????????????????? WINDOW_POS_Y = 288 #?---??????????????????--- # ??????????????????(?Graphics/Titles??????? ) #( ??? [ ???????? , ???????????? ] ) # ?????? IMG_NEWGAME = ["newgame","newgame_active"] IMG_NEWGAME_X = 450 # ??? IMG_NEWGAME_Y = 320 # ??? # ??????? IMG_LOAD = ["continue","continue_active"] IMG_LOAD_X = 450 # ??? IMG_LOAD_Y = 360 # ??? # ??????? IMG_END = ["shutdown","shutdown_active"] IMG_END_X = 450 # ??? IMG_END_Y = 400 # ??? # ???????( 0:?? / 1:?? / 2:?? ) BLEND_TYPE = 0 end # ? ???????? #------------------------------------------------------------------------------ #============================================================================== # ¦ Scene_Title #============================================================================== class Scene_Title #-------------------------------------------------------------------------- # ? ????? #-------------------------------------------------------------------------- def main # ???????? if $BTEST battle_test return end # ?????????? $data_actors = load_data("Data/Actors.rxdata") $data_classes = load_data("Data/Classes.rxdata") $data_skills = load_data("Data/Skills.rxdata") $data_items = load_data("Data/Items.rxdata") $data_weapons = load_data("Data/Weapons.rxdata") $data_armors = load_data("Data/Armors.rxdata") $data_enemies = load_data("Data/Enemies.rxdata") $data_troops = load_data("Data/Troops.rxdata") $data_states = load_data("Data/States.rxdata") $data_animations = load_data("Data/Animations.rxdata") $data_tilesets = load_data("Data/Tilesets.rxdata") $data_common_events = load_data("Data/CommonEvents.rxdata") $data_system = load_data("Data/System.rxdata") # ????????????? $game_system = Game_System.new # ????????????? @sprite = Sprite.new @sprite.bitmap = RPG::Cache.title($data_system.title_name) # ???????????? s1 = PARA_TITLE_CUSTOM::MENU_NEWGAME s2 = PARA_TITLE_CUSTOM::MENU_LOAD s3 = PARA_TITLE_CUSTOM::MENU_END w = PARA_TITLE_CUSTOM::WINDOW_WIDTH @command_window = Window_Command.new(w, [s1, s2, s3]) if PARA_TITLE_CUSTOM::WINDOW_TRANS @command_window.opacity = 0 else @command_window.back_opacity = PARA_TITLE_CUSTOM::WINDOW_OPACITY end # ??????????? case PARA_TITLE_CUSTOM::WINDOW_ALIGN when 0 @command_window.x = PARA_TITLE_CUSTOM::WINDOW_POS_X when 1 @command_window.x = 0 when 2 @command_window.x = ( 640 - @command_window.width ) / 2 when 3 @command_window.x = 640 - @command_window.width end case PARA_TITLE_CUSTOM::WINDOW_VALIGN when 0 @command_window.y = PARA_TITLE_CUSTOM::WINDOW_POS_Y when 1 @command_window.y = 0 when 2 @command_window.y = ( 480 - @command_window.height ) / 2 when 3 @command_window.y = 480 - @command_window.height end # ??????????? # ????????????????????????? # ???? @continue_enabled ? true????? false ??? @continue_enabled = false for i in 0..3 if FileTest.exist?("Save#{i+1}.rxdata") @continue_enabled = true end end # ??????????????????????????????? # ????????????????????????? if @continue_enabled @command_window.index = 1 else @command_window.disable_item(1) end # ?????????? if PARA_TITLE_CUSTOM::IMG_MENU @command_window.visible = false @command_img1 = Sprite.new @command_img1.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE @command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0]) @command_img1.x = PARA_TITLE_CUSTOM::IMG_NEWGAME_X @command_img1.y = PARA_TITLE_CUSTOM::IMG_NEWGAME_Y @command_img2 = Sprite.new @command_img2.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE @command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0]) @command_img2.x = PARA_TITLE_CUSTOM::IMG_LOAD_X @command_img2.y = PARA_TITLE_CUSTOM::IMG_LOAD_Y @command_img3 = Sprite.new @command_img3.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE @command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0]) @command_img3.x = PARA_TITLE_CUSTOM::IMG_END_X @command_img3.y = PARA_TITLE_CUSTOM::IMG_END_Y # ??????????????????????????????? # ??????????????????????? if @continue_enabled @command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0]) @command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[1]) else @command_img2.opacity = 160 @command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[1]) @command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0]) end end # ???? BGM ??? $game_system.bgm_play($data_system.title_bgm) # ME?BGS ?????? Audio.me_stop Audio.bgs_stop # ????????? Graphics.transition # ?????? loop do # ???????? Graphics.update # ??????? Input.update # ?????? update # ???????????????? if $scene != self break end end # ????????? Graphics.freeze # ???????????? @command_window.dispose if PARA_TITLE_CUSTOM::IMG_MENU @command_img1.dispose @command_img2.dispose @command_img3.dispose end # ????????????? @sprite.bitmap.dispose @sprite.dispose end #-------------------------------------------------------------------------- # ? ?????? #-------------------------------------------------------------------------- alias update_para_tcst update def update update_para_tcst if PARA_TITLE_CUSTOM::IMG_MENU if Input.repeat?(Input::UP) or Input.repeat?(Input::DOWN) case @command_window.index when 0 # ?????? @command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[1]) @command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0]) @command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0]) when 1 # ??????? @command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0]) @command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[1]) @command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0]) when 2 # ??????? @command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0]) @command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0]) @command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[1]) end end end end end
  2. Titolo: Dynamic Ligth e Shadows Versione: 1.5 Autore/i: Rataime & Trebor777 Informazioni: Crea luci e ombre dinamiche Istruzioni: Richiede le immagini che sono nella demo. Copiatelo sopra Main,copiate L'SDK sopra lo script. Le istruzioni per usarlo sono nello script. Script:: =begin ============================================================================== ** Dynamic Light & Shadows ------------------------------------------------------------------------------ Trebor777 Version 1.5 16/11/2007 Version 1.5 is based on Rataime's shadows script,Rewrote the code structure and Added extra features ============================================================================== Instructions ============================================================================== To create a source light: Write a comment on 2 lines Light arg1|arg2|arg3|arg4|arg5 arg1, is the minimum angle. arg2, is the maximum angle arg3, the distance in pixel covered by the light arg4, the height, in tiles where the light is. arg5, the direction of the light, use the same numbers as RMXP is using: up: 8, right: 6, down: 2, left: 4 It will turn the event automatically to this direction and draw the light according to it, using its min and max angle. The 0 is always on the left of the direction. example, the light "look at" the right, so its direction is 6. the min angle is 0, so it'll start from the tile above to whatever the max angle is, in a clockwise way. So if you need to create a light, who covers only a cone of 60?, facing to the right, at a height of 1 tile, covering a radius of 150pixels: Light 60|120|150|1|6 I might do in the future, a simpler version for that. __-__-__-__-__-__-__-__-__-__-__-__-__-_- To have an event with a shadow: Write a comment on 2 lines Shadow arg1 arg1, is the maximum height of the object, so if you have a pillar on your map covering several tiles in height, just create a shadow event at its base, and give the height of that pillar as arg1. For characters, just use a height of 0. To turn off/on a light: Use a script call: a simple "self.off=true" (to turn off) or "self.off=false" to turn on is needed. What is important is where you use this script call: If the event switching the light is not the same as the source, you need use the "call script" command inside the "set move route" command (of course, don't forget to say on which event it applies) instead of the default "call script" command found on page3. ============================================================================== Configuration ============================================================================== ============================================================================== You probably won't need to touch this : it's the 'map' of how to display the shadow depending on the event's direction and his relative position to the source. a minus means the shadow is mirrored. It seems complex, and it is. Complain to Enterbrain (why didn't they use something clockwise or counter- clockwise ? I suspect it's because of the rm2k legacy. More explanations below. ============================================================================= =end SDK.log('DL&S', "trebor777", 1, "16.11.07") if SDK.state('DL&S') SHADOWS_DIRECTION_ARRAY = Array.new SHADOWS_DIRECTION_ARRAY[2] = [ -3, 4, -2, 1 ] SHADOWS_DIRECTION_ARRAY[4] = [ 4, -2, 1, -3 ] SHADOWS_DIRECTION_ARRAY[6] = [ 1, -3, 4, -2 ] SHADOWS_DIRECTION_ARRAY[8] = [ -2, 1, -3, 4 ] #============================================================================== # An important option : if you set it to true, the shadows will get longer if # you are far from the source. Nice, but induces lag : it will eat your CPU, # and quite possibly your first born if you try that on a big map. #============================================================================== SHADOW_GETS_LONGER = true #============================================================================== # Misc options # If an event has its opacity below SHADOWS_OPACITY_THRESHOLD, no shadow will # be displayed. # Set SHADOWS_CATERPILLAR_COMPATIBLE to true if you uses the caterpillar script #============================================================================== SHADOWS_OPACITY_THRESHOLD = 254 SHADOWS_CATERPILLAR_COMPATIBLE = true #============================================================================== # Class Light #============================================================================== class Light @@lights=[] attr_reader :character, :parameters #-------------------------------------------------------------------------- def initialize(viewport,character, param) @character = character @viewport = viewport unless param.nil? @parameters = param[0].split('|') @anglemin = @parameters.first.to_i @anglemax = @parameters[1].to_i @distancemax = @parameters[2].to_i @light_height = @parameters[3].to_i @base_face_at = @parameters.last.to_i @character.direction=@base_face_at test = @@lights.find_all{|l| l.character==@character and l.parameters==@parameters} if test.size==0 draw_lights update @@lights.push(self) end end end #-------------------------------------------------------------------------- def Light.set return @@lights end #-------------------------------------------------------------------------- def Light.off_size result=0 @@lights.each do |light| result+=1 if light.character.off end return result end #-------------------------------------------------------------------------- def dispose @s_light.dispose @@lights.delete(self) end #-------------------------------------------------------------------------- def update unless @s_light.nil? @[email protected] @s_light.angle=0 if @character.direction==2 @s_light.angle=-90 if @character.direction==4 @s_light.angle=180 if @character.direction==8 @s_light.angle=90 if @character.direction==6 @[email protected]_x @[email protected]_y+32*@light_height @[email protected]_z end end #-------------------------------------------------------------------------- def draw_lights return if @@lights.include?(self) or (@@lights.find_all{|l| l.character==@character and l.parameters==@parameters}).size>0 radius = @distancemax @s_light=Sprite.new(@viewport) @[email protected]_x @[email protected]_y+32*@light_height @[email protected]_z @s_light.bitmap=Bitmap.new(radius*2,radius*2) @s_light.opacity=90 @s_light.ox+=radius @s_light.oy+=radius @s_light.angle=0 if @base_face_at==2 @s_light.angle=270 if @base_face_at==4 @s_light.angle=180 if @base_face_at==8 @s_light.angle=90 if @base_face_at==6 @s_light.bitmap.draw_pie(radius,radius,radius,Color.new(255,255,100,90),@anglemi n, @anglemax) end end #============================================================================== # Class shadow #============================================================================== class Shadow attr_accessor :character attr_reader :distance, :distancemax, :overlayed @@shadows=[] #-------------------------------------------------------------------------- def initialize(viewport,character, param,light) @character = character @viewport = viewport unless param.nil? @parameters = param[0].split('|') @shadow_max_height = @parameters[1].to_i @anglemin=light.parameters[0].to_f @anglemax=light.parameters[1].to_f @distancemax=light.parameters[2].to_f @light_height= light.parameters[3].to_i @source = light @s_shadow = RPG::Sprite.new(@viewport) @s_shadow.color = Color.new(0, 0, 0) update end @@shadows.push(self) end #-------------------------------------------------------------------------- def Shadow.set return @@shadows end #-------------------------------------------------------------------------- def sprite return @s_shadow end #-------------------------------------------------------------------------- def dispose @s_shadow.dispose @@shadows.delete(self) end #-------------------------------------------------------------------------- def in_light_range? return (@distance<=@distancemax) end #-------------------------------------------------------------------------- def overlayed? @overlayed = false @@shadows.each do |i| s = i.sprite next if s.nil? or i == self or @character.tile_id!=0 or s.disposed? if (@s_shadow.z)>s.z and @s_shadow.angle.between?(s.angle-1.5,s.angle+1.5)\ and ((@character.x-i.character.[img=http://rpgmkr.net/forum/public/style_emoticons/default/sourirex.gif]**2 + (@character.y-i.character.y)**2)**0.5<=s.zoom_y \ and s.z>=0 @s_shadow.visible=false @overlayed = true end return if !@s_shadow.visible end return @overlayed end #-------------------------------------------------------------------------- def update # set shadow visibility according to the light state @s_shadow.visible = [email protected] if @character.transparent or @character.opacity <= SHADOWS_OPACITY_THRESHOLD @s_shadow.visible = false return end if @old_amin.nil? and @old_amax.nil? and @old_dir.nil? @old_amin= @anglemin @old_amax= @anglemax @old_dir = @source.character.direction end # adapt the angle according to the source direction case @source.character.direction when 2 @anglemin= @old_amin+180 @anglemax= @old_amax+180 when 4 @anglemin= @old_amin+90 @anglemax= @old_amax+90 when 8 @anglemin= @old_amin @anglemax= @old_amax when 6 @anglemin= @old_amin+270 @anglemax= @old_amax+270 end if @[email protected] @old_dir = @source.character.direction end # simplify the angles if more than 360 or less than 0 @anglemin%=360;@anglemax%=360 tile_height= @shadow_max_height @deltax=(@[email protected]_X)/4 @deltay= ((@source.character.real_y+@light_height*128)-(@character.real_y+tile_height*128))/4 @distance = (((@deltax ** 2) + (@deltay ** 2))** 0.5) if @distancemax !=0 and @distance>@distancemax @s_shadow.visible = false return end @s_shadow.angle = 57.3*Math.atan2(@deltax, @deltay ) @angle_trigo= (@s_shadow.angle+90) % 360 #test if there is a shadow above it, from something close,and then # don't display its shadow return if overlayed? if @anglemin !=0 or @anglemax !=0 if (@angle_trigo<@anglemin or @angle_trigo>@anglemax) and \ @anglemin<@anglemax @s_shadow.visible = false return elsif (@angle_trigo<@anglemin and @angle_trigo>@anglemax) and \ @anglemin>@anglemax @s_shadow.visible = false return end end @s_shadow.update if @tile_id != @character.tile_id or @character_name != @character.character_name or @character_hue != @character.character_hue @tile_id = @character.tile_id @character_name = @character.character_name @character_hue = @character.character_hue if @tile_id >= 384 @s_shadow.bitmap = RPG::Cache.tile($game_map.tileset_name, @tile_id, @character.character_hue) @s_shadow.src_rect.set(0, 0, 32, 32) @s_shadow.ox = 16 @s_shadow.oy = 32 else @s_shadow.bitmap = RPG::Cache.character(@character.character_name, @character.character_hue) @cw = @s_shadow.bitmap.width / 4 @ch = @s_shadow.bitmap.height / 4 @s_shadow.ox = @cw / 2 @s_shadow.oy = @ch end end @s_shadow.x = @character.screen_x @s_shadow.y = @character.screen_y-8 @s_shadow.z = @character.screen_z(@ch)-1 if @tile_id!=0 # if the sprite graphic is from the tileset # set the Z-Index using the tileset priority settings @s_shadow.z = ($game_map.priorities[@tile_id])*32 # convert the shadow angle, into 8-directions (0-7) direction_shadow=((@s_shadow.angle/45+45/2.0+90).round)%8 # for the middle-Top and top layers, for i in [1, 2] # get the tile from the converted angle tile_around=[$game_map.data[@character.x,@character.y-1,i], $game_map.data[@character.x-1,@character.y-1,i], $game_map.data[@character.x-1,@character.y,i], $game_map.data[@character.x-1,@character.y+1,i], $game_map.data[@character.x,@character.y+1,i], $game_map.data[@character.x+1,@character.y+1,i], $game_map.data[@character.x+1,@character.y,i], $game_map.data[@character.x+1,@character.y-1,i]] # if the tile is the empty one go to the next layer next if tile_around[direction_shadow]==0 # else, lower the Z-index if the tile around is "above" or at the same # priority of our tile @s_shadow.z-=32 if $game_map.priorities[tile_around[direction_shadow]]>=$game_map.priorities[@tile_id] end end if @tile_id == 0 sx = @character.pattern * @cw quarter = ((@angle_trigo/90+0.5).floor)%4 # The quarter is the position of the event relative to the source. # Imagine the source is the o point (0,0). Trace the 2 lines # y=x and y=-x : you get something like a big X # On the right, quarter=0. Up, quarter = 1, and so on # Take the @character.direction row (2,4,6,8), and the quarter # column (0,1,2,3) (remember, it starts at 0), and you'll get # a number between 1 and 4. It correspond to the row of the charset # the shadow will be, and mirrored if negative. # Yes, it isn't obvious, but I didn't find any simple operation to # get those. magic = SHADOWS_DIRECTION_ARRAY[@character.direction][quarter] magic = -magic if magic < 0 @s_shadow.mirror = true magic = -magic else @s_shadow.mirror = false end sy = (magic-1)*@ch @s_shadow.src_rect.set(sx, sy, @cw, @ch) end # This is the formula of the opacity in function of the distance # ** 2 means square @s_shadow.opacity = 1200/((@distance ** 2)/ 1000 + 6) # This is the formula of the size in function of the distance # The 0.75 is here so you have a size of 1:1 when next to the source. @s_shadow.zoom_y=0.75*(@shadow_max_height+1) + (@distance) / 256 if SHADOW_GETS_LONGER end end #============================================================================== # ** Zlib #============================================================================== module Zlib #============================================================================ # ** Png_File #============================================================================ class Png_File < GzipWriter #-------------------------------------------------------------------------- # * Make PNG #-------------------------------------------------------------------------- def make_png(bitmap, mode = 0) # Save Bitmap & Mode @bitmap, @mode = bitmap, mode # Create & Save PNG self.write(make_header) self.write(make_ihdr) self.write(make_idat) self.write(make_iend) end #-------------------------------------------------------------------------- # * Make Header #-------------------------------------------------------------------------- def make_header return [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a].pack('C*') end #-------------------------------------------------------------------------- # * Make IHDR #-------------------------------------------------------------------------- def make_ihdr ih_size = [13].pack("N") ih_sign = 'IHDR' ih_width = [@bitmap.width].pack('N') ih_height = [@bitmap.height].pack('N') ih_bit_depth = [8].pack('C') ih_color_type = [6].pack('C') ih_compression_method = [0].pack('C') ih_filter_method = [0].pack('C') ih_interlace_method = [0].pack('C') string = ih_sign + ih_width + ih_height + ih_bit_depth + ih_color_type + ih_compression_method + ih_filter_method + ih_interlace_method ih_crc = [Zlib.crc32(string)].pack('N') return ih_size + string + ih_crc end #-------------------------------------------------------------------------- # * Make IDAT #-------------------------------------------------------------------------- def make_idat header = "\\x49\\x44\\x41\\x54" data = @mode == 0 ? make_bitmap_data0 : make_bitmap_data1 data = Zlib::Deflate.deflate(data, 8) crc = [Zlib.crc32(header + data)].pack('N') size = [data.length].pack('N') return size + header + data + crc end #-------------------------------------------------------------------------- # * Make Bitmap Data 0 #-------------------------------------------------------------------------- def make_bitmap_data0 gz = Zlib::GzipWriter.open('hoge.gz') t_Fx = 0 w = @bitmap.width h = @bitmap.height data = [] for y in 0...h data.push(0) for x in 0...w t_Fx += 1 if t_Fx % 10000 == 0 Graphics.update end if t_Fx % 100000 == 0 s = data.pack("C*") gz.write(s) data.clear end color = @bitmap.get_pixel(x, y) red = color.red green = color.green blue = color.blue alpha = color.alpha data.push(red) data.push(green) data.push(blue) data.push(alpha) end end s = data.pack("C*") gz.write(s) gz.close data.clear gz = Zlib::GzipReader.open('hoge.gz') data = gz.read gz.close File.delete('hoge.gz') return data end #-------------------------------------------------------------------------- # * Make Bitmap Data Mode 1 #-------------------------------------------------------------------------- def make_bitmap_data1 w = @bitmap.width h = @bitmap.height data = [] for y in 0...h data.push(0) for x in 0...w color = @bitmap.get_pixel(x, y) red = color.red green = color.green blue = color.blue alpha = color.alpha data.push(red) data.push(green) data.push(blue) data.push(alpha) end end return data.pack("C*") end #-------------------------------------------------------------------------- # * Make IEND #-------------------------------------------------------------------------- def make_iend ie_size = [0].pack('N') ie_sign = 'IEND' ie_crc = [Zlib.crc32(ie_sign)].pack('N') return ie_size + ie_sign + ie_crc end end end #============================================================================== # Class Game Event #============================================================================== class Game_Event alias treb_mobile_source_game_event_initialize initialize attr_accessor :off, :direction def initialize(*args) # create the off attribute, only used for the lights @off = false treb_mobile_source_game_event_initialize(*args) end end #============================================================================== # class Spriteset Map #============================================================================== class Spriteset_Map alias trebor777_DLS_spriteset_map_init_characters init_characters alias trebor777_DLS_spriteset_map_update_character_sprites update_character_sprites alias trebor777_DLS_spriteset_map_dispose dispose #-------------------------------------------------------------------------- def init_characters trebor777_DLS_spriteset_map_init_characters # create the lights and shadows arrays @lights = [] @shadows = [] @viewport1.visible=false @viewport2.visible=false @viewport3.visible=false for i in $game_map.events.keys.sort # Search for light trigger light_param = SDK.event_comment_input($game_map.events[i], 1, "Light") # if not found go to the next iteration next if light_param.nil? # else add it to the Lights Hash, and create a new light @lights.push( Light.new(@viewport1,$game_map.events[i],light_param) ) # create the shadow for the player. @shadows.push( Shadow.new(@viewport1,$game_player, ['0'], @lights.last) ) end for i in $game_map.events.keys.sort for light in @lights # Search for shadow trigger shadow_param = SDK.event_comment_input($game_map.events[i], 1, "Shadow") next if shadow_param.nil? @shadows.push( Shadow.new(@viewport1,$game_map.events[i], shadow_param, light) ) end end @viewport1.visible=true @viewport2.visible=true @viewport3.visible=true end #-------------------------------------------------------------------------- def update_character_sprites trebor777_DLS_spriteset_map_update_character_sprites lights_off = 0 # Update the lights for light in @lights light.update # count the number of lights off lights_off+=1 if light.character.off end # Update the Shadows for shade in @shadows shade.update end if @lights.size>0 # updating screen tinting according to the number of lights on value=((lights_off.to_f/@lights.size)*(-180)).round $game_screen.start_tone_change(Tone.new(value,value,value,value), 1) else $game_screen.start_tone_change(Tone.new(0,0,0,0), 1) end end #-------------------------------------------------------------------------- def dispose for light in @lights light.dispose end # Update the Shadows for shade in @shadows shade.dispose end @lights = [] @shadows = [] end end #============================================================================== # Class Bitmap #============================================================================== class Bitmap #-------------------------------------------------------------------------- def draw_line(x1, y1, x2, y2, width = 1, color = Color.new(255, 255, 255)) # Return if width is less than or 0 return if width <= 0 # Reverse all parameters sent if 2 x is less than the first x x1, x2, y1, y2 = x2, x1, y2, y1 if x2 < x1 # Get S (1/2 width) s = width / 2.0 # If X Coordinates are equal if x1 == x2 # Draw Vertical line fill_rect(x1 - s, [y1, y2].min, width, (y2 - y1).abs, color) # If Y Coordinates are equal elsif y1 == y2 # Draw Horizontal line fill_rect(x1, y1 - s, x2 - x1, width, color) end # Get Length length = x2 - x1 < (y2 - y1).abs ? (y2 - y1).abs : x2 - x1 # Get Increments x_increment, y_increment = (x2 - x1) / length.to_f, (y2 - y1) / length.to_f # Get Current X and Y x, y = x1, y1 # While Current X is less than end X while x < x2 # Draw Box of width width and width height fill_rect(x-s, y-s, width, width, color) # Increment X and Y x += x_increment y += y_increment end end #-------------------------------------------------------------------------- # Draw pie, take quite a long time as it draws each line. #-------------------------------------------------------------------------- def draw_pie(x,y,radius,color = Color.new(255, 255, 255, 255),start_angle=0,end_angle=360) end_angle+=360 if end_angle name_string="#{radius}_#{start_angle}_#{end_angle}" #filename="Graphics/Pictures/#{name_string}.png" if FileTest.exist?("Graphics/Pictures/#{name_string}.png") temp = RPG::Cache.picture(name_string) blt(0,0,temp,temp.rect) else Graphics.transition t = Progress_Bar.new(160,240,320,20,end_angle-start_angle+2 ) for i in start_angle...end_angle t.current_step+=1 t.update Graphics.update for j in 0..2 x_=(Math::cos((i+j/2.0)*Math::PI/180)*radius).round+x y_=(Math::sin((i+j/2.0)*Math::PI/180)*radius).round+y draw_line(x, y, x_, y_, 2,color) end end t.current_step+=1 t.update Graphics.update make_png(name_string, 'Graphics/Pictures/') t.current_step+=1 t.update Graphics.update t.dispose end end def make_png(name = 'like', path = '', mode = 0) Dir.make_dir(path) if path != '' and !FileTest.directory?(path) Zlib::Png_File.open('temp.gz') { |gz| gz.make_png(self, mode) } Zlib::GzipReader.open('temp.gz') { |gz| $read = gz.read } f = File.open(path + name + '.png', 'wb') f.write($read) f.close File.delete('temp.gz') end end class Progress_Bar < Sprite #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :current_step # The Current Step attr_accessor :steps # The max amount of steps #---------------------------------------------------------------------------- # * Initialize Object #---------------------------------------------------------------------------- def initialize(x,y,width,height=16,steps=100,start=0) super() @steps = steps self.x = x self.y = y @current_step= start @width = width @height = height @w = 9 @nb_bars = @width/@w @c1 = Color.new(46,211,49,255) @c2 = Color.new(46,211,49,227) @c3 = Color.new(46,211,49,202) @c4 = Color.new(46,211,49,177) @c5 = Color.new(46,211,49,152) @c6 = Color.new(46,211,49,127) @stretch_c = (@height-4)/16.0 self.bitmap = Bitmap.new(@width, @height) self.bitmap.clear self.bitmap.fill_rect(0, 0, @width, @height, Color.new(59,59,59,167)) draw end #---------------------------------------------------------------------------- # * Draw Bar #---------------------------------------------------------------------------- def draw self.bitmap.fill_rect(1, 1, @width-2, @height-2, Color.new(59,59,59,0)) for i in 0...((@current_step/@steps.to_f)*@nb_bars).round self.bitmap.fill_rect(i*@w+1,2,@w-2,@height-4,@c6) self.bitmap.fill_rect(i*@w+1,3*@stretch_c,@w-2,@height-6*@stretch_c,@c5) self.bitmap.fill_rect(i*@w+1,4*@stretch_c,@w-2,@height-8*@stretch_c,@c4) self.bitmap.fill_rect(i*@w+1,5*@stretch_c,@w-2,@height-10*@stretch_c,@c3) self.bitmap.fill_rect(i*@w+1,6*@stretch_c,@w-2,@height-12*@stretch_c,@c2) self.bitmap.fill_rect(i*@w+1,7*@stretch_c,@w-2,@height-14*@stretch_c,@c1) end @old = @current_step end #---------------------------------------------------------------------------- # * Update #---------------------------------------------------------------------------- def update draw if @current_step != @old end end #SDK test end Demo:http://www.mediafire.com/?zdcdjdzdim4 Incompatibilita: Richiede L'SDK
  3. Titolo: Ligth Effects XP Versione: 3.2 Autore/i: Near Fantastica,migliorato da SKKY88 Informazioni: Inserisce effetti di luce nel vostro gioco Istruzioni: Copiate come al solito sopra " Main". Necessita di questa immagine da inserire nella cartella Pictures http://www.mediafire.com/file/y1wdmq4zhn2/LE.rar Quindi create un nuovo evento ed inserite un commento con una delle seguenti frasi: LIGTH, FIRE,LIGTH2,TORCH,TORCH2,GROUND, per ottenere diversi effetti di illuminazione Script:: # ■ Light Effects XP V.3.2 #================================ #  By: Near Fantastica # Date: 28.06.05 # Version: 3 # modified by:SKKY88 # DATE: 06.08.09 # bug risolto=ora le luci non si muovono più su mappe superiori a 20x15 # #================================ class Spriteset_Map alias les_spriteset_map_initalize initialize alias les_spriteset_map_dispose dispose alias les_spriteset_map_update update def initialize @light_effects = [] setup_lights les_spriteset_map_initalize update end def dispose les_spriteset_map_dispose for effect in @light_effects effect.light.dispose end @light_effects = [] end def update les_spriteset_map_update update_light_effects end def setup_lights for event in $game_map.events.values next if event.list == nil for i in 0...event.list.size if event.list[i].code == 108 and event.list[i].parameters == ["GROUND"] type = "GROUND" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 2 light_effects.light.zoom_y = 2 light_effects.light.opacity = 100 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["FIRE"] type = "FIRE" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 5 light_effects.light.zoom_y = 5 light_effects.light.opacity = 100 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT"] type = "LIGHT" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 1 light_effects.light.zoom_y = 1 light_effects.light.opacity = 150 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT2"] type = "LIGHT2" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 1 light_effects.light.zoom_y = 1 light_effects.light.opacity = 150 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["TORCH"] type = "TORCH" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 1 light_effects.light.zoom_y = 1 light_effects.light.opacity = 150 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["TORCH2"] type = "TORCH2" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 1 light_effects.light.zoom_y = 1 light_effects.light.opacity = 150 @light_effects.push(light_effects) end end end for effect in @light_effects case effect.type when "GROUND" effect.light.x = (-0.25 * $game_map.display_[img=http://rpgmkr.net/forum/public/style_emoticons/default/sourirex.gif] + (effect.event.x * 32) - 47 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 47 effect.light.blend_type = 1 when "FIRE" effect.light.x = (-0.25 * $game_map.display_<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> + (effect.event.x * 32) - 144 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 144 effect.light.tone = Tone.new(255,-100,-255, 0) effect.light.blend_type = 1 when "LIGHT" effect.light.x = (-0.25 * $game_map.display_<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> + (effect.event.x * 32) - 15 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.blend_type = 1 when "LIGHT2" effect.light.x = (-0.25 * $game_map.display_<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> + (effect.event.x * 32) - 15 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.blend_type = 1 when "TORCH" effect.light.x = (-0.25 * $game_map.display_<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> + (effect.event.x * 32) - 15 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.tone = Tone.new(255,-100,-255, 0) effect.light.blend_type = 1 when "TORCH2" effect.light.x = (-0.25 * $game_map.display_<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> + (effect.event.x * 32) - 15 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.tone = Tone.new(255,-100,-255, 0) effect.light.blend_type = 1 end end end def update_light_effects if $game_switches[1] for effect in @light_effects next if effect.type == "FIRE" || effect.type == "TORCH" effect.light.visible = false end else for effect in @light_effects next if effect.type == "FIRE" || effect.type == "TORCH" effect.light.visible = true end end for effect in @light_effects case effect.type when "GROUND" effect.light.x = (-0.25 * $game_map.display_<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> + (effect.event.x * 32) - 45 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 45 when "FIRE" effect.light.x = (-0.25 * $game_map.display_<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> + (effect.event.x * 32) - 144 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 144 effect.light.opacity = rand(10) + 90 when "LIGHT" effect.light.x = (-0.25 * $game_map.display_<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> + (effect.event.x * 32) - 15 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15 when "LIGHT2" effect.light.x = (-0.25 * $game_map.display_<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> + (effect.event.x * 32) - 15 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15 when "TORCH" effect.light.x = (-0.25 * $game_map.display_<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> + (effect.event.x * 32) - 15 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.opacity = rand(30) + 70 when "TORCH2" effect.light.x = (-0.25 * $game_map.display_<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> + (effect.event.x * 32) - 15 effect.light.y = (-0.25 * $game_map.display_y) + (effect.event.y * 32) - 15 effect.light.opacity = rand(10) + 90 end end end end #================================ # ■ Light Effects Class #================================ class Light_Effect #-------------------------------------------------------------- attr_accessor :light attr_accessor :event attr_accessor :type #-------------------------------------------------------------- def initialize(event, type) @light = Sprite.new @light.bitmap = RPG::Cache.picture("LE.PNG") @light.visible = true @light.z = 1000 @event = event @type = type end end Incompatibilita:N/D
  4. Ally

    Interfacce Bestiario

    Titolo: Bestiario Versione: ? Autore/i: DaD and RagnarokM Informazioni: script di un bestiario Istruzioni: - inserire sopra main Script:: #by DaD and RagnarokM module Enemy_Book_Config DROP_ITEM_NEED_ANALYZE = false EVA_NAME = "Evasione" SHOW_COMPLETE_TYPE = 3 end class Game_Temp attr_accessor :enemy_book_data alias temp_enemy_book_data_initialize initialize def initialize temp_enemy_book_data_initialize @enemy_book_data = Data_MonsterBook.new end end class Game_Party attr_accessor :enemy_info #-------------------------------------------------------------------------- alias book_info_initialize initialize def initialize book_info_initialize @enemy_info = {} end #-------------------------------------------------------------------------- def add_enemy_info(enemy_id, type = 0) case type when 0 if @enemy_info[enemy_id] == 2 return false end @enemy_info[enemy_id] = 1 when 1 @enemy_info[enemy_id] = 2 when -1 @enemy_info[enemy_id] = 0 end end #-------------------------------------------------------------------------- def enemy_book_max return $game_temp.enemy_book_data.id_data.size - 1 end #-------------------------------------------------------------------------- def enemy_book_now now_enemy_info = @enemy_info.keys no_add = $game_temp.enemy_book_data.no_add_element new_enemy_info = [] for i in now_enemy_info enemy = $data_enemies[i] next if enemy.name == "" if enemy.element_ranks[no_add] == 1 next end new_enemy_info.push(enemy.id) end return new_enemy_info.size end #-------------------------------------------------------------------------- def enemy_book_complete_percentage e_max = enemy_book_max.to_f e_now = enemy_book_now.to_f comp = e_now / e_max * 100 return comp.truncate end end class Interpreter def enemy_book_max return $game_party.enemy_book_max end def enemy_book_now return $game_party.enemy_book_now end def enemy_book_comp return $game_party.enemy_book_complete_percentage end end class Scene_Battle alias add_enemy_info_start_phase5 start_phase5 def start_phase5 for enemy in $game_troop.enemies unless enemy.hidden $game_party.add_enemy_info(enemy.id, 0) end end add_enemy_info_start_phase5 end end class Window_Base < Window def initialize(x, y, width, height) super() self.contents = Bitmap.new (width - 32, height - 32) self.contents.font.name = "Arial" @windowskin_name = $game_system.windowskin_name self.windowskin = RPG::Cache.windowskin(@windowskin_name) self.x = x self.y = y self.width = width self.height = height self.z = 100 end #-------------------------------------------------------------------------- def draw_enemy_drop_item(enemy, x, y) self.contents.font.color = normal_color self.contents.font.name = "Arial" treasures = [] if enemy.item_id > 0 treasures.push($data_items[enemy.item_id]) end if enemy.weapon_id > 0 treasures.push($data_weapons[enemy.weapon_id]) end if enemy.armor_id > 0 treasures.push($data_armors[enemy.armor_id]) end if treasures.size > 0 item = treasures[0] bitmap = RPG::Cache.icon(item.icon_name) opacity = 255 self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) name = treasures[0].name else self.contents.font.color = disabled_color self.contents.font.name = "Arial" name = "No Item" end self.contents.draw_text(x+28, y, 212, 32, name) end #-------------------------------------------------------------------------- def draw_enemy_book_id(enemy, x, y) self.contents.font.color = normal_color self.contents.font.name = "Arial" id = $game_temp.enemy_book_data.id_data.index(enemy.id) self.contents.draw_text(x, y, 32, 32, id.to_s) end #-------------------------------------------------------------------------- def draw_enemy_name(enemy, x, y) self.contents.font.color = normal_color self.contents.font.name = "Arial" self.contents.draw_text(x, y, 152, 32, enemy.name) end #-------------------------------------------------------------------------- def draw_enemy_graphic(enemy, x, y, opacity = 255) bitmap = RPG::Cache.battler(enemy.battler_name, enemy.battler_hue) cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) x = x + (cw / 2 - <img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> if cw / 2 > x self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity) end #-------------------------------------------------------------------------- def draw_enemy_exp(enemy, x, y) self.contents.font.color = system_color self.contents.font.name = "Arial" self.contents.draw_text(x, y, 120, 32, "EXP") self.contents.font.color = normal_color self.contents.font.name = "Arial" self.contents.draw_text(x + 120, y, 36, 32, enemy.exp.to_s, 2) end #-------------------------------------------------------------------------- def draw_enemy_gold(enemy, x, y) self.contents.font.color = system_color self.contents.font.name = "Arial" self.contents.draw_text(x, y, 120, 32, $data_system.words.gold) self.contents.font.color = normal_color self.contents.font.name = "Arial" self.contents.draw_text(x + 120, y, 36, 32, enemy.gold.to_s, 2) end end class Game_Enemy_Book < Game_Enemy #-------------------------------------------------------------------------- def initialize(enemy_id) super(2, 1) @enemy_id = enemy_id enemy = $data_enemies[@enemy_id] @battler_name = enemy.battler_name @battler_hue = enemy.battler_hue @hp = maxhp @sp = maxsp end end class Data_MonsterBook attr_reader :id_data #-------------------------------------------------------------------------- def initialize @id_data = enemy_book_id_set end #-------------------------------------------------------------------------- def no_add_element no_add = 0 for i in 1...$data_system.elements.size if $data_system.elements[i] =~ /Monster Book/ no_add = i break end end return no_add end #-------------------------------------------------------------------------- def enemy_book_id_set data = [0] no_add = no_add_element for i in 1...$data_enemies.size enemy = $data_enemies[i] next if enemy.name == "" if enemy.element_ranks[no_add] == 1 next end data.push(enemy.id) end return data end end class Window_MonsterBook < Window_Selectable attr_reader :data #-------------------------------------------------------------------------- def initialize(index=0) super(0, 64, 640, 416) @column_max = 2 @book_data = $game_temp.enemy_book_data @data = @book_data.id_data.dup @data.shift @item_max = @data.size self.index = 0 refresh if @item_max > 0 end #-------------------------------------------------------------------------- def data_set data = $game_party.enemy_info.keys data.sort! newdata = [] for i in data next if $game_party.enemy_info[i] == 0 if book_id(i) != nil newdata.push(i) end end return newdata end #-------------------------------------------------------------------------- def show?(id) if $game_party.enemy_info[id] == 0 or $game_party.enemy_info[id] == nil return false else return true end end #-------------------------------------------------------------------------- def book_id(id) return @book_data.index(id) end #-------------------------------------------------------------------------- def item return @data[self.index] end #-------------------------------------------------------------------------- def refresh if self.contents != nil self.contents.dispose self.contents = nil end self.contents = Bitmap.new(width - 32, row_max * 32) if @item_max > 0 for i in 0...@item_max draw_item(i) end end end #-------------------------------------------------------------------------- def draw_item(index) enemy = $data_enemies[@data[index]] return if enemy == nil x = 4 + index % 2 * (288 + 32) y = index / 2 * 32 rect = Rect.new(x, y, self.width / @column_max - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.font.color = normal_color self.contents.font.name = "Arial" draw_enemy_book_id(enemy, x, y) if show?(enemy.id) self.contents.draw_text(x + 28+16, y, 212, 32, enemy.name, 0) else self.contents.draw_text(x + 28+16, y, 212, 32, "-----", 0) return end if analyze?(@data[index]) self.contents.font.color = text_color(3) self.contents.font.name = "Arial" self.contents.draw_text(x + 256, y, 24, 32, "Cancel", 2) end end #-------------------------------------------------------------------------- def analyze?(enemy_id) if $game_party.enemy_info[enemy_id] == 2 return true else return false end end end class Window_MonsterBook_Info < Window_Base include Enemy_Book_Config #-------------------------------------------------------------------------- def initialize super(0, 0+64, 640, 480-64) self.contents = Bitmap.new(width - 32, height - 32) end #-------------------------------------------------------------------------- def refresh(enemy_id) self.contents.clear self.contents.font.name = "Arial" self.contents.font.size = 22 enemy = Game_Enemy_Book.new(enemy_id) draw_enemy_graphic(enemy, 96, 240+48+64, 200) draw_enemy_book_id(enemy, 4, 0) draw_enemy_name(enemy, 48, 0) draw_actor_hp(enemy, 288, 0) draw_actor_sp(enemy, 288+160, 0) draw_actor_parameter(enemy, 288 , 32, 0) self.contents.font.color = system_color self.contents.draw_text(288+160, 32, 120, 32, EVA_NAME) self.contents.font.color = normal_color self.contents.draw_text(288+160 + 120, 32, 36, 32, enemy.eva.to_s, 2) draw_actor_parameter(enemy, 288 , 64, 3) draw_actor_parameter(enemy, 288+160, 64, 4) draw_actor_parameter(enemy, 288 , 96, 5) draw_actor_parameter(enemy, 288+160, 96, 6) draw_actor_parameter(enemy, 288 , 128, 1) draw_actor_parameter(enemy, 288+160, 128, 2) draw_enemy_exp(enemy, 288, 160) draw_enemy_gold(enemy, 288+160, 160) if analyze?(enemy.id) or !DROP_ITEM_NEED_ANALYZE self.contents.draw_text(288, 192, 96, 32, "Oggetto lasciato") draw_enemy_drop_item(enemy, 288+96+4, 192) self.contents.font.color = normal_color end end #-------------------------------------------------------------------------- def analyze?(enemy_id) if $game_party.enemy_info[enemy_id] == 2 return true else return false end end end class Scene_MonsterBook include Enemy_Book_Config #-------------------------------------------------------------------------- def main $game_temp.enemy_book_data = Data_MonsterBook.new @title_window = Window_Base.new(0, 0, 640, 64) @title_window.contents = Bitmap.new(640 - 32, 64 - 32) @title_window.contents.draw_text(4, 0, 320, 32, "Monster Book", 0) if SHOW_COMPLETE_TYPE != 0 case SHOW_COMPLETE_TYPE when 1 e_now = $game_party.enemy_book_now e_max = $game_party.enemy_book_max text = e_now.to_s + "/" + e_max.to_s when 2 comp = $game_party.enemy_book_complete_percentage text = comp.to_s + "%" when 3 e_now = $game_party.enemy_book_now e_max = $game_party.enemy_book_max comp = $game_party.enemy_book_complete_percentage text = e_now.to_s + "/" + e_max.to_s + " " + comp.to_s + "%" end if text != nil @title_window.contents.draw_text(320, 0, 288, 32, text, 2) end end @main_window = Window_MonsterBook.new @main_window.active = true @info_window = Window_MonsterBook_Info.new @info_window.z = 110 @info_window.visible = false @info_window.active = false @visible_index = 0 Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @main_window.dispose @info_window.dispose @title_window.dispose end #-------------------------------------------------------------------------- def update @main_window.update @info_window.update if @info_window.active update_info return end if @main_window.active update_main return end end #-------------------------------------------------------------------------- def update_main if Input.trigger?(Input:: $game_system.se_play($data_system.cancel_se) $scene = Scene_Zaino.new(2) return end if Input.trigger?(Input::C) if @main_window.item == nil or @main_window.show?(@main_window.item) == false $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) @main_window.active = false @info_window.active = true @info_window.visible = true @visible_index = @main_window.index @info_window.refresh(@main_window.item) return end end #-------------------------------------------------------------------------- def update_info if Input.trigger?(Input:: $game_system.se_play($data_system.cancel_se) @main_window.active = true @info_window.active = false @info_window.visible = false return end if Input.trigger?(Input::C) return end if Input.trigger?(Input::L) $game_system.se_play($data_system.decision_se) loop_end = false while loop_end == false if @visible_index != 0 @visible_index -= 1 else @visible_index = @main_window.data.size - 1 end loop_end = true if @main_window.show?(@main_window.data[@visible_index]) end id = @main_window.data[@visible_index] @info_window.refresh(id) return end if Input.trigger?(Input::R) $game_system.se_play($data_system.decision_se) loop_end = false while loop_end == false if @visible_index != @main_window.data.size - 1 @visible_index += 1 else @visible_index = 0 end loop_end = true if @main_window.show?(@main_window.data[@visible_index]) end id = @main_window.data[@visible_index] @info_window.refresh(id) return end end end Demo:Nessuna Demo Incompatibilita: script Equipment Creator
  5. Titolo: Finestra Fissa Versione: 1.0 Autore/i: Ally Informazioni: script che fissa la finestra Istruzioni: Inserire lo script sopra main.. Per disattivare il menù sotto la variabile @win = 0 inserisci questa stringa di codice: $game_system.menu_disabled = true Script: #============================================== # # Finestra Fissa # By Ally # # http://www.rpgmkr.net # http://www.makerando.com #=============================================== class Finestra < Window_Base def initialize super (0, 0, 340, 340) self.contents = Bitmap.new(width - 32, height - 32) @win = 0 refresh end def refresh self.contents.clear actor = $game_party.actors[0] if $scene.is_a?(Scene_Menu) self.contents.clear end if $scene.is_a?(Scene_Battle) self.contents.clear self.visible = false end end end class Scene_Map alias mexod_main main def main @finestra = Finestra.new mexod_main @finestra.dispose end alias mexod_update update def update mexod_update @finestra.update @finestra.refresh end end
  6. Nome Script: MCDU_System Versione: 1.0 Autore/i: Mexod Informazioni: Questo script permette di scomporre in unità-decine-centinaia-migliaia-dec.migliaia un numero e salvare ogni cifra in una variabile di gioco. Istruzioni: Istruzioni per l'uso e la customizzazione all'interno dello script. Script: #=============================================================================== # MCDU_System V 1.1 20/02/2010 #=============================================================================== # by Mexod #=============================================================================== # Come usare lo script: # Assegnare alla variabile di gioco n°6 il valore del numero da scomporre. # Richiamare lo script inserendo in un call script il seguente codice: # # var = $game_variables[6] # MCDU_System.new(var) # # Una volta avviato lo script le variabili assumeranno i seguenti valori: # V[0001] = unità # V[0002] = decine # V[0003] = centinaia # V[0004] = migliaia # V[0005] = decine di migliaia # V[0006] = numero intero # # E' consigliato non utilizzare queste variabili per altre operazioni. # Terminati i calcoli lo script si disattiva da solo, per scomporre un # altro numero richiamare nuovamente lo script come indicato sopra. # Lo script funziona solo con i numeri minori di 100000. #=============================================================================== # Per cambiare le variabili con cui lo script lavora modificare gli id # a partire dalla riga 100 # Inserire l'id senza gli zeri che precedono la cifra. # es: # V[0054] ---> $game_variables[54] # # Se si modifica l'id della variabile associata a @[member=varifortEa] # (di default $game_variables[6]) modificare il call script in questo modo: # # var = $game_variables[nuovo_id] # MCDU_System.new(var) # #=============================================================================== class MCDU_System def initialize(var) @[member=varifortEa] = var mcdu_sys end def mcdu_sys if @[member=varifortEa] < 10 alg_u else if @[member=varifortEa] > 10 && @[member=varifortEa] < 100 alg_d else if @[member=varifortEa] > 100 && @[member=varifortEa] < 1000 alg_c else if @[member=varifortEa] > 1000 && @[member=varifortEa] < 10000 alg_m else if @[member=varifortEa] > 10000 && @[member=varifortEa] < 100000 alg_dm else chiudi end end end end end end def alg_u @[member=varifortEa]_u = @[member=varifortEa] chiudi end def alg_d @[member=varifortEa]_u = @[member=varifortEa] % 10 @[member=varifortEa]_d = ((@[member=varifortEa] - @[member=varifortEa]_u) / 10) % 10 chiudi end def alg_c @[member=varifortEa]_u = @[member=varifortEa] % 10 @[member=varifortEa]_d = ((@[member=varifortEa] - @[member=varifortEa]_u) / 10) % 10 @[member=varifortEa]_c = ((@[member=varifortEa] - @[member=varifortEa]_d) / 100) % 10 chiudi end def alg_m @[member=varifortEa]_u = @[member=varifortEa] % 10 @[member=varifortEa]_d = ((@[member=varifortEa] - @[member=varifortEa]_u) / 10) % 10 @[member=varifortEa]_c = ((@[member=varifortEa] - @[member=varifortEa]_d) / 100) % 10 @[member=varifortEa]_m = ((@[member=varifortEa] - @[member=varifortEa]_c) / 1000) % 10 chiudi end def alg_dm @[member=varifortEa]_u = @[member=varifortEa] % 10 @[member=varifortEa]_d = ((@[member=varifortEa] - @[member=varifortEa]_u) / 10) % 10 @[member=varifortEa]_c = ((@[member=varifortEa] - @[member=varifortEa]_d) / 100) % 10 @[member=varifortEa]_m = ((@[member=varifortEa] - @[member=varifortEa]_c) / 1000) % 10 @[member=varifortEa]_dm = ((@[member=varifortEa] - @[member=varifortEa]_m) / 10000) % 10 chiudi end def chiudi $game_variables[1] = @[member=varifortEa]_u # unità $game_variables[2] = @[member=varifortEa]_d # decine $game_variables[3] = @[member=varifortEa]_c # centinaia $game_variables[4] = @[member=varifortEa]_m # migliaia $game_variables[5] = @[member=varifortEa]_dm # decine di migliaia $game_variables[6] = @[member=varifortEa] # numero intero end end Incompatibilità:Nessun bug/conflitto noto. Note dell'Autore: Non so quanto realmente possa servire uno script del genere, ma se lo usate creditatemi ^^
  7. Nome Script: Sistema Sparo Resident-Evil Versione: 2.1 Autore/i: Near Fantastica Informazioni: Avete presente l'interfaccia del famosissimo gioco horror Resident Evil? Ecco,questo script lo simula benissimo... Potete avere il menù,e tanto altro ancora Screenshots: Istruzioni: All'interno della demo. se volete aggiungere un nuovo file alla lista,fate un call script con questo codice: [c]$scene = Scene_Game_File.new( File ID , True)[/c] Demo: Sistema Sparo Resident-Evil Bug fixati
  8. Ally

    CBS ABS FFXII

    Nome Script: ABS FFXII Versione: N/D Autore/i: RTH Informazioni: Un sistema di battaglia che simula quello di FFXII. Non è ancora completo al 100%,ma c'è già la base su tutto ^^ Screenshots: Istruzioni: All'interno della demo... Demo: ABS FFXII Incompatibilità: Forse con l'SDK. Incompatibile con maggior parte degli script.
  9. Titolo: Chrono Trigger Battle System Versione: 2.0.2, ATB 1.0.0, Add-ons 7.31 Autore/i: Claimh, Blizzard, Naridar Informazioni: Questo script emula il sistema di battaglia come Chrono Trigger... Istruzioni: All'interno della demo. Demo: Chrono Trigger Battle System Font Font Incompatibilità: Incompatibile con gli altri BS(ovvio), e non è stato testato con l'SDK.
  10. Nome Script: UMS-Universal Message System Versione: N/D Autore/i: ccoa Informazioni: Si tratta di un sistema di messaggi,che implementa un pò di script in uno...come il face nei messaggi,e tanto altro che potete trovare all'interno della demo ^^ Screenshots': ----------------] Istruzioni: Tutto all'interno della demo Demo: Link 1 Link 2
  11. Nome Script: Inserire Cursore Versione: 1.0.2 Autore/i: PARA Informazioni: Cursore animato. Crea un cursore sulla base di immagini. E' possibile definire i numeri di frames dell'immagine. E' possibile impostare la velocità del cursore. Screenshots: Istruzioni: Crea una cartella chiamata Cursors. I frame delle immagini,dovranno essere chiamati: Cursor1,Cursor2,Cursor3...e così via... Inserire lo script sotto Material. Script: #=============================================================================== # PARA Cursor v1.0.2 (Autor: PARA/Modificado por: NicholasRg) #------------------------------------------------------------------------------- # Este script cria um cursor baseado em imagens, que substitui # o cursor padrão da windowskin. #------------------------------------------------------------------------------- # OBS: Crie uma pasta chamada "Cursors", e salvem as imagens nela. #=============================================================================== # Configure Abaixo # module PARA_LEFT_CURSOR # Nome da imagen do cursor FILE_NAME = "Cursor" # Tipo do Cursor #(0 = Exibe apenas a imagen do cursor) #(1 = Exibe a imagen do cursor eo da windowskin Simultâneamente) TYPE = 0 # Maximo de frames MAX_FRAMES = 10 # OBS : o Script vai procurar as imagens Cursor1, Cursor2 e Cursor3 # e não Cursor. # Velocidade ANM_SPEED = 3 end # Fim da Configuração, Não modifique Abaixo # module RPG::Cache def self.cursors(filename, hue = 0) self.load_bitmap('Graphics/Cursors/', filename, hue) end end class Window_Base alias cursor_rect_para_lcr cursor_rect def cursor_rect=(rect) if PARA_LEFT_CURSOR::TYPE == 1 super(rect) end empty = Rect.new(0,0,0,0) if rect != empty and self.visible != false and @index != -1 if @cursor == nil or @cursor.disposed? @cursor = Sprite.new @cursor.bitmap = RPG::Cache.cursors(PARA_LEFT_CURSOR::FILE_NAME) end @cursor.x = self.x + rect.x cy = (rect.height-32) / 2 @cursor.y = self.y + cy + rect.y + 16 @cursor.z = self.z + 2 elsif @cursor != nil @cursor.dispose end end alias dispose_para_cur dispose def dispose super if @cursor != nil @cursor.dispose end end def visible=(bool) super if @cursor != nil and bool == false @cursor.dispose end end def x=(<img src='http://rpgmkr.net/forum/public/style_emoticons/default/sourirex.gif' class='bbc_emoticon' alt='XD' /> super if @index != nil update_cursor_rect end end def y= super if @index != nil update_cursor_rect end end end #module PARA_LEFT_CURSOR # MAX_FRAMES = 8 # ANM_SPEED = 5 #end class Window_Base alias cursor_rect_para_lcr cursor_rect def cursor_rect=(rect) if PARA_LEFT_CURSOR::TYPE == 1 super(rect) end empty = Rect.new(0,0,0,0) if rect != empty and self.visible != false and @index != -1 if @cursor == nil or @cursor.disposed? @cursor = Sprite.new @cursor_anm_frame = 1 @cursor.bitmap = RPG::Cache.cursors(PARA_LEFT_CURSOR::FILE_NAME+@cursor_anm_frame.to_s) @cursor_wait = PARA_LEFT_CURSOR::ANM_SPEED end @cursor.x = self.x + rect.x cy = (rect.height-32) / 2 @cursor.y = self.y + cy + rect.y + 16 @cursor.z = self.z + 2 elsif @cursor != nil @cursor.dispose end end def update super if @cursor != nil and @cursor.disposed? == false if @cursor_wait == nil or @cursor_wait <= 0 @cursor_wait = PARA_LEFT_CURSOR::ANM_SPEED @cursor_anm_frame += 1 if @cursor_anm_frame > PARA_LEFT_CURSOR::MAX_FRAMES @cursor_anm_frame = 1 end @cursor.bitmap = RPG::Cache.cursors(PARA_LEFT_CURSOR::FILE_NAME+@cursor_anm_frame.to_s) else @cursor_wait -= 1 end end end end
  12. Nome Script: Triple Triad FF8 Versione: N/D Autore/i: Sephiroth Informazioni: Per gli amanti di FF8,ecco per voi il Triple Triad... E' molto bello questo script in quanto riproduce quasi totalmente il gioco di carte che troviamo nel game di final fantasy ^^ Screenshots: Istruzioni: Istruzioni e immagini sono tutte all'interno della demo Demo: Triple Triad FF8
  13. Nome Script: Crhonos Status Book Versione: N/D Autore/i: Crhonos Informazioni: Uno scene_status personalizzato molto bello ^^ Screenshots: Istruzioni: Istruzioni all'interno della demo Demo: Crhonos Status Book
  14. Ally

    Ciao a tutti! :)

    Sono contento di vedere Utenti conosciuti provenire da di là <3 Benvenuto Shido :*
  15. Controlla di aver rinominato i file giusti e di averli messi dove lo richiede lo script... Inoltre, quali sono gli altri script che usi?
  16. Sarebbe interessante fare un video sul suo funzionamento ^^
  17. Ally

    batman

    Vecchi ricordi :Q_______
  18. Ally

    Cs Rtp request05

  19. Ally

    Cs Rtp request04 1

  20. Ally

    Cs Rtp request02

  21. Ally

    Cs Rtp firedream13

  22. Ally

    Cs Rtp firedream12

  23. Ally

    Cs Rtp firedream11

  24. Ally

    Cs Rtp firedream10

  25. Ally

    Cs Rtp firedream09

×