楼主: 锦瑟思华年

[有事请教] 怎么给别人的帖子评分?

[复制链接]

史莱姆的信徒
12-B

梦石
0
星屑
53
在线时间
368 小时
注册时间
2013-8-14
回帖
909
发表于 2013-10-12 22:09:33 来自手机 | 显示全部楼层
美丽晨露 发表于 2013-10-12 18:04
if
积分为7以上时,用户组为剑士以上时
print(你可以评分了)

print(”晨露乃忘了加引号”)#噗=  =
回复

使用道具 举报

梦石
0
星屑
407
在线时间
1291 小时
注册时间
2013-1-12
回帖
3349

贵宾

发表于 2013-10-13 02:08:26 | 显示全部楼层
本帖最后由 76213585 于 2013-10-12 13:03 编辑

你們的腳本一點誠意都沒有W  要寫就好好寫....  
@876加几  @美丽晨露  
[pre lang="ruby" line="1"]class Point
  def initialize(point)
    @point = point
    point_cal
    @daymax = @onemax * 2
    if @point >= 7
      p "目前有" + @point.to_s + "分,"  + "可以進行評分,"
      p "一次上限為"  + @onemax.to_s  + ",一天上限為" + @daymax.to_s
      p "用戶組為" + @cal
    else
      @point = 0
      @daymax = 0
      p "目前有" + @point.to_s + "分,"  + "不可以進行評分"
      p "一次上限為"  + @onemax.to_s  + ",一天上限為" + @daymax.to_s
    end
  end
    def point_cal
    if @point <= 6
      @onemax = 0
    end
    if @point >= 7 and @point <= 11
      @cal = "騎士"
      @onemax = 7
    end
    if @point >= 12 and @point <= 19
      @cal = "圣骑士"
      @onemax = 12
    end
    if @point >= 20 and @point <= 29
      @cal = "圣骑士"
      @onemax = 20
    end
    if @point >= 30 and @point <= 44
      @cal = "龙骑士"
      @onemax = 30
    end
    if @point >= 45 and @point <= 59
      @cal = "贤者"
      @onemax = 45
    end
    if @point >= 60 and @point <= 84
      @cal = "指引者"
      @onemax = 60
    end
    if @point >= 85 and @point <= 99
      @cal = "天使"
      @onemax = 85
    end
    if @point >= 100 and @point <= 139
      @cal = "元素天使"
      @onemax = 100
    end
    if @point >= 140 and @point <= 159
      @cal = "六翼天使"
      @onemax = 140
    end
    if @point >= 160 and @point <= 179
      @cal = "光明天使"
      @onemax = 160
    end
    if @point >= 180 and @point <= 199
      @cal = "大天使"
      @onemax = 180
    end
    if @point >= 200 and @point <= 219
      @cal = "天使长"
      @onemax = 200
    end
    if @point >= 220 and @point <= 249
      @cal = "天国守护"
      @onemax = 220
    end
    if @point >= 250 and @point <= 299
      @cal = "神之意志"
      @onemax = 250
    end
    if @point >= 300 and @point <= 399
      @cal = "神"
      @onemax = 300
    end
    if @point >= 400 and @point <= 499
      @cal = "众神之首"
      @onemax = 400
    end
    if @point >= 500
      @cal = "万物创造者"
      @onemax = 500
    end
  end
end
Point.new(x)#x寫入自己的積分[/pre]
插入main以上

使用方法:
最後一行的 new(x) 中的x中寫入自己的積分

评分

参与人数 1星屑 +10 收起 理由
美丽晨露 + 10 ······

查看全部评分


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部