yuhsing

Untitled

Dec 3rd, 2012
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1.  
  2.  
  3.  
  4. prontera,155,181,5 script Santa Clause#npc_1 757,{
  5. mes "Ho ho ho, Christmas is coming, do you want to help me gather the items from different monster?";
  6. if( #Santa_Quest == atoi( gettimestr("%Y%m%d", 9) ) ){
  7. mes "You have done this Quest..please wait until tomorrow.";
  8. }else if( #Santa_Quest > 3 ){
  9. #Santa_Quest = 0;
  10. }
  11.  
  12. if( #Santa_Quest < 3 ){
  13. mes "View Quest";
  14. if( select("Yes:No") == 2 ){
  15. mes "Ok, if you have time you can just approach me and if you will finish the task I given you, you will receive a very good reward.";
  16. }else{
  17. #Santa_Quest = rand(3);
  18. switch( #Santa_Quest ){
  19. // Quest Items list + Amounts
  20. Case 0: setarray .@items[0],607,1,608,1; break;
  21. Case 1: setarray .@items[0],608,2,512,1; break;
  22. Case 2: setarray .@items[0],612,10,607,3; break;
  23. default: break;
  24. }
  25. .@size = getarraysize( .@items );
  26. if( .@size > 2 )
  27. for( .@i = 0; .@i < .@size - 1; .@i += 2 ){
  28. mes " ~ "+getitemname( .@items[.@i] )+" x "+.@items[.@i+1];
  29. if( countitem( .@items[.@i] ) < .@items[.@i+1] )
  30. .@failed = 1;
  31. }
  32. if( .@failed ){
  33. mes "Seem like you dont have enough items.";
  34. }else
  35. if( select("Continue:Cancel") == 1 ){
  36. for( .@i = 0; .@i < .@size - 1; .@i += 2 )
  37. delitem .@items[.@i],.@items[.@i+1];
  38. getitem 14545,1;
  39. mes "Thank you for helping me, as a reward..take this..you can do this again tomorrow.";
  40. mes "Here's your reward...";
  41. #Santa_Quest = atoi( gettimestr("%Y%m%d", 9) );
  42. }
  43. }
  44. }else{
  45. mes "Nothing i can help you here...";
  46. }
  47. close;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment