Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 20:05

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



A problem with my TribalWars2 script

Discussion on A problem with my TribalWars2 script within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2011
Posts: 20
Received Thanks: 1
A problem with my TribalWars2 script

So I got this from somebody who gave it to our guild months ago,but it doesn't works properly anymore.

Code:
//timber_camp, headquarter, barracks, tavern, hospital, wall, statue (I don't know all of the ids)

window.build = ["warehouse", "farm","barracks"];
window.index = 0;

window.socketService = window.injector.get('socketService');
window.modelDataService = window.injector.get('modelDataService');
window.villageService = window.injector.get('villageService');
window.tribeService = window.injector.get('tribeService');

window.tradeListModelProvider = window.injector.get('tradeListModelProvider');
window.eventTypeProvider = window.injector.get('eventTypeProvider');
window.questLineListModelProvider = window.injector.get('questLineListModelProvider');
window.questLineModelProvider = window.injector.get('questLineModelProvider');
window.routeProvider = window.injector.get('routeProvider');

socketService.emit(routeProvider.GET_CHARACTER_VILLAGES, {}, function(villages){
    window.village_id = villages.villages[0].id;
    console.log(village_id);
});

setInterval(function() {
	socketService.emit(routeProvider.VILLAGE_UPGRADE_BUILDING, {building: build[index], village_id: village_id, location: "menu", premium: false}, function(data) {
		if(!data.error_code) {
			index++;
		}
	});
}, 20000);
The problem is when I put in the script the game gives a building queue is full error and then the script just goes to the next building in the index, causing after a minute to throw the invalid key for 'building': " (this means it has reached the end of the index, probably also should find a fix for that.) I'm not that good anymore with this like I was 1-2 years ago, I could write an else if and pickup that error and just make sure it doesn't goes to the next one, never really got into javascript. Thanks for the help already.
el_bengast is offline  
Reply

Tags
help ; problem ; error, javascript, tribal wars 2


Similar Threads Similar Threads
HP Script Problem
09/24/2011 - Metin2 Private Server - 2 Replies
Also hab nochn älteres Hp Script.. Und wollte mal fragen, was ich umstellen muss, damit das Kästchen nicht leer bleibt? http://h3.abload.de/img/catsueke.jpg Darunter ist dann noch ein 2. Wo was drin steht, wenn ich aber z.b das 1 Oben löschen will, lässt es sich nicht wirklich löschen, weil die Ränder immer da bleiben ect, oder der Platz bleibt frei blabla.. Was genau muss ich in der Index ändern das da ein Bild drin ist oder sonst was?
Script Problem :S
09/10/2011 - Rappelz Private Server - 3 Replies
Script Error:http://c1109.hizliresim.com/11/9/10/5277.png Script: function get_module_name() return "on_player_dead" end function on_player_dead( name, lost_exp, drop_item_name )
HP Script Problem help pls
04/22/2011 - Metin2 - 1 Replies
<?php $dbhost = "root"; $dbuser = "localhost"; $dbpass = "123456"; $mysql_db = "GreenHorneTz²"; ?> ich weis nciht ob das richtig ist aber hp geht nicht da steht >> Warning: mysql_connect() : php_network_getaddresses: getaddrinfo failed: Der angegebene Host ist unbekannt. in D:\xampp\htdocs\index.php on line 15
Problem VB 10 Patcher Script Problem
09/20/2010 - .NET Languages - 8 Replies
Hayho liebe Com. ich habe mal wieder einen ganz netten Patcher gescriptet, für einen metin2 P Server, da es nicht mein erster is, hab ich echt kp was da vorliegt, Hier der Script an sich: Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEv entArgs) Handles...
[HOW-TO]Hp-Script+Admin-script (weekly-updatet) problem!
06/21/2010 - Metin2 Private Server - 11 Replies
hallo leute ich hab ein problem und zwar bei dem hp script von masterboss kommt der fehler : http://img541.imageshack.us/img541/8140/24955249. png und wenn ich dann die datei öffne und in die zeile gehe kommt: while($row = mysql_fetch_array($ergebnis)) kann mir jmd helfen?



All times are GMT +1. The time now is 20:06.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.