Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ** ความเร็วของสกิล
- #------------------------------------------------------------------------------
- # * โดย: jojo741963
- # * เวอร์ชั่น: 1.0
- # 3-1-2015
- #------------------------------------------------------------------------------
- # รายละเอียดของสคริปต์นี้ :
- # - กำหนดความเร็วของสกิลแต่ล่ะไอดีได้
- #------------------------------------------------------------------------------
- # วิธีการใช้งานสคริปต์นี้ :
- # วางสคริปต์นี้เหนือสคริปต์ Main และอยู่ใต้สคริปต์ Game_Battler 1
- # แล้วเซ็ตค่าได้ด่านล่างเลยครับ
- #==============================================================================
- module SKILL_SPEED
- Skill_speed = {
- #------------------------------------------------------------------------------
- # ส่วนการตั้งค่า
- #------------------------------------------------------------------------------
- # ตั้งค่าโดยใช้รูปบบดังนี้
- # ไอดีของสกิล => ความเร็วของสกิล , ..........
- # ตัวอย่าง : กำหนดให้เมื่อใช้สกิล Fire (ไอดี 7) ก็จะเริ่มทำงานก่อน ก็ให้ใส่ความเร็วไว้เยอะๆ เช่น 1000
- # 7=>1000
- #------------------------------------------------------------------------------
- 7=>1000, 57 =>1000
- #------------------------------------------------------------------------------
- # จบส่วนการตั้งค่า
- #------------------------------------------------------------------------------
- }
- end
- class Game_Battler
- def make_action_speed
- if @current_action.kind == 1 #ตรวจสอบว่าเป็นการใช้สกิลหรือไม่
- if SKILL_SPEED::Skill_speed[@current_action.skill_id] != nil #ตรวจสอบว่าได้กำหนดไอดีไว้หรือไม่
- @current_action.speed = SKILL_SPEED::Skill_speed[@current_action.skill_id]
- else
- @current_action.speed = agi + rand(10 + agi / 4) #<< นี่คือคำสั่งสุ่มความเร็วแบบปกติ
- end
- else
- @current_action.speed = agi + rand(10 + agi / 4) #<< นี่คือคำสั่งสุ่มความเร็วแบบปกติ
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement