Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[v1.3] & Version 1.4 - Selbst ausbauende Barbarendörfer
#1
Hab ich grad auf der Platte gefunden, vielleicht hat ja jemand ne Verwendung für ^^

Code:
Source Code

Installation Deutsch

Installation English

PS: Der Config-Eintrag lässt euch einstellen, wie weit die Dörfer sich ausbauen
PS2: Rohstoffe werden abgezogen, BH-Plätze werden belegt, ausbauen dauert genauso lange wie bei den Spielern, etc.
PS3: No support - Keine Hilfe bei der Installation oder bei Fehlern
PS4: Ja, das Script ist ekligt, aber das ist auch schon 2 Jahre alt Big Grin

MfG Manuel
Reply
#2
Nice work, but it seems that there is problem with the code?

Everything went good with the installation. After a while barbarians haven't grown up so I checked if there was any errors at localhost/barbar.php.

Here is what I've got:

Parse error: parse error, unexpected ';' in C:\Users\thanos\My Docs\Tribal Wars\TWLan 1.4\htdocs\barbar.php on line 86

Any ideas?
Reply
#3
have you changed the script? my ZEND say no Error.
Schildkröte: "nichts ist langsamer als ich!"
Schnecke: "ich bin ganz sicher langsamer!"
Und dann kam der Internet Explorer...
Reply
#4
Not at all Tongue?

I just downloaded it, put barbar.php in my htdocs, after that I opened the config.php an added the line and finally I included it to the game.php.

I will check again for any mistakes maybe? :/
Reply
#5
Oh you´re right, thank you parat, updated the script

MfG Manuel
Reply
#6
I am sorry to dissapoint you :8 but I had make the same correction as you've done, but now I get this error:

Fatal error: Call to a member function on a non-object in C:\Users\thanos\My Docs\Tribal Wars\TWLan 1.4\htdocs\barbar.php on line 40

Line 40:
$query = $db->query('SELECT * FROM `build` WHERE `end_time` < ' . time());


Any ideas?

Thanos
Reply
#7
(06.05.2013, 18:18)SlimShady95 Wrote: - game.php öffnen und nach ?> folgendes einfügen:
PHP Code:
require_once('barbar.php'); 

Joa das macht viel Sinn Big Grin


(07.05.2013, 14:19)parat26 Wrote: I am sorry to dissapoint you :8 but I had make the same correction as you've done, but now I get this error:

Fatal error: Call to a member function on a non-object in C:\Users\thanos\My Docs\Tribal Wars\TWLan 1.4\htdocs\barbar.php on line 40

Line 40:
$query = $db->query('SELECT * FROM `build` WHERE `end_time` < ' . time());


Any ideas?

Thanos

PHP Code:
require_once('barbar.php'); 

Muss ganz nach unten in der game.php, also vor dem ?>
 Du suchst ein Tool? Dann sieh doch mal in meine Toolsammlung!
Reply
#8
I saw that I had to include it after ?> but no hope yet Sad
Reply
#9
(07.05.2013, 18:56)parat26 Wrote: I saw that I had to include it after ?> but no hope yet Sad

Sorry, in English... Include the code before ?> Smile
 Du suchst ein Tool? Dann sieh doch mal in meine Toolsammlung!
Reply
#10
That's what I wanted to say, mispelled it! I checked it right now, and I had put it before ?>.

I believe that putting it after or before doesn't matter however in any away, the real problem is on barbar.php which has no assosiacition with game.php but game.php only includes the code from the file, that's why I believe it's useless to include in before or after (it's the same).

Anyway, maybe Manuel could check the code again Tongue?

Thanos.
Reply
#11
Well, yeah. I will check it now (sorry, slept the whole day Big Grin). But it worked on my pc, maybe because I have it very early in the game.php hmm ^^
Wait a few minutes

Ok I fixed it now. It was not my error, hehe. It it because the last line in game.php is exit(); and that means, that nothing after it, will actually be executed.
I found a way to go around this stupid thing.

First post updated!

MfG Manuel
Reply
#12
Seems ok so far, however I struggle to figure out how to install it with the "includes.inc.php".

Maybe you could write it in English too Sad?

Thanos.
Reply
#13
Omg that will be difficult, but I try it for you because I have a very good day Big Grin

1. [Download] and save the file in "htdocs" ("htdocs\barbar.php")
2. Rename your "include.inc.php" to "include2.inc.php"
3. Create a new file named "include.inc.php" in "htdocs" with the following content:
PHP Code:
<?php
require_once('include2.inc.php');
require_once(
'barbar.php'); 
4. Open your "config.php" located in "htdocs\include" and add the following thing which controls till how much points the barbars should be build:
PHP Code:
$config['bb_max_points'] = 3000
5. Maybe restart dslan_start.bat, don't know if this is nessecary

Hope that helps, my English is not the best :/

Have a nice day!

MfG Manuel
Reply
#14
(08.05.2013, 13:57)SlimShady95 Wrote: 2. Rename your "include.inc.php" to "include2.inc.php"
3. Create a new file named "include.inc.php" in "htdocs" with the following content:
PHP Code:
<?php
require_once('include2.inc.php');
require_once(
'barbar.php'); 

Kannst du mir als PHP Noob das mal erklären? Big Grin
Was wäre falsch daran, die Datei nicht einfach am Ende der include.inc.php zu includen?
Abgesehen davon hatte ich keine Probleme damit es am ende der game.php zu includen.
 Du suchst ein Tool? Dann sieh doch mal in meine Toolsammlung!
Reply
#15
Ehrlich gesagt, hatte ich das gar nicht versucht *shame*
Hab das von Molt glaub geklaut, der hatte das mal auf die Art gelöst Tongue

Das mit der game.php ist glaub auch erst ab 1.4+ so, bei 1.3 war das noch nicht so.

Muss jetzt leider auch los, Volksfest wartet, sonst würde ich dir das genauer erklären ^^

MfG Manuel
Reply
#16
immer diese säufer ich glaub vor der 1.4 wurde das programm noch in dem codierten teil beendet und folglich zählt alles was nach der codierung kommt nicht mehr wenn ich hier irchtig gelesen hab
Falls ich dir helfen konnte bewerte mich bitte
Reply
#17
Säufer? Pass auf was du sagst. Ich bin eigentlich seit Halloween letztes Jahr trocken.

Ja scheiß egal wieso, so wie die Anleitung oben is, geht's

MfG Manuel
Reply
#18
Am Ende der include.inc.php kann man nix anhängen... aus Gründen und so, kein Plan was da wirklich läuft.
Bei allen anderen Dateien geht's aber... ich müsst' eigentlich mal was mit nem Hook für die Events releasen... Tongue
Reply
#19
Öhm laut Code sollte das aber funktionieren. Oder wo soll so ne Sperre sein?
Selbst in game.php is nichts, wundert mich, warum das dann nicht geht

MfG Manuel
Reply
#20
Kein Plan, aber es geht halt nicht... ^^
Reply




Users browsing this thread: 1 Guest(s)