Hello hercules folks. Ive been using this broadcaster npc of mine way back year 2014. Now i would like to update its feature.
prontera,187,210,3 script Broadcaster#1::BC 894,{
set @npcname$, "^FF9300 Broadcaster ^000000";
set @header$,"[^0000ff" + @npcname$ + "^000000]";
set broadcastfee, 3000000;
mes @header$;
mes "Hi, I'm the Broadcaster.";
mes "I can Broadcast a message for you.";
mes " ";
mes " ";
mes " ";
mes "It costs ^ff0000"+ broadcastfee +"^000000 zeny.";
next;
mes @header$;
mes "Would you like to Broadcast?";
next;
switch (select("Yes","Nevermind")){
case 1:
if(Broadcast> gettimetick(2)) {
mes @header$;
mes "Sorry you have to wait for 1 min.";
close;
}
mes @header$;
if(Zeny<3000000) goto $nozenybc;
set Zeny,zeny - broadcastfee;
mes "Please input your message.";
next;
input broadcast$;
announce "Shout from "+strcharinfo(0)+": "+broadcast$+"",0,0x5AFF00; // Edit 5AFF00 for color code HTML Color Code
close2;
set Broadcast, gettimetick(2)+60; //Timer 60 = 1 minute/s
dispbottom "Broadcaster: Please wait for 1min until next broadcast to avoid flooding.";
end;
case 2:
mes @header$;
mes "Suit yourself.";
close;
}
$nozenybc:
mes "You don't have enough zeny.";
close;
}
^ This is the script. Simple Broadcaster NPC with a fee for every broadcast.
Now there's this Ragnarok Server that using somehow similar NPC. Yet, they have 3rd option. Its called Automated Broadcast. Check my screenies below.
This is the broadcaster NPC with Auto Broadcast menu. (see the rest of the screenshot below to see how the NPC's behavior)
After you input your desired number you can review it to proceed or not.
Annie made me a script which is similar to this one. Can be used as a case 3 for my script. But i dont know how to link it to my current script. Also, its asking for item. I cant make it to ask for zeny instead. Here's what annie wrote.
prontera,155,185,5 script sjdfsdlf 1_F_MARIA,{
mes "input your broadcast message";
mes "each broadcast use 1 "+ F_MesItemInfo(Poring_Coin);
if (!countitem(Poring_Coin))
close;
next;
input .@text$;
mes "input how many times to broadcast";
next;
input .@num;
if (countitem(Poring_Coin) < .@num) {
mes "you don't have enough "+ F_MesItemInfo(Poring_Coin);
close;
}
mes "after closing this dialog box I'll start broadcast";
close2;
if (countitem(Poring_Coin) < .@num) { // hacking recheck
mes "you don't have enough "+ F_MesItemInfo(Poring_Coin);
close;
}
delitem Poring_Coin, .@num;
while (.@loop++ < .@num) {
announce .@text$, bc_all;
sleep 1000;
}
end;
}
Hello hercules folks. Ive been using this broadcaster npc of mine way back year 2014. Now i would like to update its feature.
prontera,187,210,3 script Broadcaster#1::BC 894,{ set @npcname$, "^FF9300 Broadcaster ^000000"; set @header$,"[^0000ff" + @npcname$ + "^000000]"; set broadcastfee, 3000000; mes @header$; mes "Hi, I'm the Broadcaster."; mes "I can Broadcast a message for you."; mes " "; mes " "; mes " "; mes "It costs ^ff0000"+ broadcastfee +"^000000 zeny."; next; mes @header$; mes "Would you like to Broadcast?"; next; switch (select("Yes","Nevermind")){ case 1: if(Broadcast> gettimetick(2)) { mes @header$; mes "Sorry you have to wait for 1 min."; close; } mes @header$; if(Zeny<3000000) goto $nozenybc; set Zeny,zeny - broadcastfee; mes "Please input your message."; next; input broadcast$; announce "Shout from "+strcharinfo(0)+": "+broadcast$+"",0,0x5AFF00; // Edit 5AFF00 for color code HTML Color Code close2; set Broadcast, gettimetick(2)+60; //Timer 60 = 1 minute/s dispbottom "Broadcaster: Please wait for 1min until next broadcast to avoid flooding."; end; case 2: mes @header$; mes "Suit yourself."; close; } $nozenybc: mes "You don't have enough zeny."; close; }
^ This is the script. Simple Broadcaster NPC with a fee for every broadcast.
Now there's this Ragnarok Server that using somehow similar NPC. Yet, they have 3rd option. Its called Automated Broadcast. Check my screenies below.
This is the broadcaster NPC with Auto Broadcast menu. (see the rest of the screenshot below to see how the NPC's behavior)
After you input your desired number you can review it to proceed or not.
Annie made me a script which is similar to this one. Can be used as a case 3 for my script. But i dont know how to link it to my current script. Also, its asking for item. I cant make it to ask for zeny instead. Here's what annie wrote.
prontera,155,185,5 script sjdfsdlf 1_F_MARIA,{ mes "input your broadcast message"; mes "each broadcast use 1 "+ F_MesItemInfo(Poring_Coin); if (!countitem(Poring_Coin)) close; next; input .@text$; mes "input how many times to broadcast"; next; input .@num; if (countitem(Poring_Coin) < .@num) { mes "you don't have enough "+ F_MesItemInfo(Poring_Coin); close; } mes "after closing this dialog box I'll start broadcast"; close2; if (countitem(Poring_Coin) < .@num) { // hacking recheck mes "you don't have enough "+ F_MesItemInfo(Poring_Coin); close; } delitem Poring_Coin, .@num; while (.@loop++ < .@num) { announce .@text$, bc_all; sleep 1000; } end; }
Good Script indeed.
Edited by gidzdlcrzThank you so much!
Typos
Share this post
Link to post
Share on other sites