Let the vk script from WCup5 be public...

General discussion about the games and the scene.

Moderator: Moporators

Post Reply
User avatar
sierra
39mins club
Posts: 2471
Joined: 15 Apr 2004, 22:51

Let the vk script from WCup5 be public...

Post by sierra »

Look at this mess. This is just one of countless examples of tournaments where people have lost their patience dealing with crappy interfaces and overcomplicated systems of submitting their times. I'll admit even I was guilty of sloppy organisation when i did the PIT cup. Wouldn't it be cool if there could be a standardized way of submitting times that could be copied by even a scripting novice? This way we'd probably see a lot more tournaments from the many levelmakers who no doubt think that only guys like zebra, skint0r and pexi are capable of hosting respectable events. I don't personally give much of a shit because I hardly play Elma anymore, but still it pains me to see the scene operating in a sub-optimal manner.
[OMG] | [SpEF] | Apparently my TT was once 39:26:06
User avatar
Raven
Moporator
Posts: 2727
Joined: 7 Feb 2005, 15:28
Team: MiE
Location: Finland.
Contact:

Post by Raven »

stfu nab
Seize the day
User avatar
sierra
39mins club
Posts: 2471
Joined: 15 Apr 2004, 22:51

Post by sierra »

Any comments from any educated and/or intelligent people?
[OMG] | [SpEF] | Apparently my TT was once 39:26:06
User avatar
Memphis
37mins club
Posts: 1907
Joined: 28 Feb 2003, 13:35
Location: B.C. Canada
Contact:

Post by Memphis »

Ya I guess sending in times is a pain in the ass. Be cool if there was a script that hacked into my computer took the replay and time from it and then sent it into the tourny host. It would do this 1 min before deadline and even the peeps that played the lvl and didn't plan on sending in still send in. So the peeps that don't holya the lvls that much but i bet play a few times like john or tor or zweg or luther or someone else who is busy with internals may have a crappy time in a cup cause no holya. but crappy for them would be like 5th place in a cup. imma copy write this program whoever invents it owes me 5% profit shares.
Religious Man
|| TT: 37:47:70 || EX New Wave WR + Animal Farm WR || 24 Canadian Records || TEC Bronze Medal || HHIT in the 37min club || http://elastomaster.tripod.com/
||
Image
User avatar
The_BoneLESS
38mins club
Posts: 4604
Joined: 7 Sep 2003, 00:30
Team: HHIT
Location: Dangerously close to the St-Lawrence River
Contact:

Post by The_BoneLESS »

Have to totally agree with sierra this time.

If i take the same example as him, the error pipe cup, the too high complexity of sending recs and the fact that lots of people's rec weren't received made my interest for the cup == 0.

World Cup 5 was the total opposite. Simple, nice, efficient. Everything you would like from a sending form.

Let's share this script and let the elma contest world better!
Website || TT:38:05:33 || WC5:15th || HHIT for life || 9th world wide ... BAP is next
User avatar
zebra
Kuski
Posts: 1014
Joined: 23 Sep 2003, 15:35
Team: TAP
Location: Finland
Contact:

Post by zebra »

The_BoneLESS wrote:Have to totally agree with sierra this time.

If i take the same example as him, the error pipe cup, the too high complexity of sending recs and the fact that lots of people's rec weren't received made my interest for the cup == 0.

World Cup 5 was the total opposite. Simple, nice, efficient. Everything you would like from a sending form.

Let's share this script and let the elma contest world better!
Well, I agree that those scripts should be public (the wc5 script and skintatious too), but I don't think it's much more difficult to send your times via e-mail (like in mastercup2). It may be a bit harder but shouldn't take more than a minute anyway.
A winner of 4 GAA's (mc2 included), winner of mkup206, and a proud member of team TAP.
Play uni levels: http://koti.mbnet.fi/zebra/uni.html
Homepage: http://koti.mbnet.fi/zebra/elma.html
User avatar
skint0r
39mins club
Posts: 768
Joined: 16 Jun 2002, 07:36
Location: Oslo, Norway

Post by skint0r »

I doubt sharing is the issue. It's not like you can just copy the script to your server then: voila everything works. And I doubt vk, or anyone else for that matter, would bother putting the script together so that it would work anywhere right 'out the box'. It's not exactly that simple.

And this must have been posted a million places already, but the source to my script is even shared at my site. If you already know some php, then getting it to work for you is not that hard.

Source for getting the CRC of the lev file (to check against the CRC in replay to see if the replay hasn't been made on another level. Not that it's too hard to fool however):
http://skintatious.net/src/getLevCRC.phps

Source for calculating with elma times (convert 00:00,00 to ms, and back):
http://skintatious.net/src/strToHs.phps

Source for getting the time, level name, and CRC from a replay:
http://skintatious.net/src/getRecInfo.phps
Prestigious member of 14.6x Tutor14 club
Viper_KillerGuy
PHPer
Posts: 122
Joined: 1 Sep 2002, 19:34
Location: Denmark
Contact:

hmm

Post by Viper_KillerGuy »

It was quite a while ago, but as far as i remember, my script only generated the .txt file.
But other than a few events, px didn't bitch about it much, but i suspect he had to do alot of manual edits in the .txt because the script fucked it up.

edit: arh, found it. It has a rather advanced config file and looks somewhat understandable coded, so in theory it should be able to be adapted.

I guess i could slap on some interface and host it through my server, unless px somehow don't want to share it.
Viper_KillerGuy
PHPer
Posts: 122
Joined: 1 Sep 2002, 19:34
Location: Denmark
Contact:

gulp, that turned out pretty ugly

Post by Viper_KillerGuy »

Okay, i've set up a cup generation script.
I think the version i had of the script is old or something, it had alot of weird errors. If anyone want the actual source you have to get it from px.

www.vk0.dk/elmacups

it uses the database from www.vk0.dk/ratemylev for user/pass stuff
You can log in and make and manage cups.

I rather quickly slapped together some mesh to config the script, especially the events setup can seem weird, but i wrote alot about it which may make it understandable.

on the "front page" you can see a list of currently active cups.
The actual form to send in recs changes depending on the type of the event (if it's a pipe apple collecting lev, there's a box to type in amount of apples), but you should be able to simply copypaste the form to your site by just changing the action= thing in the <form> thing.

The script itself basically only does a few things:
allows users to send in their information along with .lev and .rec file.
allows admins to browse and edit those inputs, the script doesn't care which .lev or .rec files are uploaded, but it does take the time from the .lev.
After the admin have sorted through the input the script automatically generates the .txt files as seen with wcup, including the total points adding of all previous events, for single kuskies, nations and teams.

You can also just use this as admin by disableing nickcheck and manually entering the information and uploaded the .lev for each user for each event.

If anyone is actually going to use this script be sure to give some feedback on what you would want changed.

edit: changed link (sorry tijs)
Last edited by Viper_KillerGuy on 9 Sep 2006, 14:33, edited 1 time in total.
teajay
Donator duck
Posts: 10043
Joined: 3 Apr 2003, 17:53

Post by teajay »

I clicked on the link to check it out, but I got a 404. :(
User avatar
petsen
Meetsen
Posts: 2044
Joined: 29 May 2002, 01:27
Location: Aarhus S, Denmark or nearest DEM

Post by petsen »

Raven wrote:stfu nab
sierra wrote:Any comments from any educated and/or intelligent people?
said about a comment which could easily have been from your self in countless other topics.. noob..



but your idea is good.
Proud Member Of RDK
User avatar
sierra
39mins club
Posts: 2471
Joined: 15 Apr 2004, 22:51

Post by sierra »

Well I'm so relieved to have your support petsen, I was really worried that you wouldn't like it. Because that would mean that maybe you didn't like me. Which would really depress me. Totally.
[OMG] | [SpEF] | Apparently my TT was once 39:26:06
User avatar
jaytea
37mins club
Posts: 1015
Joined: 22 May 2004, 08:45

Post by jaytea »

petsen, he's just being sarcastic
User avatar
petsen
Meetsen
Posts: 2044
Joined: 29 May 2002, 01:27
Location: Aarhus S, Denmark or nearest DEM

Post by petsen »

thats the reason i love this forum :idea:
Proud Member Of RDK
Viper_KillerGuy
PHPer
Posts: 122
Joined: 1 Sep 2002, 19:34
Location: Denmark
Contact:

new more easily implementable script

Post by Viper_KillerGuy »

I've worked abit more on the weekbattle script i made some time ago.

It can be quite easily installed and integrated into an existing website, it allows easy handling of lev uploading, setting up battles, uploding .recs to submit times. Right now it doesn't include any way to make some combined statistics of results on all battles played, but that can be easily implemented.

I've even made a little text that shows some basic info, like installation and download:
www.vk0.dk/weekbattle

If anyone is considering using this and have problems, feel free to contact me here or at vk a vk0 dot dk.
User avatar
niN
Kuski
Posts: 2631
Joined: 22 Aug 2005, 12:23
Team: HoHo
Location: Sweden, Gothemburg
Contact:

Post by niN »

Thanks Viper! I'll really try and make this work. If I have any prblems I might ask =).

EDIT:
hmm it doesn't seem to work =(.
I edited the weekbattle.conf.php to minimum required, but when I started weekbattle.php the code came up and not the page =(. what Am I doing wrong?
Team HotHorses, and I'm converting to Icelandian now...
Viper_KillerGuy
PHPer
Posts: 122
Joined: 1 Sep 2002, 19:34
Location: Denmark
Contact:

Post by Viper_KillerGuy »

if the code itself comes up, maybe you don't have php installed or properly set up to parse .php files
a basic test would be to make a file containing:
<?php phpinfo();

and name it something with a php extension (ex. phpinfo.php) and see if the server renders it.
User avatar
niN
Kuski
Posts: 2631
Joined: 22 Aug 2005, 12:23
Team: HoHo
Location: Sweden, Gothemburg
Contact:

Post by niN »

hm I think I understand and I'll try that. However, I can't download the cyrrent version in .zip/tar.gz format. the links are broken. So I downloaded the sourcecodes to my desktop and edited them in notepad. Maybe I'm not doing it correctly?
Anyway, I'll try doing what you told me to do

EDIT:
Ok you were right. My comp don't recognize .php files. Tomorrow I will have access to my newer comp, ez try then :D thanks for helpin! really would love this script
Team HotHorses, and I'm converting to Icelandian now...
Viper_KillerGuy
PHPer
Posts: 122
Joined: 1 Sep 2002, 19:34
Location: Denmark
Contact:

Post by Viper_KillerGuy »

sorry about the broken links, they're fixed now.

but that shouldn't effect the script unless you left out the first <?php or you actually save-as the file, thereby downloading the html code that generated all the colors, which, although pretty, don't work well with actual php code.
User avatar
zworqy
Kuski
Posts: 3706
Joined: 19 May 2002, 23:17
Location: Lilla Edet, Sweden
Contact:

Post by zworqy »

niN: download this: http://www.easyphp.org/
<Fihlvein> another case of zworqy-is-always-right closed i guess
<yoosef> zworqy doesnt suck at anything
User avatar
niN
Kuski
Posts: 2631
Joined: 22 Aug 2005, 12:23
Team: HoHo
Location: Sweden, Gothemburg
Contact:

Post by niN »

I downloaded the .zip latest version. And this is how the files looked like (the files that appear as html files is indeed ones which I've right-clicked, save page as.)
http://img102.imageshack.us/img102/7943/namnlshi4.gif

so basically I must get a program which enables me to view .php files, and I'm pretty sure my other comp has such prog.
Thanks for your help!

EDIT:
Thanks zworq! I'm dnldn =)
Team HotHorses, and I'm converting to Icelandian now...
Viper_KillerGuy
PHPer
Posts: 122
Joined: 1 Sep 2002, 19:34
Location: Denmark
Contact:

Post by Viper_KillerGuy »

It sounds like you are trying to use the script alone on a computer.

This is made to be run on a webserver connected to the internet. So everyone can register and submit times.

If you run it alone on a personal workstation, you have to setup a mysql and http server and register all users yourself, and submit their .rec files yourself, which is alot more work than using those fancy stats .exe programs.
User avatar
zworqy
Kuski
Posts: 3706
Joined: 19 May 2002, 23:17
Location: Lilla Edet, Sweden
Contact:

Post by zworqy »

I got some problems when testing it:

1. You forgot to edit out "http://www.vk0.dk/" in all the links
2.

Code: Select all

Notice: unserialize(): Error at offset 1670 of 11045 bytes in c:\program files\easyphp1-8\www\weekbattle.php on line 1736

Notice: Undefined index: WeekBattle_setup_done in c:\program files\easyphp1-8\www\weekbattle.php on line 171

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at c:\program files\easyphp1-8\www\weekbattle.php:1736) in c:\program files\easyphp1-8\www\weekbattle.php on line 179

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\program files\easyphp1-8\www\weekbattle.php:1736) in c:\program files\easyphp1-8\www\weekbattle.php on line 179

Notice: Undefined index: weekbattle_errormode in c:\program files\easyphp1-8\www\weekbattle.php on line 191
When trying to install. Some table are listed as created/ already exists, though. A lot more errors occur if the install line is commented out.
<Fihlvein> another case of zworqy-is-always-right closed i guess
<yoosef> zworqy doesnt suck at anything
Viper_KillerGuy
PHPer
Posts: 122
Joined: 1 Sep 2002, 19:34
Location: Denmark
Contact:

oh dear

Post by Viper_KillerGuy »

Though i had edited out all the www.vk0.dk stuff

the massive amounts of errors because i didn't really check it through for minor errors.

I think it will work if you just add
error_reporting(E_ALL ^ E_NOTICE);
Just after the <?php line in weekbattle.php.

from the error reports it looked like that this was the only problem.
User avatar
zworqy
Kuski
Posts: 3706
Joined: 19 May 2002, 23:17
Location: Lilla Edet, Sweden
Contact:

Re: oh dear

Post by zworqy »

Viper_KillerGuy wrote:just add
error_reporting(E_ALL ^ E_NOTICE);
Just after the <?php line in weekbattle.php.
worked \o/
<Fihlvein> another case of zworqy-is-always-right closed i guess
<yoosef> zworqy doesnt suck at anything
User avatar
niN
Kuski
Posts: 2631
Joined: 22 Aug 2005, 12:23
Team: HoHo
Location: Sweden, Gothemburg
Contact:

Post by niN »

l'll try the script tomorrow, and thanks in advantage Viper for doing this :D
Team HotHorses, and I'm converting to Icelandian now...
Viper_KillerGuy
PHPer
Posts: 122
Joined: 1 Sep 2002, 19:34
Location: Denmark
Contact:

Post by Viper_KillerGuy »

I made a new version (1.1) that shows some global statistics, i made the same as used on wcup, sorting points by invidual user, team and nationality.
I included both the wcup type of points, the first x gets y[x] points, and the battle statistics, where last place always gets 1 point and first place gets (amount of people in battle)+1 points.

Things i can thing of that needs adding:
Seperate stats-page for individuals, countries and teams.
The ability to only include the best X of each team to the global teams points standing.
Ability for users to change their team, country and password.
More conf examples:
how to include it into phpbb userdatabase,
How to output the data in a more computer-friendly format so users can fiddle with itthemselves.
How to integrate it into existing websites,
How to temporary change conf values to have more than 1 different htmls for the same text.
How to get various values for use in more advanced handling.
onlainari
Kuski
Posts: 827
Joined: 19 May 2002, 19:13

Post by onlainari »

YA! god first post :beer:
User avatar
enil
Kuski
Posts: 311
Joined: 26 Apr 2005, 14:07
Location: Fjelstervang
Contact:

Post by enil »

vk is the shit :*
User avatar
Jeppe
39mins club
Posts: 324
Joined: 25 Jun 2003, 17:37

Post by Jeppe »

enil is teh poop.
Post Reply