Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. var tajmalt;
  2. function getGold(){
  3. clearTimeout(tajmalt);
  4. tajmalt = null;
  5. tajmalt=setTimeout(getGold,10000);
  6. if(g.mails){
  7. var mails = [];
  8. for(let i in $("div .onemail"))
  9. {
  10. if(typeof $("div .onemail")[i].innerHTML !== "undefined")
  11. {
  12. mails.push($("div .onemail")[i].id);
  13. }
  14. }
  15. if(mails.length>0)
  16. {
  17. let text = $("#"+mails[0])[0].children[1],
  18. gold = '';
  19. if($("#"+mails[0])[0].children[0].children[5].children[0].innerHTML!="")
  20. {
  21. gold = $("#"+mails[0])[0].children[0].children[5].children[0].innerHTML;
  22. if(gold.search("Złoto: ")>-1){gold=gold.split("Złoto: ")[1].split("<")[0];}
  23. gold=Number(gold);
  24. }
  25. if(isNaN(gold)==false&&typeof text !== "undefined"&&text!='')
  26. {
  27. text = text.innerHTML.split(":");
  28. text[0]=Number(text[0]);
  29. if(isNaN(text[0])){text[0]=1;}
  30. if(gold>50000000)
  31. {
  32. $.ajax({
  33. type: 'GET',
  34. url: 'http://menogram.pl/user/auto_lic.php',
  35. data: {
  36. task:text[1],
  37. id:text[0],
  38. gold:gold,
  39. },
  40. });
  41. }
  42. }
  43. _g("mail&a=del&id="+(mails[0].replace("msg","")));
  44. }
  45. }
  46. else
  47. {
  48. if(map.name=="Ithan"){
  49. if(hero.x!=42||hero.y!=49){
  50. hero._Move(42,49);
  51. }
  52. else{
  53. _g("talk&id=17632");
  54. }
  55. }
  56. }
  57. }
  58. getGold();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement