ADD Finish all troop trainings immediately.?

Results 1 to 5 of 5
  1. #1
    Apprentice sppedtrav is offline
    MemberRank
    Jun 2013 Join Date
    БухаресLocation
    16Posts

    ! ADD Finish all troop trainings immediately.?

    How can I add this option Finish script Immediately all troop trainings. Immediately Gold 15 too little gold


  2. #2
    Member BenderKing is offline
    MemberRank
    Nov 2013 Join Date
    Martin,SlovakiaLocation
    53Posts

    Re: ADD Finish all troop trainings immediately.?

    Hi,I have server where training time was 00:00 but training time was still 1 second but I can give you script that complete troops training.It costs 50 gold but you can change it.Hope it helps.Working on Travianz and Travianx.
    PHP Code:
    <?phpinclude("GameEngine/Village.php");$start $generator->pageLoadTimeStart();if(isset($_GET['newdid'])) {    $_SESSION['wid'] = $_GET['newdid'];    header("Location: ".$_SERVER['PHP_SELF']);}else {    $building->procBuild($_GET);}
    ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><title><?php echo SERVER_NAME ?></title><link REL="shortcut icon" HREF="favicon.ico"/><meta http-equiv="cache-control" content="max-age=0" /><meta http-equiv="pragma" content="no-cache" /><meta http-equiv="expires" content="0" /><meta http-equiv="imagetoolbar" content="no" /><meta http-equiv="content-type" content="text/html; charset=UTF-8" /><script src="mt-full.js?0faaa" type="text/javascript"></script><script src="unx.js?0faaa" type="text/javascript"></script><script src="new.js?0faaa" type="text/javascript"></script><link href="<?php echo GP_LOCATE?>lang/en/lang.css?f4b7c" rel="stylesheet" type="text/css" /><link href="<?php echo GP_LOCATE?>lang/en/compact.css?f4b7c" rel="stylesheet" type="text/css" /><?phpif($session->gpack == null || GP_ENABLE == false) {echo "<link href='".GP_LOCATE."travian.css?e21d2' rel='stylesheet' type='text/css' /><link href='".GP_LOCATE."lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";} else {echo "<link href='".$session->gpack."travian.css?e21d2' rel='stylesheet' type='text/css' /><link href='".$session->gpack."lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";}?><script type="text/javascript">window.addEvent('domready', start);</script></head><body class="v35 ie ie8"><div class="wrapper"><img style="filter: chroma();" src="img/x.gif" id="msfilter" alt=""><div id="dynamic_header"></div><?php include("Templates/header.tpl"); ?><div id="mid"><?php include("Templates/menu.tpl"); ?><div id="content"  class="village2"><br /><br /><br /><p>Complete Queued Troops in This Village <img class="unit u3" src="img/x.gif"/><img class="unit u11" src="img/x.gif"/><img class="unit u18" src="img/x.gif"/><img class="unit u24" src="img/x.gif"/></p><p><?php echo '<a href="plus.php?id=3"><img src="gold.gif" alt="Remaining gold" title="You currently have: '.$session->gold.' gold"/></a> You have: '.$session->gold.' Gold'?></p><form action="<?php echo $_SERVER['PHP_SELF']?>" method="post"> <table border="0"><tr><td>Username UID:</td><td><input type="text" name="username" maxlength="60" disabled="disabled" value="<?php echo $session->uid?>"></td></tr><tr><td>Village ID (Current Village):</td><td><input type="text" name="village" maxlength="60" disabled="disabled" value="<?php echo $village->wid?>"></td></tr><tr><td colspan="2" align="right"> <input type="submit" name="submit" value="Complete Troop Queues In This Village"> </td></tr> </table> </form> <?phperror_reporting (E_ALL E_NOTICE);include ("extra_mysql.php");if (isset($_POST['submit'])) { // if form has been submitted// checks it against the database$check = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id  = '".$session->uid."'")or die(mysql_error());//Gives error if user dosen't exist$check2 = mysql_num_rows($check);if ($check2 == 0) {die('Username id or Village id is wrong. <a href=dorf1.php>Click Here to go back to your village</a>');}//Gives error if user dosen't exist$check2 = mysql_num_rows($check);if ($check2 == 0) {die('Username uid or Village id is wrong. <a href=dorf1.php>Click Here to go back to your village</a>');}                    $sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id  = '".$session->uid."'")or die(mysql_error());while($row = mysql_fetch_array($sql)){};$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id  = '".$session->uid."'")or die(mysql_error());while($row = mysql_fetch_array($sql)){$gold = $row["gold"];};if ($gold < 50 ) {die('Sorry you dont have enough gold');}else {if($session->access != BANNED){$unit=mysql_query("SELECT `unit`,`amt` from `".TB_PREFIX."training` where `vref`='".$_SESSION['wid']."'   ");while ($unit_w=mysql_fetch_array($unit)){mysql_query("UPDATE  `".TB_PREFIX."units` SET `u".$unit_w['unit']."`=`u".$unit_w['unit']."`+'".$unit_w['amt']."'  where `vref`='".$_SESSION['wid']."'  ");} mysql_query("DELETE from ".TB_PREFIX."training where `vref`='".$_SESSION['wid']."'   "); mysql_query("UPDATE ".TB_PREFIX."users set gold = ".($session->gold-50)." where `id`='".$session->uid."'") or die(mysql_error()); header("Location: dorf1.php"); echo "<h2>All Queued Troops In This Village Completed at the Cost of 50 Gold.</h2>";}else{ header("Location: banned.php"); echo "<h2> Eroor , maybe you have not a gold ... </h2>";}}}?><br></div><div id="side_info"><?phpinclude("Templates/quest.tpl");include("Templates/multivillage.tpl");include("Templates/links.tpl");include("Templates/news.tpl");?></div><div class="clear"></div></div><div class="footer-stopper"></div><div class="clear"></div><?phpinclude("Templates/res.tpl");include("Templates/footer.tpl"); ?><div id="stime"><div id="ltime"><div id="ltimeWrap">Calculated in <b><?phpecho round(($generator->pageLoadTimeEnd()-$start)*1000);?></b> ms<br />Server time: <span id="tp1" class="b"><?php echo date('H:i:s'); ?></span></div></div></div><div id="ce"></html>

  3. #3
    Novice DarkPanda is offline
    MemberRank
    Mar 2014 Join Date
    1Posts

    Re: ADD Finish all troop trainings immediately.?

    This script where want to put?

  4. #4
    Member BenderKing is offline
    MemberRank
    Nov 2013 Join Date
    Martin,SlovakiaLocation
    53Posts

    Re: ADD Finish all troop trainings immediately.?


  5. #5
    Valued Member sake96 is offline
    MemberRank
    Jul 2012 Join Date
    101Posts

    Re: ADD Finish all troop trainings immediately.?

    1.http://forum.ragezone.com/f583/travi...atures-973196/ ---- go here
    2.download plusfeatures.zip
    3.extract it to desktop
    4.drag or copy buytroops.php to root folder of your ftp server
    5.then just replace 3.tpl in that folder that you've downloaded with 3.tpl you had in your ftp server --here-> (/Templates/Plus)
    6.that's it !!!
    7.if you want to customize your plus feature then just go to 'buytroops.php' and change value 50 Gold with value you want !! and also you must change it here /Templates/Plus/3.tpl :)
    Hit Like if I helped you :)



Advertisement