-
25bf1c7e :Anonymous
2011-01-01 03:14
-
御神籤な(´・ω・) スクリプト
(*´・ω・) スゴクテキトウ
--- /home/bitch/secross/gateway_old.py Sat Feb 23 09:08:22 2008
+++ /home/bitch/secross/gateway_new.py Sat Jan 01 03:08:50 2011
@@ -1,3 +1,6 @@
+#!/usr/bin/python
+# -*- coding: utf8 -*-
+
"""Saku Gateway base module.
"""
#
@@ -477,6 +480,34 @@
self.header(self.message["null_article"], deny_robot=True)
self.footer()
return None
+
+ """
+ !omikuji !dama
+ """
+ import random
+ if time.strftime("%j") == "001" and body["name"].find("!omikuji") != -1:
+ int_kuji = random.randint(0,2400)
+ if int_kuji < 10:
+ get_kuji = "【女神】"
+ elif int_kuji < 50:
+ get_kuji = "【神】"
+ elif int_kuji < 200:
+ get_kuji = "【大吉】"
+ elif int_kuji < 400:
+ get_kuji = "【中吉】"
+ elif int_kuji < 800:
+ get_kuji = "【吉】"
+ elif int_kuji < 1300:
+ get_kuji = "【小吉】"
+ elif int_kuji < 1600:
+ get_kuji = "【末吉】"
+ elif int_kuji < 1800:
+ get_kuji = "【凶】"
+ elif int_kuji <= 2400:
+ get_kuji = "【大凶】"
+ body["name"] = body["name"].replace("!omikuji",get_kuji)
+ if time.strftime("%j") == "001" and body["name"].find("!dama") != -1:
+ body["name"] = body["name"].replace("!dama","【" + str(random.randint(0,10000)) + "円】")
cache = Cache(form.getfirst("file"))
rec = Record(datfile=cache.datfile)
Powered by shinGETsu.