PDA

View Full Version : Slappy's & Chair's Travian Software



Stool
12th November 2007, 10:54 PM
I was tinkering in VB and wrote a lil program to calculate two timings

Those that want to use it will notice the top calculation is to determine earliest Cranny Level Breach time.
The bottom Calculation shows the amount of time you have to wait until you can build a building requiring however many resources.

Maybe you'd like it aswell.

Note: This program saves data such as current cranny level, resource acquisition rates and current resource levels in a lil text file located at c:\traviandata.txt

You can find my lil village at 97|6

I think I sorted out the Highlighting Bug

Anyhow what I added in this version:
1. Ability to simply paste in your "current resource levels" (stokes idea :) )
2. Ability to simply paste in your "required resource levels" to build/upgrade something (stokes idea :) )
3. Made the timing easier to read
4. Program clears every text field that you click on hence saving you the hassle of selecting all text before changing. (plus i hear stokes backspace key has weak knees)
5. The traviandata.txt file is also now saved in whatever directory you launch this program

[edit] just noticed a division by zero error I never thought about catching just yet. It pops up when your "Acquisition Rate" fields are empty. Just beware. Will fix next time we get some more ideas

SlappY
3rd December 2007, 07:30 AM
OK, I wrote a lil app that will let us log ourselves and our neighbours, and plot it on a map nicely. Allows for different alliances, etc.

TG: Whats the best way to distribute? Can it be done via the site, or email.
PS: It is .NET 2.0, so make sure you got the framework.

It is a rough start, but I can build on it easily enough provided you lot gimme the input.

From what I can see there is a very strong cluster of us in certain areas.

EDIT: Ok, uploaded.

ATM it is rough at best, literally knocked it up in 2 hours. But like I said, gimme a list of features / changes and I can make em.

EDIT: Source available
The .dat file is the data (duh) so you can send this around. I will ad support for file load probably tonight, but for now just keep the name the same.
If someone has a windows server handy, I could write a web service for the data layer so we can all see the same data, but till then, mailing dat files around will have to do.

SlappY
3rd December 2007, 08:48 AM
Done.. also if anyone wants the code to tinker with just shout.

Roloreaper
3rd December 2007, 08:57 AM
Maybe a Travel Time Tools like for cargo and stuff!

So we can set up a 24 hour Caravan route....

stoke
3rd December 2007, 08:59 AM
You select Stoke on the first datagrid, and all the s's show on the grid?
How do you control who shows on the grid?

The .dat database is an XML file .. NICE, we can redistribute it.

SlappY
3rd December 2007, 09:11 AM
PS: Dont trust the coordinates I entered, double check em... I was a little under the influence when I entered them.

gus
3rd December 2007, 09:44 AM
Yes, I would like to look at the source code please. Looks nice. Thanks.

Titan
3rd December 2007, 10:22 AM
@Slappy, Can I add players to the program?

gus
3rd December 2007, 10:23 AM
Have you guys seen this as well:
http://help.travian.com/index.php?type=faq&mod=230

SlappY
3rd December 2007, 10:40 AM
@Slappy, Can I add players to the program?

Yes you can. The app will load the data on startup and save it on close down.

Add an Alliance too, select a color,
Add a player by entering their details in on the first tab, they will be plotted with their alliances color on the map.

gus
3rd December 2007, 10:40 AM
Also, have a look at:
http://travianmap.nl/index.php?ln=en#
It seems to work very nice.

SlappY
3rd December 2007, 10:59 AM
Jeesh... if I can get a data feed then all the better, I could plot out near realtime movements of troops, caravans, etc.

SaintMg
3rd December 2007, 06:14 PM
this is so kewl :woot: you'll are rock stars :beer:

did you see we are all in a rather tight circle nearly looks like a heart no not a real one :heart: :punk: {hey why dont we have a heart smiley} okaaay neva mind , forget i said that .......


so where was i ,right in a circle yes a round one. So this doesn't look so bad cause we just take out the guys in the middle, den we can cover each others backs . :sharp:

SlappY
3rd December 2007, 06:26 PM
I would highly recomend everyone logging the opposing villages in their area, maybe log the name, coords and alliance in a thread, then we can get a decent map of the area going. I nominate stoke to maintain it :)

stoke
3rd December 2007, 06:35 PM
Opposing villages? What's that? A village that attacks us?
Me est confused, please give clearer directions.

gus
3rd December 2007, 06:55 PM
Slappy, you can use the SQL dump file from Tavian mentioned in post 9 of this thread to get village information. Or do you have something more specific in mind, as Stoke mentioned?

SlappY
3rd December 2007, 06:59 PM
I havent checked it out yet... Just got home.
But a data dump will def be the way forward.

SlappY
3rd December 2007, 07:00 PM
Opposing villages? What's that? A village that attacks us?
Me est confused, please give clearer directions.

Opposing = bad dudes.

Askari
3rd December 2007, 07:18 PM
Well well well, most work Slappy has done all year!

Askari
3rd December 2007, 07:20 PM
If anyone needs a PHP/MySQL platform to work with I can make one available.

gus
3rd December 2007, 07:28 PM
Opposing = bad dudes.

SELECT * from x_world where alliance <> "|WrG|" :D

gus
3rd December 2007, 07:31 PM
If anyone needs a PHP/MySQL platform to work with I can make one available.

About any SQL database should work.

What do you use for local PHP/MySQL? I usually use XAMPP (http://www.apachefriends.org/en/xampp.html).

SlappY
3rd December 2007, 08:07 PM
Well the file is a MySQL dump... I.E: 60 000 INSERT statements. So I can plaug it into my MS SQL Express DB. Thing is muh script is timing out, and I aint got the proper Management studio installed so I can tweak the timeout :(

However, there is a truckload of data here, simply not feesible to move it around. We going to have to go for a Web service solution here and keep one updated DB on a server. The queries will be pretty basic, and should be limited to your view gammit area against selected viewable alliances. Simple to pull off, but I need a MS box hooked up to the net. Any volunteers???

My mates got one, will try sweet talk him...

hmmm.... thinking of which.... Microsoft have launched a Silverlight service whereby they will host your silverlight app on a huge bandwidth infrustructure. Perhaps I should look at redoing it in silverlight. Then I can just wrap up the map renderer in a generic handler to serve up the images, could then link to them in web pages, etc.

Will look into it.

Askari
3rd December 2007, 08:12 PM
About any SQL database should work.

What do you use for local PHP/MySQL? I usually use XAMPP (http://www.apachefriends.org/en/xampp.html).

Dont do it locally. What I meant was I have a VPS and I could make it available if anyone wanted to use it to do what Slappy is doing(lets pwn his MS ass). I know Slappy needs a Windows box but I cant help there.

SlappY
3rd December 2007, 08:12 PM
Well well well, most work Slappy has done all year!

Hold your tongue Cretan.

SlappY
3rd December 2007, 08:14 PM
Dont do it locally. What I meant was I have a VPS and I could make it available if anyone wanted to use it to do what Slappy is doing(lets pwn his MS ass). I know Slappy needs a Windows box but I cant help there.

Hmph! The reason I can actually pull these things off in 2 hours or so is cause I am using MS products. Easy peasy. Who would want to use anything else.

gus
3rd December 2007, 08:19 PM
MS products solve small problems fast but time out on big ones. :p

(Note, I use both Visual Studio and PHP, so I actually do not pick a side, but it is always fun to comment.)

SlappY
3rd December 2007, 08:31 PM
K, the Silverlight option is a no go. No DB hosting support. Just 4GB of space and bandwidth for streaming vids, etc

Askari
3rd December 2007, 08:39 PM
Couldnt you query a MySQL db on say my sever and thus use it to store the data?

SlappY
3rd December 2007, 08:42 PM
Would need to setup a web service to expose it. And I only do MS. :)
Unless someone want to knock up another service type and I can reference the WSDL in the app. That will work too.

Askari
3rd December 2007, 08:45 PM
Well cant you do the .net app on that other server and query a MySQL db on mine? A simple yes or no would suffice.

gus
3rd December 2007, 08:46 PM
See for example:
http://www.15seconds.com/issue/050210.htm

The .Net app can probably run local, doing a query against the remote MySQL DB, cutting out the need for two servers.

Askari
3rd December 2007, 08:49 PM
Thank you Gus. Slappy is a bit slow. Ok, so the offer for the db stands if needed.

SlappY
3rd December 2007, 08:50 PM
Well cant you do the .net app on that other server and query a MySQL db on mine? A simple yes or no would suffice.

Yes, but it would expose your server to the intraweb. And thats bad.

Roloreaper
4th December 2007, 09:10 AM
Why do you need the MS Server.... We could set up the MONO to run the Windows shit under Linux.... I've Moved 80% of our siff .net Stuff to the Linux enviroment.... and my word... it runs 2% better... shows how crap the .Net frame actually is :)

I can offer web space (but its not Local) and a DB

veer477
4th December 2007, 09:24 AM
:blink:

SlappY
4th December 2007, 02:13 PM
Why do you need the MS Server.... We could set up the MONO to run the Windows shit under Linux.... I've Moved 80% of our siff .net Stuff to the Linux enviroment.... and my word... it runs 2% better... shows how crap the .Net frame actually is :)

I can offer web space (but its not Local) and a DB

K, I will supply you with a DB and a Web application to host. (When it is done...)

SlappY
4th December 2007, 02:14 PM
Linux is ghey and is teh sux.

Askari
4th December 2007, 03:51 PM
Sulky Sue...

Roloreaper
5th December 2007, 08:13 AM
I'll see what my server has! :) but I don't think mono Server is on the Net... I was wandering if anyone else has a dedicated server to run MONO?

Stool
6th December 2007, 11:34 AM
ok added my sourcecode for my application in the 1st post of this thread.

it was coded with visual basic 6, you guys/gals welcome to tinker with it from here on out. dead simple stuff but i currently cant stand to see anymore code. just thesis writeup and buggering off on my holiday :)

arie warie

SlappY
6th December 2007, 04:35 PM
Oh yeah, good point... I must post mine too.

K, done. Just dont hold your breath, it is rough.
Will work on a nice one next week.

JAWS_Firefox
7th December 2007, 06:53 AM
Slappy, plse explain the difference between travian.rar and travian2.rar?

Stool
7th December 2007, 08:00 AM
Slappy, plse explain the difference between travian.rar and travian2.rar?

im guessing you talking to me

travian.rar ia a very simple program

travian2.rar does everything that travian.rar does and more...... also the sourcecode supplied is relevant to travian2.rar.

basically the program is just a customised calculator that can calculate how long it would take for ur cranny to overflow. it can also calculate when you will have enough resources to build someting. saves u from logging in regularly

JAWS_Firefox
7th December 2007, 09:45 AM
Apologies, Stool. My senior moment.:o

I have been using it for a while now and it is so, so useful. Big thank you for it! :woot:

Just wasn't sure if the 2 did different things. Tks for clearing that up.

SaintMg
11th December 2007, 09:12 PM
can you also add some map details like tracking new villiages and and growth of old ones :D

would save me much thinking if you can put it all in a little picture :sharp:

/me runs away zzzzz screamy from a scareyyyyyyyy

SlappY
12th December 2007, 07:34 AM
hehe... actually believe it or not I had thought of this.... then stopped thinking about it straight away. Would require on to track history, and a 2 meg download a day, could grow quite quickly. And to boot it wouldnt be too accurate since I only have the population data as a source of growth to track over time.

SaintMg
12th December 2007, 08:17 AM
hehe... actually believe it or not I had thought of this.... then stopped thinking about it straight away. Would require on to track history, and a 2 meg download a day, could grow quite quickly. And to boot it wouldnt be too accurate since I only have the population data as a source of growth to track over time.

well thats all im using as an indicator to tell me when to go scout someone (the pop growth) and writing it out on a piece of paper ...

maybe if you could just do it where we enter our own data for our little area and points of interest.... like new peeps who reg start playing and then just stop after a day or 2 .

is that a bit easier cause there are so many people on the server im not really interested in them alll, ..... for now :D

SlappY
12th December 2007, 01:31 PM
Will do...

SintaxErr
12th December 2007, 01:51 PM
Hey what's this piece of code in here that mail's your DSL account username and password to someone called "TheSlapstorHaxor". ?? :D

SlappY
12th December 2007, 04:49 PM
Sh!t... you saw that...