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 5398
297 폰 시스템 29 RPGbooster 2008.10.11 3454
296 직업 [직업 변경] TBK_JobChanger_Demo_v1.2 10 아방스 2009.02.05 3468
295 기타 범용 게이지 묘화 - KGC 14 file 카르와푸딩의아틀리에 2009.08.19 3476
294 파티 전투중 파티 변경 스크립트 21 아방스 2008.03.09 3477
293 온라인 VX Phoenix 온라인 스크립트 1.3버전 12 아방스 2009.06.18 3486
292 메뉴 Final Fantasy VII Menu System 8 비극ㆍ 2010.04.19 3506
291 메시지 MessageSound v2.0 글자에 소리 다다닥 스크립트 21 할렘 2009.02.02 3510
290 상점 상점에서 아이템 분류 5 file 파이어 2011.01.23 3510
289 새로운 종류의 세이브 스크립트!! 8 Man... 2008.10.28 3517
288 기타 Staff Roll 13 file 허걱 2009.01.31 3523
287 이동 및 탈것 A* 알고리즘을 이용한 길찾기 스크립트 3 file 허걱 2009.04.20 3528
286 기타 경험치, HP, MP 백분율계산 (실시간) 8 file 허걱 2009.08.01 3540
285 메뉴 지난 메뉴 스크립트에 이은 스테이터스 스크립트! 5 file 독사 2008.06.29 3545
284 기타 KGC패시브 스크립트 30 카르와푸딩의아틀리에 2009.10.07 3551
283 전투 XAS Hero Edition VX Manual 번역 1 케이언 2012.01.02 3554
282 기타 데이터베이스 자체 제한 해체 스크립트 [Database Limit Breaker] 13 file 할렘 2009.02.07 3562
281 기타 말풍선 그림 바꾸기 6 file 허걱 2009.08.15 3565
280 타이틀/게임오버 타이틀전 공지사항 19 file AYARSBMA 2010.01.23 3583
279 스킬장착 시스템 17 file RPGbooster 2008.10.11 3585
278 메시지 Display Flipped Picture 스크립트 11 Love♡ 2009.11.09 3585
Board Pagination Prev 1 ... 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 ... 32 Next
/ 32