Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[v1.3] & Version 1.4 - Selbst ausbauende Barbarendörfer
#21
Hab ich auch festgestellt jo ^^
Der Code von vor 2.0 ist sowieso an manchen Stellen seeeehr fragwürdig Big Grin

MfG Manuel
Reply
#22
Fragwürdig ist da noch milde formuliert.

lib/functions.php, Zeilen 1066 und 1067 (simulate()):
PHP Code:
    // Verteidiger immer zusützlich etwas abziehen, weil sie zu deff zu kämpfen sind ;D
    
$defPoints $defPoints 1.03
Reply
#23
All right Manuel, I renamed include.inc.php to include2.inc.php (and put the code in the file) and changed the bot code. No hope yet to get it working, as the same error occurs when I go to localhost/barbar.php (just to check for errors).

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

Also, do I have to include it to game.php still?

Any ideas?

*EDIT: I've also noticed that changing the include.inc.php corrupts superbot for some reason (white screen?). Sad

Thanos.
Reply
#24
Please put this code:
PHP Code:
echo serialize(get_defined_vars());
exit; 
Between those two lines in include.inc.php:
PHP Code:
require_once('include2.inc.php');
// Put it right here
require_once('barbar.php'); 
Open any page and paste the result here.
It should look like this (just a lot more of it):
Code:
a:2:{s:1:"a";s:1:"b";s:1:"c";s:1:"d";}
You can remove the two lines again afterwards.

Regards
Molt
Reply
#25
(10.05.2013, 09:58)parat26 Wrote: All right Manuel, I renamed include.inc.php to include2.inc.php (and put the code in the file) and changed the bot code. No hope yet to get it working, as the same error occurs when I go to localhost/barbar.php (just to check for errors).

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

Also, do I have to include it to game.php still?

Any ideas?

*EDIT: I've also noticed that changing the include.inc.php corrupts superbot for some reason (white screen?). Sad

Thanos.

Well, if you want I can came to you via teamviewer, that would make the whole thing more easy. ^^

(09.05.2013, 20:34)Molt Wrote: Fragwürdig ist da noch milde formuliert.

lib/functions.php, Zeilen 1066 und 1067 (simulate()):
PHP Code:
    // Verteidiger immer zusützlich etwas abziehen, weil sie zu deff zu kämpfen sind ;D
    
$defPoints $defPoints 1.03

Hier noch was schönes aus der functions.php:
PHP Code:
function unit_running($x,$y,$cordx,$cordy,$pro_feld)
{
    global 
$config;
    
    if (
$x $cordx) { $xfelder $x $cordx; } else { $xfelder $cordx $x; }
    if (
$y $cordy) { $yfelder $y $cordy; } else { $yfelder $cordy $y; }
    if (
$xfelder $yfelder) { $schief $yfelder; } else { $schief $xfelder; }
    if (
$xfelder $yfelder) { $gerade $xfelder $yfelder; } else { $gerade $yfelder $xfelder; }
    
$time1 $gerade $pro_feld;
    
$time2 $schief * (1.4142 $pro_feld);
    
$komplett $time1 $time2;
    
$komplett = ($komplett $config->get('speed')) / $config->get('movement_speed');

    RETURN 
round($komplett);

Der ganze Abteil ist viel zu umständlich ^^

PHP Code:
function unit_running($x1$y1$x2$y2)
{
    return 
ceil(sqrt(pow($x1 $x22) + pow($y1 $y22)));

Fehlt halt noch das mit der Zeit, aber das wär auch nur eine Zeile

MfG Manuel
Reply
#26
Whoaaa!

Thats a lot. From Localhost.

[Click]
Reply
#27
Ok, the "$db" array seems to be missing, as far as I can see... what TWLan version are you using?
Reply
#28
I use the latest one 1.4

I don't use All in One currently, cause I wanted to customize it by myself (install bots, admin tools etc.)
Reply
#29
Du Dieb Big Grin
✝ RiP 
Weiter geht's  Cool
Reply
#30
Hihihi, der kleine Manuel Big Grin

so far
Yannici
Manchmal denke ich:
Reply
#31
Yanigi Big Grin

MfG Manuel
Reply
#32
also, bei der 1.3 scheint das script nicht wirklich zu laufen Smile
Schildkröte: "nichts ist langsamer als ich!"
Schnecke: "ich bin ganz sicher langsamer!"
Und dann kam der Internet Explorer...
Reply




Users browsing this thread: 2 Guest(s)