RPGMakerID
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Komunitas RPG Maker Indonesia
 
IndeksIndeks  Latest imagesLatest images  PencarianPencarian  PendaftaranPendaftaran  Login  
Per 2016, RMID pindah ke RMID Discord (Invite link dihapus untuk mencegah spambot -Theo @ 2019). Posting sudah tidak bisa dilakukan lagi.
Mohon maaf atas ketidaknyamanannya dan mohon kerjasamanya.

 

 Script Ga Boleh Jual

Go down 
+3
wltr3565
mbahnoname
Notorius
7 posters
PengirimMessage
Notorius
Veteran
Veteran
Notorius


Level 5
Posts : 1408
Thanked : 0
Engine : RMVX
Skill : Intermediate
Type : Event Designer

Script Ga Boleh Jual Empty
PostSubyek: Script Ga Boleh Jual   Script Ga Boleh Jual Empty2009-09-04, 20:43

NO SELL SHOP
Versi: 2
Tipe: SHOP SYSTEM atau apalah



Pengenalan

Notorius pergi ke warung terus ngejual permen ke Tokonya. Emg Notorius apaan?! Broker permen loli?
Karena kepikiran aja...



Fitur


  • Membuat player tidak bisa menjual apa-apa
  • Dapet Ide: Script ini bisa di-aktif dan di-nonaktif dgn switch...



Screenshots

Emm pas pake langsung nyala, jadi dicoba aja
tapi boleh lah
before:
Spoiler:
after:
Spoiler:


Demo

Skrip Notorius selalu simpel



Scripts

Code:

module N_SHOP
SWITCH = 5 #switch id untuk mengaktifkan No Sell Shop
BELI = "Beli" # Tulisan untuk Beli
JUAL = "Jual"# Tulisan untuk Jual
BALIK = "Bakekok" # Tulisan untuk Kembali
end



#==============================================================================
# Notorius No Sell Shop
#------------------------------------------------------------------------------
#  Script ini membuat player tidak bisa menzual apa2 di Shop ini
#==============================================================================

class Scene_Shop
  include N_SHOP
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make help window
    @help_window = Window_Help.new
    # Make command window
    @command_window = Window_ShopCommand.new
    # Make gold window
    @gold_window = Window_Gold.new
    @gold_window.x = 480
    @gold_window.y = 64
    # Make dummy window
    @dummy_window = Window_Base.new(0, 128, 640, 352)
    # Make buy window
    @buy_window = Window_ShopBuy.new($game_temp.shop_goods)
    @buy_window.active = false
    @buy_window.visible = false
    @buy_window.help_window = @help_window
    # Make sell window unless switch is onn
    @sell_window = Window_ShopSell.new unless $game_switches[SWITCH]
    @sell_window.active = false unless $game_switches[SWITCH]
    @sell_window.visible = false unless $game_switches[SWITCH]
    @sell_window.help_window = @help_window unless $game_switches[SWITCH]
    # Make quantity input window
    @number_window = Window_ShopNumber.new
    @number_window.active = false
    @number_window.visible = false
    # Make status window
    @status_window = Window_ShopStatus.new
    @status_window.visible = false
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @help_window.dispose
    @command_window.dispose
    @sell_window.dispose unless $game_switches[SWITCH]
    @gold_window.dispose
    @dummy_window.dispose
    @buy_window.dispose
    @number_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @help_window.update
    @command_window.update
    @gold_window.update
    @dummy_window.update
    @buy_window.update
    @sell_window.update unless $game_switches[SWITCH]
    @number_window.update
    @status_window.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
      return
    end
    # If buy window is active: call update_buy
    if @buy_window.active
      update_buy
      return
    end
    # If sell window is active and Switch is off: call update_sell
    if @sell_window.active and $game_switches[SWITCH] == false
      update_sell
      return
    end
    # If quantity input window is active: call update_number
    if @number_window.active
      update_number
      return
    end
   
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C) and $game_switches[SWITCH] == false
      # Branch by command window cursor position
      case @command_window.index
      when 0  # buy
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Change windows to buy mode
        @command_window.active = false
        @dummy_window.visible = false
        @buy_window.active = true
        @buy_window.visible = true
        @buy_window.refresh
        @status_window.visible = true
      when 1  # sell
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Change windows to sell mode
        @command_window.active = false
        @dummy_window.visible = false
        @sell_window.active = true
        @sell_window.visible = true
        @sell_window.refresh
      when 2  # quit
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to map screen
        $scene = Scene_Map.new
      end
      return
    end
    # If C button was pressed & Switch == on
    if Input.trigger?(Input::C) and $game_switches[SWITCH] == true
      # Branch by command window cursor position
      case @command_window.index
      when 0  # buy
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Change windows to buy mode
        @command_window.active = false
        @dummy_window.visible = false
        @buy_window.active = true
        @buy_window.visible = true
        @buy_window.refresh
        @status_window.visible = true
      when 1  # quit
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to map screen
        $scene = Scene_Map.new
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when buy window is active)
  #--------------------------------------------------------------------------
  def update_buy
    # Set status window item
    @status_window.item = @buy_window.item
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Change windows to initial mode
      @command_window.active = true
      @dummy_window.visible = true
      @buy_window.active = false
      @buy_window.visible = false
      @status_window.visible = false
      @status_window.item = nil
      # Erase help text
      @help_window.set_text("")
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Get item
      @item = @buy_window.item
      # If item is invalid, or price is higher than money possessed
      if @item == nil or @item.price > $game_party.gold
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Get items in possession count
      case @item
      when RPG::Item
        number = $game_party.item_number(@item.id)
      when RPG::Weapon
        number = $game_party.weapon_number(@item.id)
      when RPG::Armor
        number = $game_party.armor_number(@item.id)
      end
      # If 99 items are already in possession
      if number == 99
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Play decision SE
      $game_system.se_play($data_system.decision_se)
      # Calculate maximum amount possible to buy
      max = @item.price == 0 ? 99 : $game_party.gold / @item.price
      max = [max, 99 - number].min
      # Change windows to quantity input mode
      @buy_window.active = false
      @buy_window.visible = false
      @number_window.set(@item, max, @item.price)
      @number_window.active = true
      @number_window.visible = true
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when sell window is active)
  #--------------------------------------------------------------------------
  def update_sell
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Change windows to initial mode
      @command_window.active = true
      @dummy_window.visible = true
      @sell_window.active = false
      @sell_window.visible = false
      @status_window.item = nil
      # Erase help text
      @help_window.set_text("")
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Get item
      @item = @sell_window.item
      # Set status window item
      @status_window.item = @item
      # If item is invalid, or item price is 0 (unable to sell)
      if @item == nil or @item.price == 0
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Play decision SE
      $game_system.se_play($data_system.decision_se)
      # Get items in possession count
      case @item
      when RPG::Item
        number = $game_party.item_number(@item.id)
      when RPG::Weapon
        number = $game_party.weapon_number(@item.id)
      when RPG::Armor
        number = $game_party.armor_number(@item.id)
      end
      # Maximum quanitity to sell = number of items in possession
      max = number
      # Change windows to quantity input mode
      @sell_window.active = false
      @sell_window.visible = false
      @number_window.set(@item, max, @item.price / 2)
      @number_window.active = true
      @number_window.visible = true
      @status_window.visible = true
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when quantity input window is active)
  #--------------------------------------------------------------------------
  def update_number
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Set quantity input window to inactive / invisible
      @number_window.active = false
      @number_window.visible = false
      # Branch by command window cursor position
      case @command_window.index
      when 0  # buy
        # Change windows to buy mode
        @buy_window.active = true
        @buy_window.visible = true
      when 1  # sell
        # Change windows to sell mode
        @sell_window.active = true
        @sell_window.visible = true
        @status_window.visible = false
      end
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Play shop SE
      $game_system.se_play($data_system.shop_se)
      # Set quantity input window to inactive / invisible
      @number_window.active = false
      @number_window.visible = false
      # Branch by command window cursor position
      case @command_window.index
      when 0  # buy
        # Buy process
        $game_party.lose_gold(@number_window.number * @item.price)
        case @item
        when RPG::Item
          $game_party.gain_item(@item.id, @number_window.number)
        when RPG::Weapon
          $game_party.gain_weapon(@item.id, @number_window.number)
        when RPG::Armor
          $game_party.gain_armor(@item.id, @number_window.number)
        end
        # Refresh each window
        @gold_window.refresh
        @buy_window.refresh
        @status_window.refresh
        # Change windows to buy mode
        @buy_window.active = true
        @buy_window.visible = true
      when 1  # sell
        # Sell process
        $game_party.gain_gold(@number_window.number * (@item.price / 2))
        case @item
        when RPG::Item
          $game_party.lose_item(@item.id, @number_window.number)
        when RPG::Weapon
          $game_party.lose_weapon(@item.id, @number_window.number)
        when RPG::Armor
          $game_party.lose_armor(@item.id, @number_window.number)
        end
        # Refresh each window
        @gold_window.refresh
        @sell_window.refresh
        @status_window.refresh
        # Change windows to sell mode
        @sell_window.active = true
        @sell_window.visible = true
        @status_window.visible = false
      end
      return
    end
  end
end

class Window_ShopCommand < Window_Selectable
  include N_SHOP
  def initialize
    super(0, 64, 480, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    @item_max = 3 unless $game_switches[SWITCH]
    @item_max = 2 if $game_switches[SWITCH]
    @column_max = 3
    @commands = [BELI, BALIK] if $game_switches[SWITCH]
    @commands = [BELI, JUAL, BALIK] unless $game_switches[SWITCH]
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #    index : item number
  #--------------------------------------------------------------------------
  def draw_item(index)
    x = 8 + index * 160
    self.contents.draw_text(x, 0, 256, 32, @commands[index]) if $game_switches[SWITCH]
    self.contents.draw_text(x, 0, 128, 32, @commands[index]) unless $game_switches[SWITCH]
  end
end


Credits


  • Enterbrain (Modifikasi Scene_Shop dan WIndow_ShopCommand)
  • Notorius


Terakhir diubah oleh Notorius tanggal 2009-09-06, 13:16, total 1 kali diubah
Kembali Ke Atas Go down
mbahnoname
Senior
Senior
mbahnoname


Level 5
Posts : 670
Thanked : 0
Engine : RMVX
Skill : Very Beginner
Type : Mapper

Trophies
Awards:

Script Ga Boleh Jual Empty
PostSubyek: Re: Script Ga Boleh Jual   Script Ga Boleh Jual Empty2009-09-04, 21:08

=)) gokil jadi cara ngejualnya gimana =)) jadi player gak bisa dapet duit dengan cara jual untuk selamanya gitu ..? =))
Kembali Ke Atas Go down
Notorius
Veteran
Veteran
Notorius


Level 5
Posts : 1408
Thanked : 0
Engine : RMVX
Skill : Intermediate
Type : Event Designer

Script Ga Boleh Jual Empty
PostSubyek: Re: Script Ga Boleh Jual   Script Ga Boleh Jual Empty2009-09-05, 10:01

Tepat sekali =))

Silahkan membuat player miskin =))
Kembali Ke Atas Go down
mbahnoname
Senior
Senior
mbahnoname


Level 5
Posts : 670
Thanked : 0
Engine : RMVX
Skill : Very Beginner
Type : Mapper

Trophies
Awards:

Script Ga Boleh Jual Empty
PostSubyek: Re: Script Ga Boleh Jual   Script Ga Boleh Jual Empty2009-09-05, 10:24

=)) aku pk buat QoA dah =)) :twisted: =)) bangkrut dah =)) om notto bikin Script aneh 2 semua =))

Spoiler:

=)) cuman bercanda :peace:
Kembali Ke Atas Go down
Notorius
Veteran
Veteran
Notorius


Level 5
Posts : 1408
Thanked : 0
Engine : RMVX
Skill : Intermediate
Type : Event Designer

Script Ga Boleh Jual Empty
PostSubyek: Re: Script Ga Boleh Jual   Script Ga Boleh Jual Empty2009-09-05, 10:46

OH asiiik!!! heheehehe yahoo google lah !

Soalnya ak bikin barang keramat utk player, eh takutnya ntar dijual wkwkwk

jadi kubuat aja gini, lagian rada aneh kalo ngejual sesuatu ke warung =))
Kembali Ke Atas Go down
wltr3565
Senior
Senior
wltr3565


Level 5
Posts : 870
Thanked : 28
Engine : RMVX
Skill : Skilled
Type : Scripter

Trophies
Awards:

Script Ga Boleh Jual Empty
PostSubyek: Re: Script Ga Boleh Jual   Script Ga Boleh Jual Empty2009-09-06, 00:59

@Notorius:
Bukannya bisa dicegah dengan nge nol-in harga barangnya?
Masalahnya banyak banget overridnya. Kasian untuk pengguna custom shop system :(. kagak ada alias ya?

Lagipula, hanya ini yang dirubah:
Code:

  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 0  # buy
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Change windows to buy mode
        @command_window.active = false
        @dummy_window.visible = false
        @buy_window.active = true
        @buy_window.visible = true
        @buy_window.refresh
        @status_window.visible = true
      when 1  # quit
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to map screen
        $scene = Scene_Map.new
      end
      return
    end
  end
Lalu window seleksi jual-beli-quit nya kagak diubah?

Yah, walaupun gitu sih, good job :peace:
Kembali Ke Atas Go down
Randomasta
Senior
Senior
Randomasta


Kosong
Posts : 661
Thanked : 6
Engine : RMVX

Script Ga Boleh Jual Empty
PostSubyek: Re: Script Ga Boleh Jual   Script Ga Boleh Jual Empty2009-09-06, 01:26

Kalo dinolin harganya, nanti ga cuma ga bisa jual barang... tapi juga ga bisa beli!!! @_@ gemnya jadi kaya apa nanti kira2?
Kembali Ke Atas Go down
wltr3565
Senior
Senior
wltr3565


Level 5
Posts : 870
Thanked : 28
Engine : RMVX
Skill : Skilled
Type : Scripter

Trophies
Awards:

Script Ga Boleh Jual Empty
PostSubyek: Re: Script Ga Boleh Jual   Script Ga Boleh Jual Empty2009-09-06, 01:32

_|^656 wrote:
Kalo dinolin harganya, nanti ga cuma ga bisa jual barang... tapi juga ga bisa beli!!! @_@ gemnya jadi kaya apa nanti kira2?
Ya juga sih, tapi kan kalo itu key item. Lagipula, ini script bisa ada switchnya untuk buat beberapa toko bisa ngebiarin ngejual item gak?
Kembali Ke Atas Go down
Notorius
Veteran
Veteran
Notorius


Level 5
Posts : 1408
Thanked : 0
Engine : RMVX
Skill : Intermediate
Type : Event Designer

Script Ga Boleh Jual Empty
PostSubyek: Re: Script Ga Boleh Jual   Script Ga Boleh Jual Empty2009-09-06, 12:34

wltr3565 wrote:
_|^656 wrote:
Kalo dinolin harganya, nanti ga cuma ga bisa jual barang... tapi juga ga bisa beli!!! @_@ gemnya jadi kaya apa nanti kira2?
Ya juga sih, tapi kan kalo itu key item. Lagipula, ini script bisa ada switchnya untuk buat beberapa toko bisa ngebiarin ngejual item gak?

Oh di-Switch gtu? Bisa, saya* usahain. Tapi ntar, kalo di kmptr yg ada RM-nya...
Kembali Ke Atas Go down
M4nz
Advance
Advance
M4nz


Level 5
Posts : 309
Thanked : 6
Engine : RMXP
Skill : Intermediate
Type : Artist

Trophies
Awards:

Script Ga Boleh Jual Empty
PostSubyek: Re: Script Ga Boleh Jual   Script Ga Boleh Jual Empty2009-09-06, 14:32

wah script gak boleh jual ya?

tp bagus koq...
klo pas herony nyampe ke kota miskin, terus gak nerima jual...
klo nggak pas nyampe kota pelit... jdi klo jual barang tuh susahny minta ampun...

:D
Kembali Ke Atas Go down
http://akumogames.blogspot.com/
Notorius
Veteran
Veteran
Notorius


Level 5
Posts : 1408
Thanked : 0
Engine : RMVX
Skill : Intermediate
Type : Event Designer

Script Ga Boleh Jual Empty
PostSubyek: Re: Script Ga Boleh Jual   Script Ga Boleh Jual Empty2009-09-06, 15:26

Wakakak, silahkan dipakai, dibuang, dibakar, diduruk, dll...
Kembali Ke Atas Go down
Gary PoL
Newbie
Newbie
Gary PoL


Level 5
Posts : 81
Thanked : 2
Engine : RMVX
Skill : Very Beginner
Type : Jack of All Trades

Trophies
Awards:
Script Ga Boleh Jual Empty
PostSubyek: Re: Script Ga Boleh Jual   Script Ga Boleh Jual Empty2010-05-02, 21:53

bukan-nya itu bisa di buat tanpa script...?
Tapi Nggak Papa Klo Orang Yg Nggak Ngerti Buat Eventnya Kan Bisa Pake Scriptnya...
Bisa Aotu No Sale...!!!

^.^
Kembali Ke Atas Go down
Vsio
Xutix Xox
Xutix Xox
Vsio


Kosong
Posts : 2377
Thanked : 18
Engine : Multi-Engine User
Skill : Advanced
Type : Developer

Script Ga Boleh Jual Empty
PostSubyek: Re: Script Ga Boleh Jual   Script Ga Boleh Jual Empty2010-05-02, 22:05

X

@eashule:

Maaf ya, tp thread berumur lebih dari 3 bulan dan sudah tidak aktif lagi, tidak boleh lagi direply. ;)

Quote :

Necropost
Forum ini tidak memperbolehkan RMer untuk melakukan Necropost. Apa itu necropost? Necropost adalah kegiatan membangkitkan thread yang sudah lama tidak aktif. Thread berumur lebih dari 3 bulan dan sudah tidak aktif akan kami anggap necropost. Silahkan PM sang pemilik thread jika anda hanya sekadar memberikan pujian, kritikan atau bug reporting

Agar tidak terjadi kesalahan yang sama, baca dulu peraturannya ya ;)
https://rmid.forumotion.net/boardrules-h1.htm

Karena masih newbie, untuk kali ini dimaafkan ;). Tp, jika terjadi lagi, mungkin akan ditindaklanjuti. ;)

X
Kembali Ke Atas Go down
http://prodig.forumotion.net/forum.htm
Sponsored content





Script Ga Boleh Jual Empty
PostSubyek: Re: Script Ga Boleh Jual   Script Ga Boleh Jual Empty

Kembali Ke Atas Go down
 
Script Ga Boleh Jual
Kembali Ke Atas 
Halaman 1 dari 1
 Similar topics
-
» Pake Script HK...?? boleh nggak ya...
» bisa gak jual game rpg
» Kenapa sih ga boleh Necropost?
» boleh nyontek gak gamennya
» Game Tanpa sitem jual beli

Permissions in this forum:Anda tidak dapat menjawab topik
RPGMakerID :: Scripts & Event Systems :: RMXP Scripts-
Navigasi: