Lusianl Posted February 4, 2014 Share Posted February 4, 2014 Rock Paper Scissors AutoreSirBilly Descrizione Questo script simula il gioco della carta, sasso e forbice in modo carino e personalizzabile Immagine:http://silentkingdom.com/images/rps.gifScript #=============================================================================== # Rock Paper Scissors (VXA) # Autor : SirBilly (silentkingdom.com) # Version : 1.0 #=============================================================================== # Description #------------------------------------------------------------------------------- # This script provides the mini-game Rock, Paper, Scissors for your game. # The players wins and losses are saved to a variable to give you more options # to use with in your game. For example you can set up an event that you need so # many wins in order for it to start. # #=============================================================================== # Instructions #------------------------------------------------------------------------------- # To install this script, open up your script editor and copy/paste this script # to an open slot below Materials but above Main. # # To open the RPS game scene from an event, you use the following # code in the Script event command. # # SceneManager.call(SK_RPS_Scene) # # All of the configuration is done in the RPS module. #=============================================================================== module SK module RPS #------------------------------------------------------------------------------- # SETUP OPTIONS #------------------------------------------------------------------------------- WELCOME_TEXT = "Lets play some \n Rock Paper Scissors" # Text to show whem the scene is opened. \n is the code for a newline. WINDOW_SKIN = nil # The windowskin to use for the windows "file name". #Located in /Graphics/System/ Set to nil to disable. BGM = true # Play BGM when scene is opened. MENU_BGM = ["Audio/BGM/Town1", 60, 100] # BGM file to play if set to true. file name, volume, and pitch BG_COLOR = [0, 0, 0, 200] # Set the color for background. rgba(255,255,255,255) BACKGROUND = "Actor_RPS" # An image used for the background. Located in /Graphics/Pictures/ BG_X = 0 # X horizontal value on screen to show background. BG_Y = 0 # Y vertical value on screen to show background. ACTOR_VAL = 1 # Variable ID. to keep count of your wins. COMP_VAL = 2 # Variable ID. to keep count of the computers wins. COST_GOLD = true # If set to true you need to pay to play and will display a window for gold. GOLD_X = 1 # X horizontal value on screen to show gold window. GOLD_Y = 4 # Y vertical value on screen to show gold window. GOLD_AMOUNT = 10 # The amount it will cost in order to play if COST_GOLD is ture. WIN_AMOUNT = 2 # The GOLD_AMOUNT to play times WIN_AMOUNT amount. i.e. 10x2 = 20 gold for wining. NO_MONEY_TEXT = "You don't have any money \n come back and see me when you do." # Text to display if you don't have enough money to play NO_MONEY_SE = ["Audio/SE/Buzzer1", 60, 100] # SE if yes is clicked when you have no money. file name, volume, and pitch #------------------------------------------------------------------------------- # END SETUP #=============================================================================== end end #============================================================================== # ** SK_RPS_Scene #------------------------------------------------------------------------------ # This class performs the menu screen processing. #============================================================================== class SK_RPS_Scene < Scene_MenuBase def start super create_command_window create_rps_window create_action_window create_gold_window if SK::RPS::COST_GOLD bgm = SK::RPS::MENU_BGM Audio.bgm_play(bgm[0], bgm[1], bgm[2]) if SK::RPS::BGM end def create_background @background_sprite = Sprite.new @background_sprite.bitmap = SceneManager.background_bitmap bgc = SK::RPS::BG_COLOR @background_sprite.color.set(bgc[0], bgc[1], bgc[2], bgc[3]) background end def background @background = Sprite.new @background.bitmap = Cache.picture(SK::RPS::BACKGROUND) @background.x = SK::RPS::BG_X @background.y = SK::RPS::BG_Y end def dispose_background @background_sprite.dispose @background.dispose end def create_rps_window @rps_window = SK_RPS_Window.new @rps_window.windowskin = Cache.system(SK::RPS::WINDOW_SKIN) unless SK::RPS::WINDOW_SKIN.nil? @rps_window.x = 0 @rps_window.y = Graphics.height - @rps_window.height - 70 end def create_command_window @command_window = SK_RPS_Command_Window.new @command_window.windowskin = Cache.system(SK::RPS::WINDOW_SKIN) unless SK::RPS::WINDOW_SKIN.nil? @command_window.hide.deactivate @command_window.set_handler(:rock, method(:command)) @command_window.set_handler(:paper, method(:command)) @command_window.set_handler(:scissors, method(:command)) end def create_action_window @action_window = SK_RPS_Action_Window.new @action_window.x = 410 @action_window.y = Graphics.height - @rps_window.height - @command_window.height - 20 @action_window.opacity = 0 @action_window.activate @action_window.select(0) @action_window.set_handler(:ok, method(:yes)) @action_window.set_handler(:no, method(:no)) @action_window.set_handler(:cancel, method(:return_scene)) end def create_gold_window @gold_window = Window_Gold.new @gold_window.windowskin = Cache.system(SK::RPS::WINDOW_SKIN) unless SK::RPS::WINDOW_SKIN.nil? @gold_window.x = SK::RPS::GOLD_X @gold_window.y = SK::RPS::GOLD_Y end def command case @command_window.current_symbol when :rock $val = 1 @rps_window.refresh @rps_window.run_game @command_window.unselect @gold_window.refresh if SK::RPS::COST_GOLD @command_window.hide @action_window.show @action_window.activate @action_window.select(0) when :paper $val = 2 @rps_window.refresh @rps_window.run_game @command_window.unselect @gold_window.refresh if SK::RPS::COST_GOLD @command_window.hide @action_window.show @action_window.activate @action_window.select(0) when :scissors $val = 3 @rps_window.refresh @rps_window.run_game @command_window.unselect @gold_window.refresh if SK::RPS::COST_GOLD @command_window.hide @action_window.show @action_window.activate @action_window.select(0) end end def yes if SK::RPS::COST_GOLD != $game_party.gold < SK::RPS::GOLD_AMOUNT $game_party.lose_gold(SK::RPS::GOLD_AMOUNT) @action_window.unselect @action_window.hide @rps_window.refresh @rps_window.play_again @command_window.show @command_window.activate @command_window.select(0) elsif SK::RPS::COST_GOLD != $game_party.gold > SK::RPS::GOLD_AMOUNT Audio.se_stop se = SK::RPS::NO_MONEY_SE Audio.se_play(se[0], se[1], se[2]) @rps_window.refresh @rps_window.no_money @action_window.activate else @action_window.unselect @action_window.hide @rps_window.refresh @rps_window.play_again @command_window.show @command_window.activate @command_window.select(0) end end def no SceneManager.goto(Scene_Map) end def terminate super() dispose_background Audio.bgm_fade(5) end end #============================================================================== # ** SK_RPS_Window #------------------------------------------------------------------------------ # This window displays the play screen. #============================================================================== class SK_RPS_Window < Window_Help def initialize super(3) welcome_text @options = ["rock", "paper", "scissors"] end def welcome_text draw_text_ex(1, 1, SK::RPS::WELCOME_TEXT) end def run_game @val = $val @r = rand(3) + 1 if @val == @r out_come; draw_text_ex(1, line_height * 2, " It's a Tie, next Throw?") if SK::RPS::COST_GOLD $game_party.gain_gold(SK::RPS::GOLD_AMOUNT) end elsif @val == 1 and @r == 3 out_come; draw_text_ex(1, line_height * 2, " Rock blunts scissors, you Win. Throw again?"); $game_variables[SK::RPS::ACTOR_VAL] += 1 if SK::RPS::COST_GOLD $game_party.gain_gold(SK::RPS::GOLD_AMOUNT * SK::RPS::WIN_AMOUNT) end elsif @val == 3 and @r == 1 out_come; draw_text_ex(1, line_height * 2, " Rock blunts scissors, you Loose. Throw again?"); $game_variables[SK::RPS::COMP_VAL] += 1 elsif @val == 3 and @r == 2 out_come; draw_text_ex(1, line_height * 2, " Scissors cut paper, you Win. Throw again?"); $game_variables[SK::RPS::ACTOR_VAL] += 1 if SK::RPS::COST_GOLD $game_party.gain_gold(SK::RPS::GOLD_AMOUNT * SK::RPS::WIN_AMOUNT) end elsif @val == 2 and @r == 3 out_come; draw_text_ex(1, line_height * 2, " Scissors cut paper, you Loose. Throw again?"); $game_variables[SK::RPS::COMP_VAL] += 1 elsif @val == 2 and @r == 1 out_come; draw_text_ex(1, line_height * 2, " Paper covers rock, you Win. Throw again?"); $game_variables[SK::RPS::ACTOR_VAL] += 1 if SK::RPS::COST_GOLD $game_party.gain_gold(SK::RPS::GOLD_AMOUNT * SK::RPS::WIN_AMOUNT) end elsif @val == 1 and @r == 2 out_come; draw_text_ex(1, line_height * 2, " Paper covers rock, you Loose. Throw again?"); $game_variables[SK::RPS::COMP_VAL] += 1 end end def out_come computer = @options[@r-1] human = @options[@val-1] draw_text_ex(1, 1, "I have #{computer}, you have #{human}.") end def play_again human = $game_variables[SK::RPS::ACTOR_VAL] computer = $game_variables[SK::RPS::COMP_VAL] draw_text_ex(1, 1, "Wins \\C[11]#{human}\\C[0], losses \\C[18]#{computer}\\C[0].") draw_text_ex(1, line_height * 2, "Rock-Paper-Scissors") end def no_money draw_text_ex(1, 1, SK::RPS::NO_MONEY_TEXT) end end #============================================================================== # ** SK_RPS_Command_Window #------------------------------------------------------------------------------ # This window displays the menu screen. #============================================================================== class SK_RPS_Command_Window < Window_HorzCommand def initialize super(22, 353) end def window_width return Graphics.width - 160 end def window_height return 50 end def line_height return 42 end def standard_padding return 4 end def col_max return 3 end def make_command_list add_main_commands end def add_main_commands add_command("Rock", :rock) add_command("Paper", :paper) add_command("Scissors", :scissors) end end #============================================================================== # ** SK_RPS_Action_Window #------------------------------------------------------------------------------ # This window displays secondary menu screen. #============================================================================== class SK_RPS_Action_Window < Window_Command def initialize super(0, 0) end def window_width return 130 end def standard_padding return 8 end def make_command_list add_main_commands end def add_main_commands add_command("Yes", :yes) add_command("No", :no) end end Immagine da inserire nella cartella PICTUREhttp://silentkingdom.com/images/Actor_RPS.png http://www.freankexpo.net/signature/1129.pngPremi RpgMaker http://www.rpg2s.net/forum/uploads/monthly_01_2017/msg-293-0-48316500-1483794996.jpghttp://www.rpg2s.net/dax_games/r2s_regali2.pngContesthttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif http://rpg2s.net/gif/SCContest1Oct.gif http://rpg2s.net/gif/SCContest2Oct.gif http://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest1Oct.gifhttp://www.rpg2s.net/awards/bestpixel2.jpghttp://www.rpg2s.net/awards/bestresourCSist2.jpghttp://www.rpg2s.net/awards/mostproductive1.jpghttp://i42.servimg.com/u/f42/13/12/87/37/iconap13.pnghttp://i42.servimg.com/u/f42/13/12/87/37/iconap14.pnghttp://i42.servimg.com/u/f42/13/12/87/37/iconap15.pnghttp://i42.servimg.com/u/f42/13/12/87/37/iconap16.pnghttp://i42.servimg.com/u/f42/13/12/87/37/screen10.pnghttp://www.rpgmkr.net/contest/screen-contest-primo.pnghttp://www.makerando.com/forum/uploads/jawards/iconawards3.png Link to comment Share on other sites More sharing options...
Guardian of Irael Posted February 4, 2014 Share Posted February 4, 2014 Vedo che c'è tanta personalizzazione, sì ^ ^C'è da dire che sarebbe un sistema da provare a fare prima ad eventi per prendere la mano, non è difficile da ricreare, ma con alcune variabili lo script ti facilita la vita ^ ^ (\_/)(^ ^) <----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...
Midi Posted February 4, 2014 Share Posted February 4, 2014 (edited) Non male, piuttosto semplice ma efficace.Lo script però è decisamente "sporco". Realizzato con un po' troppa approssimazione. La cosa peggiore in assoluto è che non è prevista un'opzione per modificare il testo delle scelte (Sasso-Carta-Forbice al posto di Rock-Paper-Scissor) e per modificare i testi in generale (vittoria, sconfitta, pareggio, "io ho Sasso, tu hai Forbici", eccetera).A guardare bene nel codice ovviamente si può facilmente intuire i punti da modificare, ma sarebbe sempre buona norma evitarlo.La metà della gente che usa gli script non ha la più pallida idea di come funzionino, e costringerli a toccare direttamente il codice semplicemente per mettere una frase in italiano o modificare un'opzione è un invito a creare casino... >_> Edited February 4, 2014 by Midi Aurora Dreaming The Dreamer (v. 1.1) - standalone 72 MB - Il prequel ad Aurora Dreaming segui il dev-diary ufficiale di Aurora Dreaming! Bacheca Premi http://www.rpg2s.net/forum/uploads/monthly_01_2014/post-6-0-39588100-1390575633.png Link to comment Share on other sites More sharing options...
La fine di An Another Life Posted February 4, 2014 Share Posted February 4, 2014 Si, può fare tranquillamente ad eventi... e lo script non mi sembra che dia opzioni in più. CYNDA BYTEShttp://i1220.photobucket.com/albums/dd458/Cyndaquil_Bytes/Cyndabytes.pngCreiamo mondi, storie e giochi che possano emozionare.DEV BLOG <-- Ultime notizie e approfondimenti so quello che stiamo facendo.SOCIAL Non dimenticarti di seguirmi! FACEBOOK TWITTER YOUTUBE GOOGLE PLUS DEVIANTART An Another Life Uan-Ciù The WEBCOMICFumetto online demenziale gratuito che parodizza i manga giapponesi e i giochi di ruolo:arti marziali, J-Rpg, magia, shonen, combattimenti, ignoranza, tette e tante botte! Leggilo qui sul forum!Puoi seguirci su Facebook, Twitter o Deviantart. Se il fumetto ti piace, per sostenerci e spronarci ad andare avanti metti un like <3 sui social,oppure votaci su shockdom! Puoi leggere quest webcomic anche sul nostro blog ufficiale. GIOCHI COMPLETIScarica, gioca e commenta i miei giochi per sostenere il making italiano. Bloody Repression (in Inglese, versione ITA disponibile nel topic) -> Topic Ufficiale\ Trailer starring Martis \ Video Gameplay ITA \ Short Gameplay Video ENGhttp://www.freankexpo.net/signature/1026.pngLOVE & WAR NEVER CHANGE -> Topic Ufficiale \ Let's Play By MartisUn gioco breve dalla storia toccante. 2° Posto all Short RTP Game Contest. http://www.freankexpo.net/signature/666.pngSe non vuoi perderti tutto il mondo della Cynda Bytes (trofei, regali, webcomics, contest...), apri lo spoiler. Lo so che lo vuoi. GIOCHI IN SVILUPPOGODS HATE USTopic UfficialeAASTROR WARTopic Ufficiale AN ANOTHER LIFE Da dove tutto è cominciato, un gioco lollo (non nel senso che l'ha fatto Lollo, eh), arcaico e noob dell'anno 2003 (più di una decade!).Richiede RTP Inglesi e forse manca qualche altro file.Piacizzate su Facebook per leggere direttamente lì, oppure sul topic ufficiale. CONTESTRPG2S CHARA BATTLE ROYAL TOURNAMENT 2012SHORT RTP GAME CONTEST 2013http://s8.postimg.org/yntv9nxld/Banner.pngINDIE GAME MAKING CONTEST 2015 con GODS HATE US - BLOODY REPRESSION REGALIhttp://www.rpg2s.net/dax_games/r2s_regali5s.png TROFEIhttp://rpg2s.net/gif/SCContest2Oct.gif http://www.rpg2s.net/forum/uploads/monthly_12_2013/post-6-0-84168400-1388406007.png"I'm a Dream Maker, Bitch!" Link to comment Share on other sites More sharing options...
siengried Posted February 4, 2014 Share Posted February 4, 2014 (edited) Non è stato difficile tradurlo...ecco qui lo script in italiano:Ps:Merito rens? #===============================================================================# Rock Paper Scissors (VXA)# Autor : SirBilly (silentkingdom.com)# Version : 1.0#===============================================================================# Descrizione#-------------------------------------------------------------------------------# Questo script ti eprmette di giocare al minigioco Carta Sasso Forbici.# Le vincite e le sconfitte del player sono salvate in una variabile per# permettere l'uso di alcuni eventi.Per esempio puoi creare un evento che# parte solo quando hai fatto un tot di vittorie.#===============================================================================# Instruzioni#-------------------------------------------------------------------------------# Per istallare lo script fare copia/taglia nella sezione script in uno slot# sotto Materila ma sopra Main.## Per avviare il minigioco aprire il comando script e incollarci questo# codice:## SceneManager.call(SK_RPS_Scene)## Tutte le configurazioni sono effettuate nel RPS module.#===============================================================================module SK module RPS#-------------------------------------------------------------------------------# SETUP OPTIONS#------------------------------------------------------------------------------- WELCOME_TEXT = "Giochiamo a \n Sasso Carta Forbici" # Testo da mostrare non appena parte il minigioco. \n è per andare a capo. WINDOW_SKIN = nil # La windowskin da usare "file name". # Che si trova in /Graphics/System/ nil per disattivare. BGM = true # Parte una BGM quando si avvia il gioco MENU_BGM = ["Audio/BGM/Town1", 60, 100] # File BGM da far partire. nome, volume, e tempo. BG_COLOR = [0, 0, 0, 200] # Colore dello sfondo. rgba(255,255,255,255) BACKGROUND = "Actor_RPS" # Un'immagine di sfondo situata in /Graphics/Pictures/ BG_X = 0 # Coordinate X dove mostrare lo sfondo BG_Y = 0 # Coordinate Y dove mostrare lo sfondo ACTOR_VAL = 1 # ID della variabile che conterà le vincite. COMP_VAL = 2 # ID della variabile che conterà le sconfitte. COST_GOLD = true # Se messa su true dovrai pagare per giocare e verrà mostrata la finestra dell'oro GOLD_X = 1 # Coordinate X dove mostrare la finestra dell'oro GOLD_Y = 4 # Coordinate Y dove mostrare la finestra dell'oro GOLD_AMOUNT = 10 # L'ammontare di oro che costa la partita se COST_GOLD se è true. WIN_AMOUNT = 2 # Il moltiplicatore di soldi scommessi in caso di vincita. Es 10x2 = 20 oro vinti. NO_MONEY_TEXT = "Non hai abbastanza soldi." # Testo da mostrare se non hai abbastanza soldi. NO_MONEY_SE = ["Audio/SE/Buzzer1", 60, 100] # SE se clicchi quando non hai abbastanza soldi. nome, volume, e tempo.#-------------------------------------------------------------------------------# FINE SETUP#=============================================================================== endend#==============================================================================# ** SK_RPS_Scene#------------------------------------------------------------------------------# This class performs the menu screen processing.#==============================================================================class SK_RPS_Scene < Scene_MenuBase def start super create_command_window create_rps_window create_action_window create_gold_window if SK::RPS::COST_GOLD bgm = SK::RPS::MENU_BGM Audio.bgm_play(bgm[0], bgm[1], bgm[2]) if SK::RPS::BGM end def create_background @background_sprite = Sprite.new @background_sprite.bitmap = SceneManager.background_bitmap bgc = SK::RPS::BG_COLOR @background_sprite.color.set(bgc[0], bgc[1], bgc[2], bgc[3]) background end def background @background = Sprite.new @background.bitmap = Cache.picture(SK::RPS::BACKGROUND) @background.x = SK::RPS::BG_X @background.y = SK::RPS::BG_Y end def dispose_background @background_sprite.dispose @background.dispose end def create_rps_window @rps_window = SK_RPS_Window.new @rps_window.windowskin = Cache.system(SK::RPS::WINDOW_SKIN) unless SK::RPS::WINDOW_SKIN.nil? @rps_window.x = 0 @rps_window.y = Graphics.height - @rps_window.height - 70 end def create_command_window @command_window = SK_RPS_Command_Window.new @command_window.windowskin = Cache.system(SK::RPS::WINDOW_SKIN) unless SK::RPS::WINDOW_SKIN.nil? @command_window.hide.deactivate @command_window.set_handler(:rock, method(:command)) @command_window.set_handler(:paper, method(:command)) @command_window.set_handler(:scissors, method(:command)) end def create_action_window @action_window = SK_RPS_Action_Window.new @action_window.x = 410 @action_window.y = Graphics.height - @rps_window.height - @command_window.height - 20 @action_window.opacity = 0 @action_window.activate @action_window.select(0) @action_window.set_handler(:ok, method(:yes)) @action_window.set_handler(:no, method(:no)) @action_window.set_handler(:cancel, method(:return_scene)) end def create_gold_window @gold_window = Window_Gold.new @gold_window.windowskin = Cache.system(SK::RPS::WINDOW_SKIN) unless SK::RPS::WINDOW_SKIN.nil? @gold_window.x = SK::RPS::GOLD_X @gold_window.y = SK::RPS::GOLD_Y end def command case @command_window.current_symbol when :rock $val = 1 @rps_window.refresh @rps_window.run_game @command_window.unselect @gold_window.refresh if SK::RPS::COST_GOLD @command_window.hide @action_window.show @action_window.activate @action_window.select(0) when :paper $val = 2 @rps_window.refresh @rps_window.run_game @command_window.unselect @gold_window.refresh if SK::RPS::COST_GOLD @command_window.hide @action_window.show @action_window.activate @action_window.select(0) when :scissors $val = 3 @rps_window.refresh @rps_window.run_game @command_window.unselect @gold_window.refresh if SK::RPS::COST_GOLD @command_window.hide @action_window.show @action_window.activate @action_window.select(0) end end def yes if SK::RPS::COST_GOLD != $game_party.gold < SK::RPS::GOLD_AMOUNT $game_party.lose_gold(SK::RPS::GOLD_AMOUNT) @action_window.unselect @action_window.hide @rps_window.refresh @rps_window.play_again @command_window.show @command_window.activate @command_window.select(0) elsif SK::RPS::COST_GOLD != $game_party.gold > SK::RPS::GOLD_AMOUNT Audio.se_stop se = SK::RPS::NO_MONEY_SE Audio.se_play(se[0], se[1], se[2]) @rps_window.refresh @rps_window.no_money @action_window.activate else @action_window.unselect @action_window.hide @rps_window.refresh @rps_window.play_again @command_window.show @command_window.activate @command_window.select(0) end end def no SceneManager.goto(Scene_Map) end def terminate super() dispose_background Audio.bgm_fade(5) endend#==============================================================================# ** SK_RPS_Window#------------------------------------------------------------------------------# This window displays the play screen.#==============================================================================class SK_RPS_Window < Window_Help def initialize super(3) welcome_text @options = ["sasso", "carta", "forbici"] end def welcome_text draw_text_ex(1, 1, SK::RPS::WELCOME_TEXT) end def run_game @val = $val @r = rand(3) + 1 if @val == @r out_come; draw_text_ex(1, line_height * 2, " E' un pareggio, rigiochiamo?") if SK::RPS::COST_GOLD $game_party.gain_gold(SK::RPS::GOLD_AMOUNT) end elsif @val == 1 and @r == 3 out_come; draw_text_ex(1, line_height * 2, " Sasso batte Forbici, hai vinto. Rigiochiamo?"); $game_variables[sK::RPS::ACTOR_VAL] += 1 if SK::RPS::COST_GOLD $game_party.gain_gold(SK::RPS::GOLD_AMOUNT * SK::RPS::WIN_AMOUNT) end elsif @val == 3 and @r == 1 out_come; draw_text_ex(1, line_height * 2, " Sasso batte forbici, hai perso. Rigiochiamo?"); $game_variables[sK::RPS::COMP_VAL] += 1 elsif @val == 3 and @r == 2 out_come; draw_text_ex(1, line_height * 2, " Forbici batte carta, hai vinto. Rigiochiamo?"); $game_variables[sK::RPS::ACTOR_VAL] += 1 if SK::RPS::COST_GOLD $game_party.gain_gold(SK::RPS::GOLD_AMOUNT * SK::RPS::WIN_AMOUNT) end elsif @val == 2 and @r == 3 out_come; draw_text_ex(1, line_height * 2, " Forbici batte carta, hai perso. Rigiochiamo?"); $game_variables[sK::RPS::COMP_VAL] += 1 elsif @val == 2 and @r == 1 out_come; draw_text_ex(1, line_height * 2, " Carta batte sasso, hai vinto. Rigiochiamo?"); $game_variables[sK::RPS::ACTOR_VAL] += 1 if SK::RPS::COST_GOLD $game_party.gain_gold(SK::RPS::GOLD_AMOUNT * SK::RPS::WIN_AMOUNT) end elsif @val == 1 and @r == 2 out_come; draw_text_ex(1, line_height * 2, " Carta batte sasso,hai perso. Rigiochiamo"); $game_variables[sK::RPS::COMP_VAL] += 1 end end def out_come computer = @options[@r-1] human = @options[@val-1] draw_text_ex(1, 1, "Io ho #{computer}, tu hai #{human}.") end def play_again human = $game_variables[sK::RPS::ACTOR_VAL] computer = $game_variables[sK::RPS::COMP_VAL] draw_text_ex(1, 1, "Vinte \\C[11]#{human}\\C[0], Perse \\C[18]#{computer}\\C[0].") draw_text_ex(1, line_height * 2, "Sasso-Carta-Forbici") end def no_money draw_text_ex(1, 1, SK::RPS::NO_MONEY_TEXT) end end#==============================================================================# ** SK_RPS_Command_Window#------------------------------------------------------------------------------# This window displays the menu screen.#==============================================================================class SK_RPS_Command_Window < Window_HorzCommand def initialize super(22, 353) end def window_width return Graphics.width - 160 end def window_height return 50 end def line_height return 42 end def standard_padding return 4 end def col_max return 3 end def make_command_list add_main_commands end def add_main_commands add_command("Sasso", :rock) add_command("Carta", :paper) add_command("Forbici", :scissors) endend #==============================================================================# ** SK_RPS_Action_Window#------------------------------------------------------------------------------# This window displays secondary menu screen.#==============================================================================class SK_RPS_Action_Window < Window_Command def initialize super(0, 0) end def window_width return 130 end def standard_padding return 8 end def make_command_list add_main_commands end def add_main_commands add_command("Si", :yes) add_command("No", :no) endend Edited February 4, 2014 by siengried Link to comment Share on other sites More sharing options...
Guardian of Irael Posted February 4, 2014 Share Posted February 4, 2014 @Sien: puoi richiederli come script tradotto (linka per bene il tuo messaggio), ma non in caso come link postato XD^ ^ (\_/)(^ ^) <----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...
siengried Posted February 4, 2014 Share Posted February 4, 2014 Si lo so vale come script tradotto xD Link to comment Share on other sites More sharing options...
Nunzio92 Posted June 7, 2019 Share Posted June 7, 2019 E possibile utilizzarlo in battaglia? 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