VX 스크립트

# by 까까까
#
# 스킬과 아이템의 공격 횟수 추가시키기
#
# 스킬/아이템의 공격 횟수는 기본적으로
# 적 한마리는 2번, 적을 랜덤하게는 3번이
# 적 전체나, 아군 전체는 1번이 한계입니다.
# 그걸 늘려주는 스크립트 입니다.
# 메모 기능을 이용합니다.
#
# 메모 부분에 /Dnn 넣어주시면 nn만큼 공격 횟수가 증가
#
# 예) <적 1마리 연속> 체크후 메모에 /D02 기입
# ==> 적 1마리를 4번 공격
# <적을 랜덤하게 3마리> 체크후 메모에 /D03 기입
# ==> 적을 랜덤하게 6번 공격
# <적 전체> 체크후 메모에 /D04 기입
# ==> 적 전체를 5번 공격
# <아군 전체> 체크후 메모에 /D05 기입
# ==> 아군 전체를 6번 회복?!
#
# !!!!!주의사항!!!!!
# nn의 자릿수를 꼭 맞춰주셔야 합니다.
# /D3 <== 이렇게 쓰시면 안됩니다! /D03 이렇게 써주세요

class Game_BattleAction
 
 alias make_obj_targets_ssetal make_obj_targets
 
  def make_obj_targets(obj)
    targets = []
   
    def plus_attack_option
      counter = 0
      for i in 0 ... item.note.size
        if item.note[i] == 68 or item.note[i] == 100
          dual10 = ( item.note[i+1] - 48 ) * 10
          dual1   = ( item.note[i+2] - 48 ) * 1
          counter += dual10 + dual1
        else
        end
      end
     return counter
   end
  
    if obj.for_opponent?
      if obj.for_random?
        if obj.for_one?         # 적단체 랜덤
          number_of_targets = 1 + plus_attack_option
        elsif obj.for_two?      # 적2가지 개체 랜덤
          number_of_targets = 2 + plus_attack_option
        else                    # 적삼체 랜덤
          number_of_targets = 3 + plus_attack_option
        end
        number_of_targets.times do
          targets.push(opponents_unit.random_target)
        end
      elsif obj.dual?           # 적단체 연속
        targets.push(opponents_unit.smooth_target(@target_index))
        targets = targets * ( plus_attack_option + 2 )
      elsif obj.for_one?        # 적단체
        targets.push(opponents_unit.smooth_target(@target_index))
      else                      # 적전체
        targets = opponents_unit.existing_members * ( plus_attack_option + 1 )
      end
    elsif obj.for_user?         # 사용자
      targets.push(battler)
    elsif obj.for_dead_friend?
      if obj.for_one?           # 아군 단체 (전투 불능)
        targets.push(friends_unit.smooth_dead_target(@target_index))
      else                      # 아군 전체 (전투 불능)
        targets = friends_unit.dead_members * ( plus_attack_option + 1 )
      end
    elsif obj.for_friend?
      if obj.for_one?           # 아군 단체
        targets.push(friends_unit.smooth_target(@target_index))
      else                      # 아군 전체
        targets = friends_unit.existing_members * ( plus_attack_option + 1 )
      end
    end
    return targets.compact
  end
end
####################################
class Game_BattleAction
 
 alias make_obj_targets_ssetal make_obj_targets
 
  def make_obj_targets(obj)
    targets = []
   
    def plus_attack_option
      counter = 0
      for i in 0 ... skill.note.size
        if skill.note[i] == 68 or skill.note[i] == 100
          dual10 = ( skill.note[i+1] - 48 ) * 10
          dual1   = ( skill.note[i+2] - 48 ) * 1
          counter += dual10 + dual1
        else
        end
      end
     return counter
   end
  
    if obj.for_opponent?
      if obj.for_random?
        if obj.for_one?         # 적단체 랜덤
          number_of_targets = 1 + plus_attack_option
        elsif obj.for_two?      # 적2가지 개체 랜덤
          number_of_targets = 2 + plus_attack_option
        else                    # 적삼체 랜덤
          number_of_targets = 3 + plus_attack_option
        end
        number_of_targets.times do
          targets.push(opponents_unit.random_target)
        end
      elsif obj.dual?           # 적단체 연속
        targets.push(opponents_unit.smooth_target(@target_index))
        targets = targets * ( plus_attack_option + 2 )
      elsif obj.for_one?        # 적단체
        targets.push(opponents_unit.smooth_target(@target_index))
      else                      # 적전체
        targets = opponents_unit.existing_members * ( plus_attack_option + 1 )
      end
    elsif obj.for_user?         # 사용자
      targets.push(battler)
    elsif obj.for_dead_friend?
      if obj.for_one?           # 아군 단체 (전투 불능)
        targets.push(friends_unit.smooth_dead_target(@target_index))
      else                      # 아군 전체 (전투 불능)
        targets = friends_unit.dead_members * ( plus_attack_option + 1 )
      end
    elsif obj.for_friend?
      if obj.for_one?           # 아군 단체
        targets.push(friends_unit.smooth_target(@target_index))
      else                      # 아군 전체
        targets = friends_unit.existing_members * ( plus_attack_option + 1 )
      end
    end
    return targets.compact
  end
end
####################################

혹시나 해서 item을 skill로 바꾸고 한번 더 붙여넣으니

둘 다 잘됩니다.

TAG •

Who's star211

profile

어... 음...

Comment '14'
  • ?
    덩크슛 2010.02.16 15:53

    액알에도 되려나

  • profile
    star211 2010.02.16 15:53

    액알은안됨

  • ?
    까까까 2010.02.16 18:23

    ㅋㅋ 옛날에 짯던거 보니 참 허접하네요.ㅎㅎ;;

    문자열 입출력 서툴러서 아스키코드로 입력받는 저 허접함...ㅡㅡ;

    오랜만에 추억에 젖어봅니다.ㅎ;;

  • profile
    star211 2010.02.18 15:33

    왠지 모르게 기본스크립트랑 충돌일어나는군요 ㄱ-

    배틀만 2번하면 충돌일어남

  • ?
    psp2 2010.02.21 18:22

    이게 뭔말인지 잘...

  • ?
    psp2 2010.02.21 18:23

    아이템의 공격횟수가 증가하면 뭐가 바뀌져?????

  • profile
    star211 2010.02.22 10:06

    이를테면

     

    파이어 두루마리는 적 전체를 1번 공격하는데

    메모란에 /D01을 넣으면

    적 전체를 두번 공격하게 됩니다

    이런건 그냥 주석 보시면 아실텐데요.

  • ?
    에이미 2010.02.23 12:27

    공격을 두번하게 된다고요??

    전투에 쓰면 재밌겠네요 ^^

  • ?
    zero_som 2010.02.23 12:35

    이야 이런 스크립트가 필요했어요 , 감사합니다~

  • ?
    오를리쉬 2010.04.14 02:35

    너무 감사합니다 꼭 필요했어요~ 잘쓸게요~

  • ?
    vx맨 2011.04.07 23:20

    아 ㅠㅠ 액알에 안된다니 충격

  • ?
    포인트 팡팡 2011.04.07 23:20
    축하합니다. vx맨님은 35포인트에 당첨되셨습니다.
  • ?
    아레나5045 2011.07.06 22:35

    으히 감사

     

  • profile
    명란젓 2013.05.17 21:18
    .................................................................
    충돌이 엄청나서 이건 안쓰는게 나은듯합니다..
    어떻게든 써볼려고 맨날 만지작거리는데..ㅠ
    스크립트 만질줄을 모르니...

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5408
237 메뉴 레벨업 시 자세한 정보 나오는 스크립트 23 아방스 2009.01.20 3895
236 온라인 NETVX 2버전 18 아방스 2009.02.04 3908
235 전투 VX SRPG 스크립트를 수정해봤습니다(8) - 누적수정 30 아이미르 2011.09.09 3916
234 그래픽 RPG XP의 Transitions효과를 VX에도 적용을 해보자 4 아방스 2008.01.27 3934
233 직업 서브클래스 선택 시스템 Subclass Selection System 7 file 카르와푸딩의아틀리에 2009.06.30 3943
232 파티 파티 변경 시스템 21 file 아방스 2008.03.09 3945
231 이동 및 탈것 vx 걸을때 소리가 나도도록 하는 스크립트 33 아방스 2008.01.31 3947
230 메시지 문장에서1글자마다소리내기 19 작은샛별 2010.03.07 3951
229 메뉴 커서 모양 바꾸는 스크립트 16 아방스 2009.01.20 3959
228 상점 YERD - 커먼이벤트 샵 12 file 훈덕 2009.11.08 3961
227 기타 vx 보안 시스템 19 file 허걱 2009.07.29 3966
226 기타 화면 해상도(640 X 480) 스크립트 6 file 쿠쿠밥솥 2012.01.10 3972
225 아이템 아이템 믹서 21 file 미양 2010.07.02 3983
224 파티 파티원이 따라다니는 스크립트 11 file 놀러 2011.09.15 3988
223 2 Players Engine 2인용하기 15 file RPGbooster 2008.10.08 4001
222 온라인 VX Pheonix 2.0 한글 번역 버전 16 미니 2010.04.18 4002
221 상점 상점의 자세한 표시 32 file RPGbooster 2008.10.11 4008
220 기타 시야범위 스크립트 22 file 카르와푸딩의아틀리에 2009.06.30 4025
219 미니맵 KGC 미니 맵 22 file RPGbooster 2008.10.08 4036
218 기타 시야범위 스크립트 18 file 좀비사냥꾼 2009.03.19 4047
Board Pagination Prev 1 ... 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ... 32 Next
/ 32