Advertisement
Guest User

Untitled

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