扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 128|回复: 0

[转载发布] 战斗结果窗口加强脚本

[复制链接]
累计送礼:
0 个
累计收礼:
0 个
  • TA的每日心情
    开心
    昨天 18:01
  • 签到天数: 114 天

    连续签到: 4 天

    [LV.6]常住居民II

    2338

    主题

    403

    回帖

    1万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    6
    卡币
    10632
    OK点
    16
    推广点
    0
    同能卷
    0
    积分
    13401

    灌水之王

    发表于 2024-4-19 18:51:47 | 显示全部楼层 |阅读模式
    闲得无聊写了这个脚本出来……应该很少人需要XD
    1. class Window_BattleResult < Window_Base  def initialize(exp, gold, treasures)    @exp = exp    @gold = gold    @treasures = treasures    @treasures_ = []    loop do      @treasures_1 = @treasures[0]      @treasures_2 = @treasures.size      @treasures.delete(@treasures_1)      @treasures_.push [@treasures_1,@treasures_2 - @treasures.size]      break if @treasures == []    end    super(160, 0, 320, @treasures_.size * 32 + 64)    self.contents = Bitmap.new(width - 32, height - 32)    self.y = 160 - height / 2    self.back_opacity = 160    self.visible = false    refresh  end  def refresh    self.contents.clear    x = 4    self.contents.font.color = normal_color    cx = contents.text_size(@exp.to_s).width    self.contents.draw_text(x, 0, cx, 32, @exp.to_s)    x += cx + 4    self.contents.font.color = system_color    cx = contents.text_size("EXP").width    self.contents.draw_text(x, 0, 64, 32, "EXP")    x += cx + 16    self.contents.font.color = normal_color    cx = contents.text_size(@gold.to_s).width    self.contents.draw_text(x, 0, cx, 32, @gold.to_s)    x += cx + 4    self.contents.font.color = system_color    self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)    y = 32    for item in @treasures_      draw_item_name(item[0], 4, y)      self.contents.draw_text(0, y, width-32, 32, "×" + " "+ item[1].to_s,2)      y += 32    end  endend复制代码
    复制代码


    发两张图大家就知道了- -

    未使用:


    使用后:

                 本帖来自P1论坛作者Wind2010,因Project1站服务器在国外有时候访问缓慢不方便作者交流学习,经联系P1站长fux2同意署名转载一起分享游戏制作经验,共同为国内独立游戏作者共同创造良好交流环境,原文地址:https://rpg.blue/forum.php?mod=viewthread&tid=165259  若有侵权,发帖作者可联系底部站长QQ在线咨询功能删除,谢谢。

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2025-3-15 04:34 , Processed in 0.097509 second(s), 54 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表