[v1.3] Attack time calculator - Printable Version +- TWLan Forum (https://twlan.org) +-- Forum: Legacy (https://twlan.org/forumdisplay.php?fid=61) +--- Forum: TWLan 1.x (DSLan) (https://twlan.org/forumdisplay.php?fid=62) +---- Forum: Deutsche Community (https://twlan.org/forumdisplay.php?fid=65) +----- Forum: Fragen & Probleme (https://twlan.org/forumdisplay.php?fid=7) +----- Thread: [v1.3] Attack time calculator (/showthread.php?tid=4337) |
Attack time calculator - kala - 11.05.2011 Hello TWlan community. I am trying to make the map tool with the pop-up that is showing the travel time but I have a big problem. I cannot figure out how do dslan calculate the travel time. $time = ($unit_speed * $distance)/($server_speed*$troops_speed); This should be correct but is not. Can someone give the the correct formula for this? Thanks in advance. Regards, KaLa RE: Attack time calculator - SlimShady95 - 11.05.2011 Try this one: $distance = hypot($x1 - $x2, $y1 - $y2); $time = ($distance * $unit_speed)/$server_speed; Haven´t tried it MfG Manuel RE: Attack time calculator - kala - 13.05.2011 what about server troops speed ($config[u_speed])? RE: Attack time calculator - SlimShady95 - 13.05.2011 Code: $distance = hypot($x1 - $x2, $y1 - $y2); MfG Manuel RE: Attack time calculator - kala - 13.05.2011 PHP Code: <?php 527|527 attack 525|524 My time: 02:42 Server time: 02:52 527|527 attack 525|523 My time: 03:21 Server time: 03:37 RE: Attack time calculator - SlimShady95 - 13.05.2011 Hmm. Then I don´t know. I will try it for you. But later. If you want, you can add me on skype: manuel.mannhardt MfG Manuel |