# HG changeset patch # User ARAKI Tsuyohito # Date 1445643146 -32400 # Node ID 3bfbed8919b6294b31ca842862422362b8b93133 # Parent d476b2cf82ea887d0ad8e5b1fb6f5761660c1f1a +csv diff -r d476b2cf82ea -r 3bfbed8919b6 opencampus2015/.sqliterc --- a/opencampus2015/.sqliterc Fri Oct 23 17:13:44 2015 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -.header on -.mode html diff -r d476b2cf82ea -r 3bfbed8919b6 opencampus2015/accountcheck.rb --- a/opencampus2015/accountcheck.rb Fri Oct 23 17:13:44 2015 +0900 +++ b/opencampus2015/accountcheck.rb Sat Oct 24 08:32:26 2015 +0900 @@ -95,7 +95,7 @@ db.execute(toi, id) # db.execute(item, id) db.execute(numup, id, cd) - db.execute(ins8,id,no1,t1.to_i/5,t1) + db.execute(ins8,id,no1,t1.to_i/5,t1.to_i/5) end # srand(id.to_i) # id2 = rand(1000000) diff -r d476b2cf82ea -r 3bfbed8919b6 opencampus2015/list.csv --- a/opencampus2015/list.csv Fri Oct 23 17:13:44 2015 +0900 +++ b/opencampus2015/list.csv Sat Oct 24 08:32:26 2015 +0900 @@ -1,9 +1,9 @@ -1,inazuma,30,10,25,45,60 -2,inu,25,8,15,25,35 -3,ito,10,3,6,9,12 -4,kamon,20,10,15,20,25 -5,kinoko,10,2,5,10,15 -6,medama,20,15,17,21,24 -7,momen,15,5,10,15,20 -8,snake,25,3,10,20,40 -9,tako,20,5,13,18,23 +1,inazuma,30,20,50,90,120 +2,inu,25,16,30,50,70 +3,ito,10,6,12,18,24 +4,kamon,20,20,30,40,50 +5,kinoko,10,4,10,20,30 +6,medama,20,30,34,42,48 +7,momen,15,10,20,30,40 +8,snake,25,6,20,40,80 +9,tako,20,10,26,36,46 diff -r d476b2cf82ea -r 3bfbed8919b6 opencampus2015/list3.csv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/opencampus2015/list3.csv Sat Oct 24 08:32:26 2015 +0900 @@ -0,0 +1,9 @@ +1,inazuma,30,10,25,45,60 +2,inu,25,8,15,25,35 +3,ito,10,3,6,9,12 +4,kamon,20,10,15,20,25 +5,kinoko,10,2,5,10,15 +6,medama,20,15,17,21,24 +7,momen,15,5,10,15,20 +8,snake,25,3,10,20,40 +9,tako,20,5,13,18,23 diff -r d476b2cf82ea -r 3bfbed8919b6 opencampus2015/prof.rb --- a/opencampus2015/prof.rb Fri Oct 23 17:13:44 2015 +0900 +++ b/opencampus2015/prof.rb Sat Oct 24 08:32:26 2015 +0900 @@ -56,9 +56,9 @@
-

データがみつかりません!

クッキーを消してやりなおしてください!

-
とうろく画面へ!
-
くっきーをけす!
+

記録が無くなったようだ...

記憶も消してやりなおしたまえ......

+
新規記憶の作成
+
作成前に記憶を消す
skip@xxxx.co.jp
@@ -102,16 +102,7 @@ jikan2 = db.execute(jikan1, "j") now1 = jikan2[0][1] rescue - db.execute(ins4, "a") - db.execute(ins4, "b") - db.execute(ins4, "c") - db.execute(ins4, "d") - db.execute(ins4, "e") - db.execute(ins4, "f") - db.execute(ins4, "g") - db.execute(ins4, "h") - db.execute(ins4, "i") - db.execute(ins4, "j") + ("a".."j").each{|x| db.execute(ins4,x)} end @@ -204,6 +195,28 @@ ########################~ここまでpt処理~################### ####################################################### +##################################レベル処理する#### +e1 = db.execute("select e1 from box where id = ?",id)[0].to_i#じぶんのidのboxにある一体目の経験値 +no1 = db.execute("select no1 from box where id = ?",id) +wlv = "select ? from zukan where no = ?" +lv2 = db.execute(wlv,lv2,no1)[0].to_i +lv3 = db.execute(wlv,lv3,no1)[0].to_i +lv4 = db.execute(wlv,lv4,no1)[0].to_i +lv5 = db.execute(wlv,lv5,no1)[0].to_i +if e1 < lv2 +lv = 1 +elsif e1 >= lv5 +lv = 5 +elsif e1 >= lv4 +lv = 4 +elsif e1 >= lv3 +lv = 3 +elsif e1 >= lv2 +lv = 2 +end +################################################## + + m1 = "馬小屋" mimg1 = "./img/food.png" m2 = "客室" @@ -232,9 +245,12 @@ #expの1の位*10で、次のレベルアップに必要な経験値の割合が出る。 #(exp=12の場合、2*10=『20%』、次のレベルアップまであと80%が必要、と分かる。) #(exp=35の場合、5*10=『50%』、次のレベルアップまであと50%が必要、と分かる。) +#exppoint = "select e1 from box where id = ?" #じぶんのidのboxにある一体目の経験値 +#expp = db.execute(exppoint,id) +#exp = expp[0][0].to_i gage = 0 -gage2 = db.execute("select no1 from box where id = ?",id) -exp2 = exp +#gage2 = db.execute("select no1 from box where id = ?",id) +#exp2 = exp #esa = "


" @@ -317,6 +333,8 @@

coin:%d$

+ + + @@ -333,4 +353,4 @@ _EOS_ -print "#{gage2}" +print "#{expp}" diff -r d476b2cf82ea -r 3bfbed8919b6 opencampus2015/profeel.css --- a/opencampus2015/profeel.css Fri Oct 23 17:13:44 2015 +0900 +++ b/opencampus2015/profeel.css Sat Oct 24 08:32:26 2015 +0900 @@ -57,7 +57,7 @@ margin:1em 17em;} div.lets{ border:solid 2px #fa0; -background:#faf; +background:#aaa; padding:1% 0%; #margin:1em 17em; } diff -r d476b2cf82ea -r 3bfbed8919b6 opencampus2015/quest.rb --- a/opencampus2015/quest.rb Fri Oct 23 17:13:44 2015 +0900 +++ b/opencampus2015/quest.rb Sat Oct 24 08:32:26 2015 +0900 @@ -10,20 +10,78 @@ id = c.cookies["id"][0].to_i cmps = c["cmps"] - +x = 0 +newone = "" +################################## #card = "select " 設定してる予定のi1,i2,i3を選びたい。どこから? メインテーブル? それようのテーブル? exppoint = "select e1 from box where id = ?" #じぶんのidのboxにある一体目の経験値 expup = "update box set e1 = ? where id = ?" exp2 = db.execute(exppoint,id) exp = exp2[0][0].to_i +srand if cmps == "↑" -exp += 2 + exp += 2 + x = rand(2)+1 +elsif cmps == "→" + exp += 1 + x = rand(3)+1 +#################### +elsif cmps == "←" ##当たりルート + no1 = db.execute("select no1 from box where id = ?",id)[0][0] + no2 = db.execute("select no2 from box where id = ?",id)[0][0] + no3 = db.execute("select no3 from box where id = ?",id)[0][0] + number = rand(8)+1 +while number == no1.to_i + number = rand(8)+1 +end +##############2 + if no2 == 0 + newcal = db.execute('select * from zukan where no = ?',"#{number}") + no2 = newcal[0][0] + calname = newcal[0][1] + t2 = newcal[0][2].to_i/5 + db.execute("update box set no2 = ?, t2 = ?, tm2 = ? where id = ?",no2,t2,t2,id) + newone = "#{calname}が現われた!
#{calname}が仲間になった!" +##############3 + elsif no3 == 0 + while number == no1.to_i || number == no2.to_i + number = rand(8)+1 + end + newcal = db.execute('select * from zukan where no = ?',"#{number}") + no3 = newcal[0][0] + calname = newcal[0][1] + t3 = newcal[0][2].to_i/5 + db.execute("update box set no3 = ?, t3 = ?, tm3 = ? where id = ?",no3,t3,t3,id) + newone = "#{calname}が現われた!
#{calname}が仲間になった!" +############## + else + x = 49 + end +end +db.execute(expup,exp,id) +coin = db.execute("select pt from test where id = ?",id)[0][0] +coin += x +db.execute("update test set pt = ?",coin) +############################################ + + +if x > 0 + xs = x.to_s + "$get!" +else + xs = "" end -db.execute(expup,exp,id) - - -printf(<<_EOS_,cmps,exp2) +x = rand(33) +if x == 0 +cmpsget =' + +' +else +cmpsget =' + +' +end +printf(<<_EOS_,cmps,xs,newone,cmpsget)

だぁんじょん%s

-

%s

+

%s %s

exp

-

こうえきポイント:

+
- - - +%s
- - - +
+