| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 7 |
| 经验 | |
| 最后登录 | 2021-10-29 |
| 在线时间 | 2184 小时 |
- 梦石
- 0
- 星屑
- 672
- 在线时间
- 2184 小时
- 注册时间
- 2009-12-6
- 回帖
- 571

|
发表于 2012-4-14 18:27:26
|
显示全部楼层
本帖最后由 ML4455739 于 2012-4-14 20:02 编辑 , P( T& l- Z" i( q8 Y. c L) T
+ ~" w* w4 T" w/ ~
在Extra Skill里按1~5是设置
: A, z8 p6 P0 [设置好后回到地图按1~5就是……切换。$ N% n$ Q1 K+ r8 L( H
; e3 ^( R( X1 y: [! S请问是要改成直接使用吗?( N# F' y3 ^/ S5 P, o
3 `+ f H, B9 Z
那就用这个吧、记得改XAS_HUDDISABLE_HUD_SWITCH。
( O9 C0 Z6 [0 B; ~[pre lang="ruby"]#===============================================================================
4 ^4 B3 ^! ~# e9 p5 J5 c3 H7 B# XAS - Hot Key HUD0 Z# I; @, [4 u9 R4 {( {
#===============================================================================
& y# R: {" ]( G: t( x$ D# By Mr_Wiggles. ^$ d- f- P3 ?: ~: e
# Version 1.3
/ W* w0 X. O4 [# E7 p( O# 7/6/10
7 J7 ?) l* v7 y" J/ y2 N2 N# E# B#-------------------------------------------------------------------------------- C t% |* Q4 c9 Z
# Instructions:
* i" S1 D. t; T& d# Fill in the constants bellow, paste this script above main and bellow XAS in# W; V1 Y- A# j+ D
# your script data base. BE SURE TO SET TO THE RIGHT XAS VERSION!!) W4 @! g3 ^. X% S9 D
# ! O3 f+ [: [/ E# y$ ], T' }
# Place the "Hot_Keys_HUD" picture file into your game directory " [6 ]1 M1 y/ ~5 t
# Graphics/Pictures folder.: [$ }9 w* O5 S1 _, _$ S4 s3 \ I% v) m
#-------------------------------------------------------------------------------
. s5 c" | n1 y# N6 M# Directions of Use:
7 n; [$ y. j. k2 |1 J- `0 M# Simple just press a number key (1 - 5) when the quick skill or item menu is
+ ~ c2 l9 T A# E! P1 i; Y# Showing.
1 T0 h- @' I3 @/ H) b7 Z7 m( q d#===============================================================================
( _3 @4 s1 M: C0 O: v6 ?1 bHUD_X = 0 # X pos of HUD
, [; m; K9 ^" FHUD_Y = 0 # Y pos of HUD- y. [; [4 f6 M
XAS_HUDDISABLE_HUD_SWITCH = 1" g+ k; c; W8 k1 g# q
" }& h- K; |2 w2 ~
# Set true if XAS 3.7f( Q1 a: q5 G6 Q. q( n/ J
# set false if XAS 3.6
: d, ^$ Q+ D5 C! H, \2 MXASVER_37 = true
! c% Y/ q$ O+ y6 H4 ^; ~: c( s& K7 W+ o3 F* D
#===============================================================================2 {- ?1 h0 r4 J$ T1 e! S Q5 I' y. h
# Numkeys Module! n; o) O: l2 E. M
#===============================================================================
% D n; q. `" z0 Emodule Input8 }4 X2 g0 e, ^, ?+ B, y% }
Numkey = {1 => 1049, 2 => 1050, 3 => 1051, 4 => 1052, 5 => 1053}) ~) x' n. f8 r5 s) D' V. S2 K
class << self% X( \6 B h* M: k# e3 a5 ^
Key = Win32API.new('user32','GetAsyncKeyState',['i'],'i')
( d0 \# _' i+ t3 v" I% w. r; N
2 C) _) k+ C' B. g3 B6 ^* H def testkey(key)
1 P( r+ W" J% J! m% ~! T8 R8 \ Key.call(key) & 0x01 == 1& z' `( s$ d* ?8 o2 b
end$ m" i( R" S9 t
' L: t# e, Z0 L$ ^ alias hud_key_update update: S4 \) O- m) C, v
def update
' m! ~1 }" |/ ]9 w' P& b8 m hud_key_update* }: l" b" T. D# C7 m( _9 e# h# A
@pressed = []3 |! |# e! s( e
for key in Numkey.values# d4 o c, t/ v) o9 b x- M! a
key -= 1000
8 z& X& ~/ z1 h: [ @pressed.push(key) if testkey(key)
4 I8 ]4 r- N* r4 O end
. [) K+ I5 X, c1 g2 \) C: P) Q( O end8 Z- d; v6 p7 E6 _& f4 Q, L
2 V+ }' c: R* Q' E
def pressed?(key)6 [# [' f7 d6 @
key -= 1000
- ^! }+ d- w0 C# G/ q @pressed = [] if @pressed.nil?; P: W; O3 P/ Q* S; m2 T
return true if @pressed.include?(key)0 @; ~- f3 { u* m4 Q x+ |
return false
0 X3 p6 |: D6 C* [& g" c end* y$ y4 q7 v8 ~/ H' k2 [2 R8 {
. o/ U% i8 E! w5 @ alias hud_key_press? press?- K! k& t5 x' r- ~" v
def press?(key)
' k$ x1 M2 @2 A6 a. n! S' V return pressed?(key) if key.to_f > 1000/ G2 _" T/ F/ O. v
hud_key_press?(key)8 T/ Z4 S( _+ S2 m* K9 U' S$ s
end2 p3 \$ p, v" ^" [
end6 F+ A( Q! R' l
end9 I' R: z# q$ N7 K
+ D- k% ^/ Q/ f- G, S) x! M#===============================================================================. j" T& s5 }! r& t8 c
# Game Player8 ], H ?0 C, [$ V/ R
#===============================================================================# A2 X: Y1 W& O% {( J$ _
class Game_Player < Game_Character
* S4 P9 \4 e; R; i9 y% D+ p n, B attr_accessor :hud_equip4 [& [5 s, b" m8 _$ [: u
attr_accessor :hud_item_id
3 {) U8 i1 U# L) R1 }4 L attr_accessor :hud_skill_id
: ?# [0 x1 l# ^) V% W" L3 p) b
" `* p6 ?& Y ^ alias hot_key_hud_init initialize
" H- b! R. s& h def initialize" s1 W& T4 u9 M) Y( y
hot_key_hud_init
. s( E( q3 G3 \# I @hud_equip = []
# d9 w. E1 J3 Z- y- b' F @hud_item_id = []
$ G: g. F/ M) R; ] @hud_skill_id = []
0 _; y6 ^8 O- a% i4 u6 k+ {1 [ end
' n0 Y' j' C) x+ |
! B6 [- ^/ }' r. ?' m) u- ` def equip_item_to_hud(n, item)
$ ]& Z: [ q$ j* O8 ] if item.nil?# d. Z) m+ ]& t) r: H' O
$game_system.se_play($data_system.buzzer_se)0 P% g0 _ C' w0 x% c) Y% {2 j
return
* f5 c9 a2 B' s- E7 } end
( |! K* P2 a; f8 \" r $game_system.se_play($data_system.decision_se)( n2 c# ?" Y( M
@hud_equip[@hud_equip.index(item)] = nil if @hud_equip.include?(item)
9 M% A+ j( \9 c" E+ }) A0 k( i- v @hud_equip[n] = item , X& n9 A1 j/ a% h3 F3 U( m
@hud_item_id[n] = XAS::XASITEM_ID[item.id]2 y, S, F# N6 v5 @& t3 c
@hud_skill_id[n] = item.id
1 |+ ]0 e" t: m" ?' T5 @ end
# U3 x$ f/ u2 c K% }2 L hend
0 S0 U' ~1 A% g
* c0 e3 B$ d4 n#===============================================================================, z8 j. q# N: M' k
# Quick Skill Window- a: ^4 u* N' x& }! j+ m" q
#===============================================================================7 O- h& s# J9 u1 \3 J0 s
if XASVER_37 == false
; N: W/ ?5 e+ J class Xas_Scene_Skill
/ M4 N: V# P& p5 q alias hud_quick_menu_main main* r, _( y. c, x7 S v
def main
$ F. y0 T% v5 G' y* d9 x- _ @hot_key_hud = Hot_Key_HUD.new
! \* v. b9 ^+ g7 l M hud_quick_menu_main4 l2 l5 E I0 Y9 X/ n6 K: H6 w
@hot_key_hud.dispose/ J- L2 o; T) v
end
$ w& | J5 O! [# p: p ' Q+ Y. |4 S+ u2 H! l+ W! U! n6 Z f
alias hotkey_hud_qucik_menu_update update) _' B- r2 U3 X" V& s, ]/ I& t2 X5 ]- J
def update
' D7 w( N+ J/ |2 `, G7 a hotkey_hud_qucik_menu_update
* W1 s; Y' H+ ]' y # Hot Key num 1
3 t& C2 }4 R( `1 S* U4 }; c if Input.press?(Input::Numkey[1]), D8 v/ v8 C% d
$game_player.equip_item_to_hud(0, @skill_window.skill)/ `* K3 t- Z" A
# Hot Key num 2
& V' e$ O* B9 ]+ ]" x elsif Input.press?(Input::Numkey[2])
8 Z; ]4 m2 Y; `5 g' J $game_player.equip_item_to_hud(1, @skill_window.skill)
9 a/ E- R" Q" ~3 W: c: J. g3 m # Hot Key num 30 d) Q _6 D0 S5 W6 x
elsif Input.press?(Input::Numkey[3])
! }* M. B( Z1 L3 N# \ Y# d $game_player.equip_item_to_hud(2, @skill_window.skill)5 l. W1 x4 }4 ?) G+ Y7 n1 M
# Hot Key num 4! f1 g+ p" G3 c( t0 ~
elsif Input.press?(Input::Numkey[4])
. m1 [- V) U' J/ V1 C4 l( y $game_player.equip_item_to_hud(3, @skill_window.skill)
! F. z- q5 m$ z, N, c$ i3 O # Hot Key num 5( y1 J0 p# g: ?5 t, o/ e3 {
elsif Input.press?(Input::Numkey[5])5 X% w2 h3 ~' X1 F2 n- W
$game_player.equip_item_to_hud(4, @skill_window.skill)( b/ w% y2 ^& c5 i" A
end3 C; O- ]& A3 R* a
@hot_key_hud.update
5 ^' S6 e; l% C6 M- L6 C# J end
3 J6 C1 z- e: G7 V! V- J6 T* o6 ? end3 s$ @+ e; J- I" k) W3 Q
else
0 G8 @9 R1 {7 Q5 q) E: W class Quick_Menu_Skill7 B- N+ C4 C) k8 Z
alias hud_quick_menu_main main |* f( V$ b: ^+ |/ a
def main
[, {- w) ~8 B4 G @hot_key_hud = Hot_Key_HUD.new% l' k, m9 _. c+ X
hud_quick_menu_main
; ~4 q" M" n5 q0 c H, T @hot_key_hud.dispose9 |. w4 X: w$ ^, j& U; f* g
end
% v, n4 D/ ?4 `. ~2 J$ O9 G $ k. x/ J4 T7 j w0 }
alias hotkey_hud_qucik_menu_update update
8 \5 w- a+ I! \$ M def update
& F, G/ `4 f9 r: M hotkey_hud_qucik_menu_update
, ] `1 B. d: X7 W9 s # Hot Key num 1( \0 K+ V3 h' W; r& \+ l
if Input.press?(Input::Numkey[1])1 O5 i G! u Q& _! ]# u9 {$ o
$game_player.equip_item_to_hud(0, @skill_window.skill)) ^) F; y2 \7 D! u; u
# Hot Key num 2
& |5 [& Q* s0 T elsif Input.press?(Input::Numkey[2])
5 u" G, }6 M# V1 P $game_player.equip_item_to_hud(1, @skill_window.skill)
& x4 V' @5 d3 y' Z8 ]3 P # Hot Key num 3
3 F+ v: A" T* W$ l6 G elsif Input.press?(Input::Numkey[3]): O' u3 B5 y- w4 A/ W+ c1 z
$game_player.equip_item_to_hud(2, @skill_window.skill)
5 \$ [; ^* `; i& O, P # Hot Key num 4
6 z' J# j' |, X* y) l7 N9 Q elsif Input.press?(Input::Numkey[4])
) _) y# v. I5 ^# H* |6 ^: a! T $game_player.equip_item_to_hud(3, @skill_window.skill)* R& {: ?1 c3 z7 N5 S* z8 `( b) ]
# Hot Key num 5
$ S4 A5 U( G0 L, t3 s. e6 f" Q elsif Input.press?(Input::Numkey[5])2 c' u: z3 X( k1 h
$game_player.equip_item_to_hud(4, @skill_window.skill)
) r0 V& q2 [2 N+ u end' q0 C* M0 @; n9 C! g) K
@hot_key_hud.update
( G4 ^' i: M% G6 P end; b- e* k- k$ ]# E7 a# T7 d
end
1 R4 |4 s/ A9 ?# Zend7 \5 N9 `% T9 @$ Z! T* [
4 S9 G: Z( Y( b) _#===============================================================================" e6 |- t, M N; ]
# Quick Item Window2 H- X/ s9 |0 O) I0 u/ }
#===============================================================================
- _5 m- J$ C% o9 q1 w4 Tif XASVER_37 == false
) h5 h6 w8 `+ n4 h class Xas_Scene_Item
) R" e4 M$ q }# i# @ alias hud_quick_menu_main main
. \& @( E( e$ e def main. C1 o! j- P3 m/ n4 x2 \: v
@hot_key_hud = Hot_Key_HUD.new/ V$ Y' [6 Z( e# W; g: Y" k$ P
hud_quick_menu_main* Q: E3 b) d3 C P
@hot_key_hud.dispose9 T, n3 t4 _5 @0 V
end' N/ w! j7 p: _
7 ?6 E; [+ w; ~7 \ alias hud_key_update update) O: Q$ a N# D% C% ]$ r. w. \
def update$ V5 _2 W+ e+ Z) n7 t% P$ X: K
hud_key_update
$ n; i' u5 H! L' Q5 Y& g# j # Hot Key num 1: v! k) p5 |0 y1 A6 }. ?5 ^
if Input.press?(Input::Numkey[1]) Q& i5 h, S) E% z, j7 X
$game_player.equip_item_to_hud(0, @item_window.item)% G/ f9 i M& G
# Hot Key num 27 g, i8 V( [: _% c" R
elsif Input.press?(Input::Numkey[2]): T" N- ~- t1 D$ D' ]3 g9 S
$game_player.equip_item_to_hud(1, @item_window.item)* H* ?5 V; P) F, p5 h5 s
# Hot Key num 3
1 d, d0 Q9 y- Y( g elsif Input.press?(Input::Numkey[3])
R" k- S6 b: |6 x. A! I, U. `+ m6 Z $game_player.equip_item_to_hud(2, @item_window.item)
/ H) j# ? ~4 R9 N R7 d # Hot Key num 4
; r1 c2 A% \ i! j+ h7 f elsif Input.press?(Input::Numkey[4])0 w3 T% }1 a: a3 q
$game_player.equip_item_to_hud(3, @item_window.item)
9 i9 B; `2 I, w( y # Hot Key num 5
+ w5 I2 E' g" M2 p# N8 _7 W5 Z elsif Input.press?(Input::Numkey[5]); y5 f* w& W: D. c" @
$game_player.equip_item_to_hud(4, @item_window.item)
p. u- A2 X2 F0 h2 |" o# ] end' b: T1 a2 |) t2 c, q! ` S
@hot_key_hud.update
$ ] h) a0 _, p0 ]. F end0 e# x" H6 Z& X0 B, B
end7 z2 h) P K5 V q" D1 l
else
6 w( f( w9 ]" D$ s6 V& R. C1 ~ class Quick_Menu_Item3 @4 D) j6 y1 B F0 V p
alias hud_quick_menu_main main
: `% _! o4 ~' _3 a3 c: {0 Y def main" b8 W% a4 p$ T% i6 q# Z+ G, Z, m: P" A
@hot_key_hud = Hot_Key_HUD.new% A. V. t8 v% d4 v3 [: P3 e S
hud_quick_menu_main
1 ^& ]# l) o3 {4 R# P; J' u8 t @hot_key_hud.dispose
% R) `2 [6 J2 E5 S6 J* z* Z end
( E1 [* K! e1 [
/ }: W2 v* d1 ]2 G+ ~ p+ _3 [ alias hud_key_update update
& a0 K% |5 Z4 L6 S+ x) ^ def update1 g. J# |# x4 Q
hud_key_update
9 w. n2 p' e% [0 B0 h9 c # Hot Key num 15 Y" n1 Y% p9 I0 o5 k
if Input.press?(Input::Numkey[1])
7 c6 a. c" R) { $game_player.equip_item_to_hud(0, @item_window.item)% l; x9 _ p1 W6 }. J
# Hot Key num 2! j% w8 Y$ b/ n; v: d$ E. ~' B
elsif Input.press?(Input::Numkey[2])3 i% V5 e9 @, x* [
$game_player.equip_item_to_hud(1, @item_window.item)
@1 \, V- o6 [0 `- H # Hot Key num 33 \4 T. B8 {# A6 L3 w
elsif Input.press?(Input::Numkey[3])
8 r7 {/ E, {* w $game_player.equip_item_to_hud(2, @item_window.item)8 A; j, ~2 L/ I; H3 |0 k' U" o
# Hot Key num 4
4 ^, @) T: i) z: \* T elsif Input.press?(Input::Numkey[4])
9 c1 ~4 C3 k$ O2 x; ] $game_player.equip_item_to_hud(3, @item_window.item)
5 A% b/ n1 m* C # Hot Key num 5
% Z- g0 B8 u( U) B# R5 M8 E elsif Input.press?(Input::Numkey[5])
" g; N2 L% H3 t' J $game_player.equip_item_to_hud(4, @item_window.item)
) V# Q4 \' f3 Z7 g7 @' ` end
$ O z/ \9 G1 V& g @hot_key_hud.update. g) D8 J5 q0 {! L8 D8 p; @2 l, y' v
end
2 x4 H( W. s+ q) \8 `- [ end8 B5 ~* E" f# T9 ]+ J; y
end( K2 j0 I0 h; y8 ~, \( K5 N; c
! @8 k# a* Y0 L$ ^" a
#===============================================================================
8 o' {0 v; @( \. O# {2 N4 ?# HUD Window* s. j4 J/ H, [$ X( n& b
#===============================================================================
4 o" ]0 H- t2 `0 t8 Z3 E- d! v `class Hot_Key_HUD < Window_Base
6 x9 S P" G- y# u) u. o def initialize(x = HUD_X - 10, y = HUD_Y - 15)" c# }# a1 |0 w( U
super(x, y, 220, 80)0 D: A) s3 x6 R2 ^
self.contents = Bitmap.new(width - 32, height - 32)$ V% Y- R% Z' v$ G
self.opacity = 0
3 {7 H. s, a; z @actor = $game_party.actors[0]% V0 A3 ~9 A* J: u( o7 }9 L* I/ v
refresh
3 D# s2 t" c. ^1 o W, w K' K7 n end9 H7 G$ }9 H$ D4 S
1 e' y. W i5 X# N1 l5 X def refresh
|7 O. Y: x! o9 f1 L3 ]" Z self.contents.clear
& k0 e$ p' U( T3 B! o0 X bitmap = RPG::Cache.picture("Hot_Keys_HUD")5 w0 E5 e$ ~2 v; n% z. K& _
self.contents.blt(0, 0, bitmap, Rect.new(0, 0, 160, 32)), e2 Y+ G+ @, M5 F$ Z( C6 c1 j
for i in 0..4$ \3 I8 x! R0 D
x = 32 * i + 4
% Z' _6 J% `$ ]3 D" Z item = $game_player.hud_equip* x" E" l# N6 m# @- H- E
next if item.nil?9 t9 V; F& o" g: F
if item.is_a?(RPG::Weapon)
5 I8 g4 f/ c/ I, H item = nil if $game_party.weapon_number(item.id) == 0 and1 l4 f, ]8 Z) O
@actor.weapon_id != item.id
1 v# d! n8 P- e! C elsif item.is_a?(RPG::Armor)2 F A' J+ i2 D! O- L H
item = nil if $game_party.armor_number(item.id) == 0 and 1 L7 l/ X7 l$ A( K1 t: ]% M
@actor.armor1_id != item.id
6 t0 @' P& J, U, b elsif item.is_a?(RPG::Item)
4 {0 N Q) A4 N M0 y, Y* X y' h item = nil if $game_party.item_number(item.id) == 0 or# d- u1 e0 G) J0 T' H" D
!$game_party.item_can_use?(item.id)/ x: `$ ? ?6 k! L6 `9 Z
end
8 }6 }) S$ l7 b# o! L) I0 a0 e bitmap = RPG::Cache.icon(item.icon_name)! W$ O0 M7 U$ O. i. P
self.contents.blt(x, 4, bitmap, Rect.new(0, 0, 24, 24))5 n7 t/ H9 \& Q" K3 s
end, l+ @% F3 z I2 J
end
8 O# @" ]# L8 x6 F # S8 b* N- @/ O& _/ D
def equip(item)& G" p3 W; h$ O
if item.nil?; O, ^) b8 A* \6 G) s0 A* h
$game_system.se_play($data_system.buzzer_se)
! ]* J! Q4 [% s, R return
! ]/ ]9 q) U- c3 X end4 S" A( a2 }' W! q, \" t* I
if item.is_a?(RPG::Skill)$ |1 t. |/ r; Y5 q5 V! t
if !@actor.skill_can_use?(item.id)
* v3 m# e0 ~. f/ j $game_system.se_play($data_system.buzzer_se)
. \4 G' t3 ~% H! r return
: _3 M' l$ j% q3 b+ W! z end
# L& z0 n$ t L, x% m( O$ p #$game_system.xas_skill_id = item.id
, I& ^% g( D; H0 X: Z0 W0 [! g @item_type = false2 Z, h$ a' M; H. V- f- l
elsif item.is_a?(RPG::Weapon)
( E7 n* ]) G9 u1 T @actor.equip(0, item.id)
: k( _- M, t/ U V: I0 A Q1 B elsif item.is_a?(RPG::Armor)/ B b. _; n" o& ]: ^7 i4 n8 Q
@actor.equip(1, item.id) ^2 k- p! k3 Y* ]; h6 n4 ^0 {& I3 v
elsif item.is_a?(RPG::Item)- i P$ k( L$ f, q$ ~: x
item_tool_id = XAS::XASITEM_ID[item.id]0 x% O: o8 E/ Z( k) d1 g: L ] N
if item_tool_id != nil9 q5 o9 x {: |* p; C% B
unless $game_party.item_can_use?(item.id)1 ?7 E9 W9 \5 ^- X/ D$ j, _) Y
$game_system.se_play($data_system.buzzer_se)6 {" r) U0 Z, m/ x1 U
return
! {8 x0 c! {% f4 k% i end
4 Q$ S! x9 ]( t( d* K+ k# H #$game_system.xas_item_id = item.id+ K4 Y3 r1 A2 b$ |
@item_type = true% ^: i$ L* g" ~: N7 l# H9 c
end
& @3 g' q; [& S! ?! { end: }& z5 F) e, i' c/ I6 D
#$game_system.se_play($data_system.equip_se)
# b' P3 L$ d" M end
. {7 _% z5 s& c: J. l: j2 }
4 g" [3 Q* j0 S: p$ l/ N+ ]4 b3 i def use_hud_item(i)
. d4 b* ?2 V! \2 n9 T if @item_type
K$ | n+ v0 f& ]' o2 N $game_temp.force_action_id = $game_player.hud_item_id
8 x4 w+ I r _3 _# n/ ] _% H. O+ s2 w else
8 Z, }$ A0 j: D9 ] $game_temp.force_action_id = $game_player.hud_skill_id
" ~1 q4 ^2 s/ o; k7 N end
2 ?! G* E! l) m+ G# _2 M end
, v- L8 B9 E# v$ A' t0 l" A% q! {) b) N
8 R8 P5 l% I; E6 T% K9 r% R/ [ def update
! Y5 |6 |2 ?% F A5 ~8 C @actor = $game_party.actors[0]9 E3 a4 u* K/ m! M& w2 M. n
@hot_keys = $game_player.hud_equip# ` Q% |( u; b1 i4 P$ {# H
refresh
: V- _% c& t, Z1 g) W return if !$scene.is_a?(Scene_Map)+ b ^7 U' s5 }. n
if Input.press?(Input::Numkey[1])
8 J% ?8 x1 l; R8 c$ l1 |8 A equip($game_player.hud_equip[0])9 `; f9 i5 U$ {) Z
use_hud_item(0)
1 q. I0 r% f2 K elsif Input.press?(Input::Numkey[2])/ R1 z! d* a% {& q/ @5 s0 N
equip($game_player.hud_equip[1])
' a! z9 E; G) ~ use_hud_item(1)
3 q" b ?6 ~" I& o7 k5 l elsif Input.press?(Input::Numkey[3])- [% l7 q1 B- l! V1 B
equip($game_player.hud_equip[2]) 8 Y9 k) @5 s+ G& K7 \$ C
use_hud_item(2)
# @; E( e% m- O elsif Input.press?(Input::Numkey[4])- l# j4 ]& P, r h
equip($game_player.hud_equip[3]) O2 O+ t# i1 g! b
use_hud_item(3)7 I$ [. p8 G6 h) A6 T! k
elsif Input.press?(Input::Numkey[5])/ E/ X& k3 Q& A/ t! x
equip($game_player.hud_equip[4])* D4 ?! G' W6 j- X; P. [8 Z% Z
use_hud_item(4)6 \: L" ^. X8 e. ?) Z
end# o, @. F- {# A, J0 I
end
8 \2 w9 U1 Z# ]9 N2 c4 zend
) \" S! X( f" S( B J( C0 F9 }7 |6 `, h1 G9 ]
#===============================================================================
# h+ K( D6 c, h6 u# Scene Map$ X5 ]: O, B1 ~0 D) M. Y) E9 R) k# ]
#===============================================================================" ?+ n" i3 N9 @- b3 Z# y
class Scene_Map: n* k9 A0 T% F/ y
alias hot_key_hud_init main5 @, w5 ~/ [- |% @: `" A! s: X
def main) b/ r1 L: _7 n& s: a) B) B' K
@hot_key_hud = Hot_Key_HUD.new6 g1 l* t! | H! S: J' t
@hot_key_hud.visible = !$game_switches[XAS_HUDDISABLE_HUD_SWITCH]
4 b. w! a6 ^ J' N3 b hot_key_hud_init
0 h0 J; t4 v- P @hot_key_hud.dispose* D6 T) r0 \4 Q- V) P$ M% a
end, E5 S# @ q: Y- o; @
& b9 S' l! [- c0 W4 |7 v alias hot_key_hud_update update' q9 c' D, k, q
def update* J- o) ~& j# z/ p6 F
hot_key_hud_update3 p: k2 x# ?) D9 c6 Z
@hot_key_hud.update
. f4 \( @3 F; K, {/ E @hot_key_hud.visible = !$game_switches[XAS_HUDDISABLE_HUD_SWITCH]! ?2 ~$ r' \6 S( W* I" h& i
@hot_key_hud.update if !$game_switches[XAS_HUDDISABLE_HUD_SWITCH]
[, N5 V8 N) S8 ~; E1 v4 g end, Q) E m1 }% {
end[/pre] |
|