질문과 답변

Extra Form

class Game_Interpreter
  def command_122
    value = 0
    case @params[3]  # Operand
    when 0  # Constant
      value = @params[4]
    when 1  # Variable
      value = $game_variables[@params[4]]
    when 2  # Random
      value = @params[4] + rand(@params[5] - @params[4] + 1)
    when 3  # Item
      value = $game_party.item_number($data_items[@params[4]])
    when 4  # Actor
      actor = $game_actors[@params[4]]
      if actor != nil
        case @params[5]
        when 0  # Level
          value = actor.level
        when 1  # Experience
          value = actor.exp
        when 2  # HP
          value = actor.hp
        when 3  # MP
          value = actor.mp
        when 4  # Maximum HP
          value = actor.maxhp
        when 5  # Maximum MP
          value = actor.maxmp
        when 6  # Attack
          value = actor.atk
        when 7  # Defense
          value = actor.def
        when 8  # Spirit
          value = actor.spi
        when 9  # Agility
          value = actor.agi
        end
      end
    when 5  # Enemy
      enemy = $game_troop.members[@params[4]]
      if enemy != nil
        case @params[5]
        when 0  # HP
          value = enemy.hp
        when 1  # MP
          value = enemy.mp
        when 2  # Maximum HP
          value = enemy.maxhp
        when 3  # Maximum MP
          value = enemy.maxmp
        when 4  # Attack
          value = enemy.atk
        when 5  # Defense
          value = enemy.def
        when 6  # Spirit
          value = enemy.spi
        when 7  # Agility
          value = enemy.agi
        end
      end
    when 6  # Character
      character = get_character(@params[4])
      if character != nil
        case @params[5]
        when 0  # x-coordinate
          value = character.x
        when 1  # y-coordinate
          value = character.y
        when 2  # direction
          value = character.direction
        when 3  # screen x-coordinate
          value = character.screen_x
        when 4  # screen y-coordinate
          value = character.screen_y
        end
      end
    when 7  # Other
      case @params[4]
      when 0  # map ID
        value = $game_map.map_id
      when 1  # number of party members
        value = $game_party.members.size
      when 2  # gold
        value = $game_party.gold
      when 3  # steps
        value = $game_party.steps
      when 4  # play time
        value = Graphics.frame_count / Graphics.frame_rate
      when 5  # timer
        value = $game_system.timer / Graphics.frame_rate
      when 6  # save count
        value = $game_system.save_count
      end
    end
    for i in @params[0] .. @params[1]   # Batch control
      case @params[2]  # Operation
      when 0  # Set
        $game_variables[i] = value
      when 1  # Add
        $game_variables[i] += value
      when 2  # Sub
        $game_variables[i] -= value
      when 3  # Mul
        $game_variables[i] *= value
      when 4  # Div
        $game_variables[i] /= value if value != 0
      when 5  # Mod
        $game_variables[i] %= value if value != 0
      end
      if $game_variables[i] > 99999999    # Maximum limit check
        $game_variables[i] = 99999999
      end
      if $game_variables[i] < -99999999   # Minimum limit check
        $game_variables[i] = -99999999
      end
    end
    $game_map.need_refresh = true
    return true
  end
end

 

 

무슨 RPGVX의 치명적인 버그를 수정하는 거라네요..

Comment '1'
  • ?
    백호 2011.02.22 00:29

    이벤트 처리부분입니다.

    기존 RPGVX소스가 어떤진몰라도

    저 소스에서 if 문들이 본소스에 없다면 치명적인 버그가되죠 ㅎㅎ;


List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12441
RMVX 스크립트 에러 3 file NaNaShinoNovel 2014.05.05 513
RMVX 게임 글씨체가 바뀌지 않아요 ;; 끼룩 2011.01.04 515
RMVX 데미지 효과창의 옵션들 1 위리리릴 2014.05.27 515
RMVX vx몬스터 포획 이벤트 잡초더미 2011.02.04 517
RMVX 메모 같은것 보기.... 1 프라임헌터즈 2011.01.08 520
RMVX 퀘스트 2 츠키코로 2014.05.04 520
RMVX [RPG VX] 배틀씬 관련 질문. DRK-Maker 2013.02.14 521
RMVX 몬스터나 캐릭터가 전투불능이 되어도 초상화(배틀러)가 없어지지 않습니다. MMM 2014.08.26 521
RMVX 또 하나 더요 .. 1 유아린 2010.10.05 523
RMVX 용어 질문입니다~ 3 메이커 메이커 2010.12.08 523
RMVX 악! 데이터데이스 액터부분이... 아스트랄군 2010.12.02 525
RMVX 호환 부탁드립니다. 1 카르닉스 2010.12.07 525
RMVX 스킬 커먼 이벤트 라유 2010.12.31 525
RMVX 접촉시 전투하는 몬스터를 이벤트시에는 안나오게 하고 싶어요 9 빡새 2014.05.06 529
RMVX 액알에서 스킬만들기 dlwog2 2014.06.02 529
RMVX vx 전투중에 적이 분열하는 효과 낼수 없을까요? 1 왕자 2010.11.29 530
RMVX 시작하자마자 화면 검게 하는 법. 1 에스테반 2011.01.05 531
RMVX 이 것이 무슨 스크립트인지 아시는 분...해석좀.. 1 Arowana 2011.02.21 531
RMVX 이벤트가 이벤트에게 다가가게 하는방법 18 지혈이 2014.02.22 531
RMVX 메세지박스 바꾸는 법좀요... 1 dlwog2 2014.06.01 531
Board Pagination Prev 1 ... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 ... 127 Next
/ 127