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
417 전투 Verus Tempus Proelium by Vlad 습작 2013.05.13 1246
416 전투 VLAD ABS [액알 시스템] 65 아방스 2009.01.07 12566
415 맵/타일 VX Mode 7 스크립트!!!! 42 file Tofuman 2009.01.07 4306
414 온라인 VX Pheonix 2.0 한글 번역 버전 16 미니 2010.04.18 4002
413 온라인 VX Phoenix 온라인 스크립트 1.3버전 12 아방스 2009.06.18 3486
412 온라인 VX Phoenix 온라인 스크립트 Ver 1.5 36 아방스 2009.07.02 5510
411 변수/스위치 VX Script Fix - Variable Operation (by Yeyinde) 8 WMN 2008.04.06 2267
410 전투 VX SRPG 스크립트를 살짝 손대봤습니다. 13 아이미르 2011.03.31 3433
409 전투 VX SRPG 스크립트를 수정해봤습니다(8) - 누적수정 30 아이미르 2011.09.09 3916
408 전투 VX SRPG 한글번역 (최종수정) 26 file 에틴 2010.08.25 7418
407 전투 VX SRPG3d 수정본(1) 12 아이미르 2011.10.19 4620
406 전투 VX SRPG3d(한글번역) 8 file 아이미르 2011.10.15 5036
405 기타 VX Weather Script by ccoa 1 Alkaid 2010.09.08 1318
404 이동 및 탈것 vx 걸을때 소리가 나도도록 하는 스크립트 33 아방스 2008.01.31 3947
403 이동 및 탈것 VX 기차 스크립트 28 아방스 2009.01.13 4470
402 기타 vx 보안 시스템 19 file 허걱 2009.07.29 3966
401 전투 VX 사이드 뷰 전투 (2003 방식) 16 드로드맨 2008.02.24 4996
400 VX 주석액알 PR코더즈의ABS보다 않좋다고생각할수있지만 더좋음 34 배군 2008.08.17 5145
399 전투 VX]Mog Battleback XP 1.0 11 file WMN 2008.04.06 3869
398 전투 VX_SRPG2 by tomoaky 1 습작 2013.05.13 2053
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ... 32 Next
/ 32