Kingartur2 Posted July 24, 2009 Share Posted July 24, 2009 mi servirebbe uno script che comprendesse solo una banca degli oggetti.Ve lo chiedo dopo aver tentat inutilmente per mezz'ora di modificare script di banche oggetti e soldi 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 Andre4e Posted September 2, 2009 Share Posted September 2, 2009 Dopo 3000 ore ci sono riuscito finalmente Ecco qua la banca x soli oggettiHo messo font arial poi cambialo come vuoi tedimmi se ci sono problemi! #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/#_/script da fare nell'evento: --> chiama_banca <--#_/----------------------------------------------------------------------------#_/ ??????????????????????????#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/module KGC$game_special_elements = {}$imported = {}$data_states = load_data("Data/States.rxdata")$data_system = load_data("Data/System.rxdata")end#==============================================================================# ? ???????? ?#============================================================================== module KGC # ??????????????DEPOSITORY_COMMAND = [ "Deposita Oggetti", # ????????"Ritira Oggetti",# ?????????]# ????????????DEPOSITORY_HELP = [ "Deposita Oggetti", # ????????"Ritira Oggetti" ,# ?????????] # ????????????????(????????) DEPOSIT_ITEM = "Deposita Oggetti"# ?????????????????(???????)WDEPOSIT_ITEM = "Ritira Oggetti"end #??????????????????????????????????????? $imported = {} if $imported == nil$imported["Banca"] = true #--------------------------------------------------------------------------# ? ????????#--------------------------------------------------------------------------def chiama_banca# ???????????$game_player.straighten# ???????????$scene = Scene_Depository.newend #??????????????????????????????????????? #==============================================================================# ¦ Game_Party#============================================================================== class Game_Party#--------------------------------------------------------------------------# ? ?????????#--------------------------------------------------------------------------alias initialize_KGC_Depository initializedef initialize# ??????? initialize_KGC_Depository $defaultfonttype = "Arial" @deposit_item, @deposit_weapon, @deposit_armor = [], [], []end#--------------------------------------------------------------------------# ? ??????#-------------------------------------------------------------------------- #--------------------------------------------------------------------------# ? ??????# number : ???#--------------------------------------------------------------------------#--------------------------------------------------------------------------# ? ??????# number : ???#-------------------------------------------------------------------------- #--------------------------------------------------------------------------# ? ?????????# id : ID#--------------------------------------------------------------------------def deposit_item_number(id) $defaultfonttype = "Arial"@deposit_item = [] if @deposit_item == nilreturn @deposit_item[id] != nil ? @deposit_item[id] : 0end#--------------------------------------------------------------------------# ? ?????????# id : ID# number : ??#--------------------------------------------------------------------------def gain_deposit_item(id, number) $defaultfonttype = "Arial"@deposit_item = [] if @deposit_item == nil@deposit_item[id] = 0 if @deposit_item[id] == nil@deposit_item[id] += numberend#--------------------------------------------------------------------------# ? ?????????# id : ID# number : ??#--------------------------------------------------------------------------def lose_deposit_item(id, number) $defaultfonttype = "Arial"self.gain_deposit_item(id, -number)end#--------------------------------------------------------------------------# ? ???????# id : ID#--------------------------------------------------------------------------def deposit_weapon_number(id)@deposit_weapon = [] if @deposit_weapon == nilreturn @deposit_weapon[id] != nil ? @deposit_weapon[id] : 0end#--------------------------------------------------------------------------# ? ???????# id : ID# number : ??#--------------------------------------------------------------------------def gain_deposit_weapon(id, number)@deposit_weapon = [] if @deposit_weapon == nil@deposit_weapon[id] = 0 if @deposit_weapon[id] == nil@deposit_weapon[id] += numberend#--------------------------------------------------------------------------# ? ???????# id : ID# number : ??#--------------------------------------------------------------------------def lose_deposit_weapon(id, number)self.gain_deposit_weapon(id, -number)end#--------------------------------------------------------------------------# ? ???????# id : ID#--------------------------------------------------------------------------def deposit_armor_number(id)@deposit_armor = [] if @deposit_armor == nilreturn @deposit_armor[id] != nil ? @deposit_armor[id] : 0end#--------------------------------------------------------------------------# ? ???????# id : ID# number : ??#--------------------------------------------------------------------------def gain_deposit_armor(id, number)@deposit_armor = [] if @deposit_armor == nil@deposit_armor[id] = 0 if @deposit_armor[id] == nil@deposit_armor[id] += numberend#--------------------------------------------------------------------------# ? ???????# id : ID# number : ??#--------------------------------------------------------------------------def lose_deposit_armor(id, number)self.gain_deposit_armor(id, -number)endend #??????????????????????????????????????? #==============================================================================# ¦ Window_DepositoryCommand#------------------------------------------------------------------------------# ???????????????????????#============================================================================== class Window_DepositoryCommand < Window_Selectable#--------------------------------------------------------------------------# ? ?????????#--------------------------------------------------------------------------def initializesuper(0, 64, 640, 64)self.y = 128 if $imported["HelpExtension"]self.contents = Bitmap.new(width - 32, height - 32)self.contents.font.name = "Arial"self.contents.font.size = 20# ?????????@commands = KGC::DEPOSITORY_COMMAND@item_max = 2 #@commands.size@column_max = 2 #@commands.size@item_width = (width - 32) / 2 #@commands.sizeself.back_opacity = 160self.index = 0refreshend#--------------------------------------------------------------------------# ? ??????#--------------------------------------------------------------------------def refreshfor i in 0...2 #@commands.sizerect = Rect.new(@item_width * i, 0, @item_width, 32)self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))self.contents.font.color = system_colorself.contents.font.name = "Arial"self.contents.draw_text(rect, @commands, 1)endend#--------------------------------------------------------------------------# ? ?????????#--------------------------------------------------------------------------def update_cursor_rectif index != -1self.cursor_rect.set(@item_width * index, 0, @item_width, 32)endend#--------------------------------------------------------------------------# ? ?????????#--------------------------------------------------------------------------def update_help$defaultfonttype = "Arial"@help_window.set_text(KGC::DEPOSITORY_HELP[self.index])endend #??????????????????????????????????????? #==============================================================================##------------------------------------------------------------------------------# ???????????????????????#============================================================================== #==============================================================================# ¦ Window_DepositoryItem#------------------------------------------------------------------------------# ???????????????????????????????#============================================================================== class Window_DepositoryItem < Window_Selectable#--------------------------------------------------------------------------# ? ?????????#--------------------------------------------------------------------------def initializesuper(0, 128, 640, 352)if $imported["HelpExtension"]self.y = 192self.height = 288endself.back_opacity = 160self.active = falseself.visible = false@column_max = 2#self.contents.font.name = "Arial"#self.contents.font.size = 20self.index = 0end#--------------------------------------------------------------------------# ? ???????#--------------------------------------------------------------------------def itemreturn @data[self.index]end#--------------------------------------------------------------------------# ? ??????# type : ??#--------------------------------------------------------------------------def refresh(type)if self.contents != nilself.contents.disposeself.contents = nilend@data = []self.index = 0# ????·??·?????if type == 0for i in 1...$data_items.sizeif $game_party.item_number(i) > 0@data.push($data_items)endendfor i in 1...$data_weapons.sizeif $game_party.weapon_number(i) > 0@data.push($data_weapons)endendfor i in 1...$data_armors.sizeif $game_party.armor_number(i) > 0@data.push($data_armors)endendelsefor i in 1...$data_items.sizeif $game_party.deposit_item_number(i) > 0@data.push($data_items)endendfor i in 1...$data_weapons.sizeif $game_party.deposit_weapon_number(i) > 0@data.push($data_weapons)endendfor i in 1...$data_armors.sizeif $game_party.deposit_armor_number(i) > 0@data.push($data_armors)endend end# ???? 0 ??????????????????????@item_max = @data.sizeif @item_max > 0self.contents = Bitmap.new(width - 32, row_max * 32)for i in 0...@item_maxdraw_item(i, type)endendend#--------------------------------------------------------------------------# ? ?????# index : ????# type : ??#--------------------------------------------------------------------------def draw_item(index, type) $defaultfonttype = "Arial"item = @data[index]case itemwhen RPG::Itemnumber = type == 0 ? $game_party.item_number(item.id) :$game_party.deposit_item_number(item.id)when RPG::Weaponnumber = type == 0 ? $game_party.weapon_number(item.id) :$game_party.deposit_weapon_number(item.id)when RPG::Armornumber = type == 0 ? $game_party.armor_number(item.id) :$game_party.deposit_armor_number(item.id)endx = 4 + index % 2 * (288 + 32)y = index / 2 * 32rect = Rect.new(x, y, self.width / @column_max - 32, 32)self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))bitmap = RPG::Cache.icon(item.icon_name)self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)self.contents.draw_text(x + 240, y, 16, 32, ":", 1)self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)end#--------------------------------------------------------------------------# ? ?????????#--------------------------------------------------------------------------def update_help $defaultfonttype = "Arial" @help_window.set_text(self.item == nil ? "" : self.item.description)endend #??????????????????????????????????????? #==============================================================================# ¦ Window_DepositoryNumber#------------------------------------------------------------------------------# ????????????????????????#============================================================================== class Window_DepositoryNumber < Window_Base#--------------------------------------------------------------------------# ? ?????????#--------------------------------------------------------------------------def initialize $defaultfonttype = "Arial"@digits_max, @number = 2, 0# ??????????????? (0~9 ??????)dummy_bitmap = Bitmap.new(32, 32)@cursor_width = dummy_bitmap.text_size("0").width + 8dummy_bitmap.dispose@default_size = @cursor_width * @digits_max + 32super(0, 0, @default_size, 128)self.contents = Bitmap.new(width - 32, height - 32)self.z = 1000self.back_opacity = 160self.active = falseself.visible = false@index = 0@item = nilrefreshupdate_cursor_rectself.contents.font.name = "Arial"self.contents.font.size = 20end#--------------------------------------------------------------------------# ? ???????# item : ????#--------------------------------------------------------------------------def item=(item)@item = itemend#--------------------------------------------------------------------------# ? ?????#--------------------------------------------------------------------------def numberreturn @numberend#--------------------------------------------------------------------------# ? ?????# number : ?????#--------------------------------------------------------------------------def number=(number)@number = [[number, 0].max, @max].minrefreshend#--------------------------------------------------------------------------# ? ?????????#--------------------------------------------------------------------------def update_cursor_rectself.cursor_rect.set(@index * @cursor_width, 32, @cursor_width, 32)end#--------------------------------------------------------------------------# ? ????#--------------------------------------------------------------------------def reset(type)@number = 0@index = @digits_max - 1if type == 0case @itemwhen RPG::Item@max = $game_party.item_number(@item.id)dep = $game_party.deposit_item_number(@item.id)when RPG::Weapon@max = $game_party.weapon_number(@item.id)dep = $game_party.deposit_weapon_number(@item.id)when RPG::Armor@max = $game_party.armor_number(@item.id)dep = $game_party.deposit_armor_number(@item.id)end# ??????????self.contents.fill_rect(0, 64, width - 32, 32, Color.new(0, 0, 0, 0))self.contents.font.color = system_colorself.contents.font.name = "Arial"self.contents.draw_text(0, 64, width - 32, 32, "#{dep} Depositati")elsecase @itemwhen RPG::Item@max = [$game_party.deposit_item_number(@item.id),10 ** @digits_max - $game_party.item_number(@item.id) - 1].minhaving = $game_party.item_number(@item.id)when RPG::Weapon@max = [$game_party.deposit_weapon_number(@item.id),10 ** @digits_max - $game_party.weapon_number(@item.id) - 1].minhaving = $game_party.weapon_number(@item.id)when RPG::Armor@max = [$game_party.deposit_armor_number(@item.id),10 ** @digits_max - $game_party.armor_number(@item.id) - 1].minhaving = $game_party.armor_number(@item.id)end# ??????self.contents.fill_rect(0, 64, width - 32, 32, Color.new(0, 0, 0, 0))self.contents.font.color = system_colorself.contents.font.name = "Arial"self.contents.draw_text(0, 64, width - 32, 32, "#{having} Posseduti")endrefreshend#--------------------------------------------------------------------------# ? ??????#--------------------------------------------------------------------------def refreshself.contents.fill_rect(0, 32, width - 32, 32, Color.new(0, 0, 0, 0))self.contents.font.color = normal_colors = sprintf("%0*d", @digits_max, @number)for i in 0...@digits_maxself.contents.draw_text(i * @cursor_width + 4, 32, 32, 32, s[i,1])endend#--------------------------------------------------------------------------# ? ?????# string : ?????#--------------------------------------------------------------------------def set_text(string = " ")self.resize(self.contents.text_size(string).width + 40)self.contents.fill_rect(0, 0, width - 32, 32, Color.new(0, 0, 0, 0))self.contents.font.color = normal_colorself.contents.draw_text(0, 0, width - 32, 32, string, 1)refreshcenteringend#--------------------------------------------------------------------------# ? ?????# nw : ????#--------------------------------------------------------------------------def resize(nw)self.width = nwbuf = self.contents.dupself.contents.disposeself.contents = Bitmap.new(nw - 32, 96)self.contents.blt(0, 0, buf, buf.rect)buf.disposeend#--------------------------------------------------------------------------# ? ????#--------------------------------------------------------------------------def centeringself.x = 320 - self.width / 2self.y = 240 - self.height / 2end#--------------------------------------------------------------------------# ? ??????#--------------------------------------------------------------------------def updatesuperreturn unless self.active# ????????????????if Input.repeat?(Input::UP) || Input.repeat?(Input::DOWN)$game_system.se_play($data_system.cursor_se)# ???????????????? 0 ???place = 10 ** (@digits_max - 1 - @index)n = self.number / place % 10self.number -= n * place# ??? +1???? -1n = (n + 1) % 10 if Input.repeat?(Input::UP)n = (n + 9) % 10 if Input.repeat?(Input::DOWN)# ???????????self.number += n * placerefreshend# ?????if Input.repeat?(Input::RIGHT)if @digits_max >= 2$game_system.se_play($data_system.cursor_se)@index = (@index + 1) % @digits_maxendend# ?????if Input.repeat?(Input::LEFT)if @digits_max >= 2$game_system.se_play($data_system.cursor_se)@index = (@index + @digits_max - 1) % @digits_maxendendupdate_cursor_rectendend #??????????????????????????????????????? #==============================================================================# ¦ Scene_Depository#------------------------------------------------------------------------------# ??????????????????#============================================================================== class Scene_Depository#--------------------------------------------------------------------------# ? ?????#--------------------------------------------------------------------------def main# ??????????@spriteset = Spriteset_Map.new# ??????????if $imported["HelpExtension"]@dummy_window = Window_Base.new(0, 192, 640, 288)@help_window = Window_HelpExtension.newelse@dummy_window = Window_Base.new(0, 128, 640, 352)@help_window = Window_Help.newend@dummy_window.back_opacity = 160@help_window.back_opacity = 160@command_window = Window_DepositoryCommand.new @item_window = Window_DepositoryItem.new@number_window = Window_DepositoryNumber.new# ?????????????@command_window.help_window = @help_window@item_window.help_window = @help_window# ?????????Graphics.transition# ??????loop do# ????????Graphics.update# ???????Input.update# ??????update# ????????????????if $scene != selfbreakendend# ?????????Graphics.freeze# ??@spriteset.dispose@dummy_window.dispose@help_window.dispose@command_window.dispose @item_window.dispose@number_window.disposeend#--------------------------------------------------------------------------# ? ??????#--------------------------------------------------------------------------def update# ????????@dummy_window.update@help_window.update@command_window.update @item_window.update@number_window.update# ??????????????????: update_command ???if @command_window.activeupdate_commandreturnend # ??????????????????: update_item ???if @item_window.activeupdate_itemreturnend# ????????????????: update_number ???if @number_window.activeupdate_numberreturnendend#--------------------------------------------------------------------------# ? ?????? (??????????????????)#--------------------------------------------------------------------------def update_command# B ??????????if Input.trigger?(Input::B)# ????? SE ???$game_system.se_play($data_system.cancel_se)# ??????????$scene = Scene_Map.newreturnend# C ??????????if Input.trigger?(Input::C)# ?? SE ???$game_system.se_play($data_system.decision_se)# ?????????case @command_window.index when 0# ??????????????@item_window.active = true@item_window.visible = true@item_window.refresh(0)when 1# ??????????????@item_window.active = true@item_window.visible = true@item_window.refresh(1)end@command_window.active = false# ??????????@dummy_window.visible = falsereturnendend#--------------------------------------------------------------------------# ? ?????? (??????????????????)#-------------------------------------------------------------------------- #--------------------------------------------------------------------------# ? ?????? (??????????????????)#--------------------------------------------------------------------------def update_item# B ??????????if Input.trigger?(Input::B)# ????? SE ???$game_system.se_play($data_system.cancel_se)# ??????????????@command_window.active = true@item_window.active = false@item_window.visible = false@dummy_window.visible = truereturnend# C ??????????if Input.trigger?(Input::C)# ?????????@item = @item_window.item# ?????if @item == nil# ??? SE ???$game_system.se_play($data_system.buzzer_se)returnend# ???????????????@number_window.item = @item# ?? SE ???$game_system.se_play($data_system.decision_se)# ?????????case @command_window.indexwhen 0 # ???@number_window.set_text(KGC::DEPOSIT_ITEM)when 1# ????@number_window.set_text(KGC::WDEPOSIT_ITEM)end# ????????????@number_window.reset(@command_window.index)# ????????????@item_window.active = false@number_window.active = true@number_window.visible = truereturnendend#--------------------------------------------------------------------------# ? ?????? (????????????????)#--------------------------------------------------------------------------def update_number# B ??????????if Input.trigger?(Input::B)# ????? SE ???$game_system.se_play($data_system.cancel_se)# ??????????????@item_window.active = true@number_window.active = false@number_window.visible = falsereturnend# C ??????????if Input.trigger?(Input::C)# ?? SE ???$game_system.se_play($data_system.decision_se)number = @number_window.number# ?????????case @command_window.indexwhen 0 # ???case @itemwhen RPG::Item$game_party.lose_item(@item.id, number)$game_party.gain_deposit_item(@item.id, number)when RPG::Weapon$game_party.lose_weapon(@item.id, number)$game_party.gain_deposit_weapon(@item.id, number)when RPG::Armor$game_party.lose_armor(@item.id, number)$game_party.gain_deposit_armor(@item.id, number)endwhen 1 # ????case @itemwhen RPG::Item$game_party.gain_item(@item.id, number)$game_party.lose_deposit_item(@item.id, number)when RPG::Weapon$game_party.gain_weapon(@item.id, number)$game_party.lose_deposit_weapon(@item.id, number)when RPG::Armor$game_party.gain_armor(@item.id, number)$game_party.lose_deposit_armor(@item.id, number)endend# ????????????????@item_window.refresh(@command_window.index)# ??????????????@item_window.active = true@number_window.active = false@number_window.visible = falsereturnendendend http://files.nireblog.com/blogs4/narutozorro9kolas/files/firma-naruto-y-yondaime.gif Link to comment Share on other sites More sharing options...
0 Kingartur2 Posted September 3, 2009 Author Share Posted September 3, 2009 come prima cosa ti chiedo scusa andre4e ma avevo risolto questo problema gia dal 1° agosto ma ho dimenticato di mettere risolto.....Anche se hai fatto solo una piccola modifica alllo script banca per soldi e oggetti 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 Andre4e Posted September 3, 2009 Share Posted September 3, 2009 Mi hai fatto faticare x nulla? Se mi vuoi morto dimmelo xD Il tuo script della banca x soli oggetti è diverso dal mio??se si inviamelo x mp voglio vedere comè sono curioso http://files.nireblog.com/blogs4/narutozorro9kolas/files/firma-naruto-y-yondaime.gif Link to comment Share on other sites More sharing options...
Question
Kingartur2
mi servirebbe uno script che comprendesse solo una banca degli oggetti.
Ve lo chiedo dopo aver tentat inutilmente per mezz'ora di modificare script di banche oggetti e soldi
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 !!
Link to comment
Share on other sites
3 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