Page 3 of 4
Posted: Mon May 16, 2011 9:08 am
by Sjune
As me in Poker, my bot was a Rock. Beat him in two rounds without getting any damage...
Writing a Bot
Posted: Wed Jun 29, 2011 8:19 pm
by General_Payne
Well, iv never done any code before relating to internet.
Iv used python for alot of the challenges but with this i have no idea where to start
a google suggested urllib2 but with the below I got a 'not logged in'
import urllib2
response = urllib2.urlopen('
http://www.hacker.org/challenge/misc/d/cavern.php')
html = response.read()
print html
so i tried adding &name=General_Payne&password=[mypassword] to the url. Errored out.
Any clues / how to submit, what to do would be much appreciated
Posted: Thu Jun 30, 2011 6:09 am
by CodeX
For the first parameter you would have
? instead of
& e.g.
.../cavern.php?name=General_...
You may also have to urlencode your password which can be done in python with something like
Code: Select all
from urllib import urlencode
encodedPassword = urlencode( "!@#$%^&*()_+ oh no my password" )
query = "/challenge/misc/d/cavern.php?name=General_Payne&password=%s"%encodedPassword
urlllib2 doesn't have a urlencode function so you have to get it from urllib instead
Reply
Posted: Sun Jul 10, 2011 1:42 am
by General_Payne
Thanks alot Codex
Id just managed to figure out how to do it before checking this again. Now my issue is my damn bot refuses to go down stairs its i the top left or bottom right square, but thats just a code error.
Iv rewritten it from scratch twice and get the same issue so im being rather dim somewhere lol
Posted: Tue Aug 02, 2011 8:56 pm
by cakeeatinghaxxor
This challenge took my bot hours just to level up...
The boss summoned not until level 127. So i had to bot up to level 133...
But i really recommend Ruby for this challenge - mechanize and nokogiri are just nice.
Posted: Wed Aug 24, 2011 6:18 pm
by moose
# My current level: 128 (4883 XP)
# dungeon level: 123
# HP: 2640
# Weapon: Level 122 Slicer +5 (Strength: 127)
# Inventory: Aquamarine potion +4, Aquamarine potion +5, Magenta potion +4
I hope it will summon soon...
edit: Never mind, I got it
That was easy ... hat more than 2000 HP and the +5 heal potion left.
Posted: Fri Apr 06, 2012 12:13 pm
by Hckr
Very cool challenge
Posted: Sun Jun 17, 2012 2:09 pm
by fragman
bot is currently running, I just hope 10 levels above DungeonLevel will be enough for the boss :/
Posted: Wed Jul 09, 2014 1:39 pm
by destiny
I really enjoyed this challenge since I haven't written a bot like this before. I used ruby with the mechanize gem to complete this, and although my script wasn't perfect it did the job of killing the boss with ease. Funnily enough even the logging in to start the game was a challenge since it took me a little while to figure out how to use mechanize since the examples in the docs weren't great.
Posted: Fri Jun 26, 2015 3:18 pm
by Jijel
and year since someone posted here. I used JavaScript and tampermonkey for this one. It goes about 50 levels per hour. I am currently at dungeon level 102 and hero level 109.
As for the logging, I just use console.log to print the bit of the page that is needed and I leave it in it's own tab.
Great Challenge
Posted: Wed Mar 16, 2016 8:09 am
by Kaaser
The first bot I wrote.I used python and splinter, but my bot needed some time. At the end I was scared whether the bot win or not so I did it myself. I was 14 levels above the dungeon level drank a magenta potion +5 and killed the boss with one hit. My bot needed a week in the 24 hours a day mode to be all the time between 14 and 20 Levels above the dungeon level. Maybe not the best bot x)
Re: Great Challenge
Posted: Wed Mar 16, 2016 12:06 pm
by Hippo
Kaaser wrote:The first bot I wrote.I used python and splinter, but my bot needed some time. At the end I was scared whether the bot win or not so I did it myself. I was 14 levels above the dungeon level drank a magenta potion +5 and killed the boss with one hit. My bot needed a week in the 24 hours a day mode to be all the time between 14 and 20 Levels above the dungeon level. Maybe not the best bot x)
So Cave Master would be challenging
. Funny, it's exactly 2 years I have solved it.
Re: Great Challenge
Posted: Fri Aug 12, 2016 11:08 am
by iFurySt
Hippo wrote:Kaaser wrote:The first bot I wrote.I used python and splinter, but my bot needed some time. At the end I was scared whether the bot win or not so I did it myself. I was 14 levels above the dungeon level drank a magenta potion +5 and killed the boss with one hit. My bot needed a week in the 24 hours a day mode to be all the time between 14 and 20 Levels above the dungeon level. Maybe not the best bot x)
So Cave Master would be challenging
. Funny, it's exactly 2 years I have solved it.
sorry i am laughing XD
Posted: Tue Aug 30, 2016 1:21 pm
by KeysRFaded
could somebody please point me in the right direction of building my own bot. some useful links and info. no answers though please.... i dont know where to start and looking for only that. greatly appreciated
Posted: Thu Jan 14, 2021 8:21 pm
by Schnabeltier
Is it still possible to solve this challenge? I always get the message "off board" on the screen, when I am clicking in one direction in one step and in its counter direction in the next. (e.g. East, then West; or South, then North; or vice versa)