Advertisement
Skorm

Bloody Branch Quest v2

Aug 27th, 2013
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.09 KB | None | 0 0
  1. function    script  timeleft__  {
  2.     set .@left, getarg(0);
  3.     if ( .@left <= 0 ) return getarg(0);
  4.     set .@day, .@left / 86400;
  5.     set .@hour, .@left % 86400 / 3600;
  6.     set .@min, .@left % 3600 / 60;
  7.     set .@sec, .@left % 60;
  8.     return ( ( .@day )?.@day +" day ":"" )+( ( .@day || .@hour )?.@hour +" hour ":"" )+( ( .@day == 0 && ( .@hour || .@min ) )?.@min +" min ":"" )+( ( .@day || .@hour )?"":.@sec +" sec" );
  9. }
  10.  
  11. //Bloody Branch Quest Version 2
  12. prontera,95,96,2    script  Bloody Branch Quest 76,{
  13.     if( !mobcount("prontera","Bloody Branch Quest::OnPoringDead") && #Bloody_b_Q==1 ){
  14.         npctalk "Hmm... *looks around* Ahh, I see one over there!";
  15.         monster "prontera",0,0,"Poring",1002,1,"Bloody Branch Quest::OnPoringDead";
  16.         emotion e_gasp;
  17.         end;
  18.     }
  19.  
  20.     if( (#Bloody_b_Q-gettimetick(2))>0 && #Bloody_b_Q ) {
  21.         mes .QNPC$;
  22.         mes strcharinfo(0)+" you have "+callfunc("timeleft__",(#Bloody_b_Q-gettimetick(2)))+"left.";
  23.         close;
  24.     }
  25.  
  26.     switch ( #Bloody_b_Q ) {
  27.         case 0:
  28.             set .QNPC$,"[^0000FF???^000000]";
  29.             break;
  30.            
  31.         case 1:
  32.             mes .QNPC$;
  33.             mes "There's already a Poring out there with your name on it!";
  34.             close;
  35.            
  36.         case 2:
  37.             npctalk "Thanks again, come back in "+.hours+" hours and I'm sure another one will slip through!";
  38.             getitem 12103,2;
  39.             set #Bloody_b_Q,( gettimetick(2)+(.hours*60*60) );
  40.             end;
  41.            
  42.         case default:
  43.     }
  44.  
  45.     if(BaseLevel<255){
  46.         mes .QNPC$;
  47.         mes "I'm sorry, but only the truly strong can do this quest. Come back with a base level of 255 or higher.";
  48.         close;
  49.     }
  50.    
  51.     mes .QNPC$;
  52.     mes "Hello I need your help, Porings from the surrounding fields slip";
  53.     mes "past our lazy guards, and I'm to cute to hunt them down now they're running a-muk!";
  54.     next;
  55.    
  56.     mes .QNPC$;
  57.     mes "Would you like to participate in our daily Poring Hunt?";
  58.     mes "Oh- I almost forgot to mention, we need 300m to cover any casualties.";
  59.    
  60.     if( select("Yes:No")==2 ) {
  61.         next;
  62.         mes .QNPC$;
  63.         mes "What!- You expect me to just kill all these Porings by myself?!";
  64.         emotion e_sob;
  65.         close;
  66.     }
  67.    
  68.     if( Zeny<3000000 ) {
  69.         next;
  70.         mes .QNPC$; mes "Look I can't just let you loose swinging a sword at everything you think is a poring without some funding!";
  71.         mes "Come back when you get some more cash!";
  72.         close;
  73.     }
  74.    
  75.     emotion e_no1;
  76.     set Zeny,Zeny-3000000;
  77.     next;
  78.    
  79.     if(!#Bloody_b_Q){
  80.         mes "[^0000FFAlice^000000]";
  81.         mes "Thanks for your patronage.";
  82.         mes "You can call me ^0000FFAlice^000000 from now on...";
  83.         mes "Now get to work rookie!";
  84.     } else {
  85.         mes .QNPC$;
  86.         mes "Welcome back!";
  87.         mes "Good luck on your hunt!";
  88.     }
  89.  
  90.     set #Bloody_b_Q,1;
  91.     monster "prontera",0,0,"Poring",1002,1,"Bloody Branch Quest::OnPoringDead";
  92.     close;
  93.  
  94. OnInit:
  95.     set .QNPC$,"[^0000FFAlice^000000]";
  96.     set .hours,1; //Delay in hours.
  97.     end;
  98.  
  99. OnPoringDead:
  100.     if(#Bloody_b_Q==1){
  101.         mapannounce "prontera",strcharinfo(0)+" has found the poring!",bc_map,"0xFFCE00";
  102.         set #Bloody_b_Q,2;
  103.         end;
  104.     }else if( !#Bloody_b_Q || (#Bloody_b_Q-gettimetick(2)) > 0 && #Bloody_b_Q && Bloody_b_Q != 1 ) {
  105.         mapannounce "prontera",strcharinfo(0)+" accidentally killed the poring!",bc_map,"0xFFCE00";
  106.         end;
  107.     }
  108. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement