kabs12 Membre méga actif
Nombre de messages : 882 Age : 29 Localisation : Dehors (en suisse bien sûr^^) Date d'inscription : 18/03/2008
| Sujet: Emoticones pour vos PNJ Ven 6 Juin - 23:07 | |
| Salut! Voilà un script de Creative qui permet d'afficher des émoticones sur vos PNJs! (Ou sur vos héros bien sûr^^) L'émoticone défile. Explication: Installation: Pour en afficher un,il faut choisire la ligne de l'émoticone sur la picture ci dessus,et d'ecrire dans Deplacer,Modifier un evenement. Vous selectionner l'event puis metter ceci:\ei[x] X represente la ligne de l'emoticone a selectionner: A mettre dans Picture Exemple,si on veut selectionner le Point d'exlamation sur le hero,on fera: <>Deplacer Modifier un evnement:Hero scripte:\ei[1] 1 est la ligne de lemoticone. Et si on veu le metre sur levenement 0021,on fera <>Deplacer,Modifier un evenement:0021 scripte:\ei[1] Scripte: Par Sanzenin A placer au dessu de main,nommer le Emoticon on Event Code: - Code:
-
#============================================================================== ###################################MODIFICATION#########################################" module EMO #Setting BALLOON_WAIT = 12 EMO_NAME = "Balloon" #Ci dessus,c'est le nom de l'image a mettre dans picture #Name data NAME = { #Add Name And Number Here "Surprise" => 1 ,#C'est la 1er ligne de l'image donc si vous voulez mettre la 1er ligne sur un event vous faite:\ei[1] "Confusion" => 2 ,#C'est la 2e ligne de l'image donc si vous voulez mettre la 2e ligne sur un event vous faite:\ei[2] "Musical" => 3 ,#C'est la 3e ligne de l'image donc si vous voulez mettre la 3e ligne sur un event vous faite:\ei[3] "Love" => 4 ,#C'est la 4e ligne de l'image donc si vous voulez mettre la 4e ligne sur un event vous faite:\ei[4] "Anger" => 5 ,#C'est la 5e ligne de l'image donc si vous voulez mettre la 5e ligne sur un event vous faite:\ei[5] "Awkward" => 6 ,#C'est la 6e ligne de l'image donc si vous voulez mettre la 6e ligne sur un event vous faite:\ei[6] "Crushed" => 7 ,#C'est la 7e ligne de l'image donc si vous voulez mettre la 7e ligne sur un event vous faite:\ei[7] "Silence" => 8 ,#C'est la 8e ligne de l'image donc si vous voulez mettre la 8e ligne sur un event vous faite:\ei[8] "Creative" => 9 ,#C'est la 9e ligne de l'image donc si vous voulez mettre la 9e ligne sur un event vous faite:\ei[9] "Zzz" => 10 ,#C'est la 10e ligne de l'image donc si vous voulez mettre la 10e ligne sur un event vous faite:\ei[10] #End } #################################MODIFICATION TERMINE########################################## #Change Name to ID def self.add_id(text) if NAME.include?(text) return NAME[text] else return 0 end end #-------------------------------------------------------------------------- end #============================================================================== class Game_Character #-------------------------------------------------------------------------- attr_accessor :balloon_id #-------------------------------------------------------------------------- alias inc_initialize initialize def initialize inc_initialize @balloon_id = 0 end #-------------------------------------------------------------------------- def move_type_custom # If it is not in the midst of stopping, discontinuance if jumping? or moving? return end # Until the list of portable command it arrives lastly, the loop while @move_route_index < @move_route.list.size # Acquiring portable command command = @move_route.list[@move_route_index] # When the command cord/code 0th (list) is last if command.code == 0 # Option [ repeats operation ] in case of ON if @move_route.repeat # The index of the portable route first is reset @move_route_index = 0 end # Option [ repeats operation ] in case of OFF unless @move_route.repeat # When it is in the midst of movement route forcing if @move_route_forcing and not @move_route.repeat # Cancelling forcing the portable route @move_route_forcing = false # Return original portable route @move_route = @original_move_route @move_route_index = @original_move_route_index @original_move_route = nil end # Clearing stop count @stop_count = 0 end return end # Portable type command (it moves under? When jump) is if command.code <= 14 # It diverges with the command cord/code case command.code when 1 # It moves down move_down when 2 # It moves left move_left when 3 # It moves right move_right when 4 # It moves up move_up when 5 # It moves left-down move_lower_left when 6 # It moves right-down move_lower_right when 7 # It moves left-up move_upper_left when 8 # It moves right-up move_upper_right when 9 # It moves random move_random when 10 # It moves toward player move_toward_player when 11 # It moves away form hero move_away_from_player when 12 # It moves forward move_forward when 13 # It moves backword move_backward when 14 # Jump jump(command.parameters[0], command.parameters[1]) end # Option [ when it cannot move, disregard ] with OFF, in case of the failure of movement if not @move_route.skippable and not moving? and not jumping? return end @move_route_index += 1 return end # In case of weight if command.code == 15 # Setting weight count @wait_count = command.parameters[0] * 2 - 1 @move_route_index += 1 return end # In case of command of direction modification type if command.code >= 16 and command.code <= 26 # It diverges with the command cord/code case command.code when 16 # Face down turn_down when 17 # Face left turn_left when 18 # Face right turn_right when 19 # Face up turn_up when 20 # Turn 90 right turn_right_90 when 21 # Turn 90 left turn_left_90 when 22 # 180 Turn turn_180 when 23 # Left-right 90 turn turn_right_or_left_90 when 24 # Face random turn_random when 25 # Face to hero turn_toward_player when 26 # Face away from hero turn_away_from_player end @move_route_index += 1 return end # In case of other commands if command.code >= 27 # It diverges with the command cord/code case command.code when 27 # Switch ON $game_switches[command.parameters[0]] = true $game_map.need_refresh = true when 28 # Switch OFF $game_switches[command.parameters[0]] = false $game_map.need_refresh = true when 29 # Modification of drift speed @move_speed = command.parameters[0] when 30 # Modification of portable frequency @move_frequency = command.parameters[0] when 31 # When moving animation ON @walk_anime = true when 32 # When moving animation OFF @walk_anime = false when 33 # When stepping animation ON @step_anime = true when 34 # When stepping animation OFF @step_anime = false when 35 # Direction fixing ON @direction_fix = true when 36 # Direction fixing OFF @direction_fix = false when 37 # Through ON @through = true when 38 # Through OFF @through = false when 39 # Always on top ON @always_on_top = true when 40 # Always on top OFF @always_on_top = false when 41 # Graphic modification @tile_id = 0 @character_name = command.parameters[0] @character_hue = command.parameters[1] if @original_direction != command.parameters[2] @direction = command.parameters[2] @original_direction = @direction @prelock_direction = 0 end if @original_pattern != command.parameters[3] @pattern = command.parameters[3] @original_pattern = @pattern end when 42 # Modification of opacity @opacity = command.parameters[0] when 43 # Modification of synthetic method @blend_type = command.parameters[0] when 44 # Play SE $game_system.se_play(command.parameters[0]) when 45 # script script = command.parameters[0].clone # Emoticon With Name Command if (/\A\\[Ee]n\[(.+?)\]/.match(script)) != nil then text = $1 @balloon_id = EMO.add_id(text) script.gsub!(/\\[Ee]n\[(.+?)\]/) { "" } end # Emoticon With ID Command if (/\A\\[Ee]i\[([0-9]+)\]/.match(script)) != nil then id = $1.to_i @balloon_id = id script.gsub!(/\\[Ee]i\[([0-9]+)\]/) { "" } end # Clear Syntax script.gsub!(/\\[Ee]n\[(.+?)\]/) { "" } script.gsub!(/\\[Ee]i\[([0-9]+)\]/) { "" } result = eval(script) end @move_route_index += 1 end end end #-------------------------------------------------------------------------- end #============================================================================== class Sprite_Character < RPG::Sprite #-------------------------------------------------------------------------- BALLOON_WAIT = EMO::BALLOON_WAIT EMO_NAME = EMO:: EMO_NAME #-------------------------------------------------------------------------- def initialize(viewport, character = nil) super(viewport) @character = character @balloon_duration = 0 update end #-------------------------------------------------------------------------- alias inc_update update def update inc_update # Update Balloon update_balloon # Check Balloon if @character.balloon_id != 0 @balloon_id = @character.balloon_id start_balloon @character.balloon_id = 0 end end #-------------------------------------------------------------------------- def start_balloon dispose_balloon @balloon_duration = 8 * 8 + BALLOON_WAIT @balloon_sprite = Sprite.new(viewport) @balloon_sprite.bitmap = RPG::Cache.picture(EMO_NAME) @balloon_sprite.ox = 16 @balloon_sprite.oy = 32 update_balloon end #-------------------------------------------------------------------------- def update_balloon if @balloon_duration > 0 @balloon_duration -= 1 if @balloon_duration == 0 @balloon_id = 0 dispose_balloon else @balloon_sprite.x = x if @tile_id >= 384 he = 32 else he = self.bitmap.height/4 end @balloon_sprite.y = y - he @balloon_sprite.z = z + 200 if @balloon_duration < BALLOON_WAIT sx = 7 * 32 else sx = (7 - (@balloon_duration - BALLOON_WAIT) / 8) * 32 end sy = (@balloon_id - 1) * 32 @balloon_sprite.src_rect.set(sx, sy, 32, 32) end end end #-------------------------------------------------------------------------- def dispose_balloon if @balloon_sprite != nil @balloon_sprite.dispose @balloon_sprite = nil end end #-------------------------------------------------------------------------- end #============================================================================== | |
|
Invité Invité
| Sujet: Re: Emoticones pour vos PNJ Ven 6 Juin - 23:09 | |
| C'est super mais t'aurais pus poster ceci dans "vos script" du partage il est super de script il sert à beaucoup de chose |
|
kabs12 Membre méga actif
Nombre de messages : 882 Age : 29 Localisation : Dehors (en suisse bien sûr^^) Date d'inscription : 18/03/2008
| Sujet: Re: Emoticones pour vos PNJ Ven 6 Juin - 23:10 | |
| mouais, c'est vrai mais bon^^ | |
|
Shikamaru Designer
Nombre de messages : 1560 Age : 31 Localisation : Tunisie > Mon ordinateur > RM LAND Date d'inscription : 31/12/2007
| Sujet: Re: Emoticones pour vos PNJ Ven 6 Juin - 23:57 | |
| je l'utilserai sans doute , Merci beaucoup , Sam,Luzert tu peux déplacer ? >Oui, c'est fait | |
|
Invité Invité
| Sujet: Re: Emoticones pour vos PNJ Sam 7 Juin - 2:13 | |
| Il a l'aire super comme script. C'est la première fois que je le voie. Bien! |
|
Contenu sponsorisé
| Sujet: Re: Emoticones pour vos PNJ | |
| |
|