penwilders 0 Posted December 7, 2013 this is my script of my broadcaster npc prontera,146,169,5 script Broadcaster 114,{ //what's the npc name to show in messages? set @npcname$, "Broadcaster"; //NPC Headers Name: set @header$,"[^0000ff" + @npcname$ + "^000000]"; //NPC COST PER Broadcast: set @broadcastfee, 5000000; //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mes @header$; mes "Hi, I'm the Broadcaster"; mes "I can Broadcast a message for you"; next; mes @header$; mes "It costs 5 Million Zeny "; next; mes @header$; mes "Would you like to Broadcast?"; switch (select("Yes","No")){ case 1: if(@Broadcast> gettimetick(2)) { next; mes @header$; mes "Sorry you have to wait for 3 minutes."; close; } next; mes @header$; if(Zeny<5000000) goto noZenybc; set Zeny, Zeny - @broadcastfee; mes "Please input your message."; next; input @broadcast$; announce "Message from "+strcharinfo(0)+": "+@broadcast$+"",0,0x00FFFF; close2; set @Broadcast, gettimetick(2)+180; dispbottom "Broadcaster: Please wait for 3 minutes until next broadcast to avoid flooding."; end; case 2: mes "Suit yourself"; close; } noZenybc: mes "I have to check that you have"; mes "enough money"; next; mes @header$; mes "Im sorry but you don't have enough Zeny"; mes "Go get it if you want to Broadcast"; close; } but once you relog you can broadcast again. i want 1 char/account/ only to broadcast for every 3 mins to avoid flooding/spamming thanks in advance Quote Share this post Link to post Share on other sites
0 Patskie 88 Posted December 7, 2013 Change all : @Broadcast to : Broadcast // character variable#Broadcast // account variable Quote Share this post Link to post Share on other sites
0 Mhalicot 392 Posted December 7, 2013 ^Hi simple replace @Broadcast to $Broadcast Note: "@" - A temporary variable attached to the character. They disappear when the character logs out."$" - A global permanent variable. They are stored in database table `mapreg`. for more information about variables visit Variables Quote Share this post Link to post Share on other sites
0 penwilders 0 Posted December 7, 2013 thank you very much for replying Quote Share this post Link to post Share on other sites
0 penwilders 0 Posted December 7, 2013 others are stuck please help Quote Share this post Link to post Share on other sites
0 Patskie 88 Posted December 7, 2013 Works fine on my server Quote Share this post Link to post Share on other sites
this is my script of my broadcaster npc
Share this post
Link to post
Share on other sites