Advertisement
johnlol

Login CMD

Aug 7th, 2023
814
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VeriLog 4.48 KB | Gaming | 0 0
  1. //===== eAthena Script =======================================
  2. //= Commands activation on player's login
  3. //===== By: ==================================================
  4. //= Damlug, rev lighta
  5. //===== Current Version: =====================================
  6. //= 1.3
  7. //===== Compatible With: =====================================
  8. //= eAthena SVN 14250 (previous version untested but probably working)
  9. //===== Description: =========================================
  10. //= Allow a player to choose which commands activate automatically on login
  11. //= Works for autoloot, showexp, guildhp, main, whosell
  12. //= For autoloot, players can choose the percent limit
  13. //= For whosell, players can choose 1 items ID
  14. //Bits des commandes
  15.     //Autoloot:     startCommands   bit 0 [0;1]
  16.     //Showexp:          bit 1 [1;2]
  17.     //Guildhp:          bit 2 [2;4]
  18.     //Ally  chat    startCommands2  bit 0 [0;1]
  19.     //Main chat         bit 1 [1;2]
  20.     //autosell          bit 2 [2:4]
  21. //===== Additional Comments: =================================
  22. //= 1.0 - Works for autoloot, showexp, guildhp  [2010/09/07]
  23. //= 1.1 - Updated revision for char with space  [2010/12/10]
  24. //= 1.2 - Add Main chat and whosell     [2011/01/13]
  25. //= 1.3 - Add Ally chat
  26. //============================================================
  27.  
  28. //lof_vana,91,134,5 script  Serge   89,{
  29. prontera,164,158,3  script  Serge   89,{   
  30.     while(1) {
  31.         mes "Status of start commands";
  32.         mes "[" + ((startCommands>>0)%2?"^009900"+ startAutolootRate +"%":"^FF0000OFF") + "^000000] Autoloot";
  33.         mes "[" + ((startCommands>>1)%2?"^FF0000OFF":"^009900ON") + "^000000] Showexp"; //On inverse, vu que activée par défaut
  34.         mes "[" + ((startCommands>>2)%2?"^009900ON":"^FF0000OFF") + "^000000] Guildhp";
  35.         mes "[" + ((startCommands2>>0)%2?"^009900ON":"^FF0000OFF") + "^000000] Ally chat";
  36.         mes "[" + ((startCommands2>>1)%2?"^009900ON":"^FF0000OFF") + "^000000] Main chat";
  37.         mes "[" + ((startCommands2>>2)%2?"^009900 Item "+whosellitem :"^FF0000OFF") + "^000000] Auto whosell";
  38.         mes "Choose the command to modify";
  39.         switch(select("Autoloot:Showexp:Guildhp:Ally chat:Main chat:Whosell")) {
  40.             case 1:                                                 //Autoloot
  41.                 if(! ((startCommands>>0)%2)) {                                  //Activation
  42.                     mes "Enter the maximum percentage";
  43.                     //On limite la valeur entrée à 0-100
  44.                     do {
  45.                     input startAutolootRate;
  46.                     if (startAutolootRate<0 || startAutolootRate>100) mes "Invalid rates please try again";
  47.                     } while (startAutolootRate<0 || startAutolootRate>100);
  48.                     //Et si la valeur est comprise entre 1 et 100, on active la commande
  49.                     if(startAutolootRate) set startCommands, startCommands +1;
  50.                 }                                               //Désactivation
  51.                 else set startCommands, startCommands -1;
  52.                 break;
  53.             case 2:                                                 //Showexp
  54.                 if(! ((startCommands>>1)%2)) set startCommands, startCommands +2;               //Activation
  55.                 else set startCommands, startCommands -2;                           //Désactivation
  56.                 break;
  57.             case 3:                                                 //Guildhp
  58.                 if(! ((startCommands>>2)%2)) set startCommands, startCommands +4;               //Activation
  59.                 else set startCommands, startCommands -4;                           //Désactivation
  60.                 break;
  61.             case 4:                                                 //Ally chat
  62.                 if(! ((startCommands2>>0)%2)) set startCommands2, startCommands2 +1;                //Activation
  63.                 else set startCommands2, startCommands2 -1;                         //Désactivation                                    break;
  64.             case 5:                                                 //Main chat
  65.                 if(! ((startCommands2>>1)%2)) set startCommands2, startCommands2 +2;                //Activation
  66.                 else set startCommands2, startCommands2 -2;                         //Désactivation
  67.                 break;
  68.             case 6:                                                 //Whosell
  69.                 if(! ((startCommands2>>2)%2)) {                                 //Activation
  70.                     mes "Entrez l'ID de l'iteml";
  71.                     //On limite l'ID d'entrée à >0
  72.                     do {
  73.                         input whosellitem;
  74.                         if (whosellitem<0) mes "Invalid ID please try again";
  75.                     } while (whosellitem<0);            //ID max ?
  76.                     if(whosellitem) set startCommands2, startCommands2 +4;
  77.                 }                                               //Désactivation
  78.                 else set startCommands2, startCommands2 -4;
  79.                 break;
  80.         }
  81.         mes "Saved changes !";
  82.         next;
  83.     }
  84.    
  85.     OnPCLoginEvent:     //Activation des commandes au moment du log
  86.         if((startCommands>>0)%2) atcommand "@autoloot "+startAutolootRate;  //Autoloot
  87.         if((startCommands>>1)%2) atcommand "@showexp";              //Showexp
  88.         if((startCommands>>2)%2) atcommand "@guildhp";              //Guildhp
  89.         if((startCommands2>>0)%2) atcommand "@ally on";             //Ally chat
  90.         if((startCommands2>>1)%2) atcommand "@main on";             //Main chat
  91.         if((startCommands2>>2)%2) atcommand "@whosell "+whosellitem;        //Auto whosell
  92.         end;
  93. OnInit:
  94.     waitingroom "Start Commands",0;
  95.     end;
  96. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement