Project1

标题: 求一个还算简单的脚本 [打印本页]

作者: 星语心の梦    时间: 2008-7-29 03:44
提示: 作者被禁止或删除 内容自动屏蔽
作者: 虚幻死神    时间: 2008-7-29 03:47
http://rpg.blue/web/htm/news713.htm
這是你需要的東西么~?
作者: 星语心の梦    时间: 2008-7-29 03:52
提示: 作者被禁止或删除 内容自动屏蔽
作者: 虚幻死神    时间: 2008-7-29 03:59
http://rpg.blue/upload_program/files/八人制战斗_97703892.rar


我改了一下腳本~~~你下來看看合意不?
作者: 星语心の梦    时间: 2008-7-29 04:06
提示: 作者被禁止或删除 内容自动屏蔽
作者: 星语心の梦    时间: 2008-7-29 04:07
提示: 作者被禁止或删除 内容自动屏蔽
作者: 星语心の梦    时间: 2008-7-29 04:08
提示: 作者被禁止或删除 内容自动屏蔽
作者: 虚幻死神    时间: 2008-7-29 04:10
那個血槽可以在MAIN前加上
  1. #==============================================================================
  2. # ■ Window_Help
  3. #------------------------------------------------------------------------------
  4. # 重新定义的内容,可以显示敌人的HP\MP百分比
  5. # 你可以改脚本的开头部分定义生命、精神描述词。只和敌人描述有关,可随意修改
  6. #==============================================================================

  7. class Window_Help < Window_Base
  8.   def set_enemy(actor)  
  9.     #--------------------------------------------------------------------
  10.     # 在这里修改描述文字,比如@生命描述词="敌人生命"
  11.     #--------------------------------------------------------------------
  12.    
  13.     @生命描述词 = $data_system.words.hp
  14.     @精神描述词 = $data_system.words.sp
  15.    
  16.     #--------------------------------------------------------------------
  17.     #--------------------------------------------------------------------
  18.     self.contents.clear
  19.     draw_actor_name(actor, 4, 0)
  20.     draw_actor_state(actor, 140, 0)
  21.     carol3_draw_hp_bar(actor, 284, 12)
  22.     carol3_draw_sp_bar(actor, 460, 12)
  23.     @text = nil
  24.     self.visible = true
  25.   end
  26.   def carol3_draw_hp_bar(actor, x, y, width = 128, height = 14) #宽度可调
  27.     w = width * actor.hp / [actor.maxhp,1].max
  28.     hp_color_1 = Color.new(255, 0, 0, 192)
  29.     hp_color_2 = Color.new(255, 255, 0, 192)
  30.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  31.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  32.     x -= 1
  33.     y += (height/4).floor
  34.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  35.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  36.     x -= 1
  37.     y += (height/4).ceil
  38.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  39.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  40.     x -= 1
  41.     y += (height/4).ceil
  42.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  43.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  44.     self.contents.font.color = Color.new(0,0,0,255)
  45.     self.contents.draw_text(x+2,-3,128,32,@生命描述词,1)
  46.     self.contents.font.color = Color.new(255,255,255,255)
  47.     self.contents.draw_text(x,-4,128,32,@生命描述词,1)
  48.   end
  49.   def carol3_draw_sp_bar(actor, x, y, width = 128, height=14)
  50.     w = width * actor.sp / [actor.maxsp,1].max
  51.     hp_color_1 = Color.new( 0, 0, 255, 192)
  52.     hp_color_2 = Color.new( 0, 255, 255, 192)
  53.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  54.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  55.     x -= 1
  56.     y += (height/4).floor
  57.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  58.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  59.     x -= 1
  60.     y += (height/4).ceil
  61.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  62.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  63.     x -= 1
  64.     y += (height/4).ceil
  65.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  66.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  67.     self.contents.font.color = Color.new(0,0,0,255)
  68.     self.contents.draw_text(x+2,-3,128,32,@精神描述词,1)
  69.     self.contents.font.color = Color.new(255,255,255,255)
  70.     self.contents.draw_text(x,-4,128,32,@精神描述词,1)
  71.   end
  72.   #--------------------------------------------------------------------------
  73.   # ● ライン描画 by 桜雅 在土
  74.   #--------------------------------------------------------------------------
  75.   def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
  76.     # 描写距離の計算。大きめに直角時の長さ。
  77.     distance = (start_x - end_x).abs + (start_y - end_y).abs
  78.     # 描写開始
  79.     if end_color == start_color
  80.       for i in 1..distance
  81.         x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  82.         y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  83.         if width == 1
  84.           self.contents.set_pixel(x, y, start_color)
  85.         else
  86.           self.contents.fill_rect(x, y, width, width, start_color)
  87.         end
  88.       end
  89.     else
  90.       for i in 1..distance
  91.         x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  92.         y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  93.         r = start_color.red * (distance-i)/distance + end_color.red * i/distance
  94.         g = start_color.green * (distance-i)/distance + end_color.green * i/distance
  95.         b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance
  96.         a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
  97.         if width == 1
  98.           self.contents.set_pixel(x, y, Color.new(r, g, b, a))
  99.         else
  100.           self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
  101.         end
  102.       end
  103.     end
  104.   end
  105. end

复制代码



不知道會不會有衝突~你試試看~~~應該沒問題
作者: 虚幻死神    时间: 2008-7-29 04:12
至於那個菜單~~你完全不用操心啦~
直接加上去就OK了~
作者: 星语心の梦    时间: 2008-7-29 04:22
提示: 作者被禁止或删除 内容自动屏蔽
作者: 虚幻死神    时间: 2008-7-29 04:23
其實你看看頂貼的腳本教學可能會有點幫助~~~
你去看看吧~~
對你以後都有幫助!
作者: 星语心の梦    时间: 2008-7-29 04:35
提示: 作者被禁止或删除 内容自动屏蔽
作者: 星语心の梦    时间: 2008-7-29 04:36
提示: 作者被禁止或删除 内容自动屏蔽
作者: 虚幻死神    时间: 2008-7-29 04:49
那你可以調下XY值~就ok了~
作者: 星语心の梦    时间: 2008-7-29 04:52
提示: 作者被禁止或删除 内容自动屏蔽
作者: 星语心の梦    时间: 2008-7-29 04:53
提示: 作者被禁止或删除 内容自动屏蔽
作者: 虚幻死神    时间: 2008-7-29 04:59
原版?
說說要求?
作者: 星语心の梦    时间: 2008-7-29 05:09
提示: 作者被禁止或删除 内容自动屏蔽
作者: 虚幻死神    时间: 2008-7-29 05:15
那個~~我幫不了你啦~~~高難度了點~~
還是另請高明吧~~~{/ll}

作者: 星语心の梦    时间: 2008-7-29 05:37
提示: 作者被禁止或删除 内容自动屏蔽
作者: 虚幻死神    时间: 2008-7-29 05:41
你搞的是召喚獸么?
我找到點東西~可能對你有用~~~
http://rpg.blue/web/htm/news576.htm
你去看看~~~
作者: 星语心の梦    时间: 2008-7-29 05:51
提示: 作者被禁止或删除 内容自动屏蔽
作者: 虚幻死神    时间: 2008-7-29 05:56
那這個調整XY不就OK了么? [LINE]1,#dddddd[/LINE]版主对此帖的认可:『给点辛苦费吧 - -』,积分『+150』。
作者: 星语心の梦    时间: 2008-7-29 06:00
提示: 作者被禁止或删除 内容自动屏蔽
作者: 暮铃·邪雾    时间: 2008-7-29 06:02
提示: 作者被禁止或删除 内容自动屏蔽
作者: 星语心の梦    时间: 2008-7-29 06:09
提示: 作者被禁止或删除 内容自动屏蔽
作者: redant    时间: 2008-7-29 06:13
http://rpg.blue/web/htm/news713.htm
或者去主站找8人战斗脚本

更改坐标
game_actor里
def screen_x
修改数值
不会再参看http://rpg.blue/web/htm/news131.htm

血槽 再去找敌人血槽脚本
一般不会冲突
作者: 暮铃·邪雾    时间: 2008-7-29 06:14
提示: 作者被禁止或删除 内容自动屏蔽
作者: 星语心の梦    时间: 2008-7-29 06:17
提示: 作者被禁止或删除 内容自动屏蔽
作者: 殲滅天使·玲    时间: 2008-7-29 06:45
试了一下 我没办法把菜单弄成有8个人只显示4个人..
但是用召喚獸那个脚本 应该可以弄出效果
能力有限..看来我也帮不上忙了 呵呵 - -

作者: 星语心の梦    时间: 2008-7-29 19:54
提示: 作者被禁止或删除 内容自动屏蔽
作者: dbshy    时间: 2008-7-30 00:42
以下引用星语心の梦于2008-7-29 11:54:24的发言:

菜单中保持原来的4个就可以


该Window_BattleStatus,只让显示四人

作者: 星语心の梦    时间: 2008-7-30 05:03
提示: 作者被禁止或删除 内容自动屏蔽




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1