자유게시판

#==================================================
# ** Stamina
# By onidsouza
# Version 1.2
# 02/26/09
#-------------------------------------------------
module OniStamina

 Initial = 100 # Initial stamina value
 
  EvolutionRate = 1.3 #Float value representing the level up evolution rate.
                      # Leave 1.0 for none
 
  InitialRecoverFrames = 15 # Recover Frames Rate
 
  RecoverEvolutionRate = 3 #Float value representing the level up recover time
                             # evolution rate. Leave 1.0 for none.
 
  ActorMember = 0# Number from 0 to 3, representing the actor in the party.

end

class Game_Actor
 
  alias onistamina_init initialize
  alias onistamina_lvlup level_up
 
  attr_reader :stamina
  attr_accessor :maxsta
  attr_reader :recover
 
  def initialize(actor_id)
    onistamina_init(actor_id)
    @stamina = OniStamina::Initial
    @maxsta = @stamina
    @recover = OniStamina::InitialRecoverFrames
  end
 
  def level_up
    @maxsta = @maxsta * OniStamina::EvolutionRate
    @recover = @recover / OniStamina::RecoverEvolutionRate
    @maxsta = @maxsta.to_i
    @recover = @recover.to_i
    onistamina_lvlup
  end
 
  def stamina_text
    (@stamina).to_s + '/' + (@maxsta).to_s
  end
 
  def lose_sta(x)
    if ((@stamina - x) >= 0)
    @stamina = @stamina - x
    else
    @stamina = 0
    end
  end
 
  def gain_sta(x)
    if ((@stamina + x) <= @maxsta)
    @stamina = @stamina + x
    end
  end
 
end

class Window_Stamina < Window_Base
 
  def initialize(x, y, wid, hei)
    super(x, y, wid, hei)
    @stamina = $game_party.members[OniStamina::ActorMember].stamina
    @maxsta = $game_party.members[OniStamina::ActorMember].stamina
    self.opacity = 0
  end
 
  def refresh
    self.contents.clear
    draw_stamina(0, 0)
  end
 
  def draw_stamina(x, y, width = 100)
    wd = width * $game_party.members[OniStamina::ActorMember].stamina / $game_party.members[OniStamina::ActorMember].maxsta
    self.contents.fill_rect(x, y, width, 10, Color.new(0, 0, 0))
    self.contents.fill_rect(x, y, wd, 10, Color.new(255, 255, 119))
    text_wid = contents.text_size($game_party.members[OniStamina::ActorMember].stamina_text).width
    self.contents.draw_text(x + 0, y + 15, text_wid, 20, $game_party.members[OniStamina::ActorMember].stamina_text)
  end
 
end

class Scene_Map
 
  alias onista_start start
  alias onista_terminate terminate
  alias onista_update update
  attr_reader :winsta
 
  def start
    onista_start
    @waiting_sta = 0
    @winsta = Window_Stamina.new(-10, 1, 150, 80)
  end
 
  def terminate
    onista_terminate
    @winsta.dispose
  end
 
  def update
    onista_update
    if $game_player.moving? and $game_player.dash?
      $game_party.members[OniStamina::ActorMember].lose_sta(1)
    end
    if $game_system.waiting_sta == $game_party.members[OniStamina::ActorMember].recover
      $game_party.members[OniStamina::ActorMember].gain_sta(1)
    end
    @winsta.refresh
  end
 
end

class Game_Player < Game_Character
 
  alias sta_dash? dash?
 
  def dash?
    return false if $game_party.members[OniStamina::ActorMember].stamina == 0
    sta_dash?
  end
 
end

class Game_System
 
  attr_reader :waiting_sta
 
  alias onista_update update
  alias onista_initialize initialize
 
  def initialize
    @waiting_sta = 0
    onista_initialize
  end
 
  def update
    @waiting_sta = @waiting_sta + 1
    @waiting_sta = 0 if @waiting_sta > $game_party.members[OniStamina::ActorMember].recover
    onista_update
  end
