真·冥影帝 真·冥影帝
关注数: 0 粉丝数: 64 发帖数: 3,875 关注贴吧数: 1
【脚本】在游戏中播放视频 #============================================================================== # ☆★☆ AVI播放器 ☆★☆ # Note: # #   #    1.在下方 PROJECT_NAME = 后面填写你的游戏工程名. # #    2.在游戏中,调用脚本事件播放你的视频文件,如果一行写不下可以在逗号后换行. # #    $MP.play(movie_name, movie_length, #             skip, fullscr, #             x, y, width, height) # # 参数说明: # #      movie_name    : 视频文件名(*.avi),必须 #      movie_length : 电影时间,单位是秒,必须 #              skip : 是否可以按A键跳过,true/false,默认是true #           fullscr : 是否强制为全屏幕播放,true/false,默认是false #               x,y : 视频播放的左上角坐标,默认是0,0 #      width,height : 视频的宽度,可以任意.默认是640,480 # # 例如: #         $MP.play("logo.avi",13,false,true) #============================================================================== # ------------------------------------------------------------------------ # 高精度计时器 by FantasyDR # ------------------------------------------------------------------------ # E-mail: [email protected] # ------------------------------------------------------------------------ # 2005.10.18 # ------------------------------------------------------------------------ # 该类已经被定义为全局变量 $sys_timer # 如果只需要精确到毫秒,请设置初始化参数为true # decimal属性设置返回时间值的小数位数。 # ------------------------------------------------------------------------ # 下面是一些有用的方法列表,调用时写:$sys_timer.方法名 # 例如 $sys_timer.clear() # ------------------------------------------------------------------------ # clear() :计时器清零 #    now() :获取当前经过的时间,单位毫秒 # now_s() :获取当前经过的时间,单位秒 # ------------------------------------------------------------------------ class SystemTimer attr_accessor:decimal   #小数位数设定,默认为3 def initialize(use_GetTime=false)     # 初始化,根据系统选择不同精度计时器     @qpFrequency = Win32API.new("kernel32","QueryPerformanceFrequency",'p','L')     @qpCounter = Win32API.new("kernel32","QueryPerformanceCounter",'p','L')     @tGetTime = Win32API.new("winmm","timeGetTime",'','L')         @decimal=3     @perf_cnt=" " * 8     @time_start=" " * 8     @time_now=" " * 8         result = @qpFrequency.call(@perf_cnt)
【小知识】事件中的脚本 显示文章: $game_temp.message_text= "" 显示引号中的文章。 更改文章选项: $game_system.message_position =0,1,2 表示上、中、下,三个位置 $game_system.message_frame = 0 ,1 0表示不透明,其他的话就透明 等待: @wait_count = X 等待X帧 中断事件处理: command_end 把某一个事件暂时消除 $game_map.events[X].erase 其中X表示把X号事件暂时消除,如果是消除本事件X = @event_id 执行公共事件: $game_temp.common_event_id = 编号 执行编号的公共事件。注意,这个执行和直接在事件中的公共事件有微妙区别。 开关操作: $game_switches[编号] = true / false true是打开,false是关闭 变量操作: $game_variables[编号] = 数值 这里有一些常用的内容: rand(100):返回0-99的随机数 rand(100)+10000:返回10000-10099的随机数 $game_party.item_number(编号):编号物品的个数 角色相关:以下为某编号的角色的相关属性 生命:$game_actors[编号].hp 精神:$game_actors[编号].sp 经验:$game_actors[编号].exp 等级:$game_actors[编号].level 最大生命:$game_actors[编号].maxhp 最大精神:$game_actors[编号].maxsp 力量:$game_actors[编号].str 灵巧:$game_actors[编号].dex 速度:$game_actors[编号].agi 魔力:$game_actors[编号].int 攻击力:$game_actors[编号].atk 物理防御:$game_actors[编号].pdef 魔法防御:$game_actors[编号].mdef 回避修正:$game_actors[编号].eva 姓名:$game_actors[编号].name 职业编号:$game_actors[编号].class_id 职业名称:$game_actors[编号].class_name 武器编号:$game_actors[编号].weapon_id 防具1编号:$game_actors[编号].armor1_id 防具2编号:$game_actors[编号].armor2_id 防具3编号:$game_actors[编号].armor3_id 防具4编号:$game_actors[编号].armor4_id 完全回复:$game_actors[编号].recover_all 领悟特技:$game_actors[编号].learn_skill(编号) 遗忘特技:$game_actors[编号].forget_skill(编号) 位置(前卫返回0,中卫返回1,后卫返回2):$data_classes[$game_actors[编号].class_id].position 学会特技总数:$game_actors[编号].skills.size 敌人:$game_troop.enemies[编号] 敌人拥有角色的部分功能,包括.hp,.sp,.maxhp,.maxsp,.str,.dex,.agi,.int,.atk,.pdef,.mdef,.eva 地图的事件属性: $game_map.events[编号].x,$game_map.events[编号].y 编号事件的x,y坐标 $game_map.events[编号].screen_x,$game_map.events[编号].screen_y 编号事件的屏幕x,y坐标 $game_map.events[编号].direction 编号事件的朝向 $game_map.events[编号].terrain_tag 编号事件所处的地形标志 $game_map.events[编号].moveto(x,y) 把事件扔到(x,y) ——————————————————以上几个事件的,如果要求为角色,则为“$game_player.x”等 地图ID:$game_map.map_id 同伴总人数:$game_party.actors.size 步数:$game_party.steps 金钱:$game_party.gold 游戏总时间(秒数):Graphics.frame_count / Graphics.frame_rate 游戏总帧数:Graphics.frame_count 游戏帧速率(可直接=n调整):Graphics.frame_rate 计时器剩余秒数:$game_system.timer / Graphics.frame_rate 存档次数:$game_system.save_count 独立开关操作:
【转】教给大家几个日常英语 1.we two who and who? 咱俩谁跟谁阿         2.how are you ? how old are you?   怎么是你,怎么老是你?         3.you have seed I will give you some color to see see, brothers ! together up !     你有种,我要给你点颜色瞧瞧,兄弟们,一起上!    4.as far as you go to die 有多远,死多远!!!!    5.hello everybody!if you have something to say, then say!if you have nothing to say,go home!!   有事起奏,无事退朝    6.you me you me 彼此彼此         7.You Give Me Stop!!   你给我站住!    8.know is know noknow is noknow   知之为知之,不知为不知…    9.WATCH SISTER   表妹    10.dragon born dragon,chicken born chicken,mouse’’son can make hole!! 龙生龙,凤生凤,老鼠的儿子会打洞!    11.I give you face you don’t wanna face, you lose you face ,I turn my   face   给你脸你不要脸,你丢脸,我翻脸    12.one car come one car go ,two car pengpeng,people die 车祸现场描述    13.heart flower angry open 心花怒放    14.go past no mistake past   走过路过,不要错过    15.小明:I am sorry!   老外:I am sorry too!   小明:I am sorry three!   老外:What are you sorry for?   小明:I am sorry five!    16.If you want money,I have no;if you want life,I have one!   要钱没有,要命一条    17.I call Li old big. toyear 25.   我叫李老大,今年25。    18.you have two down son 你有两下子。  19.好好学习,天天向上: good good study,day day up! 大家也要努力补充呀!
【转载脚本】仿北欧女神2 CP制战斗(制作网游时可以用到) #===================================================================== # 仿北欧女神2 CP制战斗 By Iselia雪 # 战斗一开始根据敌我速度敏捷比例设定初始CP值, # 我方的每一种行动都有它所对应的CP消耗,当CP值不足以完成行动时该行动不能被执行。 # 战斗中在选择行动时摁下B键进入敌人行动模式,该模式下CP会慢慢回复, # 而敌人会以一般CP制的方式行动(算法照抄RTAB,加入了敌方速度的计算)。 # 在被敌人攻时,CP会有一定的回复,回复量在下面设定。 # 敌人行动模式下摁C键进入我方行动设定,设定完成的行动会立刻被执行。 # 设定我方行动时用左右键选择行动的角色。 # 特技和物品的名称需要做以下调整 : # 名称@CP消耗 这个格式,没有设定CP消耗默认值5, # 近似于无限使用。 # 其他数值设定在下面进行,平衡度还是比较容易调的口牙。 #===================================================================== $基本CP = 20          #战斗一开始我方CP的基础值。 $CP恢复速度 = 4       #数值越大敌人行动模式下CP回复越慢。 $敌人行动速度 = 12    #敌人的行动速度,数值越小越快 $物理攻击CP消耗 = 15  #物理攻击消耗的CP值 $防御CP消耗 = 10      #防御消耗的CP值 $被攻CP回复 = 5       #被敌人攻击时CP的回复量,设为0就是不回复。 $回合进行速度 = 5     #战斗回合增加的速度,数值越大越慢(倍数增长慎用ORZ)- - $逃跑CP消耗 = 30      #逃跑消耗的CP $CP名 = "小攻点数"    #CP的名称,懒人模式用- - $懒人模式 = true      #自动显示物品和特技消耗的CP。 #===================================================================== #修改CP的显示改这个部分,小雪不负责讲解||||| class CP < RPG::Sprite   attr_accessor :cp   def initialize(val = 0)     super()     self.bitmap = Bitmap.new(30,240)     self.bitmap.fill_rect(10,0,10,200,Color.new(0,0,0,255))     self.bitmap.font.size = 16     self.x = 20     self.y = 70     self.z = 100     self.visible = true     self.opacity = 255     @cp = val     @ori = val     refresh   end   def update     super     refresh if @cp != @ori   end   def refresh     self.bitmap.clear     self.bitmap.fill_rect(10,0,10,200,Color.new(0,0,0,255))
首页 1 2 下一页