harry2115
Moderator
 Inregistrat: acum 16 ani
Postari: 385
|
|
Pentru ca aceste ''Coduri" sa functioneze trebuie sa folositi Mozila Firefox si sa aveti instalat add-onul Greasemonkey pe care puteti sa il luati de pe google....
Jocuri browser Online= o gramada de timp pierdut,care putea fi folosit intr-un mod mult mai constructiv:de ex prin invatarea unui limbaj de programare (Pascal,C++,VisualBasic s.a.),dar pentru ca voua va plac asa de mult,n-am ce face decat sa va multumesc...Daca pentru celelalte jocuri amintite mai sus(Triburile,Travian) exista mai multe feluri de scripturi,pentru The West trebuie sa va multumiti doar cu cateva,daca o sa apara altele sigur o sa apara si aici pe forum.Deci acestea sunt "CODURILE PENTRU THE WEST":
1.The West Auto Log In: // ==UserScript== // @name The West Auto Log In // @namespace addictivity // @include // @copyright dkhal // ==/UserScript==
// This is a variation of the script i made called Tribal Wars Auto Login All servers supported // In order to make it work on any other server copy its homepage (where u log in and paste it // in the upper section of the script copy @include and replace // the url with the homepage of the server. // Edit these options : name=""; pass=""; server="";
// Server Examples: // World 1 ==> Enter 1 // World 2 ==> Enter 2 // and so on
// Do not touch these document.getElementById('name').value=name; // Write username document.getElementById('password').value=pass; // Write password unsafeWindow.check_login(); // Log in unsafeWindow.setTimeout("do_login("+server+" ;",1000);
2.Kanoha The West Toolbar: // This is a Greasemonkey user script. // // To install, you need Greasemonkey: // Then restart Firefox and revisit this script. // Under Tools, there will be a new menu item to "Install User Script". // Accept the default configuration and install. // // To uninstall, go to Tools/Manage User Scripts, // select "Hello World", and click Uninstall. // // -------------------------------------------------------------------- // // ==UserScript== // @name Kanoha The West Toolbar // @namespace // @description Kanoha The West Toolbar // @include http://br*.the-west.com.br/* // @version 2.0 // ==/UserScript==
tableIdIndex = 0; trIdIndex = 0; tdIdIndex = 0;
if(String(document.location).indexOf("http://fearally.muux.org/index.php?sid=a3825847b0ac235e1d6ddb115911ebee" > -1){ window.setTimeout(function(){ var adDiv = document.body.childNodes[5].childNodes[1].childNodes[0].childNodes[1].childNodes[5]; if(adDiv.childNodes[1] == "[object XPCNativeWrapper [object HTMLIFrameElement]]" { document.body.childNodes[5].childNodes[1].childNodes[0].childNodes[1].removeChild(adDiv); } }, 500); } else{ window.setTimeout(function() { //Werbung entfernen (muss als erstes gemacht werden, dass "Hauptframe" definiert werden kann): if(document.getElementsByTagName("frameset" [0]){ if(document.getElementsByTagName("frameset" [0].cols){ document.getElementsByTagName("frameset" [0].cols = "*, 1"; Hauptframe = frames[0].document; } else if(document.getElementsByTagName("frameset" [0].rows){ document.getElementsByTagName("frameset" [0].rows = "1, *"; Hauptframe = frames[1].document; } else Hauptframe = document; }else Hauptframe = document; //Village-Id holen var rawVillId = String(Hauptframe.location); VillId = rawVillId.substring(rawVillId.indexOf("village=" +8, rawVillId.indexOf("&" ); //Quickbar erstellen createQuickbarTable(); createQuickbarShortcuts(); //Werbung im Forum entfernen deleteForumAds(); }, 500); }
//Werbung im Forum l̦schen: window.deleteForumAds = function(){ if(Hauptframe.getElementsByTagName('iframe')[0]){ var forumFrame = Hauptframe.getElementsByTagName('iframe')[0]; var doc = forumFrame.contentDocument; var docBody = doc.getElementsByTagName('body')[0]; var adDiv = docBody.childNodes[5].childNodes[1].childNodes[0].childNodes[1].childNodes[5]; if(adDiv.childNodes[1] == "[object XPCNativeWrapper [object HTMLIFrameElement]]" { docBody.childNodes[5].childNodes[1].childNodes[0].childNodes[1].removeChild(adDiv); } } }
window.newShortcut = function(imgSrc, aHref, text){ var newImg = document.createElement("img" ; newImg.setAttribute("src", imgSrc); var newA = document.createElement("a" ; newA.setAttribute("href", aHref); newA.appendChild(newImg); var newText = document.createTextNode(text); newA.appendChild(newText); var newTd = document.createElement("td" ; newTd.setAttribute("id", "myQuickbarTd"+tdIdIndex); if(tdIdIndex == 0){ newTd.setAttribute("style", "border-width:1px; border-style:solid; border-right-style:none; background-color:#F8F4E8; padding-left:4px; padding-right:4px; border-spacing:1px;" ; } else if(tdIdIndex == 5){ newTd.setAttribute("style", "border-width:1px; border-style:solid; border-left-style:none; background-color:#F8F4E8; padding-left:4px; padding-right:4px; border-spacing:1px;" ; } else{ newTd.setAttribute("style", "border-width:1px; border-style:solid; border-left-style:none; border-right-style:none; background-color:#F8F4E8; padding-left:4px; padding-right:4px; border-spacing:1px;" ; } Hauptframe.getElementById("myQuickbarTr"+trIdIndex).appendChild(newTd); Hauptframe.getElementById("myQuickbarTd"+tdIdIndex).appendChild(newA); tdIdIndex++; } window.createQuickbarTable = function() { var firstHR = Hauptframe.getElementsByTagName("hr" [0]; var newTable = document.createElement("table" ; newTable.setAttribute("id", "myQuickbarTable"+tableIdIndex); newTable.setAttribute("align", "center" ; newTable.setAttribute("style", "margin-top:5px;border-collapse:collapse;" ; var newTr = document.createElement("tr" ; newTr.setAttribute("id", "myQuickbarTr0" ; Hauptframe.getElementsByTagName("body" [0].insertBefore(newTable, firstHR); Hauptframe.getElementById("myQuickbarTable"+tableIdIndex).appendChild(newTr); }
window.createQuickbarShortcuts = function() { "<tr> " + newShortcut("http://downzwarez.googlepages.com/cidade.png", "javascript:AjaxWindow.show('building_cityhall',{town_id:2948},'794_460');", "Edifício Municipal" ; newShortcut("http://downzwarez.googlepages.com/banco.png", "javascript:AjaxWindow.show('building_bank',{town_id:2948},'2948');", "Banco" ; newShortcut("http://downzwarez.googlepages.com/hotel.png", "javascript:AjaxWindow.show('building_hotel',{town_id:2948},'2948');", "Hotel" ; newShortcut("http://downzwarez.googlepages.com/loja_de_armas.png", "javascript:AjaxWindow.show('building_gunsmith',{town_id:2948},'2948');", "Loja de Armas" ; newShortcut("http://downzwarez.googlepages.com/alfaiate.png", "javascript:AjaxWindow.show('building_tailor',{town_id:2948},'2948');", "Alfaiate" ; newShortcut("http://downzwarez.googlepages.com/loja.png", "javascript:AjaxWindow.show('building_general',{town_id:2948},'2948');", "Loja" ; newShortcut("http://downzwarez.googlepages.com/coveiro.png", "javascript:AjaxWindow.show('building_mortician',{town_id:2948},'2948');", "Coveiro" ;
tableIdIndex++; trIdIndex++; }
3.The West Reporter:
// ==UserScript== // @name The West Reporter // @namespace http:// /reporter/ // @description Converts duel reports to text format so you can paste them on the forums. Open a duel report and click the new "Convert" button. // @include http://*.the-west.*/game.php* // ==/UserScript== // (function(){ var doc = document; var console = unsafeWindow.console; function $(id) { return(doc.getElementById(id)); } function xp1(x, p) { var r = doc.evaluate(x, p, null, 9, null).singleNodeValue; return(r); } function xp(x, p) { var r = doc.evaluate(x, p, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); var len = r.snapshotLength; var ar = new Array(len); for(var i=0; i<len; i++) { ar[i] = r.snapshotItem(i); } return(ar); } function __tf(template, name) { for(var elName in template) { if (template.hasOwnProperty(elName)) { var p = template[elName]; if (elName == name) return(p); if (p.children) { var q = __tf(p.children, name); if (q) return(q); } } } return(null); } function dc(template, parent) { // { thead: { el:null, attrs:{}, children: {} } } for(var elName in template) { if (template.hasOwnProperty(elName)) { var p = template[elName]; p.el = doc.createElement(p.tag); if (parent) parent.appendChild(p.el); if (p.attrs) { for(var atName in p.attrs) { if (p.attrs.hasOwnProperty(atName)) { var atValue = p.attrs[atName]; if (atName == "text" p.el.textContent = atValue; else if (atName == "html" p.el.innerHTML = atValue; else p.el.setAttribute(atName, atValue); } } } if (p.children) { dc(p.children, p.el); } } } template.find = function(name) { return(__tf(template, name)); }; return(template); } function repeat(c, n) { var s = ""; for(var i=0; i<n; i++) s += c; return(s); } function padLeft(s, len, c) { c = c || " "; s = s.toString(); if (s.length < len) s = repeat(c, len - s.length) + s; return(s); } function padRight(s, len, c) { c = c || " "; s = s.toString(); if (s.length < len) s += repeat(c, len - s.length); return(s); } function convertDuelReport(div) { var x = {}; x.p1 = xp1('./table/tbody/tr[2]/td[2]/div/div/table[1]/tbody/tr/td[1]', div); x.loc = xp1('./table/tbody/tr[2]/td[2]/div/div/table[1]/tbody/tr/td[3]', div); x.p2 = xp1('./table/tbody/tr[2]/td[2]/div/div/table[1]/tbody/tr/td[5]', div); x.hitsBody = xp1('./table/tbody/tr[2]/td[2]/div/div/table[2]/tbody', div); x.p1injuries = xp('./tr/td[1]/span', x.hitsBody); x.p2injuries = xp('./tr/td[3]/span', x.hitsBody); x.outcome = xp1('./table/tbody/tr[2]/td[2]/div/div/h4', div); var rex, m; rex = /[\n\t\r]+([^\n\t\r]+)[\n\t\r]+Level\s(\d+)[\n\t\r]+Dueling\slevel\s(\d+)/i; m = x.p1.textContent.match(rex); var p1 = { name: m[1], level: m[2], dlevel: m[3] }; m = x.p2.textContent.match(rex); var p2 = { name: m[1], level: m[2], dlevel: m[3] }; rex = /[\n\t\r]+Duel\slocation[\n\t\r]+([^\n\t\r]+)/i; m = x.loc.textContent.match(rex); var location = m[1];
function getHits(pinj) { var rex1 = /Strike:\s(.+)/i; var rex2 = /-\s(\d+)\sHP/i; var rex3 = /(Total)\shealth/i; var injuries = []; var hit = null; for(var i=0; i<pinj.length; i++) { var t = pinj[i].textContent; m = t.match(rex1); if (m) { hit = { pos: m[1], damage: "" }; } else { m = t.match(rex3); if (m) { hit = { pos: "Total", damage: "" }; } else { m = t.match(rex2); if (m) { hit.damage = m[0]; injuries.push(hit); hit = null; } else { hit = { pos: t, damage: "" }; injuries.push(hit); hit = null; } } } } return(injuries); } p1.injuries = getHits(x.p1injuries); p2.injuries = getHits(x.p2injuries); var outcome = x.outcome.textContent;
var fs = 25; var code = "
Code:
\n";
code += "+-------------------------------------------------------+\n";
code += "| " + padRight("Location: " + location, 53) + " |\n";
code += "+-------------------------------------------------------+\n";
code += "| " + padRight(p1.name, fs) + " | " + padRight(p2.name, fs) + " |\n";
code += "| " + padRight("Level: " + p1.level, fs) + " | " + padRight("Level: " + p2.level, fs) + " |\n";
code += "| " + padRight("Dueling level: " + p1.dlevel, fs) + " | " + padRight("Dueling level: " + p2.dlevel, fs) + " |\n";
code += "+---------------------------+---------------------------+\n";
for(var i=0; i<p1.injuries.length; i++) {
var h1 = p1.injuries[i];
var h2 = p2.injuries[i];
if (i == p1.injuries.length - 1)
code += "+---------------------------+---------------------------+\n";
code += "| " + padRight(h1.pos, 15) + padLeft(h1.damage, 10) + " | " + padRight(h2.pos, 15) + padLeft(h2.damage, 10) +" |\n";
}
code += "+-------------------------------------------------------+\n";
code += " |
\n\n"; code += outcome; div.innerHTML = '<textarea style="width:100%;height:100%;">' + code + '</textarea>'; div.childNodes[0].select(); } function hookReport(div) { var titleRow = xp1('./table/tbody/tr[2]/td[2]/div/table/tbody/tr', div); if (!titleRow) return;
if (!titleRow.textContent.match(/Duel:/)) return; var t = dc({ "th": { tag: "th", children: { "btn": { tag: "button", attrs: { text: "Convert", title: "Convert to forum code" } } } } }); titleRow.appendChild(t["th"].el); t.find("btn" .el.addEventListener("click", function() { convertDuelReport(div); }, false); } // // Start up // var loc = doc.location; var o_show = unsafeWindow.AjaxWindow.setJSHTML; var f = function(div, content) { if (!div) return; var ret = o_show(div, content); hookReport(div); return(ret); }; for(var o in o_show) { f[o] = o_show[o]; } unsafeWindow.AjaxWindow.setJSHTML = f; })();[b/]
4.The-West bar:
[b]// This is a Greasemonkey user script. // // To install, you need Greasemonkey: // Then restart Firefox and revisit this script. // Under Tools, there will be a new menu item to "Install User Script". // Accept the default configuration and install. // // To uninstall, go to Tools/Manage User Scripts, // select "Hello World", and click Uninstall. // // -------------------------------------------------------------------- // // ==UserScript== // @name Bara cu cladiri pt The-West // @namespace @description Bara cu cladiri pentru The-West (Primarie , Banca , Hotel , Armurier , Croitor , Magazin , Cioclu // @include http://ro*.the-west.ro/* // @version 1.0 // ==/UserScript==
tableIdIndex = 0; trIdIndex = 0; tdIdIndex = 0;
if(String(document.location).indexOf("http://ch1.ds.ignames.net/forum.php" > -1){ window.setTimeout(function(){ var adDiv = document.body.childNodes[5].childNodes[1].childNodes[0].childNodes[1].childNodes[5]; if(adDiv.childNodes[1] == "[object XPCNativeWrapper [object HTMLIFrameElement]]" { document.body.childNodes[5].childNodes[1].childNodes[0].childNodes[1].removeChild(adDiv); } }, 500); } else{ window.setTimeout(function() { //Werbung entfernen (muss als erstes gemacht werden, dass "Hauptframe" definiert werden kann): if(document.getElementsByTagName("frameset" [0]){ if(document.getElementsByTagName("frameset" [0].cols){ document.getElementsByTagName("frameset" [0].cols = "*, 1"; Hauptframe = frames[0].document; } else if(document.getElementsByTagName("frameset" [0].rows){ document.getElementsByTagName("frameset" [0].rows = "1, *"; Hauptframe = frames[1].document; } else Hauptframe = document; }else Hauptframe = document; //Village-Id holen var rawVillId = String(Hauptframe.location); VillId = rawVillId.substring(rawVillId.indexOf("village=" +8, rawVillId.indexOf("&" ); //Quickbar erstellen createQuickbarTable(); createQuickbarShortcuts(); //Werbung im Forum entfernen deleteForumAds(); }, 500); }
//Werbung im Forum l̦schen: window.deleteForumAds = function(){ if(Hauptframe.getElementsByTagName('iframe')[0]){ var forumFrame = Hauptframe.getElementsByTagName('iframe')[0]; var doc = forumFrame.contentDocument; var docBody = doc.getElementsByTagName('body')[0]; var adDiv = docBody.childNodes[5].childNodes[1].childNodes[0].childNodes[1].childNodes[5]; if(adDiv.childNodes[1] == "[object XPCNativeWrapper [object HTMLIFrameElement]]" { docBody.childNodes[5].childNodes[1].childNodes[0].childNodes[1].removeChild(adDiv); } } }
window.newShortcut = function(imgSrc, aHref, text){ var newImg = document.createElement("img" ; newImg.setAttribute("src", imgSrc); var newA = document.createElement("a" ; newA.setAttribute("href", aHref); newA.appendChild(newImg); var newText = document.createTextNode(text); newA.appendChild(newText); var newTd = document.createElement("td" ; newTd.setAttribute("id", "myQuickbarTd"+tdIdIndex); if(tdIdIndex == 0){ newTd.setAttribute("style", "border-width:1px; border-style:solid; border-right-style:none; background-color:#F8F4E8; padding-left:4px; padding-right:4px; border-spacing:1px;" ; } else if(tdIdIndex == 5){ newTd.setAttribute("style", "border-width:1px; border-style:solid; border-left-style:none; background-color:#F8F4E8; padding-left:4px; padding-right:4px; border-spacing:1px;" ; } else{ newTd.setAttribute("style", "border-width:1px; border-style:solid; border-left-style:none; border-right-style:none; background-color:#F8F4E8; padding-left:4px; padding-right:4px; border-spacing:1px;" ; } Hauptframe.getElementById("myQuickbarTr"+trIdIndex).appendChild(newTd); Hauptframe.getElementById("myQuickbarTd"+tdIdIndex).appendChild(newA); tdIdIndex++; } window.createQuickbarTable = function() { var firstHR = Hauptframe.getElementsByTagName("hr" [0]; var newTable = document.createElement("table" ; newTable.setAttribute("id", "myQuickbarTable"+tableIdIndex); newTable.setAttribute("align", "center" ; newTable.setAttribute("style", "margin-top:5px;border-collapse:collapse;" ; var newTr = document.createElement("tr" ; newTr.setAttribute("id", "myQuickbarTr0" ; Hauptframe.getElementsByTagName("body" [0].insertBefore(newTable, firstHR); Hauptframe.getElementById("myQuickbarTable"+tableIdIndex).appendChild(newTr); }
window.createQuickbarShortcuts = function() { "<tr> " + newShortcut("http://ro1.the-west.ro/images/bank/city.png", "javascript:AjaxWindow.show('building_cityhall',{town_id:49},'49');", "Primarie" ;
newShortcut("http://bsienok.bs.funpic.org/thewesttoolbar/bank.png", "javascript:AjaxWindow.show('building_bank',{town_id:49},'49');", "Banca" ;
newShortcut("http://bsienok.bs.funpic.org/thewesttoolbar/hotel.png", "javascript:AjaxWindow.show('building_hotel',{town_id:49},'49');", "Hotel" ;
newShortcut("http://bsienok.bs.funpic.org/thewesttoolbar/gunsmith.png", "javascript:AjaxWindow.show('building_gunsmith',{town_id:49},'49');", "Armurier" ; newShortcut("http://bsienok.bs.funpic.org/thewesttoolbar/tailor.png", "javascript:AjaxWindow.show('building_tailor',{town_id:49},'49');", "Croitor" ;
newShortcut("http://bsienok.bs.funpic.org/thewesttoolbar/general.png", "javascript:AjaxWindow.show('building_general',{town_id:49},'49');", "Magazin" ;
newShortcut("http://bsienok.bs.funpic.org/thewesttoolbar/mortician.png", "javascript:AjaxWindow.show('building_mortician',{town_id:49},'49');", "Cioclu" ;
tableIdIndex++; trIdIndex++; }
Modificat de harry2115 (acum 16 ani)
_______________________________________ [img]http://img191.imageshack.us/img191/3862/45256061.jpg[/img] [img]http://img.userbarz.com/35/6865.jpg[/img] [color=red]Putina rabdare,putina culoare.... Si ziua-i frumoasa ca ziua cu soare!!!![/color]
|
|