How to Add a Poker Mini Card Game (Demo)

ianbach

Zombie Master
Member
Joined
May 3, 2014
Messages
67
Reaction score
6
First Language
english
Primarily Uses
If your going to do a tutorial on a script belonging to you or not, you should do a tutorial on how to write the script not install it. If you went though the work of translating the script you could have just explained what it is doing.

Don't be the person who quits doing good because of a few comments.

To anwser another question that was asked, as a scripter myself, I don't want my scripts altered or translated because of the simple fact, I don't want someone to mis-translate my terms and tell everyone its free to use. I like to get payed for what I do.
I would say most of all do not quit.

I know I also felt like hey  whats up seems like every post I made I got some critique. I sure as heck didn't know what double posting was. I tried make a demo and the script writers response to my PM ...well first time I read it ...reminds me of some movie or comedy the person is like egad get that away from me burn it , something like that... but iI thought about and oh well I will make something else find someone who is excited to make some art err games 

I total dig all the scripts people have made, i couldn't make a decent game in rpg maker without those. 

But I am sure scripters are like artists

some artists never sell a thing 

others like me have almost none of my own art, i gave mine all away

also some people love to work with anyone 

others only those they know close

basicly i think we are all nuts, but somehow its is still, hella fun to be alive

 

I never saw so many people complaining about something I was kind enough to post for free. 

First of all, I had put this into tutorials.  I didn't post it to Scripts, I don't know how it got in this area of the forum.  It was meant to be a tutorial on how to add it, working, to a game.  Maybe it was late, and I didn't realize where I put it, I don't know.

Second of all, I'm not taking credit for his script, and he had said it was okay to translate it.  I did have to change a few small things to get it to work in English.  And I did have to add in his code fix.  I didn't see anyone else do it in English anywhere.  You think it was so easy to get it working, it wasn't.  It took me hours to smooth out the bugs.  I didn't change functionality of the script, I only got it working properly in English so it doesn't crash.  And I DO deserve credit for doing that. 

If people are going to be so ungrateful here that I shared something that I didn't have to share and spent hours working on, I will never post another tutorial to this forum again.  I posted it because there is a lack of these kind of mini games and people have requested them in the past.  But if all people can do is attack a useful post, I won't bother again.  Do what you want with the tutorial.  I'm not coming back to this post.  I don't allow this kind of negativity in my life. 
So I totally dig this script glad someone posted it.

I changed the back of the deck and made it a item i could pick up

so this will be in all the rpg games I make .

i thinking I will redo the card faces

use a dif font for dif games

and dif back for dif games

oh also someone asked about jokers

I found cool artist just added on wordpress

https://eagogo13.wordpress.com/

their main web site here

http://hackenblog.hackenbush.org/2014/01/11/the-eschaton-a-go-go-playing-cards/

 
Last edited by a moderator:

Carri

Veteran
Veteran
Joined
Aug 16, 2013
Messages
35
Reaction score
13
First Language
English
Primarily Uses
@ianbach Really like the cards you did. 

Original post edited to include my letter of permission from CACAO.  All trolls have been put on ignore.  I actually am who I say I am.  I have over three hundred thousand members at my site.  I am the mother of the SimPE program that is used to edit Sims2 files.  My work has been used and translated in every country around the world that plays the Sims games.  I have worked with and am friends with many, many international coders all over the world.  I have real permission from all of them to teach with their work whenever I want to.  And my relationship with CACAO is none of anyone's business.

I'm glad some people will actually enjoy and appreciate what I put up. 

No troll will be answered.  I'll just stick whoever it is on ignore. 

I also added CACAO's link to his TOS that he asked me to put in. 
 

WCouillard

Veteran
Veteran
Joined
Nov 24, 2013
Messages
48
Reaction score
13
First Language
English
Primarily Uses
Your link to the English script links to a forum about the Sims games.

Your script text in the original post has BBCode parsing as smiley faces.

Is there an actual link to the translated script?
 

Carri

Veteran
Veteran
Joined
Aug 16, 2013
Messages
35
Reaction score
13
First Language
English
Primarily Uses
It's attached to the original post, you can download it or you can get it from the demo.  I knew it wasn't working when I pasted it, that's why I attached it.  I didn't have time when I put it up to take out the paste of it.  I should do that now.  Just download the attachment to the post.  I don't usually use pastebin for personal reasons.  I've never liked their site. 
 

RaZzi

My Peculiar Brother
Veteran
Joined
Jul 19, 2013
Messages
423
Reaction score
206
First Language
Finnish
Primarily Uses
@ianbach Really like the cards you did. 

Original post edited to include my letter of permission from CACAO.  All trolls have been put on ignore.  I actually am who I say I am.  I have over three hundred thousand members at my site.  I am the mother of the SimPE program that is used to edit Sims2 files.  My work has been used and translated in every country around the world that plays the Sims games.  I have worked with and am friends with many, many international coders all over the world.  I have real permission from all of them to teach with their work whenever I want to.  And my relationship with CACAO is none of anyone's business.

I'm glad some people will actually enjoy and appreciate what I put up. 

No troll will be answered.  I'll just stick whoever it is on ignore. 

I also added CACAO's link to his TOS that he asked me to put in. 
Wow. Glad you got that permission AFTER you violated his/hers terms. You are a bit arrogant. Next time be sure you have the artists/scripters/composers permission BEFORE you post his or hers stuff on the internet.

PS. You must not know what trolling is.

PSS. Your script here is outdated and contains 2 bugs which have been fixed in the new version.

Here is the updated version, no credits for the translation needed. It uses variable for the coins (IDV_COIN) as did the original script.

Code:
#******************************************************************************##    * ポーカー##  --------------------------------------------------------------------------#    バージョン : 1.0.2#    対      応 : RPGツクールVX Ace : RGSS3#    制  作  者 : CACAO#    配  布  元 : [URL="http://cacaosoft.webcrow.jp/#"]http://cacaosoft.webcrow.jp/#[/URL]  --------------------------------------------------------------------------#   == 概    要 ==##    : ポーカーの機能を追加します。##  --------------------------------------------------------------------------#   == 注意事項 ==##    ※ 動作には、トランプの画像が必要です。##  --------------------------------------------------------------------------#   == 使用方法 ==##    ★ ポーカーの開始#     イベントコマンド「スクリプト」に start_poker と記述###******************************************************************************#==============================================================================# ◆ 設定項目#==============================================================================module CAOmodule Poker  #--------------------------------------------------------------------------  # ◇ コインを保存するEV変数の番号  #--------------------------------------------------------------------------  IDV_COIN = 7  #--------------------------------------------------------------------------  # ◇ 掛け金で最初に表示される枚数  #--------------------------------------------------------------------------  DEFAULT_COIN = 100  #--------------------------------------------------------------------------  # ◇ 掛け金の増減数  #--------------------------------------------------------------------------  BET_RATE = 10  #--------------------------------------------------------------------------  # ◇ 掛け金の最大枚数  #--------------------------------------------------------------------------  MAX_BET = 100  #--------------------------------------------------------------------------  # ◇ 掛け金の増加量 ( n 倍)  #--------------------------------------------------------------------------  DIVIDEND_COVER = [0, 1, 2, 3, 5, 7, 10, 50, 100, 500]  #--------------------------------------------------------------------------  # ◇ 配当金の下三桁が 000 の場合 K と表示する  #--------------------------------------------------------------------------  ADDR_DIVIDEND = true  #--------------------------------------------------------------------------  # ◇ 役の名前  #--------------------------------------------------------------------------  VOCAB_HANDS = [ "Nothing", "One pair", "Two pair", "Three of a kind",                  "Straight", "Flush", "Full house", "Four of a kind",                  "Straight flush", "Royal flush"               ]  #--------------------------------------------------------------------------  # ◇ 掛け金の名称と単位  #--------------------------------------------------------------------------  VOCAB_COIN = ""  VOCAB_COIN_U = " Coins"  #--------------------------------------------------------------------------  # ◇ 掛け金選択時のメッセージ  #--------------------------------------------------------------------------  VOCAB_BET  = "Choose the amount to bet"  #--------------------------------------------------------------------------  # ◇ 1ゲーム終了後のメッセージ  #--------------------------------------------------------------------------  VOCAB_WIN  = "Congratulations!\n\\C[0]You won \\C[14]%s \\C[16]Coins!"  VOCAB_LOSE = "Sorry! You lose!"  #--------------------------------------------------------------------------  # ◇ ヘルプウィンドウの文章  #--------------------------------------------------------------------------  VOCAB_HELP = "Press Shift to open Help"  #--------------------------------------------------------------------------  # ◇ ゲームの説明  #--------------------------------------------------------------------------  MANUAL_LINE = 9            # 行数  TEXT_MANUAL = <<-'[EOS]'    # 文章 (次の行から [EOS] まで)\C[16]Betting\C[0] ・\C[2]Up and Down\C[0] = Set the amount to bet ・\C[2]Z \C[0]= Accept ・\C[2]X \C[0]= Cancel\C[16]Poker\C[0] ・\C[2]Left and Right \C[0]= Select the cards ・\C[2]Z \C[0]= Flips the card ・\C[2]X \C[0]= Swaps the flipped cards  [EOS]  #--------------------------------------------------------------------------  # ◇ 効果音  #--------------------------------------------------------------------------  SOUND_START   = ""      # カードを表にして選択可能になったとき  SOUND_WIN     = "Applause1"   # 役あり  SOUND_LOSE    = "Scream"      # 役なし  SOUND_BET     = "Shop"        # 掛け金を決定したとき  SOUND_COIN    = "Coin"        # 掛け金を変更したとき  SOUND_DEAL    = "Book2"       # 手札を配るとき  SOUND_SLOUGH  = "Book2"       # 手札を捨てるとき  SOUND_REVERSE = "Book1"       # カードを裏返すとき  SOUND_CHANGE  = "Book2"       # 裏のカードを交換するときendend#/////////////////////////////////////////////////////////////////////////////##                                                                             ##                下記のスクリプトを変更する必要はありません。                 ##                                                                             ##/////////////////////////////////////////////////////////////////////////////#class << CAO::Poker  #--------------------------------------------------------------------------  # ● 所持コインの枚数を取得  #--------------------------------------------------------------------------  def coin    return $game_variables[CAO::Poker::IDV_COIN]  end  #--------------------------------------------------------------------------  # ● コインの増加(減少)  #--------------------------------------------------------------------------  def gain_coin(amount)    $game_variables[CAO::Poker::IDV_COIN] += amount    $game_variables[CAO::Poker::IDV_COIN] = 0 if self.coin < 0  endendmodule Sound  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def self.define_poker_sound(method_name, file_name)    if file_name.empty?      instance_eval %Q{        def #{method_name}        end      }    else      instance_eval %Q{        @#{method_name} = RPG::SE.new(file_name, 80)        def #{method_name}          @#{method_name}.play        end      }    end  end  #--------------------------------------------------------------------------  # ● ポーカーの効果音  #--------------------------------------------------------------------------  define_poker_sound :play_poker_start,   CAO::Poker::SOUND_START  define_poker_sound :play_poker_win,     CAO::Poker::SOUND_WIN  define_poker_sound :play_poker_lose,    CAO::Poker::SOUND_LOSE  define_poker_sound :play_poker_bet,     CAO::Poker::SOUND_BET  define_poker_sound :play_poker_coin,    CAO::Poker::SOUND_COIN  define_poker_sound :play_poker_deal,    CAO::Poker::SOUND_DEAL  define_poker_sound :play_poker_slough,  CAO::Poker::SOUND_SLOUGH  define_poker_sound :play_poker_reverse, CAO::Poker::SOUND_REVERSE  define_poker_sound :play_poker_change,  CAO::Poker::SOUND_CHANGEendclass CAO::Poker::Trump  #--------------------------------------------------------------------------  # ● スートの識別番号  #--------------------------------------------------------------------------  SUIT_SPADES   = 0  SUIT_HEARTS   = 1  SUIT_DIAMONDS = 2  SUIT_CLUBS    = 3  #--------------------------------------------------------------------------  # ● 公開インスタンス変数  #--------------------------------------------------------------------------  attr_reader   :suit                     # スート (0..3)  attr_reader   :number                   # 番号   (1..13)  #--------------------------------------------------------------------------  # ● オブジェクトの初期化  #--------------------------------------------------------------------------  def initialize(suit, number)    @suit = suit    @number = number  end  #--------------------------------------------------------------------------  # ● トランプのID  #--------------------------------------------------------------------------  def id    return 100 * @suit + @number  end  #--------------------------------------------------------------------------  # ● デバッグ用  #--------------------------------------------------------------------------  def inspect    return sprintf('%s%02d', '????'[@suit], @number)  # ????  endendclass CAO::Poker::Hand  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  @@deck = Array.new(13*4) {|i| CAO::Poker::Trump.new(i/13, i%13+1) }.freeze  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  attr_reader :hand                       # 手札  attr_reader :stock                      # 山札  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def initialize    @stock = @@deck.shuffle    @hand = @stock.pop(5)  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def change(index)    @hand[index] = @stock.pop  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def [](index)    return @hand[index]  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def each    @hand.each {|card| yield card }  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def sort!    @hand.sort! {|a,b| a.number <=> b.number }  end  #--------------------------------------------------------------------------  # ● 役の判定  #--------------------------------------------------------------------------  def final    sort!       # 役を判定する前に手札のソートが必要    royal    = _royal?    straight = _straight?    flush    = _flush?    pairs    = _pairs    pair_max = pairs.max    pair_min = pairs.min    pair_cnt = pairs.count(pair_max)        return 9 if royal && flush                    # ロイヤルフラッシュ    return 8 if straight && flush                 # ストレートフラッシュ    return 7 if pair_max == 4                     # フォーカード    return 6 if pair_max == 3 && pair_min == 2    # フルハウス    return 5 if flush                             # フラッシュ    return 4 if straight                          # ストレート    return 3 if pair_max == 3 && pair_min == 1    # スリーカード    return 2 if pair_max == 2 && pair_cnt == 4    # ツーペア    return 1 if pair_max == 2                     # ワンペア    return 0                                      # ハイカード  end  #--------------------------------------------------------------------------  # ● ロイヤルストレートの判定  #--------------------------------------------------------------------------  def _royal?    return @hand.map {|card| card.number } == [1, 10, 11, 12, 13]  end  #--------------------------------------------------------------------------  # ● ストレートの判定  #--------------------------------------------------------------------------  def _straight?    return true if _royal?    @hand.each_with_index do |card,i|      return false if card.number - @hand[0].number != i    end    return true  end  #--------------------------------------------------------------------------  # ● フラッシュの判定  #--------------------------------------------------------------------------  def _flush?    return @hand.all? {|card| card.suit == @hand[0].suit }  end  #--------------------------------------------------------------------------  # ● ペア数を配列で取得 (重複する)  #--------------------------------------------------------------------------  def _pairs    return @hand.map {|c1| @hand.count{|c2| c1.number == c2.number } }  end  protected :_royal?, :_straight?, :_flush?, :_pairsendclass Game_Interpreter  #--------------------------------------------------------------------------  # ● ポーカー起動  #--------------------------------------------------------------------------  def start_poker    SceneManager.call(Scene_Poker)    Fiber.yield  endendclass Window_PokerHands < Window_Base  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  attr_reader :index  #--------------------------------------------------------------------------  # ● オブジェクト初期化  #--------------------------------------------------------------------------  def initialize    super(0, 0, Graphics.width, fitting_height(5))    clear  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def clear    @index = -1    @coin = 0    refresh  end  #--------------------------------------------------------------------------  # ● リフレッシュ  #--------------------------------------------------------------------------  def refresh    self.contents.clear    draw_all_items  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def draw_all_items    10.times {|i| draw_item(i) }  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def draw_item(index)    change_color(@index == index ? text_color(18) : normal_color)    rect = Rect.new(0, 0, self.item_width, self.line_height)    rect.x = (index / 5) * (rect.width + self.space)    rect.y = (index % 5) * rect.height    draw_text(rect, CAO::Poker::VOCAB_HANDS[index])    draw_text(rect, prize_s(index), 2)  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def item_width    return (contents_width - self.space) / 2  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def space    return 16  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def prize(index = nil)    return Integer(@coin * CAO::Poker::DIVIDEND_COVER[index || @index])  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def prize_s(index)    if @coin == 0      return "x#{CAO::Poker::DIVIDEND_COVER[index]}"    else      value = String(prize(index))      value.sub!(/000$/, 'K') if CAO::Poker::ADDR_DIVIDEND && value.size > 4      return value    end  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def coin=(value)    @coin = value    refresh  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def index=(index)    @index = index    refresh  endendclass Window_Base  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def draw_poker_coin(x, y, width, value, text = "", enabled = true)    change_color(system_color)    draw_text(x, y, width, line_height, text) unless text.empty?    draw_text(x, y, width, line_height, CAO::Poker::VOCAB_COIN_U, 2)    change_color(normal_color, enabled)    cx = text_size(CAO::Poker::VOCAB_COIN_U).width    draw_text(x, y, width - cx - 2, line_height, value, 2)  endendclass Window_PokerCoin < Window_Base  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  WIDTH = Graphics.width / 8 * 3  #--------------------------------------------------------------------------  # ● オブジェクト初期化  #--------------------------------------------------------------------------  def initialize()    super(0, 0, WIDTH, fitting_height(1))    refresh  end  #--------------------------------------------------------------------------  # ● リフレッシュ  #--------------------------------------------------------------------------  def refresh    self.contents.clear    draw_poker_coin(0,0,contents_width,CAO::Poker.coin,CAO::Poker::VOCAB_COIN)  endendclass Window_PokerBet < Window_Base  #--------------------------------------------------------------------------  # ● 公開インスタンス変数  #--------------------------------------------------------------------------  attr_reader   :number                   # 入力された数  #--------------------------------------------------------------------------  # ● オブジェクト初期化  #--------------------------------------------------------------------------  def initialize    super(0, 0, 272, fitting_height(2))    self.viewport = viewport    @digits_max = CAO::Poker::MAX_BET % 10 + 1    self.openness = 0    deactivate    reset  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def reset    @count = 0    @number = CAO::Poker::DEFAULT_COIN    refresh  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def enable?    @number <= CAO::Poker.coin  end  #--------------------------------------------------------------------------  # ● リフレッシュ  #--------------------------------------------------------------------------  def refresh    self.contents.clear    change_color(normal_color)    draw_text(0, 0, contents_width, line_height, CAO::Poker::VOCAB_BET, 1)    draw_poker_coin(0, line_height, contents_width,      sprintf("%0*d", @digits_max, @number), "", self.enable?)  end  #--------------------------------------------------------------------------  # ● フレーム更新  #--------------------------------------------------------------------------  def update    super    process_digit_change    process_handling  end  #--------------------------------------------------------------------------  # ● 数字の変更処理  #--------------------------------------------------------------------------  def process_digit_change    return unless open? && active    if Input.repeat?(:UP) || Input.repeat?(:DOWN)      last_number = @number      if @count < 3        @count += 1        @number += CAO::Poker::BET_RATE if Input.repeat?(:UP)        @number -= CAO::Poker::BET_RATE if Input.repeat?(:DOWN)      else        @number += CAO::Poker::BET_RATE * 10 if Input.repeat?(:UP)        @number -= CAO::Poker::BET_RATE * 10 if Input.repeat?(:DOWN)      end      @number = CAO::Poker::BET_RATE if @number < CAO::Poker::BET_RATE      @number = CAO::Poker::MAX_BET if CAO::Poker::MAX_BET < @number      if @number != last_number        Sound.play_poker_coin        refresh      end    else      @count = 0    end  end  #--------------------------------------------------------------------------  # ● 決定とキャンセルのハンドリング処理  #--------------------------------------------------------------------------  def process_handling    return unless open? && active    return process_ok     if Input.trigger?(:C)    return process_cancel if Input.trigger?(:  end  #--------------------------------------------------------------------------  # ● 決定ボタンが押されたときの処理  #--------------------------------------------------------------------------  def process_ok    if self.enable?      Sound.play_poker_bet      deactivate      close      @ok_handler.call    else      Sound.play_buzzer    end  end  #--------------------------------------------------------------------------  # ● キャンセルボタンが押されたときの処理  #--------------------------------------------------------------------------  def process_cancel    Sound.play_cancel    @cancel_handler.call  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def set_ok_handler(method)    @ok_handler = method  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def set_cancel_handler(method)    @cancel_handler = method  endendclass Window_PokerMessage < Window_Base  #--------------------------------------------------------------------------  # ● オブジェクト初期化  #--------------------------------------------------------------------------  def initialize    super(0, 0, 320, fitting_height(2))    self.openness = 0    deactivate  end  #--------------------------------------------------------------------------  # ● フレーム更新  #--------------------------------------------------------------------------  def update    super    process_handling  end  #--------------------------------------------------------------------------  # ● 決定とキャンセルのハンドリング処理  #--------------------------------------------------------------------------  def process_handling    return unless active    return process_ok     if Input.trigger?(:C)    return process_cancel if Input.trigger?(:  end  #--------------------------------------------------------------------------  # ● 決定ボタンが押されたときの処理  #--------------------------------------------------------------------------  def process_ok    Sound.play_poker_slough    deactivate    close    @handler.call    Input.update  end  #--------------------------------------------------------------------------  # ● キャンセルボタンが押されたときの処理  #--------------------------------------------------------------------------  def process_cancel    process_ok  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def set_ok_handler(method)    @handler = method  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def set_cancel_handler(method)    @handler = method  end  #--------------------------------------------------------------------------  # ● テキスト設定  #--------------------------------------------------------------------------  def set_text(text)    if text != @text      @text = text      refresh    end  end  #--------------------------------------------------------------------------  # ● クリア  #--------------------------------------------------------------------------  def clear    set_text("")  end  #--------------------------------------------------------------------------  # ● リフレッシュ  #--------------------------------------------------------------------------  def refresh    contents.clear    draw_text_ex(4, 0, @text)  endendclass Window_PokerHelp < Window_Base  #--------------------------------------------------------------------------  # ● オブジェクト初期化  #--------------------------------------------------------------------------  def initialize    super(0, 0, Graphics.width - Window_PokerCoin::WIDTH, fitting_height(1))    refresh  end  #--------------------------------------------------------------------------  # ● リフレッシュ  #--------------------------------------------------------------------------  def refresh    self.contents.clear    draw_text(0, 0, contents_width, contents_height, CAO::Poker::VOCAB_HELP)  endendclass Window_PokerManual < Window_Base  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def initialize    bitmap = Bitmap.new(Graphics.width, Graphics.height)    bitmap.fill_rect(bitmap.rect, Color.new(0, 0, 0, 160))    @background = Sprite.new    @background.bitmap = bitmap    @background.visible = false    super(0, 0, 424, fitting_height(CAO::Poker::MANUAL_LINE))    self.openness = 0    @background.z = self.z    deactivate    refresh  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def dispose    @background.bitmap.dispose    @background.dispose    super  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def refresh    self.contents.clear    draw_text_ex(0, 0, CAO::Poker::TEXT_MANUAL)  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def update    super    @background.visible = !close?    if open? && (Input.trigger?(:A) || Input.trigger?(:)      Sound.play_cancel      @close_handler.call    elsif close? && Input.trigger?(:A)      Sound.play_ok      @open_handler.call    end  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def open_handler=(method)    @open_handler = method  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def close_handler=(method)    @close_handler = method  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def viewport=(value)    @background.viewport = value    super  endendclass Sprite_PokerTrump < Sprite  #--------------------------------------------------------------------------  # ● 定数  #--------------------------------------------------------------------------  CARD_WIDTH  = Cache.system("PokerTrump").width  / 14  CARD_HEIGHT = Cache.system("PokerTrump").height / 4  #--------------------------------------------------------------------------  # ● 公開インスタンス変数  #--------------------------------------------------------------------------  attr_reader :wait_count  #--------------------------------------------------------------------------  # ● オブジェクト初期化  #--------------------------------------------------------------------------  def initialize(x, y, viewport)    @pos_x = x    @pos_y = y    super(viewport)    self.x = x    self.y = y    self.opacity = 0    create_backface    centering_origin    init_instance_variables    hide  end  #--------------------------------------------------------------------------  # ● オブジェクト解放  #--------------------------------------------------------------------------  def dispose    @trump_bitmap.dispose if @trump_bitmap    super  end  #--------------------------------------------------------------------------  # ● カードの裏柄  #--------------------------------------------------------------------------  def create_backface    @backface = Bitmap.new(CARD_WIDTH, CARD_HEIGHT)    @backface.blt(0, 0, Cache.system("PokerTrump"),      Rect.new(CARD_WIDTH * 13, CARD_HEIGHT * 0, CARD_WIDTH, CARD_HEIGHT))    self.bitmap = @backface  end  #--------------------------------------------------------------------------  # ● インスタンス変数の初期化  #--------------------------------------------------------------------------  def init_instance_variables    @trump = nil    @opening = @closing = false    @openness = 100    @wait_count = 0    @target_bitmap = nil    @target_x = self.x    @target_y = self.y    @target_opacity = self.opacity    @speed_x = 0.0    @speed_y = 0.0    @speed_opacity = 0.0  end  #--------------------------------------------------------------------------  # ● 転送元原点を中央にする  #--------------------------------------------------------------------------  def centering_origin    self.ox = CARD_WIDTH / 2    self.oy = CARD_HEIGHT / 2  end  #--------------------------------------------------------------------------  # ● フレーム更新  #--------------------------------------------------------------------------  def update    super    if @wait_count > 0      @wait_count -= 1    else      # update_deal_sound      update_reverse      update_position    end  end  #--------------------------------------------------------------------------  # ● カード表示時に効果音を鳴らす (未使用)  #--------------------------------------------------------------------------  def update_deal_sound    if @start_deal      Sound.play_poker_deal      @start_deal = false    end  end  #--------------------------------------------------------------------------  # ● カードの向きを更新  #--------------------------------------------------------------------------  def update_reverse    return if self.x != @target_x    return if self.y != @target_y    return if self.opacity != @target_opacity    if @closing      @openness -= 20      if @openness <= 0        self.bitmap = @target_bitmap        @openness = 0        @closing = false      end      self.zoom_x = @openness / 100.0    elsif @openning      @openness += 20      if @openness >= 100        @openness = 100        @openning = false      end      self.zoom_x = @openness / 100.0    end  end  #--------------------------------------------------------------------------  # ● カードの位置を更新  #--------------------------------------------------------------------------  def update_position    return if @openness != 0 && @openness != 100    if self.x != @target_x      @x += @speed_x      self.x = @x      if @speed_x < 0        self.x = @target_x if self.x < @target_x      else        self.x = @target_x if self.x > @target_x      end    end    if self.y != @target_y      @y += @speed_y      self.y = @y      if @speed_y < 0        self.y = @target_y if self.y < @target_y      else        self.y = @target_y if self.y > @target_y      end    end    if self.opacity != @target_opacity      @opacity += @speed_opacity      self.opacity = @opacity    end  end  #--------------------------------------------------------------------------  # ● カードを表向きにする  #--------------------------------------------------------------------------  def open(wait = -1)    self.wait = wait unless wait < 0    @target_bitmap = @trump_bitmap    reverse_motion  end  #--------------------------------------------------------------------------  # ● カードを裏向きにする  #--------------------------------------------------------------------------  def close    @target_bitmap = @backface    reverse_motion  end  #--------------------------------------------------------------------------  # ● カードを反転する  #--------------------------------------------------------------------------  def reverse    front? ? close : open  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def reverse_motion    @openness = 100    @closing = true    @openning = true  end  #--------------------------------------------------------------------------  # ● カードの表示予約  #--------------------------------------------------------------------------  def deal    @start_deal = true    # 未使用 (update_deal_sound)    self.bitmap = @backface    self.x = @pos_x - 4    self.y = @pos_y - 4    @target_x = @pos_x    @target_y = @pos_y    @target_opacity = 255    calc_speed(10)  end  #--------------------------------------------------------------------------  # ● カードの消去予約  #--------------------------------------------------------------------------  def slough    @target_x = self.x    @target_y = self.y - 20    @target_opacity = 0    calc_speed(10)  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def calc_speed(frame)    @x = self.x    @y = self.y    @opacity = self.opacity    @speed_x = (@target_x - self.x) / frame.to_f    @speed_y = (@target_y - self.y) / frame.to_f    @speed_opacity = (@target_opacity - self.opacity) / frame.to_f  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def show    self.opacity = 255  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def hide    self.opacity = 0  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def in_motion?    return true if reversing?    return true if moving?    return false  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def reversing?    return @closing || @openning  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def moving?    return true if self.x != @target_x    return true if self.y != @target_y    return true if self.opacity != @target_opacity    return false  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def wait?    return @wait_count != 0  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def front?    return self.bitmap != @backface  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def trump=(trump)    return if @trump == trump    @trump = trump    @trump_bitmap.dispose if @trump_bitmap    @trump_bitmap = Bitmap.new(CARD_WIDTH, CARD_HEIGHT)    rect = Rect.new(0, 0, CARD_WIDTH, CARD_HEIGHT)    rect.x = CARD_WIDTH * (trump.number - 1)    rect.y = CARD_HEIGHT * trump.suit    @trump_bitmap.blt(0, 0, Cache.system("PokerTrump"), rect)  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def wait=(value)    @wait_count = value  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def select    self.oy = CARD_HEIGHT / 2 + 8  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def unselect    self.oy = CARD_HEIGHT / 2  end  #--------------------------------------------------------------------------  # ● 原点は固定、拡大率はカードをめくる動作で使用  #--------------------------------------------------------------------------  protected :ox=, :oy=, :zoom_x=, :zoom_y=endclass Spriteset_PokerTrump  #--------------------------------------------------------------------------  # ● 定数  #--------------------------------------------------------------------------  CARD_MAX = 5  WAIT_TIME = 8  #--------------------------------------------------------------------------  # ● 公開インスタンス変数  #--------------------------------------------------------------------------  attr_reader   :index                    # カーソル位置  attr_reader   :active                   #   #--------------------------------------------------------------------------  # ● オブジェクト初期化  #--------------------------------------------------------------------------  def initialize(viewport)    @wait_count = -1    @viewport = viewport    @viewport.z = 50    cw = @viewport.rect.width / CARD_MAX    sx = @viewport.rect.width / 2 - cw * 2    sy = @viewport.rect.height / 2    @card_sprites = Array.new(CARD_MAX) do |i|      Sprite_PokerTrump.new(sx + cw * i, sy, @viewport)    end    clear_handler    unselect    deactivate  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def dispose    @viewport.dispose    @card_sprites.each {|sp| sp.dispose }  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def update    @viewport.update    @card_sprites.each {|sp| sp.update }    update_timer    update_cursor    if self.active      process_ok                           if Input.trigger?(:C)      process_cancel                       if Input.trigger?(:      cursor_right(Input.trigger?(:RIGHT)) if Input.repeat?(:RIGHT)      cursor_left (Input.trigger?(:LEFT))  if Input.repeat?(:LEFT)    end  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def deal(hand)    Sound.play_poker_deal    CARD_MAX.times do |i|      @card_sprites[i].trump = hand[i]      @card_sprites[i].wait = WAIT_TIME * i      @card_sprites[i].deal    end  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def slough    @card_sprites.each {|sp| sp.slough }  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def open(hand = nil)    if hand      CARD_MAX.times {|i| @card_sprites[i].trump = hand[i] }      list = @card_sprites.select {|sp| !sp.front? }    else      list = @card_sprites    end    list.each_with_index {|sp,i| sp.open(WAIT_TIME * i) }    return self  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def reversed_indexes    result = []    @card_sprites.each_with_index do |sp,i|      result << i unless sp.front?    end    return result  end  #--------------------------------------------------------------------------  # ● ウィンドウのアクティブ化  #--------------------------------------------------------------------------  def activate    @active = true    self  end  #--------------------------------------------------------------------------  # ● ウィンドウの非アクティブ化  #--------------------------------------------------------------------------  def deactivate    @active = false    self  end  #--------------------------------------------------------------------------  # ● 項目の選択  #--------------------------------------------------------------------------  def select(index)    @index = index    update_cursor  end  #--------------------------------------------------------------------------  # ● 項目の選択解除  #--------------------------------------------------------------------------  def unselect    @index = -1    update_cursor  end  #--------------------------------------------------------------------------  # ● ハンドラの設定をクリア  #--------------------------------------------------------------------------  def clear_handler    @handler = {}  end  #--------------------------------------------------------------------------  # ● 動作に対応するハンドラの設定  #     method : ハンドラとして設定するメソッド (Method オブジェクト)  #--------------------------------------------------------------------------  def set_handler(symbol, method)    @handler[symbol] = method  end  #--------------------------------------------------------------------------  # ● ハンドラの存在確認  #--------------------------------------------------------------------------  def handle?(symbol)    @handler.include?(symbol)  end  #--------------------------------------------------------------------------  # ● ハンドラの呼び出し  #--------------------------------------------------------------------------  def call_handler(symbol)    @handler[symbol].call if handle?(symbol)  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def update_cursor    @card_sprites.each {|sp| sp.unselect }    @card_sprites[@index].select unless @index < 0  end  #--------------------------------------------------------------------------  # ● カーソルの移動可能判定  #--------------------------------------------------------------------------  def cursor_movable?    return self.active  end  #--------------------------------------------------------------------------  # ● カーソルを右に移動  #--------------------------------------------------------------------------  def cursor_right(wrap = false)    if index < CARD_MAX - 1 || wrap      Sound.play_cursor      select((index + 1) % CARD_MAX)    end  end  #--------------------------------------------------------------------------  # ● カーソルを左に移動  #--------------------------------------------------------------------------  def cursor_left(wrap = false)    if index > 0 || wrap      Sound.play_cursor      select((index - 1 + CARD_MAX) % CARD_MAX)    end  end  #--------------------------------------------------------------------------  # ● 選択項目のカードを取得  #--------------------------------------------------------------------------  def current_card    return @index < 0 ? nil : @card_sprites[@index]  end  #--------------------------------------------------------------------------  # ● 決定ボタンが押されたときの処理  #--------------------------------------------------------------------------  def process_ok    Sound.play_poker_reverse    Input.update    unless @index < 0      @card_sprites[@index].reverse    end  end  #--------------------------------------------------------------------------  # ● キャンセルボタンが押されたときの処理  #--------------------------------------------------------------------------  def process_cancel    Sound.play_poker_change    Input.update    deactivate    call_handler(:cancel)  end  #--------------------------------------------------------------------------  # ● すべてのカードの動作が完了するまでの時間  #--------------------------------------------------------------------------  def wait_count    return @card_sprites.max_by {|sp| sp.wait_count }.wait_count  end  #--------------------------------------------------------------------------  # ● ビューポートのサイズ  #--------------------------------------------------------------------------  def viewport    return @viewport.rect  end  #--------------------------------------------------------------------------  # ● 移動中判定  #--------------------------------------------------------------------------  def update_timer    return if @wait_count < 0    return if @card_sprites.any? {|card| card.in_motion? }    @wait_count -= 1    @deferred.call if @wait_count < 0 && @deferred  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def wait(duration, method = nil)    @wait_count = duration    @deferred = method  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def waiting?    return @wait_count >= 0  endendclass Scene_Poker < Scene_MenuBase  #--------------------------------------------------------------------------  # ● 開始処理  #--------------------------------------------------------------------------  def start    super    create_hands_window    create_help_window    create_gold_window    create_card_sprite    create_info_windows    start_game  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def create_hands_window    @hands_window = Window_PokerHands.new    @hands_window.x = (Graphics.width - @hands_window.width) / 2    @hands_window.y = 32  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def create_help_window    @help_window = Window_PokerHelp.new    @help_window.y = Graphics.height - @help_window.height  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def create_gold_window    @coin_window = Window_PokerCoin.new    @coin_window.x = Graphics.width - @coin_window.width    @coin_window.y = Graphics.height - @coin_window.height  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def create_card_sprite    viewport = Viewport.new    viewport.rect.y = @hands_window.y + @hands_window.height    viewport.rect.height -= viewport.rect.y + @help_window.height    @spriteset = Spriteset_PokerTrump.new(viewport)    @spriteset.set_handler(:cancel, method(:change_card))  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def create_info_windows    @info_viewport = Viewport.new    @info_viewport.z = 100    create_bet_window    create_message_window    create_manual_window  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def create_bet_window    @bet_window = Window_PokerBet.new    @bet_window.viewport = @info_viewport    @bet_window.x = (@info_viewport.rect.width - @bet_window.width) / 2    @bet_window.y = (@info_viewport.rect.height - @bet_window.height) / 2    @bet_window.y = @spriteset.viewport.y + 16    @bet_window.set_ok_handler(method(:on_bet_ok))    @bet_window.set_cancel_handler(method(:return_scene))  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def create_message_window    @message_window = Window_PokerMessage.new    @message_window.viewport = @info_viewport    @message_window.x = (@info_viewport.rect.width - @message_window.width) / 2    @message_window.y = (@info_viewport.rect.height-@message_window.height) / 2    @message_window.y = @spriteset.viewport.y + 16  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def create_manual_window    @manual_window = Window_PokerManual.new    @manual_window.viewport = @info_viewport    @manual_window.x = (@info_viewport.rect.width - @manual_window.width) / 2    @manual_window.y = (@info_viewport.rect.height - @manual_window.height) / 2    @manual_window.open_handler = proc do      @manual_window.open    end    @manual_window.close_handler = proc do      @manual_window.close    end  end  #--------------------------------------------------------------------------  # ● 終了処理  #--------------------------------------------------------------------------  def terminate    super    @info_viewport.dispose    @spriteset.dispose  end  #--------------------------------------------------------------------------  # ● フレーム更新  #--------------------------------------------------------------------------  def update    super    @spriteset.update if @manual_window.close?  end  #--------------------------------------------------------------------------  # ● 全ウィンドウの更新  #--------------------------------------------------------------------------  def update_all_windows    if @manual_window.close?      super    else      @manual_window.update    end  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def start_game    @hands_window.clear    @hand = CAO::Poker::Hand.new    @spriteset.deal(@hand)    @spriteset.wait(0, method(:start_bet))  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def end_game    @spriteset.slough    @spriteset.wait(10, method(:start_game))  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def start_bet    @bet_window.refresh    @bet_window.open.activate  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def start_select    Sound.play_poker_start    @spriteset.select(0)    @spriteset.activate  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def show_mes_win    Sound.play_poker_win    CAO::Poker.gain_coin(@hands_window.prize)    @coin_window.refresh    @message_window.set_text(CAO::Poker::VOCAB_WIN % @hands_window.prize)    @message_window.open.activate  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def show_mes_lose    Sound.play_poker_lose    @message_window.set_text(CAO::Poker::VOCAB_LOSE % @hands_window.prize)    @message_window.open.activate  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def on_bet_ok    CAO::Poker.gain_coin(-@bet_window.number)    @coin_window.refresh    @hands_window.coin = @bet_window.number    @bet_window.close    @spriteset.open    @spriteset.wait(0, method(:start_select))  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def on_mes_change_ok    start_select  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def on_mes_win_ok    end_game  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def on_mes_lose_ok    end_game  end  #--------------------------------------------------------------------------  # ●   #--------------------------------------------------------------------------  def change_card    @spriteset.unselect    @spriteset.reversed_indexes.each {|index| @hand.change(index) }    @spriteset.open(@hand)    @hands_window.index = @hand.final    if @bet_window.number <= @hands_window.prize      @message_window.set_ok_handler(method(:on_mes_win_ok))      @message_window.set_cancel_handler(method(:on_mes_win_ok))      @spriteset.wait(0, method(:show_mes_win))    else      @message_window.set_ok_handler(method(:on_mes_lose_ok))      @message_window.set_cancel_handler(method(:on_mes_lose_ok))      @spriteset.wait(0, method(:show_mes_lose))    end  endend 
 

Carri

Veteran
Veteran
Joined
Aug 16, 2013
Messages
35
Reaction score
13
First Language
English
Primarily Uses
I had permission BEFORE I ever put it up.  I asked him for the letter to back myself up, something I haven't had to do in TWENTY YEARS of coding game files.  You are the very definition of a troll.  Disrespectful posts, accusations with Zero basis in fact.  Not smart enough to know that it is illegal to accuse people of things in many parts of the world when you have no basis for them.  It's called Slander.  Who are you to ever accuse anyone of anything on this earth when you know nothing.  And you have no right to be disrespectful to me or to anyone else.  You have had enough of my time.  You are forever on permanent ignore.  I don't allow disrespectful and negative people in my life.  And I won't stand for it here.  Enjoy being on ignore.  There is no appeal on that.  It's forever. 
 

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
15,141
Reaction score
15,473
First Language
Filipino
Primarily Uses
RMMZ
RaZzi where in the world did you see Carri stole the script when the moment s/he posted here s/he already LINKED Cacao and not once stated that they made this script from scratch? They also stated many times that they got permission. Like seriously, what is your problem?

If you have an issue with the way things are approved here then contact a mod or the admins. Any further aggressiveness from you will warrant a warning. 
 
Last edited by a moderator:

ianbach

Zombie Master
Member
Joined
May 3, 2014
Messages
67
Reaction score
6
First Language
english
Primarily Uses
I had permission BEFORE I ever put it up.  I asked him for the letter to back myself up, something I haven't had to do in TWENTY YEARS of coding game files.  You are the very definition of a troll.  Disrespectful posts, accusations with Zero basis in fact.  Not smart enough to know that it is illegal to accuse people of things in many parts of the world when you have no basis for them.  It's called Slander.  Who are you to ever accuse anyone of anything on this earth when you know nothing.  And you have no right to be disrespectful to me or to anyone else.  You have had enough of my time.  You are forever on permanent ignore.  I don't allow disrespectful and negative people in my life.  And I won't stand for it here.  Enjoy being on ignore.  There is no appeal on that.  It's forever. 
lol carri go girl.

I was thinking why they write that accusations also before you responded. I was typing a reply but got notification of new post lol. 

so here is what I had typed:

 

It's attached to the original post, you can download it or you can get it from the demo.  I knew it wasn't working when I pasted it, that's why I attached it.  I didn't have time when I put it up to take out the paste of it.  I should do that now.  Just download the attachment to the post.  I don't usually use pastebin for personal reasons.  I've never liked their site. 
I dont use pastebin either.

I also tried make a demo on a script that i was told was ok to use for non commercial and commercial use. I had asked around about how to do something found so many dif ways but one was nice and easy so wanted to show it in use but kinda got a response like UGHH hide it burn it run away egad. lol.

oh I had checked out your site I know how it feels to be treated like a nobody when it not true. 

ah oh well kids who knows what to do with them, they just have to eventually learn they do not know everything.

So Carri did you look over the new script that was posted in one up men ship?

I am about to try it out in the demo you made i made it so the guy picks up a deck of cards and u can play game anytime just ckick on the cards item and it does the script call u had in the treasure box. I saw a way cool game last night 

"Dude Wheres My Speeder" DSWP 

its a star wars themed way cool graphics. 

no xp on chars but u do fight

its basically do lil stuff see some cool graphics and game mechanics
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
RaZzi, from now on, you are not permitted to post in any more of Carri's tutorial threads. You've done nothing but stir up trouble, despite being told in the other one to keep out of it. If Archeia hadn't posted above, I'd have given you a warning. Don't post back here again.
 
Last edited by a moderator:

Carri

Veteran
Veteran
Joined
Aug 16, 2013
Messages
35
Reaction score
13
First Language
English
Primarily Uses
@ianbach  I was actually going to make another demo to teach a technique that's called dual coding. 

I really haven't bothered to look at the script he posted because I would never trust anything from someone who has issues.  I never said the script was bugfree.  But I didn't personally encounter any problems when I tested it before I put it up. 

I know how to add what you want with making it an item deck that can be played with out of inventory.  If I do the new demo, I'll see if I can put that in it.  Most things you can actually do that with, it's done through common events.  And would probably be a good thing to add.  Even the tutorial I posted on the slots, that can actually be made into an inventory item. 

Just some ideas, if you wanted to give a deck of cards to another character as a gift, you can actually make a gift box item, put some code in that so they have to unwrap it and even do a cute little event with that before you add the deck to inventory.  Little things like that make the game more interesting.

 
 

ianbach

Zombie Master
Member
Joined
May 3, 2014
Messages
67
Reaction score
6
First Language
english
Primarily Uses
@ianbach  I was actually going to make another demo to teach a technique that's called dual coding. 

I really haven't bothered to look at the script he posted because I would never trust anything from someone who has issues.  I never said the script was bugfree.  But I didn't personally encounter any problems when I tested it before I put it up. 

I know how to add what you want with making it an item deck that can be played with out of inventory.  If I do the new demo, I'll see if I can put that in it.  Most things you can actually do that with, it's done through common events.  And would probably be a good thing to add.  Even the tutorial I posted on the slots, that can actually be made into an inventory item. 

Just some ideas, if you wanted to give a deck of cards to another character as a gift, you can actually make a gift box item, put some code in that so they have to unwrap it and even do a cute little event with that before you add the deck to inventory.  Little things like that make the game more interesting.

 
true that sounds cool. I will have to check out your post on slots also.
 

Carri

Veteran
Veteran
Joined
Aug 16, 2013
Messages
35
Reaction score
13
First Language
English
Primarily Uses
The top post has been updated with the second part of the tutorial.  This teaches the art of Duel Coding, gives you the option to have a game switch turned on when the player wins a hand, and gives another option to play again unlimited.  It also teaches how to make the cards into an inventory item the player can use to play poker whenever they want to.  Demo for this part of the tutorial was added and a separate download for those who just want the duel scripts with picture files without the demo.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
So, instead of adding a few extra if/else checks in the script, you choose to duplicate all of it and add some extra letters at the end of each class so that the engine thinks that those are different scripts?

That is an utter waste of space in the script editor and it is not needed at all. :D

Adding a cool name like "Duel Coding" for it won't make it more useful and calling it "art" is not something I would do for sure.

You can simply reuse everything if you add a few extra checks in.

But then it would be a modified script, so posting it would... Ok I won't go there again, sorry. :p

But you did modified it anyway, even if with just 2 lines, so here is something which should eliminate the need of 2 scripts altogether:

def show_mes_win Sound.play_poker_win CAO::poker.gain_coin(@hands_window.prize) @coin_window.refresh @message_window.set_text(CAO::poker::VOCAB_WIN % @hands_window.prize) @message_window.open.activate $game_variables[CAO::poker::Variable] = 1 return_scene if $game_switches[CAO::poker::Switch] == true end def show_mes_lose Sound.play_poker_lose @message_window.set_text(CAO::poker::VOCAB_LOSE % @hands_window.prize) @message_window.open.activate $game_variables[CAO::poker::Variable] = 2 return_scene if $game_switches[CAO::poker::Switch] == true endThis will execute the return scene only if the defined switch is ON regardless if the player won or lost. If it is OFF, it will keep on with the playing.It will also set a variable to 1 if the player won, and to 2 if the player lost, so you can use that to check if the player won or lost.

And you can re-use the switch for different events too for the same purpose with proper eventing.

Everything what you did in the demo can be done with just operating one switch and one variable in the event.

I like how you explain things, but that "Duel Coding" is just far from the optional solution, in my opinion.

And a little thing worth mentioning, that you put '$game_switches[1] = true' in the script instead of '$game_switches[CAO::poker::Switch] = true', which means that the setting you have made in the module won't affect anything, it will always turn the switch with ID 1 on.

Ohh, and thanks for the slot machine tutorial! That one helped me understand some parts of that script. :)
 

Carri

Veteran
Veteran
Joined
Aug 16, 2013
Messages
35
Reaction score
13
First Language
English
Primarily Uses
It's just a different way of doing things.  And it gets the job done.  Some people might find my way faster and easier.  No one is saying any way is the right way.  Think outside the box.  There are always alternate ways of doing things.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,045
Members
137,569
Latest member
Shtelsky
Top