| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 1 |
| 经验 | |
| 最后登录 | 2013-10-25 |
| 在线时间 | 140 小时 |
- 梦石
- 0
- 星屑
- 67
- 在线时间
- 140 小时
- 注册时间
- 2012-2-6
- 回帖
- 351
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
本帖最后由 无双sxa 于 2012-3-13 18:54 编辑
YF的脚本真如“大音希声扫阴翳”,犹如“拨开云雾见青天”,使我等网民看到了希望,看到了未来!晴天霹雳、醍醐灌顶或许不足以形容大师脚本的万一;巫山行云、长江流水更难以比拟大师的才气!黄钟大吕,振聋发聩!你烛照天下,明见万里;雨露苍生,泽被万方!透过你深邃的脚本,我仿佛看到了你鹰视狼顾、龙行虎步的伟岸英姿;仿佛看到了你手执如椽大笔、写天下脚本的智慧神态;仿佛看见了你按剑四顾、指点江山的英武气概!
我在R界打滚这么多年,所谓阅人无数,就算没有见过猪走路,也总明白猪肉是啥味道的。一看到YF的气势,我就觉得YF同在6R里灌水的那帮小混混有着本质的差别!那神奇的脚本功效,那熟悉的脚本格式,还有字里行间高屋建瓴的辞藻。没用的,YF,就算你怎么换马甲都是没有用的,你的亿万拥戴者早已经把你认出来了,你一定就是传说中的Yanfly大神。自从6R复活之后,我就已经心灰意冷,对R界也没抱什么希望了,传说已经幻灭,神话已经终结,留在R界还有什么意思?没想到,没想到,今天可以再睹YF的风范,我激动得忍不住就在屏幕前流下了眼泪。是啊,只要在YF的带领下,R界就有希望了。我的内心再一次沸腾了,我胸腔里的血再一次燃烧了。YF的几句话虽然简单,却概括扼要,一语道出了我们苦想多年仍不可解的几个重大问题的根本。YF就好比R界的明灯,YF就好比R界的方向,YF就好比R界的栋梁。有YF在,R界的明天必将更好!
YF的脚本实在是写得太好了。文笔流畅,修辞得体,深得柳柳九夜遗风,更将VictorYami之风格发扬得入木三分,能在有生之年看见YF的这个脚本。实在是我三生之幸啊。看完YF的这个脚本之后,我竟产生出一种无以名之的悲痛感——啊,这么好的脚本,如果将来我再也看不到了,那我该怎么办?那我该怎么办?直到我毫不犹豫地把YF的这个脚本收藏了,我内心的那种激动才逐渐平静下来。可是我立刻想到,这么好的脚本,倘若别人看不到,那么不是浪费YF的心血吗?经过痛苦的思想斗争,我终于下定决心,牺牲小我,奉献大我。我要拿出这帖子奉献给6R各位水客赏阅,我要把这个帖子一直往上顶,往上顶!顶到所有人都看到为止!
http://yanflychannel.wordpress.c ... cripts/spawn-event/
- #==============================================================================
- #
- # ▼ Yanfly Engine Ace - Spawn Event v1.00
- # -- Last Updated: 2012.02.08
- # -- Level: Normal, Hard
- # -- Requires: n/a
- #
- #==============================================================================
- $imported = {} if $imported.nil?
- $imported["YEA-SpawnEvent"] = true
- #==============================================================================
- # ▼ Updates
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # 2012.02.08 - Started Script and Finished.
- #
- #==============================================================================
- # ▼ Introduction
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # For those who would like to spawn pre-made events from the current map or
- # even other maps, this script allows you to do so. With the option of spawning
- # the events at specific locations or a random spot marked by a certain region,
- # you can have events spawn using simple script calls. The events remain until
- # a map change.
- #
- #==============================================================================
- # ▼ Instructions
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # To install this script, open up your script editor and copy/paste this script
- # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
- #
- # -----------------------------------------------------------------------------
- # Script Calls - These commands are used with script calls.
- # -----------------------------------------------------------------------------
- # spawn_event_location(x, y, event_id)
- # spawn_event_location(x, y, event_id, map_id)
- # This causes a new event to be created at location x and y on the current map.
- # The event to be created will use the event data from event_id. If no map_id
- # is used, then the current map's event will be used to spawn the new event.
- # The event cannot spawn on top of another event or vehicle. If there is an
- # event or vehicle in place, then no event will be spawned at all.
- #
- # spawn_event_region(region_id, event_id)
- # spawn_event_region(region_id, event_id, map_id)
- # This causes a new event to be created at a random location with a matching
- # region_id. The event to be created will use the event data from event_id. If
- # no map_id is used, then the current map's event will be used to spawn the
- # new event. If the region_id does not exist on the current map, then no event
- # will be spawned. The event will not spawn on top of another event nor on top
- # of a vehicle. If there is not enough room to spawn an event, then no event
- # will be spawned at all. This process takes slightly longer on larger maps.
- #
- #==============================================================================
- # ▼ Compatibility
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
- # it will run with RPG Maker VX without adjusting.
- #
- #==============================================================================
- #==============================================================================
- # ■ Game_Map
- #==============================================================================
- class Game_Map
-
- #--------------------------------------------------------------------------
- # new method: spawn_event
- #--------------------------------------------------------------------------
- def spawn_event(dx, dy, event_id, map_id)
- return if $game_player.collide_with_characters?(dx, dy)
- return if dx == $game_player.x && dy == $game_player.y
- map_id = @map_id if map_id == 0
- map = load_data(sprintf("Data/Map%03d.rvdata2", map_id))
- event = generated_event(map, event_id)
- return if event.nil?
- key_id = @events.keys.max + 1
- @events[key_id] = Game_Event.new(@map_id, event)
- @events[key_id].moveto(dx, dy)
- SceneManager.scene.spriteset.refresh_characters
- end
-
- #--------------------------------------------------------------------------
- # new method: generated_event
- #--------------------------------------------------------------------------
- def generated_event(map, event_id)
- for key in map.events
- event = key[1]
- next if event.nil?
- return event if event.id == event_id
- end
- return nil
- end
-
- #--------------------------------------------------------------------------
- # new method: spawn_event_region
- #--------------------------------------------------------------------------
- def spawn_event_region(reg_id, event_id, map_id)
- tile = get_random_region_tile(reg_id)
- return if tile.nil?
- spawn_event(tile[0], tile[1], event_id, map_id)
- end
-
- #--------------------------------------------------------------------------
- # new method: get_random_region_tile
- #--------------------------------------------------------------------------
- def get_random_region_tile(reg_id)
- tiles = []
- for i in 0...width
- for j in 0...height
- next unless (region_id(i, j) == reg_id) or (reg_id == 0)
- next if $game_player.collide_with_characters?(i, j)
- next if i == $game_player.x && j == $game_player.y
- tiles.push([i, j])
- end
- end
- return tiles.sample
- end
-
- end # Game_Map
- #==============================================================================
- # ■ Game_Interpreter
- #==============================================================================
- class Game_Interpreter
-
- #--------------------------------------------------------------------------
- # new method: spawn_event_location
- #--------------------------------------------------------------------------
- def spawn_event_location(dx, dy, event_id, map_id = 0)
- return unless SceneManager.scene_is?(Scene_Map)
- $game_map.spawn_event(dx, dy, event_id, map_id)
- end
-
- #--------------------------------------------------------------------------
- # new method: spawn_event_region
- #--------------------------------------------------------------------------
- def spawn_event_region(region_id, event_id, map_id = 0)
- return unless SceneManager.scene_is?(Scene_Map)
- $game_map.spawn_event_region(region_id, event_id, map_id)
- end
-
- end # Game_Interpreter
- #==============================================================================
- # ■ Scene_Map
- #==============================================================================
- class Scene_Map < Scene_Base
-
- #--------------------------------------------------------------------------
- # public instance variables
- #--------------------------------------------------------------------------
- attr_accessor :spriteset
-
- end # Scene_Map
- #==============================================================================
- #
- # ▼ End of File
- #
- #==============================================================================
复制代码
spawn_event_location(x, y, event_id, map_id)表示从仓库地图map_id中提取编号为event_id的事件到当前地图的x,y位置上。
spawn_event_region(0, event_id, map_id)表示从仓库地图map_id中提取编号为event_id的事件到当前地图随机位置上。
spawn_event_region(region_id, event_id, map_id)表示从仓库地图map_id中提取编号为event_id的事件到当前地图的区域region_id中的随机位置上。 |
评分
-
查看全部评分
|