end

TAG •

Who's 라이네크

?

작품연대기

XP - 아인 스토리 (만들다가 어려워서 포기)

VX - 타르타로스 -운명의검- (모든것을 쏟아부엇지만 아버님이 삭제하셔서 멸망)

2003 - 타르타로스 -운명의검- Again (다시 2003으로 도전하지만 몇달만에 컴터를다시키니 자료증발)

XP - 엘티어즈 ~고대의병기~ (현재만드는중 이건 완성한다 ... 젠장..)

 

으으 자료복구할방법은 업는겝니까 ㅠㅠ

지금만드는건 완성시킨다 젠장

Comment '2'
  • profile
    시옷전사 2009.09.29 19:11
    질문을 좀 자세히 해주셧으면 하는 소박한 소망이 있습니다.
  • ?
    TOFUMAN 2009.09.30 00:29

    윈도우를 뜨게 만들지 않는 방법 말씀 하시는 거죠? 그럴거면 간단하게 draw_stamina 펑션 부분을 지워주면 되구요. 그 펑션을 이용하는 (그냥 간단하게 말해 ctrl + f로 draw_stamina)모든 곳을 찾아내서 draw_stamina를 지워보세요. 아마 될 듯?


  1. 아방스 게시물 · 댓글 작성 규칙 (최근 수정일 2015.11.25)

    Date2012.07.17 Category공지 By완폐남™ Views41204
    read more
  2. 왜 아까는 안된건지..ㄷㄷ(추석그림)

    Date2009.10.02 Category잡담 By칼리아 Views1016
    Read More
  3. 추석연휴..

    Date2009.10.02 Category잡담 By칼리아 Views690
    Read More
  4. 아방스님은 게임 만든 거 없어요?

    Date2009.10.02 Category잡담 Bybettynardi Views896
    Read More
  5. 유즈미님이 주신 소스 활용

    Date2009.10.02 Category잡담 By이프 Views908
    Read More
  6. 진리의 다구리

    Date2009.10.02 Category잡담 By이프 Views719
    Read More
  7. 10분만에 급조한녀석...

    Date2009.10.01 Category잡담 By카르와푸딩의아틀리에 Views898
    Read More
  8. 후 월드맵 수정?

    Date2009.10.01 By라이네크 Views880
    Read More
  9. 인터페이스 조언좀;;

    Date2009.10.01 Category잡담 By봉시기 Views887
    Read More
  10. 쩝 관심들 없겠지만... 록맨 망한듯

    Date2009.09.30 Category잡담 By'알중_ Views815
    Read More
  11. 나의 그림

    Date2009.09.30 Category잡담 By칼리아 Views846
    Read More
  12. 엽기스쿨-수련회편(체험판)오프닝제작완료했습니다~

    Date2009.09.30 Category잡담 By수라 Views631
    Read More
  13. 타블렛 첫작 +_+이프님 리퀘스트

    Date2009.09.30 Category잡담 By봉시기 Views774
    Read More
  14. 섬나라이야기 메뉴얼 작성중

    Date2009.09.30 Category잡담 By이프 Views813
    Read More
  15. 리퀘스트 주제

    Date2009.09.30 Category잡담 By이프 Views1429
    Read More
  16. 채팅창이 안보여요 ㅠㅠ...

    Date2009.09.30 Category잡담 By봉시기 Views1230
    Read More
  17. 이런 설명 알아보려나

    Date2009.09.30 By라이네크 Views631
    Read More
  18. 안녕하세요~ 가입인사 드립니다!!

    Date2009.09.30 Category가입 Byskywarlock Views887
    Read More
  19. 스크립트 용어? 질문

    Date2009.09.30 By라이네크 Views748
    Read More
  20. 왕자같나..?

    Date2009.09.29 By라이네크 Views1250
    Read More
  21. 봉식님

    Date2009.09.29 Category잡담 By이프 Views712
    Read More
목록
Board Pagination Prev 1 ... 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 ... 755 Next
/ 755