Created
November 5, 2020 12:08
-
-
Save AnnieRuru/cf56174c4bbbd3a61d4dd0c11100c425 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prontera,158,180,3 script Broadcaster#1 4_F_KHELLISIA,{ | |
.@fee = 3000000; | |
.@delay = 60; | |
.@npcname$ = "[^FF9300" + strnpcinfo(NPC_NAME) + "^000000]"; | |
mes .@npcname$; | |
mes "Hi, I'm the Broadcaster."; | |
mes "I can Broadcast a message for you."; | |
mes " "; | |
mes " "; | |
mes " "; | |
mesf "It costs %s%s%s Zeny.", F_MesColor(C_RED), F_InsertComma(.@fee), F_MesColor(C_BLACK); | |
next; | |
mes .@npcname$; | |
mes "Would you like to Broadcast?"; | |
next; | |
switch(select("Yes", "Nevermind", "Auto-broadcast")) { | |
mes .@npcname$; | |
case 1: | |
if (broadcast_delay + .@delay > gettimetick(2)) { | |
mes "Sorry you have to wait for 1 min."; | |
close; | |
} | |
if (Zeny < .@fee) { | |
mes "You don't have enough zeny."; | |
close; | |
} | |
mes "Please input your message."; | |
next; | |
input .@bc$; | |
if (Zeny < .@fee) { | |
mes .@npcname$; | |
mes "You don't have enough zeny."; | |
close; | |
} | |
Zeny -= .@fee; | |
announce "Shout from "+ strcharinfo(PC_NAME) +": "+ .@bc$, bc_all, C_LIME; // Use Color Constants | |
broadcast_delay = gettimetick(2); //Timer 60 = 1 minute/s | |
dispbottom "Broadcaster: Please wait for 1min until next broadcast to avoid flooding."; | |
close; | |
case 2: | |
mes "Suit yourself."; | |
close; | |
case 3: | |
if (broadcast_delay + .@delay > gettimetick(2)) { | |
mes "Sorry you have to wait for 1 min."; | |
close; | |
} | |
mes "Please input your message."; | |
next; | |
input .@bc$; | |
mes .@npcname$; | |
mes "How many times do you want to broadcast?"; | |
mes "Min: 1"; | |
mes "Max: 100"; | |
next; | |
if (input(.@num, 1, 100)) { | |
mes .@npcname$; | |
mes "Suit yourself."; | |
close; | |
} | |
.@cost = .@fee * .@num; | |
mes .@header$; | |
mes "You want to broadcast:"; | |
mes "^ff0000" + .@bc$ + "^000000"; | |
mes "Every 3 minutes for ^00ff00" + .@num + "^000000 time(s)?"; | |
mes "It will cost you a total of ^ff0000" + F_InsertComma(.@cost) + "^000000 zeny."; | |
next; | |
if (select("Proceed", "Cancel") == 2) { | |
mes .@header$; | |
mes "Suit yourself."; | |
close; | |
} | |
if (Zeny < .@cost) { | |
mes .@npcname$; | |
mes "You don't have enough zeny."; | |
close; | |
} | |
Zeny -= .@cost; | |
broadcast_delay = gettimetick(2); | |
close2; | |
dispbottom "Broadcaster: Please wait for 1min until next broadcast to avoid flooding."; | |
while (.@num--) { | |
announce .@bc$, bc_all; | |
sleep 3*60*1000; | |
} | |
end; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment