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
297 디러그 시스템?? 1 Man... 2008.10.28 1247
296 기타 디스크 체인져 VX!! (업데이트..) 30 file Tofuman 2008.12.02 3168
295 퀘스트 디아블로 스타일 퀘스트 시스템(번역) 38 file 훈덕 2009.02.03 6049
294 기타 땅파기 18 file 비극ㆍ 2010.04.19 3013
293 기타 라이트 이펙트 스크립트 12 file 아방스 2009.02.07 3262
292 타이틀/게임오버 랜덤 타이틀화면 8 file RPGbooster 2008.10.08 2832
291 아이템 레벨,능력치,아이템소지갯수,소지금의 한계돌파스크립트 21 file 이탁 2009.01.28 4547
290 메뉴 레벨업 시 자세한 정보 나오는 스크립트 23 아방스 2009.01.20 3895
289 기타 레벨업 시 증가분의 HP/MP 회복 10 시트르산 2010.09.12 2427
288 기타 레벨업 이펙트... 20 비극ㆍ 2010.04.19 3768
287 레벨업 할경우 hp/mp 등을 채워주는 스크립트 49 아방스 2008.09.09 4473
286 레벨업시 자세한 능력치화면 31 file RPGbooster 2008.10.08 4181
285 레오 저장 스크립트 9 Man... 2008.10.28 2529
284 맵/타일 레이 월드맵 스크립트 14 file 카르와푸딩의아틀리에 2009.07.04 4813
283 기타 로딩중 스크립트 24 file NO.0 2009.07.11 4462
282 장비 루시퍼님이올리신 rei의 보이는 장비 아주 조금 해석본 2 file 비류 2010.01.08 2184
281 타이틀/게임오버 륀느님 요청] 전투 전멸후 Game over없이 특정위치로 이동 10 Last H 2009.02.24 2834
280 키입력 마우스 시스템 Simple Mouse System (수정) 42 Incubus 2008.05.24 5693
279 기타 말풍선 그림 바꾸기 6 file 허걱 2009.08.15 3565
278 메뉴 매우 간단명료한 메뉴. 32 file 비극ㆍ 2010.04.23 6619
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