Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("\x0314" + scriptName() + " script por dane ha sido cargado correctamente");
- function onCommand(userobj, command, target, args)
- {
- if(command.indexOf("nombre") == 0 && userobj.level > 1)
- {
- if(command.substr(7) != "")
- {
- var name = command.substr(7).toLowerCase();
- if(isNaN(name))
- {
- var sig = new HttpRequest();
- sig.utf = true;
- sig.src = "http://www.misabueso.com/nombres/nombre_" + encodeURIComponent(name) + ".html";
- sig.oncomplete = function()
- {
- var result = this.page;
- result = result.split("/>-->")[1].split(".</p> ")[0];
- if(result.length > 10)
- {
- print("\x0310origen "+name.toUpperCase());
- }
- result = clean_result(result);
- print("\x0314"+result);
- }
- sig.download();
- }
- }
- }
- if(command.indexOf("personalidad") == 0 && userobj.level > 1)
- {
- if(command.substr(13) != "")
- {
- var name = command.substr(13).toLowerCase();
- if(isNaN(name))
- {
- var per = new HttpRequest();
- per.utf = true;
- per.src = "http://www.misabueso.com/nombres/nombre_" + encodeURIComponent(name) + ".html";
- per.oncomplete = function()
- {
- var result = this.page;
- result = result.split("Personalidad de")[1].split(".</p> ")[0];
- if(result.length > 10)
- {
- print("\x0310personalidad de "+name.toUpperCase());
- }
- result = clean_result(result);
- print("\x0314"+result);
- }
- per.download();
- }
- }
- }
- if(command.indexOf("talento ") == 0 && userobj.level > 1)
- {
- if(command.substr(8) != "")
- {
- var name = command.substr(8).toLowerCase();
- if(isNaN(name))
- {
- var per = new HttpRequest();
- per.utf = true;
- per.src = "http://www.misabueso.com/nombres/nombre_" + encodeURIComponent(name) + ".html";
- per.oncomplete = function()
- {
- var result = this.page;
- result = result.split("<h4>Talento Natural:</h4>")[1].split("</strong>")[0];
- if(result.length > 10)
- {
- print("\x0310talento de "+name.toUpperCase());
- }
- result = clean_result(result);
- print("\x0314"+result);
- }
- per.download();
- }
- }
- }
- if(command.indexOf("emotividad ") == 0 && userobj.level > 1)
- {
- if(command.substr(11) != "")
- {
- var name = command.substr(11).toLowerCase();
- if(isNaN(name))
- {
- var per = new HttpRequest();
- per.utf = true;
- per.src = "http://www.misabueso.com/nombres/nombre_" + encodeURIComponent(name) + ".html";
- per.oncomplete = function()
- {
- var result = this.page;
- result = result.split("<h4>Naturaleza Emotiva:</h4>")[1].split(".</p><h4>")[0];
- if(result.length > 10)
- {
- print("\x0310emotividad de "+name.toUpperCase());
- }
- result = clean_result(result);
- print("\x0314"+result);
- }
- per.download();
- }
- }
- }
- if(command.indexOf("expresividad ") == 0 && userobj.level > 1)
- {
- if(command.substr(13) != "")
- {
- var name = command.substr(13).toLowerCase();
- if(isNaN(name))
- {
- var per = new HttpRequest();
- per.utf = true;
- per.src = "http://www.misabueso.com/nombres/nombre_" + encodeURIComponent(name) + ".html";
- per.oncomplete = function()
- {
- var result = this.page;
- result = result.split("<h4>Naturaleza Expresiva:</h4>")[1].split("</p><h4>")[0];
- if(result.length > 10)
- {
- print("\x0310expresividad de "+name.toUpperCase());
- }
- result = clean_result(result);
- print("\x0314"+result);
- }
- per.download();
- }
- }
- }
- if(command.indexOf("variacion ") == 0 && userobj.level > 1)
- {
- if(command.substr(10) != "")
- {
- var name = command.substr(10).toLowerCase();
- if(isNaN(name))
- {
- var per = new HttpRequest();
- per.utf = true;
- per.src = "http://www.misabueso.com/nombres/nombre_" + encodeURIComponent(name) + ".html";
- per.oncomplete = function()
- {
- var result = this.page;
- result = result.split("en otros idiomas</h3>")[1].split('<br class="clear" />')[0];
- if(result.length > 10)
- {
- print("\x0310variaciones de "+name.toUpperCase());
- }
- result = clean_result(result);
- print("\x0314"+result);
- }
- per.download();
- }
- }
- }
- }
- function clean_result(text)
- {
- text = text.replace(/<[^>]*>?/gm, ' ');
- text = text.toString().replace(/,/gi, "\r\n");
- return text;
- }
- function onHelp(userobj)
- {
- if(userobj.level > 1)
- {
- print(userobj, "/nombre <nombre>");
- print(userobj, "/personalidad <nombre>");
- print(userobj, "/talento <nombre>");
- print(userobj, "/emotividad <nombre>");
- print(userobj, "/expresividad <nombre>");
- print(userobj, "/variacion <nombre>");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement