Advertisement
Guest User

Untitled

a guest
Dec 17th, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.99 KB | None | 0 0
  1.  
  2. // NPC Name must have a Number behind it. ex Name#1 , Name#2,...
  3.  
  4. cydonia,143,150,5 script Chained Quest#1 757,{
  5. function ChainedQuest;
  6. mes "I am a Chained Quest NPC, you can only redo the previous Quest after you have finished all of my Quests.";
  7. next;
  8.  
  9. // Quest Setup :
  10. // ChainedQuest( Reward,Amount , Required Zeny, {Item1,Amount1,Item2,Amount2,...} );
  11. switch( getd( "Quest"+strnpcinfo(2) ) ){
  12. Case 0: ChainedQuest( 2378,1, 10000, 607,10 );
  13. Case 1: ChainedQuest( 5002,1, 15000, 607,20, 608,20 );
  14. Case 2: ChainedQuest( 5003,1, 20000, 607,30, 608,30, 7539,30 );
  15. // Case 3: ChainedQuest( 5004,1, 25000, 607,40, 608,30, 7539,40 ,501,10 );
  16. // Case 4: ChainedQuest( 5005,1, 30000, 607,50, 608,30, 7539,50 ,501,10 ,502,10 );
  17. // Case 5: ChainedQuest(....);
  18. // Case 6: ChainedQuest(....);
  19. default:
  20. mes "Congratulation ,You have finished all the Quest i gave you, you may Re-Do if you want.";
  21. set getd( "Quest"+strnpcinfo(2) ),0;
  22. close;
  23. }
  24.  
  25. OnPCLoadMapEvent:
  26. showevent 1,0;
  27. end;
  28.  
  29. function ChainedQuest {
  30. for( set .@i,3; getarg( .@i,0 ) != 0 ; set .@i,.@i + 2 ){
  31. if( countitem( getarg( .@i ) ) < ( getarg( .@i + 1 )) ){
  32. mes "[ ^FF0000Part "+( getd( "Quest"+strnpcinfo(2) ) + 1 )+"^000000 ]";
  33. mes "^00FF00_______________________________^000000";
  34. mes "^FF0000Reward^000000 : "+getarg(1)+" x ^0000FF"+getitemname( getarg(0) )+"^000000";
  35. mes "^00FF00_______________________________^000000";
  36. mes "then bring me those items :";
  37. mes "^00FF00_______________________________^000000";
  38. mes ( Zeny < getarg(2) ? "^FF0000":"^0000FF" )+getarg(2)+" Zeny^000000";
  39. for( set .@a,3; getarg( .@a,0 ) != 0 ; set .@a,.@a + 2 ){
  40. mes (( countitem(getarg( .@a )) < ( getarg(.@a + 1 )) )? "^FF0000[ "+countitem(getarg(.@a))+" / "+(getarg(.@a+1)):"^0000FF[ "+getd( "Quest"+strnpcinfo(2) ) )+" ] "+getitemname(getarg(.@a))+"^000000 ";
  41. }
  42. close;
  43. }
  44. }
  45. if( Zeny < getarg( 2 ) ){
  46. mes "You required "+getarg( 2 )+" Zeny.";
  47. close;
  48. }
  49. mes "[ ^FF0000Part "+( getd( "Quest"+strnpcinfo(2) ) + 1 )+"^000000 ]";
  50. mes "Look's like you have collected all";
  51. mes "^FF0000_______________________________^000000";
  52. mes ( Zeny < getarg(2) ? "^FF0000":"^0000FF" )+getarg(2)+" Zeny^000000";
  53. for( set .@i,3; getarg( .@i,0 ) != 0 ; set .@i,.@i + 2 ){
  54. mes "^FF0000"+getarg( .@i+1 )+" x ^0000FF "+getitemname( getarg( .@i ) )+"^000000";
  55. }
  56. next;
  57. if( select("^0000FFContinue^000000:Cancel") == 2 ){
  58. mes "Okay..as you wish ~ come back again when you do continue it.";
  59. close;
  60. }
  61. for( set .@i,3; getarg( .@i,0 ) != 0 ; set .@i,.@i + 2 ){
  62. delitem getarg( .@i ),getarg( .@i + 1 );
  63. }
  64. set Zeny,Zeny - getarg( 2 );
  65. set getd( "Quest"+strnpcinfo(2) ),getd( "Quest"+strnpcinfo(2) ) + 1;
  66. mes "You will be rewarded with ";
  67. mes "^0000FF_______________________________^000000";
  68. mes "^FF0000"+getarg(1)+"^000000 x ^0000FF"+getitemname( getarg(0) )+"^000000";
  69. mes "^0000FF_______________________________^000000";
  70. getitem getarg(0),getarg(1);
  71. close;
  72. }
  73. }
  74.  
  75. prontera mapflag loadevent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement