Advertisement
dahnnyel1

Untitled

Jun 25th, 2020
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.33 KB | None | 0 0
  1. print("\x0314" + scriptName() + " script por dane ha sido cargado correctamente");
  2.  
  3.  
  4. function onCommand(userobj, command, target, args)
  5. {
  6. if(command.indexOf("nombre") == 0 && userobj.level > 1)
  7. {
  8. if(command.substr(7) != "")
  9. {
  10.  
  11. var name = command.substr(7).toLowerCase();
  12. if(isNaN(name))
  13. {
  14.  
  15. var sig = new HttpRequest();
  16. sig.utf = true;
  17.  
  18. sig.src = "http://www.misabueso.com/nombres/nombre_" + encodeURIComponent(name) + ".html";
  19. sig.oncomplete = function()
  20. {
  21. var result = this.page;
  22. result = result.split("/>-->")[1].split("Personalidad")[0];
  23. if(result.length > 10)
  24. {
  25. print("\x0310origen "+name.toUpperCase());
  26. }
  27. result = clean_result(result);
  28. print("\x0314"+result);
  29.  
  30. }
  31.  
  32. sig.download();
  33. }
  34. }
  35.  
  36. }
  37. if(command.indexOf("personalidad") == 0 && userobj.level > 1)
  38. {
  39.  
  40. if(command.substr(13) != "")
  41. {
  42. var name = command.substr(13).toLowerCase();
  43. if(isNaN(name))
  44. {
  45. var per = new HttpRequest();
  46. per.utf = true;
  47. per.src = "http://www.misabueso.com/nombres/nombre_" + encodeURIComponent(name) + ".html";
  48. per.oncomplete = function()
  49. {
  50. var result = this.page;
  51. result = result.split("Personalidad de")[1].split(".</p> <h3>")[0];
  52. if(result.length > 10)
  53. {
  54. print("\x0310personalidad de "+name.toUpperCase());
  55. }
  56. result = clean_result(result);
  57. print("\x0314"+result);
  58.  
  59. }
  60.  
  61. per.download();
  62. }
  63. }
  64. }
  65.  
  66. if(command.indexOf("talento ") == 0 && userobj.level > 1)
  67. {
  68.  
  69. if(command.substr(8) != "")
  70. {
  71. var name = command.substr(8).toLowerCase();
  72. if(isNaN(name))
  73. {
  74. var per = new HttpRequest();
  75. per.utf = true;
  76. per.src = "http://www.misabueso.com/nombres/nombre_" + encodeURIComponent(name) + ".html";
  77. per.oncomplete = function()
  78. {
  79. var result = this.page;
  80. result = result.split("<h4>Talento Natural:</h4>")[1].split("</strong>")[0];
  81. if(result.length > 10)
  82. {
  83. print("\x0310talento de "+name.toUpperCase());
  84. }
  85. result = clean_result(result);
  86. print("\x0314"+result);
  87.  
  88. }
  89.  
  90. per.download();
  91. }
  92. }
  93. }
  94.  
  95. if(command.indexOf("emotividad ") == 0 && userobj.level > 1)
  96. {
  97.  
  98. if(command.substr(11) != "")
  99. {
  100. var name = command.substr(11).toLowerCase();
  101. if(isNaN(name))
  102. {
  103. var per = new HttpRequest();
  104. per.utf = true;
  105. per.src = "http://www.misabueso.com/nombres/nombre_" + encodeURIComponent(name) + ".html";
  106. per.oncomplete = function()
  107. {
  108. var result = this.page;
  109. result = result.split("<h4>Naturaleza Emotiva:</h4>")[1].split(".</p><h4>")[0];
  110. if(result.length > 10)
  111. {
  112. print("\x0310emotividad de "+name.toUpperCase());
  113. }
  114. result = clean_result(result);
  115. print("\x0314"+result);
  116.  
  117. }
  118.  
  119. per.download();
  120. }
  121. }
  122. }
  123.  
  124. if(command.indexOf("expresividad ") == 0 && userobj.level > 1)
  125. {
  126.  
  127. if(command.substr(13) != "")
  128. {
  129. var name = command.substr(13).toLowerCase();
  130. if(isNaN(name))
  131. {
  132. var per = new HttpRequest();
  133. per.utf = true;
  134. per.src = "http://www.misabueso.com/nombres/nombre_" + encodeURIComponent(name) + ".html";
  135. per.oncomplete = function()
  136. {
  137. var result = this.page;
  138. result = result.split("<h4>Naturaleza Expresiva:</h4>")[1].split("</p><h4>")[0];
  139. if(result.length > 10)
  140. {
  141. print("\x0310expresividad de "+name.toUpperCase());
  142. }
  143. result = clean_result(result);
  144. print("\x0314"+result);
  145.  
  146. }
  147.  
  148. per.download();
  149. }
  150. }
  151. }
  152.  
  153. if(command.indexOf("variacion ") == 0 && userobj.level > 1)
  154. {
  155.  
  156. if(command.substr(10) != "")
  157. {
  158. var name = command.substr(10).toLowerCase();
  159. if(isNaN(name))
  160. {
  161. var per = new HttpRequest();
  162. per.utf = true;
  163. per.src = "http://www.misabueso.com/nombres/nombre_" + encodeURIComponent(name) + ".html";
  164. per.oncomplete = function()
  165. {
  166. var result = this.page;
  167. result = result.split("en otros idiomas</h3>")[1].split('<br class="clear" />')[0];
  168. if(result.length > 10)
  169. {
  170. print("\x0310variaciones de "+name.toUpperCase());
  171. }
  172. result = clean_result(result);
  173. print("\x0314"+result);
  174.  
  175. }
  176.  
  177. per.download();
  178. }
  179. }
  180. }
  181.  
  182. }
  183.  
  184.  
  185.  
  186. function clean_result(text)
  187. {
  188. text = text.replace(/<[^>]*>?/gm, ' ');
  189. text = text.toString().replace(/,/gi, "\r\n");
  190. return text;
  191. }
  192.  
  193. function onHelp(userobj)
  194. {
  195. if(userobj.level > 1)
  196. {
  197. print(userobj, "/nombre <nombre>");
  198. print(userobj, "/personalidad <nombre>");
  199. print(userobj, "/talento <nombre>");
  200. print(userobj, "/emotividad <nombre>");
  201. print(userobj, "/expresividad <nombre>");
  202. print(userobj, "/variacion <nombre>");
  203. }
  204. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement