Advertisement
johnlol

STP-SKP_Seller

Aug 9th, 2023
1,020
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VeriLog 2.38 KB | Gaming | 0 0
  1. //===== eAthena Script =======================================
  2. //= Stats Seller
  3. //===== By: ==================================================
  4. //= DeadChild
  5. //===== Current Version: =====================================
  6. //= 1.0
  7. //= 2.0 - Fixed an bug with warp and optimized it[llchrisll]
  8. //===== Compatible With: =====================================
  9. //= Any eAthena Version
  10. //===== Description: =========================================
  11. //= Stats Seller
  12. //===== Additional Comments: =================================
  13. //= Have fun with it ^^
  14. //============================================================
  15. prt_in,276,127,2    script  STP/SKP Seller  86,{
  16.  
  17. mes .n$;
  18. mes "Hi, I'm the ^FF0000STP^000000/^0000FFSKP^000000 Seller";
  19. mes "It cost ^FFD700"+.price+"^000000z each point";
  20. mes "which one you wanna buy?";
  21. next;
  22. switch(select("- ^FF0000Status^000000 Points:- ^0000FFSkill^000000 Point:- ^FFD700No thanks I'm fine^000000")) {
  23.    
  24.     case 1:
  25.     mes .n$;;
  26.     mes "What do you want to buy?";
  27.     next;
  28.     set .@stat,select("Str:Agi:Vit:Int:Dex:Luk");
  29.     mes .n$;
  30.     mes "Hold on...";
  31.     next;
  32.     mes .n$;
  33.     mes "So how many?";
  34.     input .@quantity;
  35.     next;
  36.     mes .n$;
  37.     if (.@quantity == 0) {
  38.         mes "Please don't waste my time";
  39.         close;
  40.     }
  41.     if (.@quantity > 120) {
  42.         mes "Sorry but you can only get ^FF6347120^000000 Status Point";
  43.         close;
  44.     }
  45.     if (zeny < (.@quantity*.price)) {
  46.         mes "Sorry but you do not have enough ^FFD700zeny^000000.";
  47.         close;
  48.     }
  49.     set Zeny,Zeny - (.@quantity*.price);
  50.     switch(.@stat) {
  51.         case 1: statusup2 bStr,.@quantity; break;
  52.         case 2: statusup2 bAgi,.@quantity; break;
  53.         case 3: statusup2 bVit,.@quantity; break;
  54.         case 4: statusup2 bInt,.@quantity; break;
  55.         case 5: statusup2 bDex,.@quantity; break;
  56.         case 6: statusup2 bLuk,.@quantity; break;
  57.     }
  58.     getmapxy(.@mapname$,.@mapx,.@mapy,0,strcharinfo(0));
  59.     mes "Done";
  60.     next;
  61.     warp .@mapname$,.@mapx,.@mapy;
  62.     close;
  63.    
  64.     case 2:
  65.     mes .n$;
  66.     mes "So how many?";
  67.     input .@quantity;
  68.     next;
  69.     mes .n$;
  70.     if (.@quantity == 0) {
  71.         mes "Please don't waste my time";
  72.         close;
  73.     }
  74.     if (zeny < (.@quantity*.price)) {
  75.         mes "Sorry but you do not have enough ^FFD700zeny^000000.";
  76.         close;
  77.     }
  78.     mes "Done";
  79.     set zeny, zeny - (.@quantity * .price);
  80.     set SkillPoint,SkillPoint + .@quantity;
  81.     break;
  82.    
  83.     case 3:
  84.     mes .n$;
  85.     mes "Okay then...";
  86.     close;
  87. }
  88.  
  89. OnInit:
  90. set .n$,"["+strnpcinfo(0)+"]";
  91. set .price,10000000;
  92. end;
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement