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
26 스킬 합성샾 스크립트 ^^ [동영상 포함] 6 file 아방스 2008.09.23 6038
25 스킬 스킬 필요 조건(번역) 23 file 훈덕 2009.02.03 4644
24 스킬 스킬 사용시 컷인 연출 (번역) 26 file 훈덕 2009.02.05 5387
23 스킬 미완성 구버전. 2칸 위에 있는 글을 이용해주세요. 7 Last H 2009.02.23 1925
22 스킬 무기성장 랭크 시스템. 20 file 카르와푸딩의아틀리에 2009.07.08 4820
21 스킬 DQ특기풍스킬 - KGC 4 카르와푸딩의아틀리에 2009.08.19 3288
20 스킬 무기 업그레이드 시스템 27 file 담먹캐 2009.11.01 5757
19 스킬 YERD - 커스텀 스킬 이펙트 13 file 훈덕 2009.11.08 4080
18 스킬 hp소모스킬 31 file DH Games 2010.02.14 3141
» 스킬 발상의전환 : 스킬과 아이템의 공격횟수를 동시에 증가시키기 14 star211 2010.02.16 3179
16 스킬 Learn Skills By Use 10 비극ㆍ 2010.04.19 2037
15 스킬 [ultimate series]스킬,아이템 데미지계산식을 자기입맛에 맞게 고치는 스크립트 16 file EuclidE 2010.05.04 4373
14 스킬 Grid Inventory 1.0f by Modern Algebra 2 Alkaid 2010.09.05 1960
13 스킬 Simple Sort Inventory 1.3a by cozziekuns 5 file Alkaid 2010.11.10 1636
12 스킬 Simple Sort Skill Inventory 1.1 by cozziekuns 5 file Alkaid 2010.11.10 2350
11 스킬 체스트 팝업 3.0 9 file 파이어 2010.12.05 3037
10 스킬 스킬 필요조건에 살짝 손대봤습니다. -- 수정 18 아이미르 2011.03.23 2499
9 스킬 훔치기 스킬을 만드는 스크립트! 5 우켈킁 2011.03.31 2390
8 스킬 스킬북으로 스킬 레벨업!, 'SW_BookSkill' by SiotWarrior(재수정) 21 file 시옷전사 2011.05.15 2817
7 스킬 강화주문서, SW_EchantScroll by 시옷전사(SiotWarrior) 21 file 시옷전사 2011.07.13 2605
Board Pagination Prev 1 2 Next
/ 2