[人狼] 初版自動按開始遊戲及自動投票程式

看板Ruby作者 (Schelfaniel)時間15年前 (2009/03/05 18:36), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
※ [本文轉錄自 HOT_Game 看板] 作者: Schelfaniel (Schelfaniel) 看板: HOT_Game 標題: [人狼] 初版自動按開始遊戲及自動投票程式 時間: Wed Mar 4 20:45:02 2009 本程式由 Ruby 撰寫 需要安裝 Ruby 元件 Watir ( gem install watir ) 請於 irb 下使用,欲中斷自動執行請使用 ctrl-c ( 等我有空再改寫成視窗版 ) 程式提供: 1.30 秒自動按開始遊戲 auto_up_start 2.60 秒自動投選擇的對象 ( 如果對象已死亡則會亂數投票) auto_up_vote 名稱 3.60 秒自動亂數投票 auto_up_vote_random 程式如下 : require 'rubygems' require 'watir' def ngct_start $browser = Watir::IE.find(:url, /test.ngct.net/) unless $browser $browser = Watir::IE.new $browser.goto 'http://test.ngct.net' end end def up_votelink $browser_up = $browser.frame(:name, 'up') $browser_up.link(:name, 'vote_link').click end def up_gamestart $browser_up.button(:index, 2).click end def up_return $browser_up.link(:index, 2).click end def up_say text $browser_up = $browser.frame(:name, 'up') $browser_up.text_field(:id, "say").set(text) $browser_up.button(:index, 1).click end def up_vote_random result = true up_votelink sleep(0.1) begin index = rand($browser_up.radios.length) + 1 $browser_up.radio(:index, index).set $browser_up.button(:index, 1).click rescue end sleep(0.1) up_return result end def up_vote name result = true up_votelink sleep(0.1) begin $browser_up.radio(:value, name).set $browser_up.button(:index, 1).click rescue begin index = rand($browser_up.radios.length) + 1 $browser_up.radio(:index, index).set $browser_up.button(:index, 1).click rescue end end sleep(0.1) up_return result end def up_start result = true up_votelink sleep(0.1) begin up_gamestart rescue result = nil end sleep(0.1) up_return result end def auto_up_start up_say '啟動:自動按開始遊戲(30秒)' $thread_stop = false while $thread_stop == false break unless up_start sleep(30) end end def auto_up_vote_random up_say '啟動:自動亂數投票(60秒)' $thread_stop = false while $thread_stop == false break unless up_vote_random sleep(60) end end def auto_up_vote name up_say '啟動:自動投票(60秒)' $thread_stop = false while $thread_stop == false break unless up_vote name sleep(60) end end -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.126.52.118

03/04 20:52,
變相外掛!(誤
03/04 20:52

03/04 20:56,
為什麼需要這種東西囧?
03/04 20:56

03/04 20:57,
這只忙算是人突然跑去忙代打的工具啊~
03/04 20:57

03/04 21:16,
我不贊成自動開始耶 畢竟希望至少開始時人是在的
03/04 21:16

03/04 21:17,
自動開始可能會讓一些心不在這場的沒辦法在開場前過濾掉
03/04 21:17

03/04 21:17,
連開始遊戲都沒辦法按還是不要玩對大家都好
03/04 21:17

03/04 21:24,
嗯,我也是建議自動按開始拿掉會比較好...連開始都不能自己
03/04 21:24

03/04 21:24,
按的人,拖累場內其他人的機率很高
03/04 21:24

03/04 22:59,
我論有村民不想玩就快樂用這個程式代打自己繞跑XD
03/04 22:59

03/04 23:01,
這兩個都開的話bot玩遊戲就變的可行 然而這不是好事....
03/04 23:01

03/05 00:00,
感覺會影響遊戲公平性
03/05 00:00

03/05 00:11,
連人狼這種遊戲也bot那乾脆別玩...=.=
03/05 00:11

03/05 00:41,
亂數投票.__."
03/05 00:41

03/05 01:59,
亂數投票會不會變暴民戰阿...
03/05 01:59

03/05 02:11,
不推薦自動投票~反而希望增加投票通知
03/05 02:11

03/05 02:12,
有人爆斃的時候,需要重新投票,這個時候很容易暴斃
03/05 02:12

03/05 02:12,
與其啟用自動投票和開始~不如增加個投票和開始通知吧~XD
03/05 02:12

03/05 03:58,
其實開音效就好了阿...音效出來稍微看一下阿...
03/05 03:58

03/05 04:19,
外掛不好,不要外掛 XD
03/05 04:19

03/05 07:10,
以後會不會有整場都是BOT的場阿XD 全村不說話默默吊咬
03/05 07:10

03/05 17:40,
山也BOT 海也BOT
03/05 17:40

03/05 17:42,
外掛文還在啊 快劣退啊 = =
03/05 17:42

03/05 17:50,
這個...沒必要噓吧 我相信原po是出於好意而不是惡意
03/05 17:50

03/05 17:51,
請巴萌狐的頭代替噓文(?)
03/05 17:51

03/05 17:52,
不可以啦...不要欺負人家..人家不給欺負...Q口Q
03/05 17:52

03/05 18:19,
(巴頭
03/05 18:19

03/05 18:32,
會痛...Q"Q
03/05 18:32

03/05 18:35,
會痛是因為角度不對 手刀和後腦勺必須保持垂直(巴頭)
03/05 18:35
-- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.126.50.38

03/05 20:19, , 1F
我只能說敗給你了.... XD
03/05 20:19, 1F
文章代碼(AID): #19hwitfQ (Ruby)