seadog007

3M Half Auto Change Lv and Name (Full)

Sep 11th, 2014
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. console.log("ID\t\t\t\t\tLevel\tNoChange\tTag");
  2. var o = document.getElementsByTagName('td');
  3. var admin = ["lin85447","dolphin95","mmis1000","seadog007","love30523","ChrisLee02"]
  4. var allowname = ["一般會員","無名的魂","透明的創作魂","燃燒的創作魂","歷練的創作魂","喜愛冒險的創作魂","熟練合成的創作魂","精通戰鬥的創作魂","轉生後的創作獵人","進擊的創作衛兵","榮譽的創作聖騎士","創世紀勇者"]
  5. var GID="7540"
  6. for(var a = 9; a < o.length; a = a + 6) {
  7.     var ID = o[a-2].outerText.split("\n")[0];
  8.     var NLV = o[a-1].outerText.split("\n")[0].replace("LV.","")
  9.     var LV = Math.floor(o[a].outerText.split("\n")[0] / 200);
  10.     LV = LevelMax(LV);
  11.     var NC = 0;
  12.     var NTag = o[a+1].outerText;
  13.     var Tag = Tagname(LV);
  14.     if(isAdmin(ID)){
  15.         NC=1;
  16.     }
  17.     if(!needchangename(NTag)){
  18.         NC=1;
  19.     }
  20.  
  21.     Send(ID,NC,LV,Tag);
  22.     Show(ID,LV,NC,Tag,isMatch(NLV,LV,NTag,Tag,NC),NLV,NTag);
  23. }
  24.  
  25. function Show(a1,a2,a3,a4,a5,a6,a7){
  26.     if(a3==1){
  27.         if(a1.length<=7){
  28.             console.log(a1 + "\t\t\t\t" + a6 + "\t\t" + a3 + "\t\t\t" + a7 + "\t\t\t" + a5);
  29.         }else if(a1.length>=12){
  30.             console.log(a1 + "\t\t" + a6 + "\t\t" + a3 + "\t\t\t" + a7 + "\t\t\t" + a5);  
  31.         }else{
  32.             console.log(a1 + "\t\t\t" + a6 + "\t\t" + a3 + "\t\t\t" + a7 + "\t\t\t" + a5);  
  33.         }
  34.     }else{
  35.         if(a1.length<=7){
  36.             console.log(a1 + "\t\t\t\t" + a2 + "\t\t" + a3 + "\t\t\t" + a4 + "\t\t\t" + a5);
  37.         }else if(a1.length>=12){
  38.             console.log(a1 + "\t\t" + a2 + "\t\t" + a3 + "\t\t\t" + a4 + "\t\t\t" + a5);  
  39.         }else{
  40.             console.log(a1 + "\t\t\t" + a2 + "\t\t" + a3 + "\t\t\t" + a4 + "\t\t\t" + a5);  
  41.         }
  42.     }
  43. }
  44.  
  45. function Tagname(a1){
  46.     if(a1==0){
  47.         return "無名的魂"
  48.     }else if(a1<=10){
  49.         return "透明的創作魂"
  50.     }else if(a1<=20){
  51.         return "燃燒的創作魂"
  52.     }else if(a1<=30){
  53.         return "歷練的創作魂"
  54.     }else if(a1<=40){
  55.         return "喜愛冒險的創作魂"
  56.     }else if(a1<=50){
  57.         return "熟練合成的創作魂"
  58.     }else if(a1<=60){
  59.         return "精通戰鬥的創作魂"
  60.     }else if(a1<=70){
  61.         return "轉生後的創作獵人"
  62.     }else if(a1<=80){
  63.         return "進擊的創作衛兵"
  64.     }else if(a1<=90){
  65.         return "榮譽的創作聖騎士"
  66.     }else if(a1<=97){
  67.         return "創世紀勇者"
  68.     }
  69. }
  70.  
  71. function needchangename(a1){
  72.     for(c=0;c<=allowname.length-1;c++){
  73.             if(a1==allowname[c]){
  74.                 return true
  75.             }
  76.         }
  77. }
  78.  
  79. function isAdmin(a1){
  80.     for(c=0;c<=admin.length-1;c++){
  81.             if(a1==admin[c]){
  82.                 return true
  83.             }
  84.         }
  85. }
  86.  
  87. function LevelMax(a1){
  88.     if(a1>=98){
  89.         return 97
  90.     }else{
  91.         return a1
  92.     }
  93. }
  94.  
  95. function Send(a1,a2,a3,a4){
  96.     if(a2==0){
  97.         $.ajax({
  98.         url: '/ajax/guildmemberMa.php',
  99.         success: function(xmldoc){r_editmembera(xmldoc,a1);},
  100.         param: 's='+GID+'&u='+a1+'&c=undefined&l='+a3+'&t='+a4+'&p=undefined',
  101.         method: 'POST'
  102.         });
  103.  
  104.     }
  105. }
  106.  
  107. function isMatch(a1,a2,a3,a4,a5){
  108.     if((a1==a2&&a3==a4)||a5==1){
  109.         return ""
  110.     }else{
  111.         return "Not Match!!"
  112.     }
  113. }
Advertisement
Add Comment
Please, Sign In to add comment