penwilders
New member
- Messages
- 33
- Points
- 0
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
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
