perulegend Posted October 9, 2009 Share Posted October 9, 2009 salve,ho bisogno di uno script che mostri una barra che indichi se il personaggio è buono o cattivo,statistiche che aumentino in base alle azioni compiute (con call script possibilmente)grazie Link to comment Share on other sites More sharing options...
0 Kingartur2 Posted October 9, 2009 Share Posted October 9, 2009 E' uno script più vecchio di rpg maker ma comunque ecco a te#===================================# Leon's Good and Evil script adattato da Rinnegatamante#----------------------------------------------------------------------# Features:# Gives an actor the "good", "Neutral" or "evil" alignment, based# upon their actions.## Instructions:# Place above main, and below other scripts.# Use: draw_alignment_bar(actor, x, y) in a script to draw the alignment bar.# x and y being the position of the bar, and actor being the syntax for the actor's information.## To use:# To add or subtract from their alignment, use: $game_actors[actor_id].alignment += x# To see if the actor's alignment is good, evil or neutral, use:# * Conditional Branch, tab 4, Script.# * For good, use $game_actors[actor_id] > 0# * For evil, use $game_actors[actor_id] < 0# * For neutral, use $game_actors[actor_id] == 0## Extra Information:# This script edits the original Window_Status script to add the good/evil.#=================================== #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# Game_Actor#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~class Game_Actor < Game_Battler attr_accessor :alignmentattr_accessor :alignment_name alias leon_alignment_bars_ga_setup setup def setup(actor_id)@alignment = 0@alignment_name = "Neutrale"leon_alignment_bars_ga_setup(actor_id)end def alignmentif @alignment > 0if @alignment > 100@alignment = 100end@alignment_name = "Buono"return @alignmentendif @alignment < 0if @alignment < -100@alignment = -100end@alignment_name = "Cattivo"return @alignmentend@alignment_name = "Neutrale"return @alignmentend end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# Window_Base#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~class Window_Basedef draw_bar(x, y, min, max, width = 152, height = 6,bar_color = Color.new(0, 75, 0, 255), end_color = Color.new(0, 255, 0, 255))for i in 0..heightself.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))endfor i in 1..(height - 1)r = 100 * (height - i) / height + 0 * i / heightg = 100 * (height - i) / height + 0 * i / heightb = 100 * (height - i) / height + 0 * i / heighta = 255 * (height - i) / height + 255 * i / heightself.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))endfor i in 1..( (min.to_f / max.to_f) * width - 1)for j in 1..(height - 1)r = bar_color.red * (width - i) / width + end_color.red * i / widthg = bar_color.green * (width - i) / width + end_color.green * i / widthb = bar_color.blue * (width - i) / width + end_color.blue * i / widtha = bar_color.alpha * (width - i) / width + end_color.alpha * i / widthself.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))endendend def draw_backward_bar(x, y, min, max, width = 152, height = 6,bar_color = Color.new(75, 0, 0, 255), end_color = Color.new(255, 0, 0, 255))for i in 0..heightself.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))endfor i in 1..(height - 1)r = 100 * (height - i) / height + 0 * i / heightg = 100 * (height - i) / height + 0 * i / heightb = 100 * (height - i) / height + 0 * i / heighta = 255 * (height - i) / height + 255 * i / heightself.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))endfor i in 1..( (min.to_f / max.to_f) * width - 1)for j in 1..(height - 1)r = bar_color.red * (width - i) / width + end_color.red * i / widthg = bar_color.green * (width - i) / width + end_color.green * i / widthb = bar_color.blue * (width - i) / width + end_color.blue * i / widtha = bar_color.alpha * (width - i) / width + end_color.alpha * i / widthself.contents.fill_rect(x - i + j, y + height - j, 1, 1, Color.new(r, g, b, a))endendend def draw_alignment_bar(actor, x, y)#x = 320 y = 147draw_bar(x, y, 0, 200, 200, 6)if actor.alignment > 0draw_bar(x + 100, y, actor.alignment, 100, 100, 6)actor.alignment_name = "Buono"elsif actor.alignment < 0draw_backward_bar(x + 100, y, -1 * actor.alignment, 100, 100, 6)actor.alignment_name = "Cattivo"elsif actor.alignment == 0draw_bar(x + 100, y, actor.alignment, 100, 100, 6)actor.alignment_name = "Neutrale"enddraw_bar(x + 97, y - 2, 2, 2, 2, 10, Color.new(255, 255, 255, 255), Color.new(255, 255, 255,255))end end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# Window_Status#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~class Window_Status < Window_Base alias leon_alignment_bars_ws_refresh refresh def refreshleon_alignment_bars_ws_refreshif @actor.alignment > 100@actor.alignment = 100elsif @actor.alignment < -100@actor.alignment = -100endself.contents.font.color = system_colorself.contents.draw_text(290, 122, 120, 32, "Carattere")draw_alignment_bar(@actor, 280, 157)self.contents.font.color = normal_colorself.contents.draw_text(380, 122, 120, 32, @actor.alignment_name)endend Per qualsiasi motivo non aprite questo spoiler. Ho detto di non aprirlo ! Se lo apri ancora esplode il mondo. Aaaaaa è un vizio. Contento? Il mondo è esploso, sono tutti morti per colpa della tua curiosità . Vuoi che ti venga anche il morbillo, la varicella e l'AIDS??? O bravo ora sei un malato terminale e nessuno ti puo curare, sono tutti morti ! Se clicchi ancora una volta il PC esplode. E dai smettila !! Uff!! Hai cliccato tante volte che ho dovuto sostituirlo con un codebox. http://s8.postimg.org/yntv9nxld/Banner.png http://img204.imageshack.us/img204/8039/sccontest3octpl3.gif Link to comment Share on other sites More sharing options...
0 Kingartur2 Posted October 9, 2009 Share Posted October 9, 2009 E' uno script più vecchio di rpg maker ma comunque ecco a te#===================================# Leon's Good and Evil script adattato da Rinnegatamante#----------------------------------------------------------------------# Features:# Gives an actor the "good", "Neutral" or "evil" alignment, based# upon their actions.## Instructions:# Place above main, and below other scripts.# Use: draw_alignment_bar(actor, x, y) in a script to draw the alignment bar.# x and y being the position of the bar, and actor being the syntax for the actor's information.## To use:# To add or subtract from their alignment, use: $game_actors[actor_id].alignment += x# To see if the actor's alignment is good, evil or neutral, use:# * Conditional Branch, tab 4, Script.# * For good, use $game_actors[actor_id] > 0# * For evil, use $game_actors[actor_id] < 0# * For neutral, use $game_actors[actor_id] == 0## Extra Information:# This script edits the original Window_Status script to add the good/evil.#=================================== #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# Game_Actor#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~class Game_Actor < Game_Battler attr_accessor :alignmentattr_accessor :alignment_name alias leon_alignment_bars_ga_setup setup def setup(actor_id)@alignment = 0@alignment_name = "Neutrale"leon_alignment_bars_ga_setup(actor_id)end def alignmentif @alignment > 0if @alignment > 100@alignment = 100end@alignment_name = "Buono"return @alignmentendif @alignment < 0if @alignment < -100@alignment = -100end@alignment_name = "Cattivo"return @alignmentend@alignment_name = "Neutrale"return @alignmentend end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# Window_Base#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~class Window_Basedef draw_bar(x, y, min, max, width = 152, height = 6,bar_color = Color.new(0, 75, 0, 255), end_color = Color.new(0, 255, 0, 255))for i in 0..heightself.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))endfor i in 1..(height - 1)r = 100 * (height - i) / height + 0 * i / heightg = 100 * (height - i) / height + 0 * i / heightb = 100 * (height - i) / height + 0 * i / heighta = 255 * (height - i) / height + 255 * i / heightself.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))endfor i in 1..( (min.to_f / max.to_f) * width - 1)for j in 1..(height - 1)r = bar_color.red * (width - i) / width + end_color.red * i / widthg = bar_color.green * (width - i) / width + end_color.green * i / widthb = bar_color.blue * (width - i) / width + end_color.blue * i / widtha = bar_color.alpha * (width - i) / width + end_color.alpha * i / widthself.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))endendend def draw_backward_bar(x, y, min, max, width = 152, height = 6,bar_color = Color.new(75, 0, 0, 255), end_color = Color.new(255, 0, 0, 255))for i in 0..heightself.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))endfor i in 1..(height - 1)r = 100 * (height - i) / height + 0 * i / heightg = 100 * (height - i) / height + 0 * i / heightb = 100 * (height - i) / height + 0 * i / heighta = 255 * (height - i) / height + 255 * i / heightself.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))endfor i in 1..( (min.to_f / max.to_f) * width - 1)for j in 1..(height - 1)r = bar_color.red * (width - i) / width + end_color.red * i / widthg = bar_color.green * (width - i) / width + end_color.green * i / widthb = bar_color.blue * (width - i) / width + end_color.blue * i / widtha = bar_color.alpha * (width - i) / width + end_color.alpha * i / widthself.contents.fill_rect(x - i + j, y + height - j, 1, 1, Color.new(r, g, b, a))endendend def draw_alignment_bar(actor, x, y)#x = 320 y = 147draw_bar(x, y, 0, 200, 200, 6)if actor.alignment > 0draw_bar(x + 100, y, actor.alignment, 100, 100, 6)actor.alignment_name = "Buono"elsif actor.alignment < 0draw_backward_bar(x + 100, y, -1 * actor.alignment, 100, 100, 6)actor.alignment_name = "Cattivo"elsif actor.alignment == 0draw_bar(x + 100, y, actor.alignment, 100, 100, 6)actor.alignment_name = "Neutrale"enddraw_bar(x + 97, y - 2, 2, 2, 2, 10, Color.new(255, 255, 255, 255), Color.new(255, 255, 255,255))end end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# Window_Status#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~class Window_Status < Window_Base alias leon_alignment_bars_ws_refresh refresh def refreshleon_alignment_bars_ws_refreshif @actor.alignment > 100@actor.alignment = 100elsif @actor.alignment < -100@actor.alignment = -100endself.contents.font.color = system_colorself.contents.draw_text(290, 122, 120, 32, "Carattere")draw_alignment_bar(@actor, 280, 157)self.contents.font.color = normal_colorself.contents.draw_text(380, 122, 120, 32, @actor.alignment_name)endend Per qualsiasi motivo non aprite questo spoiler. Ho detto di non aprirlo ! Se lo apri ancora esplode il mondo. Aaaaaa è un vizio. Contento? Il mondo è esploso, sono tutti morti per colpa della tua curiosità . Vuoi che ti venga anche il morbillo, la varicella e l'AIDS??? O bravo ora sei un malato terminale e nessuno ti puo curare, sono tutti morti ! Se clicchi ancora una volta il PC esplode. E dai smettila !! Uff!! Hai cliccato tante volte che ho dovuto sostituirlo con un codebox. http://s8.postimg.org/yntv9nxld/Banner.png http://img204.imageshack.us/img204/8039/sccontest3octpl3.gif Link to comment Share on other sites More sharing options...
0 perulegend Posted October 9, 2009 Author Share Posted October 9, 2009 lo script si mette tutto in una riga e non funziona Link to comment Share on other sites More sharing options...
0 Kingartur2 Posted October 9, 2009 Share Posted October 9, 2009 Copialo prima nel blocco note poi lo ricopi nell'editor Per qualsiasi motivo non aprite questo spoiler. Ho detto di non aprirlo ! Se lo apri ancora esplode il mondo. Aaaaaa è un vizio. Contento? Il mondo è esploso, sono tutti morti per colpa della tua curiosità . Vuoi che ti venga anche il morbillo, la varicella e l'AIDS??? O bravo ora sei un malato terminale e nessuno ti puo curare, sono tutti morti ! Se clicchi ancora una volta il PC esplode. E dai smettila !! Uff!! Hai cliccato tante volte che ho dovuto sostituirlo con un codebox. http://s8.postimg.org/yntv9nxld/Banner.png http://img204.imageshack.us/img204/8039/sccontest3octpl3.gif Link to comment Share on other sites More sharing options...
0 Squall_93 Posted November 12, 2009 Share Posted November 12, 2009 Qualcuno mi può spiegare come funziona, perchè non è che si capisce molto... http://team.ffonline.it/imgpersonaggio/laguna_it.jpg E tu in che personaggio ti identifichi? Link to comment Share on other sites More sharing options...
0 kekkorider Posted November 12, 2009 Share Posted November 12, 2009 guarda le scritte in verde a partire dalla riga 8,quelle sono le istruzioni Bisogno di creare un sito internet?Vai a visitare il White Rabbit ;DScreen contest #23http://rpg2s.net/gif/SCContest3Oct.gifPartecipante al Rpg2s.net Game Contest 2008/2009http://www.rpg2s.net/contest/GameContest0809/gc0809-bannerino.jpgGioco in Sviluppo: Restricted : Project 15 Link to comment Share on other sites More sharing options...
0 Squall_93 Posted November 13, 2009 Share Posted November 13, 2009 si lo avevo capito che erano quelle però non riesco ad usarle... :smile: http://team.ffonline.it/imgpersonaggio/laguna_it.jpg E tu in che personaggio ti identifichi? Link to comment Share on other sites More sharing options...
Question
perulegend
salve,ho bisogno di uno script che mostri una barra che indichi se il personaggio è buono o cattivo,statistiche che aumentino in base alle azioni compiute (con call script possibilmente)
grazie
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now