したらばTOP ■掲示板に戻る■ 全部 1-100 最新50 | メール | |
レス数が1スレッドの最大レス数(1000件)を超えています。残念ながら投稿することができません。

戦国IXA ツールスレPart43

191名無しさん:2019/09/03(火) 03:30:58 ID:JAvXwE26
白くじカウントこれ以上作りこむ気はなかったのですが、
.1fYeIUUさんが頑張ってくれたのでちゃんと実装してみました。

'got_type=0' が白くじのフラグでしょうか?
whiteCount()は他と合わせる形でsenkujiResult()にして拝借しました。

-- -- -- -- --
senkujiWhiteLottery(); // senkuji/senkuji
+ senkujiResult(); // senkuji/senkuji_result
senkujiSummary(); // senkuji/senkuji_history

-- -- -- -- --
// 白くじ指定枚数引き
function senkujiWhiteLottery() {
〜 中略 〜
ixaDogTopWhiteLottery(whiteLottery.count);

+ $('input[value="戦国くじ【白】を引く"]')
+ .attr('onclick', '')
+ .on('click', function() {
+ if (confirm('戦国くじ【白】を引いてよろしいですか?')) {
+ whiteLottery.count++;
+ setStorage('ixamoko_white_lottery', whiteLottery);
+ $(this).parent('form').submit();
+ }
+ });
+
var possible_num = shirokuji_possible_num($('#ig_boxInner')),

-- -- -- -- --
// 白くじ指定枚数引き
function senkujiWhiteLottery() {
〜 中略 〜
}
+
+ // 戦国くじの結果
+ function senkujiResult(){
+ if (location.pathname != '/senkuji/senkuji_result.php') {
+ return;
+ }
+ if (!location.href.match(/got_type=0/)) {
+ return;
+ }
+
+ var Dt = new Date();
+ var now = Dt.getFullYear() + '/' + (Dt.getMonth() + 1) + '/' + Dt.getDate();
+ var whiteLottery = getStorage({}, 'ixamoko_white_lottery');
+ if(whiteLottery.date !== now){
+ whiteLottery = {date: now, count: 0};
+ }
+
+ var html=`<dt>今日引ける枚数</dt><dd>${whiteLottery.count}/1000枚</dd>`;
+ $('.lot_information').append(html);
+
+ $('img[alt="もう一度引く"]').parent()
+ .attr('href', 'javascript:void(0)')
+ .on('click', function(){
+ if (confirm('戦国くじ【白】を引いてよろしいですか?')) {
+ whiteLottery.count++;
+ setStorage('ixamoko_white_lottery', whiteLottery);
+ $('form[name="sengokukuji"]').submit();
+ }
+ });
+ }

// 戦国くじ履歴集計
function senkujiSummary() {




掲示板管理者へ連絡 無料レンタル掲示板