赞 | 12 |
VIP | 107 |
好人卡 | 6 |
积分 | 4 |
经验 | 31122 |
最后登录 | 2024-6-29 |
在线时间 | 1606 小时 |
Lv2.观梦者 傻♂逼
- 梦石
- 0
- 星屑
- 374
- 在线时间
- 1606 小时
- 注册时间
- 2007-3-13
- 帖子
- 6562
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
帮我朋友写,结果他不玩RM了。发上来给大家。。
这个系统是全宇宙最简单的了。。。
设置方法:
事件:敌人,队伍id
队伍:第一个敌人会出场。。。
然后并行,循环
- (($game_player.x-$game_map.events[id].x).abs == 1) and ($game_player.y == $game_map.events[id].y)
复制代码
判断Kboard.repeat?($R_Key_A)Kboard.repeat?($R_Key_B)………………
执行
em = $game_map.events[id].enemy
z = $game_map.events[id]
sk = $data_skills[$skill['a']]
em.skill_effect($game_party.actors[0],sk)
z.damage = em.damage
z.critical = em.critical
z.damage_pop = true
kk = $game_party.actors[0].sp
$game_party.actors[0].sp = kk - 15
#$skill是存放按键对应的招式的hash
退出循环
判断$game_map.events[id].enemy.hp <= 0
刮掉
否则
if rand(3) == 2
ev = $game_map.events[@event_id]
action = ev.enemy.make_action
case ev.enemy.current_action.kind
when 0
command_356
when 1
command_357(current_action.skill_id)
end
end
#bug一只——敌人不会用特技
退出判断
退出判断
外挂代码:
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
- #
- # 使用方法:
- #
- # ★、对角色显示伤害,如下3步:
- #
- # 1、设置伤害内容:$game_player.damage = 数值
- # 注意:如果数值是负数,就变成补血的颜色了。
- #
- # 2、设置是否会心一击:$game_player.critical = true/false
- # 如果不是会心一击,就不用这一步了
- #
- # 3、释放伤害:$game_player.damage_pop = true
- #
- #
- # ★、对普通NPC和事件进行伤害,类似的3步:
- #
- # 1、设置伤害内容:$game_map.events[事件编号].damage = 数值
- #
- # 2、设置是否会心一击:$game_map.events[事件编号].critical = true/false
- #
- # 3、释放伤害:$game_map.events[事件编号].damage_pop = true
- #
- # 注意,事件编号是事件的ID号,如果目标是“本事件”,那么在事件编号输入@event_id
- #
- #------------------------------------------------------------------------------
- # 预祝有人能早日做出华丽的ARPG来,别忘了到网站发布哦~
- #------------------------------------------------------------------------------
- class Sprite_Character < RPG::Sprite
- alias carol3_66RPG_damage_pop_update update
- def update
- carol3_66RPG_damage_pop_update
- if @character.damage_pop
- damage(@character.damage, @character.critical)
- @character.damage = nil
- @character.critical = false
- @character.damage_pop = false
- end
- end
- end
- class Game_Character
- attr_accessor :damage_pop
- attr_accessor :damage
- attr_accessor :critical
- alias carol3_66RPG_damage_pop_initialize initialize
- def initialize
- @damage_pop = false
- @damage = 0
- @critical = false
- carol3_66RPG_damage_pop_initialize
- end
- end
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
- #==========================================================================
- # 以下是全键盘按键列表
- #--------------------------------------------------------------------------
- $Rmouse_BUTTON_L = 0x01 # left mouse button
- $Rmouse_BUTTON_R = 0x02 # right mouse button
- $Rmouse_BUTTON_M = 0x04 # middle mouse button
- $Rmouse_BUTTON_4 = 0x05 # 4th mouse button
- $Rmouse_BUTTON_5 = 0x06 # 5th mouse button
- #--------------------------------------------------------------------------
- $R_Key_BACK = 0x08 # BACKSPACE key
- $R_Key_TAB = 0x09 # TAB key
- $R_Key_RETURN = 0x0D # ENTER key
- $R_Key_SHIFT = 0x10 # SHIFT key
- $R_Key_CTLR = 0x11 # CTLR key
- $R_Key_ALT = 0x12 # ALT key
- $R_Key_PAUSE = 0x13 # PAUSE key
- $R_Key_CAPITAL = 0x14 # CAPS LOCK key
- $R_Key_ESCAPE = 0x1B # ESC key
- $R_Key_SPACE = 0x20 # SPACEBAR
- $R_Key_PRIOR = 0x21 # PAGE UP key
- $R_Key_NEXT = 0x22 # PAGE DOWN key
- $R_Key_END = 0x23 # END key
- $R_Key_HOME = 0x24 # HOME key
- $R_Key_LEFT = 0x25 # LEFT ARROW key
- $R_Key_UP = 0x26 # UP ARROW key
- $R_Key_RIGHT = 0x27 # RIGHT ARROW key
- $R_Key_DOWN = 0x28 # DOWN ARROW key
- $R_Key_SELECT = 0x29 # SELECT key
- $R_Key_PRINT = 0x2A # PRINT key
- $R_Key_SNAPSHOT = 0x2C # PRINT SCREEN key
- $R_Key_INSERT = 0x2D # INS key
- $R_Key_DELETE = 0x2E # DEL key
- #--------------------------------------------------------------------------
- $R_Key_0 = 0x30 # 0 key
- $R_Key_1 = 0x31 # 1 key
- $R_Key_2 = 0x32 # 2 key
- $R_Key_3 = 0x33 # 3 key
- $R_Key_4 = 0x34 # 4 key
- $R_Key_5 = 0x35 # 5 key
- $R_Key_6 = 0x36 # 6 key
- $R_Key_7 = 0x37 # 7 key
- $R_Key_8 = 0x38 # 8 key
- $R_Key_9 = 0x39 # 9 key
- #--------------------------------------------------------------------------
- $R_Key_A = 0x41 # A key
- $R_Key_B = 0x42 # B key
- $R_Key_C = 0x43 # C key
- $R_Key_D = 0x44 # D key
- $R_Key_E = 0x45 # E key
- $R_Key_F = 0x46 # F key
- $R_Key_G = 0x47 # G key
- $R_Key_H = 0x48 # H key
- $R_Key_I = 0x49 # I key
- $R_Key_J = 0x4A # J key
- $R_Key_K = 0x4B # K key
- $R_Key_L = 0x4C # L key
- $R_Key_M = 0x4D # M key
- $R_Key_N = 0x4E # N key
- $R_Key_O = 0x4F # O key
- $R_Key_P = 0x50 # P key
- $R_Key_Q = 0x51 # Q key
- $R_Key_R = 0x52 # R key
- $R_Key_S = 0x53 # S key
- $R_Key_T = 0x54 # T key
- $R_Key_U = 0x55 # U key
- $R_Key_V = 0x56 # V key
- $R_Key_W = 0x57 # W key
- $R_Key_X = 0x58 # X key
- $R_Key_Y = 0x59 # Y key
- $R_Key_Z = 0x5A # Z key
- #--------------------------------------------------------------------------
- $R_Key_LWIN = 0x5B # Left Windows key (Microsoft Natural keyboard)
- $R_Key_RWIN = 0x5C # Right Windows key (Natural keyboard)
- $R_Key_APPS = 0x5D # Applications key (Natural keyboard)
- #--------------------------------------------------------------------------
- $R_Key_NUMPAD0 = 0x60 # Numeric keypad 0 key
- $R_Key_NUMPAD1 = 0x61 # Numeric keypad 1 key
- $R_Key_NUMPAD2 = 0x62 # Numeric keypad 2 key
- $R_Key_NUMPAD3 = 0x63 # Numeric keypad 3 key
- $R_Key_NUMPAD4 = 0x64 # Numeric keypad 4 key
- $R_Key_NUMPAD5 = 0x65 # Numeric keypad 5 key
- $R_Key_NUMPAD6 = 0x66 # Numeric keypad 6 key
- $R_Key_NUMPAD7 = 0x67 # Numeric keypad 7 key
- $R_Key_NUMPAD8 = 0x68 # Numeric keypad 8 key
- $R_Key_NUMPAD9 = 0x69 # Numeric keypad 9 key
- $R_Key_MULTIPLY = 0x6A # Multiply key (*)
- $R_Key_ADD = 0x6B # Add key (+)
- $R_Key_SEPARATOR = 0x6C # Separator key
- $R_Key_SUBTRACT = 0x6D # Subtract key (-)
- $R_Key_DECIMAL = 0x6E # Decimal key
- $R_Key_DIVIDE = 0x6F # Divide key (/)
- #--------------------------------------------------------------------------
- $R_Key_F1 = 0x70 # F1 key
- $R_Key_F2 = 0x71 # F2 key
- $R_Key_F3 = 0x72 # F3 key
- $R_Key_F4 = 0x73 # F4 key
- $R_Key_F5 = 0x74 # F5 key
- $R_Key_F6 = 0x75 # F6 key
- $R_Key_F7 = 0x76 # F7 key
- $R_Key_F8 = 0x77 # F8 key
- $R_Key_F9 = 0x78 # F9 key
- $R_Key_F10 = 0x79 # F10 key
- $R_Key_F11 = 0x7A # F11 key
- $R_Key_F12 = 0x7B # F12 key
- #--------------------------------------------------------------------------
- $R_Key_NUMLOCK = 0x90 # NUM LOCK key
- $R_Key_SCROLL = 0x91 # SCROLL LOCK key
- #--------------------------------------------------------------------------
- $R_Key_LSHIFT = 0xA0 # Left SHIFT key
- $R_Key_RSHIFT = 0xA1 # Right SHIFT key
- $R_Key_LCONTROL = 0xA2 # Left CONTROL key
- $R_Key_RCONTROL = 0xA3 # Right CONTROL key
- $R_Key_L_ALT = 0xA4 # Left ALT key
- $R_Key_R_ALT = 0xA5 # Right ALT key
- #--------------------------------------------------------------------------
- $R_Key_SEP = 0xBC # , key
- $R_Key_DASH = 0xBD # - key
- $R_Key_DOTT = 0xBE # . Key
- module Kboard
- module_function
-
- @R_Key_Hash = {}
- @R_Key_Repeat = {}
-
- GetKeyState = Win32API.new("user32","GetAsyncKeyState",['I'],'I')
- def press?(rkey)
- return GetKeyState.call(rkey) != 0
- end
-
- def repeat?(rkey)
- result = GetKeyState.call(rkey)
- if result != 0
- if @R_Key_Repeat[rkey].nil?
- @R_Key_Repeat[rkey] = 0
- return true
- end
- @R_Key_Repeat[rkey] += 1
- else
- @R_Key_Repeat[rkey] = nil
- @R_Key_Hash[rkey] = 0
- end
- if !@R_Key_Repeat[rkey].nil? and @R_Key_Repeat[rkey] > 4 # 4乃准确数字
- @R_Key_Repeat[rkey] = 0
- return true
- else
- return false
- end
- end
-
- def trigger?(rkey)
- result = GetKeyState.call(rkey)
- if @R_Key_Hash[rkey] == 1 and result != 0
- return false
- end
- if result != 0
- @R_Key_Hash[rkey] = 1
- return true
- else
- @R_Key_Hash[rkey] = 0
- return false
- end
- end
-
- end# ▼▲▼ XRXS34. パノラマスクロール ▼▲▼
- # by ぷのくー
- #——————————————————————————————————————
- # 这是一个非常简单的脚本,只要自定义自动滚动的地图编号和绝对不滚动的地图编号
- # 即可实现对远景的操作。
- #——————————————————————————————————————
- #==============================================================================
- # 初始化的一些常量
- #==============================================================================
- class Game_Map
-
- # 远景横向飘移速度速度
- PANORAMA_SX = -10
-
- # 远景纵向飘移速度速度
- PANORAMA_SY = 0
-
- # 自动滚动远景的地图编号(编号为1、4、7、5的地图远景会自动移动)
- AUTO_SCROLL_PANORAMA_IDS = [1,2,3,4,5,26]
- end
- class Spriteset_Map
-
- # 锁定远景的地图编号(编号为2、8、10的地图远景会锁定)
- SCROLL_FREEZE_PANORAMA_IDS = []
-
- #——说明:如果自动滚动和锁定都包括了某张地图,则该地图不滚动。
- #——如果自动滚动和锁定都没有包括某图,则还是会使用默认效果。
- end
- #==============================================================================
- # ■ Game_Map
- #==============================================================================
- class Game_Map
- attr_accessor :panorama_sx
- attr_accessor :panorama_sy
- attr_reader :panorama_ox
- attr_reader :panorama_oy
- def setup(map_id)
- @map_id = map_id
- @map = load_data(sprintf("Data/Map%03d.rxdata", @map_id))
- tileset = $data_tilesets[@map.tileset_id]
- @tileset_name = tileset.tileset_name
- @autotile_names = tileset.autotile_names
- @panorama_name = tileset.panorama_name
- @panorama_hue = tileset.panorama_hue
- @fog_name = tileset.fog_name
- @fog_hue = tileset.fog_hue
- @fog_opacity = tileset.fog_opacity
- @fog_blend_type = tileset.fog_blend_type
- @fog_zoom = tileset.fog_zoom
- @fog_sx = tileset.fog_sx
- @fog_sy = tileset.fog_sy
- # ===================================
- if AUTO_SCROLL_PANORAMA_IDS.include?(map_id)
- @panorama_sx = PANORAMA_SX
- @panorama_sy = PANORAMA_SY
- else
- @panorama_sx = 0
- @panorama_sy = 0
- end
- # ===================================
- @battleback_name = tileset.battleback_name
- @passages = tileset.passages
- @priorities = tileset.priorities
- @terrain_tags = tileset.terrain_tags
- @display_x = 0
- @display_y = 0
- @need_refresh = false
- @events = {}
- for i in @map.events.keys
- @events[i] = Game_Event.new(@map_id, @map.events[i])
- end
- @common_events = {}
- for i in 1...$data_common_events.size
- @common_events[i] = Game_CommonEvent.new(i)
- end
- @fog_ox = 0
- @fog_oy = 0
- @panorama_ox = 0
- @panorama_oy = 0
- @fog_tone = Tone.new(0, 0, 0, 0)
- @fog_tone_target = Tone.new(0, 0, 0, 0)
- @fog_tone_duration = 0
- @fog_opacity_duration = 0
- @fog_opacity_target = 0
- @scroll_direction = 2
- @scroll_rest = 0
- @scroll_speed = 4
- end
- def update
- if $game_map.need_refresh
- refresh
- end
- if @scroll_rest > 0
- distance = 2 ** @scroll_speed
- case @scroll_direction
- when 2 # 下
- scroll_down(distance)
- when 4 # 左
- scroll_left(distance)
- when 6 # 右
- scroll_right(distance)
- when 8 # 上
- scroll_up(distance)
- end
- @scroll_rest -= distance
- end
- for event in @events.values
- event.update
- end
- for common_event in @common_events.values
- common_event.update
- end
- @fog_ox -= @fog_sx / 8.0
- @fog_oy -= @fog_sy / 8.0
- # ===================================
- @panorama_ox -= @panorama_sx / 8.0
- @panorama_oy -= @panorama_sy / 8.0
- # ===================================
- if @fog_tone_duration >= 1
- d = @fog_tone_duration
- target = @fog_tone_target
- @fog_tone.red = (@fog_tone.red * (d - 1) + target.red) / d
- @fog_tone.green = (@fog_tone.green * (d - 1) + target.green) / d
- @fog_tone.blue = (@fog_tone.blue * (d - 1) + target.blue) / d
- @fog_tone.gray = (@fog_tone.gray * (d - 1) + target.gray) / d
- @fog_tone_duration -= 1
- end
- if @fog_opacity_duration >= 1
- d = @fog_opacity_duration
- @fog_opacity = (@fog_opacity * (d - 1) + @fog_opacity_target) / d
- @fog_opacity_duration -= 1
- end
- end
- end
- #==============================================================================
- # ■ Spriteset_Map
- #==============================================================================
- class Spriteset_Map
- def update
- if @panorama_name != $game_map.panorama_name or
- @panorama_hue != $game_map.panorama_hue
- @panorama_name = $game_map.panorama_name
- @panorama_hue = $game_map.panorama_hue
- if @panorama.bitmap != nil
- @panorama.bitmap.dispose
- @panorama.bitmap = nil
- end
- if @panorama_name != ""
- @panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
- end
- Graphics.frame_reset
- end
- if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue
- @fog_name = $game_map.fog_name
- @fog_hue = $game_map.fog_hue
- if @fog.bitmap != nil
- @fog.bitmap.dispose
- @fog.bitmap = nil
- end
- if @fog_name != ""
- @fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)
- end
- Graphics.frame_reset
- end
- @tilemap.ox = $game_map.display_x / 4
- @tilemap.oy = $game_map.display_y / 4
- @tilemap.update
- # ===================================
- if SCROLL_FREEZE_PANORAMA_IDS.include?($game_map.map_id)
- @panorama.ox = 0
- @panorama.oy = 0
- else
- @panorama.ox = $game_map.display_x / 8 +$game_map.panorama_ox
- @panorama.oy = $game_map.display_y / 8 +$game_map.panorama_oy
- end
- # ===================================
- @fog.zoom_x = $game_map.fog_zoom / 100.0
- @fog.zoom_y = $game_map.fog_zoom / 100.0
- @fog.opacity = $game_map.fog_opacity
- @fog.blend_type = $game_map.fog_blend_type
- @fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
- @fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
- @fog.tone = $game_map.fog_tone
- for sprite in @character_sprites
- sprite.update
- end
- @weather.type = $game_screen.weather_type
- @weather.max = $game_screen.weather_max
- @weather.ox = $game_map.display_x / 4
- @weather.oy = $game_map.display_y / 4
- @weather.update
- for sprite in @picture_sprites
- sprite.update
- end
- @timer_sprite.update
- @viewport1.tone = $game_screen.tone
- @viewport1.ox = $game_screen.shake
- @viewport3.color = $game_screen.flash_color
- @viewport1.update
- @viewport3.update
- end
- end
复制代码 |
|