Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 20th, 2010 | Syntax: None | Size: 4.27 KB | Hits: 94 | Expires: Never
Copy text to clipboard
  1. prontera,147,168,1      script  Marketing Broadcaster   831,{
  2. setarray .@announcetypes$,"Selling","Buying","Trading","sell","buy","trade","S>","B>","T>","0xFF3333","0x37FDFC","0x4DBD33";
  3.  
  4. set @uselevel,70; // Change to set level restriction
  5. set @cost,100000; // Change to set the Cost
  6. set @levelgm,30;  // Change to set GM level control
  7. set .marketing,1; // Don't Touch
  8. set .timeout,1; // Don't Touch
  9. set .counting,1; // Don't Touch
  10. set @agit_flag,agitcheck(); //Don't Touch
  11.  
  12.         if (@agit_flag == 1) {
  13. mes "[Marketing NPC]";
  14. emotion 17;
  15. mes "Sorry but my service is not open during WOE hours.";
  16. mes "Please come again later.";
  17. close;
  18. }
  19. else if (.time == .timeout) {
  20. mes "[Marketing NPC]";
  21. emotion 9;
  22. mes "Sorry, the broadcast network is still busy.";
  23. next;
  24. if (getgmlevel() >= @levelgm) {
  25. mes "[Marketing NPC]";
  26. emotion 0;
  27. mes "Oh! Hi "+strcharinfo(0)+".";
  28. next;
  29. mes "[Marketing NPC]";
  30. mes "Would you like to reestablish the network?";
  31.         if (select("Yes, please!:No, thanks!") == 2) goto L_no;
  32. emotion 24;
  33. npctalk "Service has been reestablish by a Game Master";
  34.         set .time,0;
  35. stopnpctimer;
  36. close;
  37. }
  38. mes "[Marketing NPC]";
  39. mes "Check back again later.";
  40. close;
  41. }
  42. else if (BaseLevel < @uselevel) {
  43. mes "[Marketing NPC]";
  44. emotion 16;
  45. mes "Sorry, but your level is not high enough for my services.";
  46. next;
  47. mes "[Marketing NPC]";
  48. mes "Come back when your base level is above ^0000FF "+@uselevel+"^000000." ;
  49. close;
  50. }
  51. else if (.market == .marketing) {
  52. mes "[Marketing NPC]";
  53. emotion 4;
  54. mes "I am sorry but I cannot provide you with my service right now.";
  55. next;
  56.         if (getgmlevel() >= @levelgm) {
  57. mes "[Marketing NPC]";
  58. emotion 0;
  59. mes "Oh, I am sorry "+strcharinfo(0)+".";
  60. mes "I didn't notice.";
  61. next;
  62. mes "[Marketing NPC]";
  63. mes "Would you like to reactive the services?";
  64.         if (select("Yes, please!:No, thanks!") == 2) goto L_no;
  65.         set .market,0;
  66. emotion 24;
  67. mes "Service is now available.";
  68. npctalk "Service is now made available by a Game Master.";
  69. }
  70. mes "[Marketing NPC]";
  71. mes "Please come back some other time.";
  72. close;
  73. }
  74.  
  75. mes "[Marketing NPC]";
  76. mes "Hello, Would you like to broadcast something market related?";
  77. emotion 1;
  78.         if (select("Yes, please.:No, thanks.") == 2) goto L_no;
  79. mes "Okay, Now choose which you would like to broadcast.";
  80.         if (getgmlevel() >= @levelgm) {
  81.         set .@selection,select("Selling:Buying:Trading:Nothing:GM Menu")-1;
  82. }  
  83. else set .@selection,select("Selling:Buying:Trading:Nothing")-1;
  84.         if (.@selection==3) goto L_no;
  85.         if (.@selection==4) {  
  86. next;
  87. mes "[Marketing NPC]";
  88. mes "Would you like to stop the service?";
  89.         if (select("Yes.:No.") == 2) goto L_no;
  90.         set .market,1;
  91. mes "Service is now stopped.";
  92. emotion 25;
  93. npctalk "Service is stopped by a Game Master.";
  94. close;
  95. }
  96. next;
  97. mes "[Marketing NPC]";
  98. mes .@announcetypes$[.@selection]+" it is, however it will cost you ^CC3300"+@cost+"^000000 zeny.";
  99. next;
  100.         if (Zeny < @cost){
  101. mes "[Marketing NPC]";
  102. emotion 4;
  103. mes "Sorry but you don't have enough zeny to pay me.";
  104. close;
  105. }
  106. mes "[Marketing NPC]";
  107. mes "Okay, What item would you like to "+.@announcetypes$[3+.@selection]+"?";
  108.         input .@announce1$;
  109. next;
  110. mes "[Marketing NPC]";
  111. mes "What would you like to "+.@announcetypes$[3+.@selection]+" it for?";
  112.         input .@announce2$;
  113. next;
  114. mes "[Marketing NPC]";
  115. mes "Are you sure you would like to broadcast";
  116. mes "^0000FF "+.@announcetypes$[6+.@selection]+" "+.@announce1$+" for "+.@announce2$+"^000000 ?";
  117.         if(select("Yes","No")==2) goto L_no;
  118. next;
  119.         announce strcharinfo(0)+": "+.@announcetypes$[6+.@selection]+" "+.@announce1$+" for "+.@announce2$,bc_all,.@announcetypes$[.@selection+9];
  120.         set Zeny,Zeny-@cost;
  121.         set .time,1;
  122. mes "[Marketing NPC]";
  123. mes "Your advertisement was successfully broadcasted.";
  124. emotion 15;
  125. mes "Thanks for using my services!";
  126. close2;
  127. initnpctimer;
  128. emotion 25;
  129. npctalk "Service Deactivated.";
  130. end;
  131. OnTimer5000:
  132. npctalk "Service will be resumed after 3 minutes.";    
  133. end;
  134. OnTimer60000:
  135. emotion 10;
  136. npctalk "Service will be resumed after 2 minutes.";
  137. end;
  138. OnTimer120000:
  139. npctalk "Service will be resumed after 1 minute.";
  140. end;
  141. OnTimer180000:
  142. emotion 24;
  143. npctalk "Service Activated.";
  144.         set .time,0;
  145. stopnpctimer;
  146. end;
  147.  
  148. L_no:
  149. next;
  150. mes "[Marketing NPC]";
  151. mes "Very well then, talk to me whenever you need my service.";
  152. emotion 21;
  153. close;
  154.  
  155.  
  156. }