Jump to content

[REQUEST] DragCave - simple C# program for a browser based game


5 posts in this topic

Recommended Posts

Posted (edited)

Hey! I understand that this is a place for iOS Hacks, but maybe someone knows some C# (or any other language) and could write a simple program I will describe. If this thread doesn't belong here, please remove it.

 

Let me explain the mechanics first.

 

DragCave http://dragcave.net/is a simple "game" which requires you to get eggs (click on them on website) and raise them. They later grow and become dragons. In spite of being as simple as it sounds, it is quite addicting. There are many different breeds (some of which are rarer than the other).

 

How to get an egg.

1) Enter the website

 

01dc688170.jpg

 

2) Pick one of 6 locations - Alpine, Coast, Desert, Forest, Jungle, Volcano

 

6ec5767304.jpg

 

3) Choose one of 3 eggs (they are marked with ?, but you can tell what egg that is by description)

 

4) When you get an egg you raise it by putting it on a special website that clicks it for you.

 

There is also another way to get an egg - sometimes people abandon their eggs and you can get them by going to a link: http://dragcave.net/get/XXXXXwhere XXXXX is an alfanumeric code associated to a dragon.

 

Program request:

I would like to request a program which would do the following (both options).

 

Option A:

  • Refresh chosen locations - up to 6 (each location has a different web address). User would pick which locations should be checked.
  • User would make a .txt file with descriptions of dragons he would like to be sniped (separated by "enters")
  • Program would check if any description matches - if it matches it would click the egg above the description (if you hover your mouse over a description you could see the egg's address). If there is no match, it would refresh.

Refreshing would be done quicker if every irrelevant piece of website was hidden. Every image should be got rid of so refreshing can be done as quickly as possible.

 

Here is the source code of one of the locations. I have highlighted dragon descriptions and links to click to get them.

 

9ccf218a77.jpg

 

 

Option B:

 

When players abandon their eggs on forums they often tell their dragons' codes (XXXXX). I'd like the program to be able to snipe those eggs. User would be able to enter 5 alphanumeric code, and the program would refresh the website with as much speed as possible. Once again - website would have to be rid of every picture possible to assure faster refreshing.

 

 

Do you think something like that was possible? 

 

Cheers,

@LookOut

Updated by LookOut
Posted

why c# i have your script read in python

 

Oh it doesn't have to be C#. If you could make something like that in python, it would be awesome!

Posted (edited)
import requests
import re
 
def extract(content):
regex='"/get/.*">'
egg = re.search(r"<a href=\"/get/.*\"><img src=\"/mystery.gif\"",content)
return egg.group()
 
def clean(content):
content = re.sub(r'"><img.*<div>','\n',content)
if 'mystery' in content:
content = content.replace('"><img src="/mystery.gif"','').replace('<a href="','')
 
return content
 
cookie = {'i': '??????????','s':'??????????'}
#repalce s with your cookie
#repalce i with your cookie
 
islands = ['http://dragcave.net/locations/1','http://dragcave.net/locations/2','http://dragcave.net/locations/3','http://dragcave.net/locations/4','http://dragcave.net/locations/5']
 
for url in islands:
r=requests.get(url,cookies=cookie)
content =extract(r.content)
print clean(content)

only gives all eggs out , maybe someone can full end this 

dF9y4g1.png

Updated by iOSv64
Posted

Thanks! Could you explain what it does? It checks the image instead of description doesnt it?

 

Dragon descriptions can be found here:

http://dragcave.wikia.com/wiki/Which_egg_is_which%3F

 

It would be awesome if user could make a txt file with descriptions of dragons he'd like the program to get and then the program would compare descriptions of dragons with those in the file :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines