Alato Posted December 13, 2006 Share Posted December 13, 2006 (edited) Citizens Script v1.0DescrizioneQuesto script permette di rendere le grosse città/villaggi ricche di personaggi creando solo pochi eventi e senza pesare sul gioco.Basterà scrivere all'interno di un commento dell'evento "begin passante" e l'evento otterrà delle caratteristiche particolari:• Movimento Casuale Personalizzato: si muove spesso in avanti e ogni tanto cambia direzione• Frequenza e Velocità: sono entrambe decise via script, la velocità è casuale• Grafica: la grafica dell'evento è gestita dallo script, che ne sceglie una a caso tra i characters di default "Civilian"• Posizionamento: se i cittadini si allontaneranno troppo dal personaggio, verranno riposizionati casualmente nelle vicinanze dell'eroe (ovviamente fuori dallo schermo)Capite che in questo modo creando una decina di eventi Cittadino il personaggio incontrerà sempre persone diverse, qualunque sia la dimensione della città!AutoreAlatoCredits: questo script contiene l'XPML Script di Rataime e una versione modificata da me dell'Anti Event Lag Script di Near FantasticaAllegatiLo script in versione txt è in fondo alla paginaIstruzioni per l'usoCreate una pagina sopra il main, e incollate al suo interno lo script.Fatto ciò vi basterà creare un commento "begin passante" all'interno degli eventi che volete rendere Cittadini. Consiglio di provarlo in una mappa ampia. #============================================================================== # - Citizens Script ~ v1.0 # ( 13/12/06 ) #--------------------------#--------------------------------------------------- # by Alato ~ www.rpg2s.net # #--------------------------# # Contiene l'XPML Script di Rataime e una versione # modificata da me dell'Anti Event Lag Script di # Near Fantastica. #------------------------------------------------------------------------------ # Incollato questo script in una pagina sopra il Main # avrete a disposizione un nuovo comando per gli eventi. # Scrivendo "begin passante" in un commento dell'evento # questo verrà considerato come un passante, cioè sarà # sempre presente vicino allo schermo. # Grafica, velocità e frequenza sono gestiti dallo # script in maniera casuale (per la grafica utilizza # i character di default "Civilian"). # # In caso di domande o problemi chiedete nel forum # di www.rpg2s.net #============================================================================== ############################################ ######## Aggiunte a Game_Character ######### ############################################ class Game_Character #-------------------------------------------------------------------------- # - Aggiornamento #-------------------------------------------------------------------------- def update if passante? @move_type = 77 # Movimento Passanti @move_frequency = 6 end if jumping? update_jump elsif moving? update_move else update_stop end if @anime_count > 18 - @move_speed * 2 if not @step_anime and @stop_count > 0 @pattern = @original_pattern else @pattern = (@pattern + 1) % 4 end @anime_count = 0 end if @wait_count > 0 @wait_count -= 1 return end if @move_route_forcing move_type_custom return end if @starting or lock? return end if @stop_count > (40 - @move_frequency * 2) * (6 - @move_frequency) case @move_type when 1 move_type_random when 2 move_type_toward_player when 3 move_type_custom when 77 move_type_passante end end end #-------------------------------------------------------------------------- # - Riposiziona #-------------------------------------------------------------------------- def riposiziona case rand(3) when 0 r_x = $game_map.display_x + rand(21)*128 - 128*3 r_y = $game_map.display_y - 128*3 when 1 r_x = $game_map.display_x + rand(21)*128 - 128*3 r_y = $game_map.display_y + 2176 + 128*3 when 2 r_x = $game_map.display_x - 128*3 r_y = $game_map.display_y + rand(16)*128 - 128*3 when 3 r_x = $game_map.display_x + 2816 + 128*3 r_y = $game_map.display_y + rand(16)*128 - 128*3 end x = r_x / 128 y = r_y / 128 if $game_map.passable?(x, y, 0) @real_x = r_x @real_y = r_y @x = x @y = y else riposiziona end r = rand(23) + 1 if r < 10 name = "10" + r.to_s + "-Civilian0" + r.to_s else name = "1" + r.to_s + "-Civilian" + r.to_s end @character_name = name @move_speed = rand(2)+ 1 end #-------------------------------------------------------------------------- # - Movimento Passante #-------------------------------------------------------------------------- def move_type_passante case rand(19) when 0..16 move_forward when 17 move_random when 18 @stop_count = 0 end end end ############################################ ######### Aggiunte a GAme_Event ############ ############################################ class Game_Event < Game_Character #-------------------------------------------------------------------------- # - Controlla se è un passante #-------------------------------------------------------------------------- def passante? params = XPML_read("passante",@id,2) return (params != nil) end end ############################################ ######### Aggiunte a Game_Player ########### ############################################ class Game_Player < Game_Character #-------------------------------------------------------------------------- # - Il Player non è mai un passante #-------------------------------------------------------------------------- def passante? return false end end ################### ############ XPML Definition ############### # by Rataime # ################### def XPML_read(markup,event_id,max_param_number=0) parameter_list = nil event=$game_map.events[event_id] return if event.list==nil for i in 0...event.list.size if event.list[i].code == 108 and event.list[i].parameters[0].downcase == "begin "+markup.downcase parameter_list = [] if parameter_list == nil for j in i+1...event.list.size if event.list[j].code == 108 parts = event.list[j].parameters[0].split if parts.size!=1 and parts[0].downcase!="begin" if parts[1].to_i!=0 or parts[1]=="0" parameter_list.push(parts[1].to_i) else parameter_list.push(parts[1]) end else return parameter_list end else return parameter_list end return parameter_list if max_param_number!=0 and j==i+max_param_number end end end return parameter_list end ############################ ####### Anti Event Lag Script v3 ############### # by Near Fantastica # ############################ # ~ mod by Alato # ############################ #==== # ¦ Game_Map #==== class Game_Map #------ def in_range?(object) screne_x = $game_map.display_x screne_x -= 256 screne_y = $game_map.display_y screne_y -= 256 screne_width = $game_map.display_x screne_width += 2816 screne_height = $game_map.display_y screne_height += 2176 return false if object.real_x <= screne_x return false if object.real_x >= screne_width return false if object.real_y <= screne_y return false if object.real_y >= screne_height return true end #------ def in_big_range?(object) screne_x = $game_map.display_x screne_x -= 256*6 screne_y = $game_map.display_y screne_y -= 256*6 screne_width = $game_map.display_x screne_width += 2816 + 256*5 screne_height = $game_map.display_y screne_height += 2176 + 256*5 return false if object.real_x <= screne_x return false if object.real_x >= screne_width return false if object.real_y <= screne_y return false if object.real_y >= screne_height return true end #------ def update if $game_map.need_refresh refresh end if @scroll_rest > 0 distance = 2 ** @scroll_speed case @scroll_direction when 2 scroll_down(distance) when 4 scroll_left(distance) when 6 scroll_right(distance) when 8 scroll_up(distance) end @scroll_rest -= distance end for event in @events.values if in_range?(event) or event.trigger == 3 or event.trigger == 4 event.update elsif event.passante? # se è un passante riposizionalo event.update until in_big_range?(event) event.riposiziona end end end for common_event in @common_events.values common_event.update end @fog_ox -= @fog_sx / 8.0 @fog_oy -= @fog_sy / 8.0 if @fog_tone_duration >= 1 d = @fog_tone_duration target = @fog_tone_target @fog_tone.red = (@fog_tone.red * (d - 1) + target.red) / d @fog_tone.green = (@fog_tone.green * (d - 1) + target.green) / d @fog_tone.blue = (@fog_tone.blue * (d - 1) + target.blue) / d @fog_tone.gray = (@fog_tone.gray * (d - 1) + target.gray) / d @fog_tone_duration -= 1 end if @fog_opacity_duration >= 1 d = @fog_opacity_duration @fog_opacity = (@fog_opacity * (d - 1) + @fog_opacity_target) / d @fog_opacity_duration -= 1 end end end #==== # ¦ Spriteset_Map #==== class Spriteset_Map #------ def in_range?(object) screne_x = $game_map.display_x screne_x -= 256 screne_y = $game_map.display_y screne_y -= 256 screne_width = $game_map.display_x screne_width += 2816 screne_height = $game_map.display_y screne_height += 2176 return false if object.real_x <= screne_x return false if object.real_x >= screne_width return false if object.real_y <= screne_y return false if object.real_y >= screne_height return true end #------ def in_big_range?(object) screne_x = $game_map.display_x screne_x -= 256*6 screne_y = $game_map.display_y screne_y -= 256*6 screne_width = $game_map.display_x screne_width += 2816 + 256*5 screne_height = $game_map.display_y screne_height += 2176 + 256*5 return false if object.real_x <= screne_x return false if object.real_x >= screne_width return false if object.real_y <= screne_y return false if object.real_y >= screne_height return true end #------ def update if @panorama_name != $game_map.panorama_name or @panorama_hue != $game_map.panorama_hue @panorama_name = $game_map.panorama_name @panorama_hue = $game_map.panorama_hue if @panorama.bitmap != nil @panorama.bitmap.dispose @panorama.bitmap = nil end if @panorama_name != "" @panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue) end Graphics.frame_reset end if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue @fog_name = $game_map.fog_name @fog_hue = $game_map.fog_hue if @fog.bitmap != nil @fog.bitmap.dispose @fog.bitmap = nil end if @fog_name != "" @fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue) end Graphics.frame_reset end @tilemap.ox = $game_map.display_x / 4 @tilemap.oy = $game_map.display_y / 4 @tilemap.update @panorama.ox = $game_map.display_x / 8 @panorama.oy = $game_map.display_y / 8 @fog.zoom_x = $game_map.fog_zoom / 100.0 @fog.zoom_y = $game_map.fog_zoom / 100.0 @fog.opacity = $game_map.fog_opacity @fog.blend_type = $game_map.fog_blend_type @fog.ox = $game_map.display_x / 4 + $game_map.fog_ox @fog.oy = $game_map.display_y / 4 + $game_map.fog_oy @fog.tone = $game_map.fog_tone i=0 for sprite in @character_sprites if sprite.character.is_a?(Game_Event) if in_range?(sprite.character) or sprite.character.trigger == 3 or sprite.character.trigger == 4 or (sprite.character.passante? and in_big_range?(sprite.character)) sprite.update i+=1 end else sprite.update i+=1 end end @weather.type = $game_screen.weather_type @weather.max = $game_screen.weather_max @weather.ox = $game_map.display_x / 4 @weather.oy = $game_map.display_y / 4 @weather.update for sprite in @picture_sprites sprite.update end @timer_sprite.update @viewport1.tone = $game_screen.tone @viewport1.ox = $game_screen.shake @viewport3.color = $game_screen.flash_color @viewport1.update @viewport3.update end end Postate qui nel caso si riscontrino bug o problemi di sorta. :PCitizens_Script.txt Edited March 18, 2013 by Apo applicato tag code o•°' - '°•oHei, mitä kuuluu? http://imagegen.last.fm/winterheadphones/recenttracks/5/Alato.gif Link to comment Share on other sites More sharing options...
Timisci Posted December 13, 2006 Share Posted December 13, 2006 Gran bello script Alato!Mi tornerà moooolto utile ^^ Progetto in corso: "Hero Walking: Toward Another Life" Video Old Intro su Youtube Visite: 11.896! http://img212.imageshack.us/img212/1060/logheryb0.jpg *Posizioni raggiunte nei contest* http://www.rpg2s.net/awards/bestuser1.jpghttp://www.rpg2s.net/awards/beststaff1.jpg http://www.rpg2s.net/awards/bestmaker3.jpghttp://www.rpg2s.net/awards/bestcritical1.jpghttp://www.rpg2s.net/awards/mostcharismatic2.jpg http://www.rpg2s.net/awards/mosthelpful1.jpghttp://www.rpg2s.net/awards/mostpolite1.jpghttp://www.rpg2s.net/awards/mostpresent1.jpg http://img204.imageshack.us/img204/8039/sccontest3octpl3.gif http://img103.imageshack.us/img103/1496/sccontest2octou1.gif http://img118.imageshack.us/img118/181/sccontest1octdt9.gif http://img230.imageshack.us/img230/1273/sccontest1batio5.gif http://img103.imageshack.us/img103/1496/sccontest2octou1.gif http://img103.imageshack.us/img103/1496/sccontest2octou1.gif http://img103.imageshack.us/img103/1496/sccontest2octou1.gif http://img143.imageshack.us/img143/3755/destroyae4.png http://img141.imageshack.us/img141/3081/comics3od3.gif http://img118.imageshack.us/img118/181/sccontest1octdt9.gif SE VUOI AVERE RENS PER RISORSE, TUTORIAL, DEMO, ECC... LEGGI QUI Link to comment Share on other sites More sharing options...
DaD Posted December 14, 2006 Share Posted December 14, 2006 Ah .. alla fine lai finito eh ;O; cmq davvero ottimo sensei :P TPC Radio Site | Blog | Big-Bughttp://img102.imageshack.us/img102/4332/slackware2userbarok0.gifhttp://img141.imageshack.us/img141/1571/nokappams1cf8.png http://i29.tinypic.com/2vijdlh.jpg Link to comment Share on other sites More sharing options...
-Akm- Posted December 14, 2006 Share Posted December 14, 2006 Wow!! impressionante!!! Link to comment Share on other sites More sharing options...
Neji Posted December 14, 2006 Share Posted December 14, 2006 brau ala ;O; molto utile http://img221.imageshack.us/img221/9656/mtv7sa8abiu4.jpghttp://www.deathnoteitalia.com/interactive/profili/Light.jpgL'archeologo e studioso di peni Lestat dice:Spoiler Il Manifesto del Making ItalianoSALVIAMO IL MAKING ITALIANO!!Dopo un test dei nostri esperti (Alato, Blake e havana24) abbiamo scoperto che ad interesse risponde interesse: cioè se voi dimostrate di essere interessati a ciò che creano gli altri, questi saranno stimolati a continuare a creare! E' un concetto semplice ma estremamente sottovalutato, basta vedere quanti topic di bei giochi sono caduti nel dimenticatoio e sono stati cagati solo da poche persone (prendiamo per esempio il fantastico gioco di Vech che vi invito a vedere nella sezione RM2k).Perciò quello che dobbiamo fare è: leggere, leggere, leggere, postare, postare, postare! E questo non significa postare a caso, ma leggere per bene il progetto di qualcuno, le domande poste, le creazioni grafiche e musicali, e fare dei post in cui si propongano miglioramenti, si critichino le brutture, si esaltino le bellezze, si aiutino gli oppressi etc etcBASTA AL MAKING ITALIANO CHE VA A ROTOLI! DIAMOCI UNA SVEGLIATA!!Per dimostrarvi ciò che sto esponendo vi riporto che la volta in cui abbiamo provato (Alato, Blake e havana24) a fare una cosa di questo genere, c'è costata un pomeriggio ma il giorno dopo abbiamo ottenuto il numero massimo di utenti online mai raggiunto!!! Ma soprattutto ciò significa che l'interesse riguardo al making era stato, almeno momentaneamente, risvegliato!!Voi pensate che eravamo solo in 3 a cercare tutti i topic e ravvivarli (con sincerità e senza i soliti falsi "Oh che bello.", ma anche con critiche per lavori incompleti o assurdi) e abbiamo ottenuto quel grande risultato: se lo facessimo tutti non sarebbe una cosa potentissima?!?BASTA ALLE SOLITE BANALI DISCUSSIONI SULLA DECADENZA DEI GIOCHI!! FACCIAMOLI STI GIOCHI!!!Chi è contrario a questa cosa, può pure continuare così ma è una persona che col making non ha nulla a che fare, ma chi crede nel making inizi ora, immediatamente a seguire questa linea di pensiero!Ma chi è d'accordo, chi davvero ci tiene al making, incolli questo Manifesto nella propria firma!! Mettete anche voi questa firma!! Link to comment Share on other sites More sharing options...
Alato Posted December 14, 2006 Author Share Posted December 14, 2006 Mi sono scordato di dire che lo script va a sostituire alcuni metodi di update (precisamente quelli di Game_Character, Game_Map, Spriteset_Map) quindi se volete fare delle modifiche a quei metodi dovete farle nelle versioni che avete incollato. In pratica quelli vecchi vengono tagliati fuori da questo script. Se vi vengono in mente cose da aggiungere avvisate, qualche aggiunta per la versione 2 la sto già facendo. :P o•°' - '°•oHei, mitä kuuluu? http://imagegen.last.fm/winterheadphones/recenttracks/5/Alato.gif Link to comment Share on other sites More sharing options...
. X i n o s . Posted December 15, 2006 Share Posted December 15, 2006 Complimenti, uno degli script più utili che abbia mai visto O.O "Looks like my summer vacation is . . . over."http://img182.imageshack.us/img182/7160/roxasqy9.png Link to comment Share on other sites More sharing options...
André LaCroix Posted December 16, 2006 Share Posted December 16, 2006 Complimenti.Davvero utile.A tal proposito è da notare il fatto che questo script venga fatto una volta che ho abbandonato il progetto per cui mi serviva xDDDD (Sì, sono l'AnteroLehtinen che bazzica in chat. E... sì, una volta insegnavo storyboarding.)http://img26.imageshack.us/img26/7048/firmadn.png Link to comment Share on other sites More sharing options...
redXIII Posted December 17, 2006 Share Posted December 17, 2006 bel cript grande alato...così evito di fare migliardi azioni con gli eventi... LAST LEGEND tempo di programmazione rimasto in percentuale è:Storia del gioco: 98%Storia dei personaggi: 75%Storia politica mondiale: 80%Applicazione e sviluppo dell'avventura, tempo rimasto in percentuale è:Titleset:40%Charaset:20%Animation:90%Idem,Skill,Armi:50%Scene Animate:10%http://img518.imageshack.us/img518/5919/logoufficialecopiawr2.png Link to comment Share on other sites More sharing options...
Stradlyn Posted December 23, 2006 Share Posted December 23, 2006 Ma scusate è solo a me che lo script si vede tutto attaccato e non si capisce niente?? :chirol_gusun: http://www.ff-fan.com/chartest/banners/vincent.jpg Yeah!! Link to comment Share on other sites More sharing options...
Maverik Posted December 23, 2006 Share Posted December 23, 2006 Anche a me è tutto attaccato ma piu tosto volevo domandare una cosa alao hai detto che lo script prende a caso una chara tra quelli con il nome civilazation e lo mette nella mappa ok ma se importo un chara e gli do il nome civilization con il numero etc me lo mete tra le possibili scelte dello script?? se no prendila come un idea per la versione 2 ;) The Italian Scripter Teamhttp://img57.imageshack.us/img57/654/istminibannerqe2wo7.jpg<[blake]> (e le giustificazioni, se serve, le falsifico)<Iryka> bravo ma questo e warez Link to comment Share on other sites More sharing options...
Stradlyn Posted December 23, 2006 Share Posted December 23, 2006 (edited) Ah ecco...ma tu sei riuscito a ricomporlo? Se si nn è che potresti ripostarlo qui ? Io sono arrivato a metà, ma poi non riesco a capire come aggiustarlo! Edited December 23, 2006 by Stradlyn http://www.ff-fan.com/chartest/banners/vincent.jpg Yeah!! Link to comment Share on other sites More sharing options...
Zerathul Posted December 24, 2006 Share Posted December 24, 2006 Bello , davvero utile , complimenti. Il problema sarà implementarlo con i messaggi che mostrano i face dei pg... O_______________________________________________________O(metà delle cose che fanno le faccio anch'io zizi) (sto qua invece è un mostro....) Link to comment Share on other sites More sharing options...
Leon Posted January 10, 2007 Share Posted January 10, 2007 Non funzia O_oPerò cavolo bell'idea! :chirol_iei2: http://www.naruto-kun.com/images/narutotest/kakashi.jpgWaiting for Regression Official SiteMelodic/Old School Hardcore from Forlì.Supportate il violento rumore forlivese!http://img360.imageshack.us/img360/4893/firma1gp.pngLeon, the Avenger. Link to comment Share on other sites More sharing options...
Alato Posted March 6, 2007 Author Share Posted March 6, 2007 Scusate se rispondo solo ora, comunque per chi scaricava il file tutto attaccato (strano, io lo scarico ed è a posto..) ho aggiunto lo script nel primo post. Per quelli che dicono che non funziona: siate più precisi o non posso aiutarvi. ^^ o•°' - '°•oHei, mitä kuuluu? http://imagegen.last.fm/winterheadphones/recenttracks/5/Alato.gif Link to comment Share on other sites More sharing options...
Mike Portnoy Posted March 6, 2007 Share Posted March 6, 2007 STUPENDERRIMO!Da esperto copiaincollaro mi permetto di chiedere una cosa... l'anti event lag che c'hai influisce solo sui cittadini VERO?Non mi va a influire sui miei eventi che essendo fuori dalla mappa mi vengono bloccati? http://img58.imageshack.us/img58/4264/newheavenhd2.jpg Iscrivetevi alla nostra accademia di Rpgmaking, presto sarà piena di contenuti e lezioni su Mapping, Eventing, Pixel Art e Scrittura, a livelli bassi, medi e avanzati!http://img185.imageshack.us/img185/4599/bannerua7.gif Link to comment Share on other sites More sharing options...
Alato Posted March 6, 2007 Author Share Posted March 6, 2007 L'Anti Event Lag non fa altro che disattivare gli eventi fuori dallo schermo. I cittadini però non vengono disattivati perché in realtà rimangono sempre vicini allo schermo. o•°' - '°•oHei, mitä kuuluu? http://imagegen.last.fm/winterheadphones/recenttracks/5/Alato.gif Link to comment Share on other sites More sharing options...
Mike Portnoy Posted March 7, 2007 Share Posted March 7, 2007 Mmmm non è che potresti rilsaciarne una versione senza la parte di Anti-lag?SArebbe sufficiente cancellarla dallo script o si formano bug?Perchè io l'anti-lag di near proprio non lo vorrei mettere, mi da un fastidio immane, mi disattiva eventi che poi magari uso... http://img58.imageshack.us/img58/4264/newheavenhd2.jpg Iscrivetevi alla nostra accademia di Rpgmaking, presto sarà piena di contenuti e lezioni su Mapping, Eventing, Pixel Art e Scrittura, a livelli bassi, medi e avanzati!http://img185.imageshack.us/img185/4599/bannerua7.gif Link to comment Share on other sites More sharing options...
Alato Posted March 7, 2007 Author Share Posted March 7, 2007 Così è senza Anti-Event Lag Script, prova se funzia che io non ho controllato ^^ #============================================================================== # - Citizens Script ~ v1.0 # ( 13/12/06 ) #--------------------------#--------------------------------------------------- # by Alato ~ www.rpg2s.net # #--------------------------# # Contiene l'XPML Script di Rataime e una versione # modificata da me dell'Anti Event Lag Script di # Near Fantastica. #------------------------------------------------------------------------------ # Incollato questo script in una pagina sopra il Main # avrete a disposizione un nuovo comando per gli eventi. # Scrivendo "begin passante" in un commento dell'evento # questo verrà considerato come un passante, cioè sarà # sempre presente vicino allo schermo. # Grafica, velocità e frequenza sono gestiti dallo # script in maniera casuale (per la grafica utilizza # i character di default "Civilian"). # # In caso di domande o problemi chiedete nel forum # di www.rpg2s.net #============================================================================== ############################################ ######## Aggiunte a Game_Character ######### ############################################ class Game_Character #-------------------------------------------------------------------------- # - Aggiornamento #-------------------------------------------------------------------------- def update if passante? @move_type = 77 # Movimento Passanti @move_frequency = 6 end if jumping? update_jump elsif moving? update_move else update_stop end if @anime_count > 18 - @move_speed * 2 if not @step_anime and @stop_count > 0 @pattern = @original_pattern else @pattern = (@pattern + 1) % 4 end @anime_count = 0 end if @wait_count > 0 @wait_count -= 1 return end if @move_route_forcing move_type_custom return end if @starting or lock? return end if @stop_count > (40 - @move_frequency * 2) * (6 - @move_frequency) case @move_type when 1 move_type_random when 2 move_type_toward_player when 3 move_type_custom when 77 move_type_passante end end end #-------------------------------------------------------------------------- # - Riposiziona #-------------------------------------------------------------------------- def riposiziona case rand(3) when 0 r_x = $game_map.display_x + rand(21)*128 - 128*3 r_y = $game_map.display_y - 128*3 when 1 r_x = $game_map.display_x + rand(21)*128 - 128*3 r_y = $game_map.display_y + 2176 + 128*3 when 2 r_x = $game_map.display_x - 128*3 r_y = $game_map.display_y + rand(16)*128 - 128*3 when 3 r_x = $game_map.display_x + 2816 + 128*3 r_y = $game_map.display_y + rand(16)*128 - 128*3 end x = r_x / 128 y = r_y / 128 if $game_map.passable?(x, y, 0) @real_x = r_x @real_y = r_y @x = x @y = y else riposiziona end r = rand(23) + 1 if r < 10 name = "10" + r.to_s + "-Civilian0" + r.to_s else name = "1" + r.to_s + "-Civilian" + r.to_s end @character_name = name @move_speed = rand(2)+ 1 end #-------------------------------------------------------------------------- # - Movimento Passante #-------------------------------------------------------------------------- def move_type_passante case rand(19) when 0..16 move_forward when 17 move_random when 18 @stop_count = 0 end end end ############################################ ######### Aggiunte a GAme_Event ############ ############################################ class Game_Event < Game_Character #-------------------------------------------------------------------------- # - Controlla se è un passante #-------------------------------------------------------------------------- def passante? params = XPML_read("passante",@id,2) return (params != nil) end end ############################################ ######### Aggiunte a Game_Player ########### ############################################ class Game_Player < Game_Character #-------------------------------------------------------------------------- # - Il Player non è mai un passante #-------------------------------------------------------------------------- def passante? return false end end ################### ############ XPML Definition ############### # by Rataime # ################### def XPML_read(markup,event_id,max_param_number=0) parameter_list = nil event=$game_map.events[event_id] return if event.list==nil for i in 0...event.list.size if event.list[i].code == 108 and event.list[i].parameters[0].downcase == "begin "+markup.downcase parameter_list = [] if parameter_list == nil for j in i+1...event.list.size if event.list[j].code == 108 parts = event.list[j].parameters[0].split if parts.size!=1 and parts[0].downcase!="begin" if parts[1].to_i!=0 or parts[1]=="0" parameter_list.push(parts[1].to_i) else parameter_list.push(parts[1]) end else return parameter_list end else return parameter_list end return parameter_list if max_param_number!=0 and j==i+max_param_number end end end return parameter_list end ############################ ####### Anti Event Lag Script v3 ############### # by Near Fantastica # ############################ # ~ mod by Alato # ############################ #==== # ¦ Game_Map #==== class Game_Map #------ def in_big_range?(object) screne_x = $game_map.display_x screne_x -= 256*6 screne_y = $game_map.display_y screne_y -= 256*6 screne_width = $game_map.display_x screne_width += 2816 + 256*5 screne_height = $game_map.display_y screne_height += 2176 + 256*5 return false if object.real_x <= screne_x return false if object.real_x >= screne_width return false if object.real_y <= screne_y return false if object.real_y >= screne_height return true end #------ def update if $game_map.need_refresh refresh end if @scroll_rest > 0 distance = 2 ** @scroll_speed case @scroll_direction when 2 scroll_down(distance) when 4 scroll_left(distance) when 6 scroll_right(distance) when 8 scroll_up(distance) end @scroll_rest -= distance end for event in @events.values event.update if event.passante? # se è un passante riposizionalo until in_big_range?(event) event.riposiziona end end end for common_event in @common_events.values common_event.update end @fog_ox -= @fog_sx / 8.0 @fog_oy -= @fog_sy / 8.0 if @fog_tone_duration >= 1 d = @fog_tone_duration target = @fog_tone_target @fog_tone.red = (@fog_tone.red * (d - 1) + target.red) / d @fog_tone.green = (@fog_tone.green * (d - 1) + target.green) / d @fog_tone.blue = (@fog_tone.blue * (d - 1) + target.blue) / d @fog_tone.gray = (@fog_tone.gray * (d - 1) + target.gray) / d @fog_tone_duration -= 1 end if @fog_opacity_duration >= 1 d = @fog_opacity_duration @fog_opacity = (@fog_opacity * (d - 1) + @fog_opacity_target) / d @fog_opacity_duration -= 1 end end end #==== # ¦ Spriteset_Map #==== class Spriteset_Map #------ def in_range?(object) screne_x = $game_map.display_x screne_x -= 256 screne_y = $game_map.display_y screne_y -= 256 screne_width = $game_map.display_x screne_width += 2816 screne_height = $game_map.display_y screne_height += 2176 return false if object.real_x <= screne_x return false if object.real_x >= screne_width return false if object.real_y <= screne_y return false if object.real_y >= screne_height return true end #------ def in_big_range?(object) screne_x = $game_map.display_x screne_x -= 256*6 screne_y = $game_map.display_y screne_y -= 256*6 screne_width = $game_map.display_x screne_width += 2816 + 256*5 screne_height = $game_map.display_y screne_height += 2176 + 256*5 return false if object.real_x <= screne_x return false if object.real_x >= screne_width return false if object.real_y <= screne_y return false if object.real_y >= screne_height return true end #------ def update if @panorama_name != $game_map.panorama_name or @panorama_hue != $game_map.panorama_hue @panorama_name = $game_map.panorama_name @panorama_hue = $game_map.panorama_hue if @panorama.bitmap != nil @panorama.bitmap.dispose @panorama.bitmap = nil end if @panorama_name != "" @panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue) end Graphics.frame_reset end if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue @fog_name = $game_map.fog_name @fog_hue = $game_map.fog_hue if @fog.bitmap != nil @fog.bitmap.dispose @fog.bitmap = nil end if @fog_name != "" @fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue) end Graphics.frame_reset end @tilemap.ox = $game_map.display_x / 4 @tilemap.oy = $game_map.display_y / 4 @tilemap.update @panorama.ox = $game_map.display_x / 8 @panorama.oy = $game_map.display_y / 8 @fog.zoom_x = $game_map.fog_zoom / 100.0 @fog.zoom_y = $game_map.fog_zoom / 100.0 @fog.opacity = $game_map.fog_opacity @fog.blend_type = $game_map.fog_blend_type @fog.ox = $game_map.display_x / 4 + $game_map.fog_ox @fog.oy = $game_map.display_y / 4 + $game_map.fog_oy @fog.tone = $game_map.fog_tone i=0 for sprite in @character_sprites if sprite.character.is_a?(Game_Event) sprite.update i+=1 end end @weather.type = $game_screen.weather_type @weather.max = $game_screen.weather_max @weather.ox = $game_map.display_x / 4 @weather.oy = $game_map.display_y / 4 @weather.update for sprite in @picture_sprites sprite.update end @timer_sprite.update @viewport1.tone = $game_screen.tone @viewport1.ox = $game_screen.shake @viewport3.color = $game_screen.flash_color @viewport1.update @viewport3.update end end o•°' - '°•oHei, mitä kuuluu? http://imagegen.last.fm/winterheadphones/recenttracks/5/Alato.gif Link to comment Share on other sites More sharing options...
Ale_B Posted January 24, 2008 Share Posted January 24, 2008 complimenti, davvero molto utile!!! Link to comment Share on other sites More sharing options...
Eberk94 Posted February 2, 2008 Share Posted February 2, 2008 utilissimo , ma se lo provo su n proggetto nuovo funziona se lo inserisco sul mio lavoro mi da errore alla riga 31 http://img263.imageshack.us/img263/4932/vegetart8.gifhttp://img117.imageshack.us/img117/4495/hisokazp3.gifhttp://img521.imageshack.us/img521/671/itachivv9.gif http://www.ff-fan.com/chartest/banners/sephiroth.jpgWhich Final Fantasy Character Are You?Final Fantasy 7 --------------------- http://img527.imageshack.us/img527/944/user6.png Link to comment Share on other sites More sharing options...
gianlu Posted December 29, 2010 Share Posted December 29, 2010 ciao wow questo script è una figata anche se a me nn funge io inserisco un commento con scritto begin passante ma nn funge strano http://mypsn.eu.playstation.com/psn/profile/gianlu9767.png Il mio progetto personale: (Sospeso) http://img833.imageshack.us/img833/3821/progresso.png <-------Clicca sul banner per vedere il mio sitoCercasi personale (anche alle prime armi) possibilmente grafico e storyboarder Link to comment Share on other sites More sharing options...
Guardian of Irael Posted December 29, 2010 Share Posted December 29, 2010 Che cosa "nn funge"? Il personaggio non si muove? Non compare per nulla? Ti dà errore? Cerca di specificare per bene quale è il problema.Provato su un nuovo progetto?^ ^ (\_/)(^ ^) <----coniglietto rosso, me! (> <) Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^ http://i.imgur.com/KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^ http://i.imgur.com/FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^ REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^ 🖤http://www.rpg2s.net/dax_games/r2s_regali2s.png E:3 http://www.rpg2s.net/dax_games/xmas/gifnatale123.gifhttp://i.imgur.com/FfvHCGG.png by Testament (notare dettaglio in basso a destra)! E:3http://i.imgur.com/MpaUphY.jpg by Idriu E:3Membro Onorario, Ambasciatore dei Coniglietti (Membro n.44) http://i.imgur.com/PgUqHPm.pngUfficiale"Ad opera della sua onestà e del suo completo appoggio alla causa dei Panda, Guardian Of Irael viene ufficialmente considerato un Membro portante del Partito, e Ambasciatore del suo Popolo presso di noi"http://i.imgur.com/TbRr4iS.png<- Grazie Testament E:3Ricorda...se rivolgi il tuo sguardo ^ ^ a Guardian anche Guardian volge il suo sguardo ^ ^ a te ^ ^http://i.imgur.com/u8UJ4Vm.gifby Flame ^ ^http://i.imgur.com/VbggEKS.gifhttp://i.imgur.com/2tJmjFJ.gifhttp://projectste.altervista.org/Our_Hero_adotta/ado2.pngGrazie Testament XD Fan n°1 ufficiale di PQ! :DVivail Rhaxen! <- Folletto te lo avevo detto (fa pure rima) che nonavevo programmi di grafica per fare un banner su questo pc XD (ora ho dinuovo il mio PC veramente :D) Rosso Guardiano dellahttp://i.imgur.com/Os5rvhx.pngRpg2s RPG BY FORUM:Nome: Darth Reveal PV totali 2PA totali 16Descrizione: ragazzo dai lunghi capelli rossi ed occhi dello stesso colore. Indossa una elegante giacca rossa sopra ad una maglietta nera. Porta pantaloni rossi larghi, una cintura nera e degli stivali dello stesso colore. E' solito trasportare lo spadone dietro la schiena in un fodero apposito. Ha un pendente al collo e tiene ben legato un pezzo di stoffa (che gli sta particolarmente a cuore) intorno al braccio sinistro sotto la giacca, copre una cicatrice.Bozze vesti non definitive qui.Equipaggiamento:Indossa:60$ e 59$ divisi in due tasche interneLevaitanSpada a due mani elsa lungaGuanti del Defender (2PA)Anello del linguaggio animale (diventato del Richiamo)Scrinieri da lanciere (2 PA)Elmo del Leone (5 PA)Corazza del Leone in Ferro Corrazzato (7 PA) ZAINO (20) contenente:Portamonete in pelle di cinghiale contenente: 100$Scatola Sanitaria Sigillata (può contenere e tenere al sicuro fino a 4 oggetti curativi) (contiene Benda di pronto soccorso x3, Pozione di cura)CordaBottiglia di idromeleForma di formaggioTorcia (serve ad illuminare, dura tre settori)Fiasca di ceramica con Giglio Amaro (Dona +1PN e Velocità all'utilizzatore)Ampolla BiancaSemi di Balissa CAVALLO NORMALE + SELLA (30 +2 armi) contentente:66$Benda di pronto soccorso x3Spada a due maniFagotto per Adara (fazzoletto ricamato) Link to comment Share on other sites More sharing options...
gianlu Posted December 29, 2010 Share Posted December 29, 2010 no non lo vedo proprio e questo script è formidabilmente utile mi serve assolutamente comunque lo ho provato su nuovo progetto ma niente http://mypsn.eu.playstation.com/psn/profile/gianlu9767.png Il mio progetto personale: (Sospeso) http://img833.imageshack.us/img833/3821/progresso.png <-------Clicca sul banner per vedere il mio sitoCercasi personale (anche alle prime armi) possibilmente grafico e storyboarder Link to comment Share on other sites More sharing options...
reiky Posted January 4, 2011 Share Posted January 4, 2011 errore di script 'part 2' alla linea 1533 del tipo 'nomethoderror'undefined method 'refresh' for#<game_player:0x7e69218 il part 2 e la parte 2 del Blizz-ABS by Blizzard Versione 2.70 io non saprei dove mettere le mani :) ma questo script mi servirebbe è da poco che ho scoperto rpgmaker xp e mi sta appassionando ma mi ritrovo a fare decine di eventi per i cittadini e per me non è facilissimo...grazie in anticipo Link to comment Share on other sites More sharing options...
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