Advertisement
Skorm

Double Click Healer v2

Jun 18th, 2013
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.94 KB | None | 0 0
  1. //By Skorm
  2. -   script  Goddess::Skormie    1,{
  3.  
  4.         set .@cntcoin, countitem(.coin);
  5.         set .@npc$, "[ ^0000FFGoddess^000000 ]";
  6.         if(($@h_last$==strcharinfo(0)) && (getnpctimer(1))) goto L_doubleclick;
  7.  
  8.         if (buff == 1) {
  9.         L_Fheal:
  10.             set $@h_last$,strcharinfo(0);
  11.             percentheal 100,100;
  12.             specialeffect2 EF_HEAL;
  13.             specialeffect2 363;
  14.             misceffect 488;
  15.             dispbottom "Successfully healed!";
  16.             dispbottom "Double-click me to change your choice of healing.";
  17.             if(!getnpctimer(1)){setnpctimer 0; startnpctimer;}
  18.             end;
  19.         }
  20.         if (buff == 2) {
  21.             set $@h_last$,strcharinfo(0);
  22.             if (((curr)?.@cntcoin<.pcoin[buff]:zeny<.price[buff])) {
  23.                 dispbottom "You do not have enough.";
  24.                 if(switch){ dispbottom "Switched to Free Heal."; goto(L_Fheal); }
  25.                 dispbottom "Double-click me to change your choice of healing.";
  26.                 if(!getnpctimer(1)){
  27.                     setnpctimer 0;
  28.                     startnpctimer;
  29.                 }
  30.                 end;
  31.             }
  32.             if (curr) delitem .coin,.pcoin[buff];
  33.             else set Zeny,Zeny-.price[buff];
  34.             skilleffect 29,0;
  35.             sc_start SC_INCREASEAGI,240000,10;
  36.             percentheal 100,100;
  37.             specialeffect2 EF_HEAL;
  38.             specialeffect2 363;
  39.             misceffect 488;
  40.             dispbottom "Successfully healed and buffed!";
  41.             dispbottom "Double-click me to change your choice of healing.";
  42.                 if(!getnpctimer(1)){setnpctimer 0; startnpctimer;}
  43.             end;
  44.         }
  45.         if (buff == 3) {
  46.             set $@h_last$,strcharinfo(0);
  47.             if (((curr)?.@cntcoin<.pcoin[buff]:zeny<.price[buff])) {
  48.                 dispbottom "You do not have enough.";
  49.                 if(switch){ dispbottom "Switched to Free Heal."; goto(L_Fheal); }
  50.                 dispbottom "Double-click me to change your choice of healing.";
  51.                 if(!getnpctimer(1)){setnpctimer 0; startnpctimer;}
  52.                 end;
  53.             }
  54.             if (curr) delitem .coin,.pcoin[buff];
  55.             else set Zeny,Zeny-.price[buff];
  56.             skilleffect 29,0;
  57.             sc_start SC_INCREASEAGI,240000,10;
  58.             skilleffect 34,0;
  59.             sc_start SC_BLESSING,240000,10;
  60.             percentheal 100,100;
  61.             specialeffect2 EF_HEAL;
  62.             specialeffect2 363;
  63.             misceffect 488;
  64.             dispbottom "Successfully healed and buffed!";
  65.             dispbottom "Double-click me to change your choice of healing.";
  66.             if(!getnpctimer(1)){setnpctimer 0; startnpctimer;}
  67.             end;
  68.         }
  69.  
  70.         mes .@npc$;
  71.         mes "Hello ^0000FF"+strcharinfo(0)+"^000000, please choose 1 of the options below:";
  72.         menu "^FF0000Heal [Free]^000000",-,"^0000FFHeal + Increase Agi "+((!curr)?"["+.price[2]+"z]":"["+.pcoin[2]+"p]")+"^000000",L_agi,"^00FF00Heal + Increase Agi + Blessing "+((!curr)?"["+.price[3]+"z]":"["+.pcoin[3]+"p]")+"^000000",L_bless; next;
  73.         set buff, 1;
  74.         mes .@npc$;
  75.         mes "Your choice have been saved.";
  76.         mes "If you want to change your choice, you can ^FF0000DOUBLE-CLICK^000000 on me again.";
  77.         mes "Have a nice day!";
  78.         close;
  79.                
  80. L_agi:
  81.         next;
  82.         set buff, 2;
  83.         mes .@npc$;
  84.         mes "Your choice have been saved.";
  85.         mes "If you want to change your choice, you can ^FF0000DOUBLE-CLICK^000000 on me again.";
  86.         mes "Have a nice day!";
  87.         close;
  88.  
  89. L_bless:
  90.         next;
  91.         set buff, 3;
  92.         mes .@npc$;
  93.         mes "Your choice have been saved.";
  94.         mes "If you want to change your choice, you can ^FF0000DOUBLE-CLICK^000000 on me again.";
  95.         mes "Have a nice day!";
  96.         close;
  97.  
  98. L_doubleclick:
  99.         mes .@npc$;
  100.         mes "Hello ^0000FF"+strcharinfo(0)+"^000000, welcome back!";
  101.         mes " ";
  102.         mes "Your current choice:";
  103.         if (buff == 1) mes "^FF0000Heal [Free]^000000";
  104.         if (buff == 2) mes "^FF0000Heal + Increase Agi "+((!curr)?"["+.price[2]+"z]":"["+.pcoin[2]+"p]")+"^000000";
  105.         if (buff == 3) mes "^FF0000Heal + Increase Agi + Blessing "+((!curr)?"["+.price[3]+"z]":"["+.pcoin[3]+"p]")+"^000000";
  106.         menu "Leave",-,"Change option",L_option;
  107.         close;
  108.  
  109. L_option:
  110.         next;
  111.         mes .@npc$;
  112.         mes "Please choose 1 of the options below:";
  113.         menu "^FF0000Heal [Free]^000000",-,"^0000FFHeal + Increase Agi "+((!curr)?"["+.price[2]+"z]":"["+.pcoin[2]+"p]")+"^000000",L_agi,"^00FF00Heal + Increase Agi + Blessing "+((!curr)?"["+.price[3]+"z]":"["+.pcoin[3]+"p]")+"^000000",L_bless,"Change Payment Option "+((!curr)?"[Zeny]":"[Poring Coin]"),L_Payment,"Auto Buff Switching "+((switch)?"[On]":"[Off]"),L_Switch;
  114.         next;
  115.         set buff, 1;
  116.         mes .@npc$;
  117.         mes "Your choice have been saved.";
  118.         mes "If you want to change your choice, you can ^FF0000DOUBLE-CLICK^000000 on me again.";
  119.         mes "Have a nice day!";
  120.         close;
  121.        
  122. L_Payment:
  123.         if(!curr){
  124.             set curr,1;
  125.             dispbottom "Payment Changed to "+getitemname(.coin)+".";
  126.             goto L_option;
  127.         }
  128.         set curr,0;
  129.         dispbottom "Payment Changed to Zeny.";
  130.         goto L_option;
  131.        
  132. L_Switch:
  133.         if(!switch){
  134.             set switch,1;
  135.             dispbottom "Auto Switching enabled.";
  136.             goto L_option;
  137.         }
  138.         set switch,0;
  139.         dispbottom "Auto Switching disabled.";
  140.         goto L_option;
  141.  
  142. OnInit:
  143.         setarray .price[1], 0, 5000, 10000; //Zeny Price
  144.         setarray .pcoin[1], 0, 50, 100; //Poring Coin Price
  145.         setarray .coin, 7539; //Poring Coin ID
  146.         initnpctimer;
  147.         end;
  148.  
  149. OnTimer2000:
  150.         set $@h_last$,"";
  151.         stopnpctimer;
  152.         end;
  153. }
  154.  
  155. // ---
  156. geffen,156,203,0    duplicate(Skormie)  Goddess#1-3 111
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement