EDIT: I solved this issue by disabling announcer npc.
Hey guys. Uhm, I need some help regarding my client. Well obviously, I post this topic here at scripting support, because I'm suspecting that one of the custom scripts I used were maybe the cause of the problem.
My client crashes every hour and 30 mins, like 1:30, then 2:30, 3:30, etc. everytime. I dunno what to do to fix this, been tryin' every possible way to fix, but i cant. Here's the list of scripts I used, maybe you can help me by posting it here.
mes "You required ^FF0000"+.BMCosts[ @menu ]+" Zeny^000000 to use this services.";
next;
break;
}
mes "^0000FFCost^000000 : ^FF0000"+.BMCosts[ @menu ]+"^000000 Zeny";
message strcharinfo(0),"Input 0 to Cancel";
mes "^FF0000Slot[X]^000000-[^0000FFSTR|AGI|VIT|INT|DEX|LUK^000000]";
mes "^0000FF_____________________________^000000";
for( set .@i,1; .@i <= .MaxSlots; set .@i,.@i + 1 ){
mes "^FF0000"+.@i+".^0000FF"+getd( "Slot_"+.@i+"$" )+"^000000 [^0000FF"+getd("STR_"+.@i)+"|"+getd("AGI_"+.@i)+"|"+getd("VIT_"+.@i)+"|"+getd("INT_"+.@i)+"|"+getd("DEX_"+.@i)+"|"+getd("LUK_"+.@i)+"^000000]";
}
mes "^0000FF_____________________________^000000";
input .@a,0,.MaxSlots;
if( .@a != 0 ){
callfunc("SwitchBuild",.@a);
message strcharinfo(0),"Done";
set Zeny,Zeny - .BMCosts[ @menu ];
}
next;
break;
Case 2:
if( Zeny < .BMCosts[ @menu ] ){
mes "You required ^FF0000"+.BMCosts[ @menu ]+" Zeny^000000 to use this services.";
next;
break;
}
mes "^0000FFCost^000000 : ^FF0000"+.BMCosts[ @menu ]+"^000000 Zeny";
mes "^0000FF_____________________________^000000";
mes "^FF0000@^000000 STR - "+readparam(bStr)+" ^FF0000@^000000 AGI - "+readparam(bAgi)+" ^FF0000@^000000 VIT - "+readparam(bVit)+"";
mes "^FF0000@^000000 INT - "+readparam(bInt)+" ^FF0000@^000000 DEX - "+readparam(bDex)+" ^FF0000@^000000 LUK - "+readparam(bLuk)+"";
mes "^0000FF_____________________________^000000";
message strcharinfo(0),"Input 0 to Cancel";
mes "^FF0000Slot[X]^000000-[^0000FFSTR|AGI|VIT|INT|DEX|LUK^000000]";
mes "^0000FF_____________________________^000000";
for( set .@i,1; .@i <= .MaxSlots; set .@i,.@i + 1 ){
mes "^FF0000"+.@i+".^0000FF"+getd( "Slot_"+.@i+"$" )+"^000000 [^0000FF"+getd("STR_"+.@i)+"|"+getd("AGI_"+.@i)+"|"+getd("VIT_"+.@i)+"|"+getd("INT_"+.@i)+"|"+getd("DEX_"+.@i)+"|"+getd("LUK_"+.@i)+"^000000]";
}
mes "^0000FF_____________________________^000000";
input .@a,0,.MaxSlots;
if( .@a != 0 ){
callfunc("SaveBuild",.@a,.StatRename);
set Zeny,Zeny - .BMCosts[ @menu ];
}
next;
break;
Case 3:
if( Zeny < .BMCosts[ @menu ] ){
mes "You required ^FF0000"+.BMCosts[ @menu ]+" Zeny^000000 to use this services.";
next;
break;
}
mes "^0000FFCost^000000 : ^FF0000"+.BMCosts[ @menu ]+"^000000 Zeny";
ResetStatus;
set Zeny,Zeny - .BMCosts[ @menu ];
mes "Your Status has been Reset. You have gained back your ^FF0000riginal Status Points^000000";
next;
break;
Case 4:
if( Zeny < .BMCosts[ @menu ] ){
mes "You required ^FF0000"+.BMCosts[ @menu ]+" Zeny^000000 to use this services.";
next;
break;
}
mes "^0000FFCost^000000 : ^FF0000"+.BMCosts[ @menu ]+"^000000 Zeny";
ResetSkill;
set Zeny,Zeny - .BMCosts[ @menu ];
mes "Your Skills has been Reset. You have gained back your ^FF0000riginal Skill Points^000000";
next;
break;
}
}
OnInit:
waitingroom "Build Manager",0;
end;
}
function script SaveBuild {
setd "STR_"+getarg(0),readparam(bStr);
setd "AGI_"+getarg(0),readparam(bAgi);
setd "VIT_"+getarg(0),readparam(bVIT);
setd "INT_"+getarg(0),readparam(bInt);
setd "DEX_"+getarg(0),readparam(bDex);
setd "LUK_"+getarg(0),readparam(bLuk);
if( getarg(1) ){
do{
message strcharinfo(0),"Input the Name for this Slot. [ Max. 12 Chars ]";
mes "You have ^336699" + @amount + "^000000 of that item, how many do you wish to exchange?";
input @input;
if (@input<@sam) goto Exit2;
if ((countitem(@exitem) < @input)) goto Exit3;
set #KAFRAPOINTS,#KAFRAPOINTS+(@input*@point/@sam);
set @receive_points,@input*@point/@sam;
delitem @exitem,@input;
goto Exit1;
Info:
next;
mes "[Kafra Point NPC]";
mes "There is only a limited list of items which can be exchanged into Kafra Points. If you give me the items below, I will exchange them for Kafra Points.";
next;
mes "[Kafra Point NPC]";
mes "10 Research Chart = 1 point";
mes "10 Handcuffs = 1 point";
mes "1 Santa Poring Card = 50 points";
mes "1 Poporing Card = 100 points";
mes "1 Marin Card = 100 points";
mes "1 Metaling Card = 200 points";
mes "1 Mastering Card = 500 points";
mes "1 Angeling Card = 1,000 points";
mes "1 Arc Angeling Card = 2,000 points";
mes "1 Ghostring Card = 2,000 points";
mes "30 TCG Card = 10 points";
goto CS_Ex1;
Exit1:
next;
mes "[Kafra Point NPC]";
mes "Your current Kafra Points balance: ^336699" + #KAFRAPOINTS;
mes "^000000Please come again if you wish to exchange items for more Kafra Points, thank you!";
dispbottom "You received "+@receive_points+" Kafrapoints.";
Question
19jake68
EDIT: I solved this issue by disabling announcer npc.
Hey guys. Uhm, I need some help regarding my client. Well obviously, I post this topic here at scripting support, because I'm suspecting that one of the custom scripts I used were maybe the cause of the problem.
My client crashes every hour and 30 mins, like 1:30, then 2:30, 3:30, etc. everytime. I dunno what to do to fix this, been tryin' every possible way to fix, but i cant. Here's the list of scripts I used, maybe you can help me by posting it here.
1. Announcer
//Announcer NPC by Wausser([email protected])
//Version 1.2
//Descpription: This NPC can be used by players to broadcast a message in different 5 different colors against a fee
// It can also be used by GM's to broadcast a message through a simple GM menu.
// GM's of lvl 80 and higher can save up to 3 messages, one of them will be
// announced every hour on a 33,33% chance.
//
//Intsructions: To set the zeny price change @zeny, 10000000 to an amount you like.
// To change the time the hourly messsage will be announced, change Onminute30: to a time you like
//
//Special thanks to: Dashu(guiding & advice) and GM-Windsor-(for his line announce callfunc("F_RandMes .. etc ))
prontera,161,185,4 script Broadcaster 832,{
set @zeny, 100000; //Put your price here
if (getgmlevel() >= 80) goto L_GM80;
if(getgmlevel() < 80 && getgmlevel() >= 60) goto L_GM60;
if(getgmlevel() < 60 && getgmlevel() >= 40) goto L_GM40;
mes "[Arnold]";
mes "Hi I'm the official announcer";
mes "of this server.";
mes "Can I help you?";
next;
switch (select("I want to broadcast an announcement:Tell me the conditions:Nothing")){
case 3:
mes "[Arnold]";
mes "If you never need to announce something";
mes "just drop by.";
close;
case 2:
mes "[Arnold]";
mes "Ok I'll tell you the rules.";
next;
mes "[Arnold]";
mes "First of all, all rules that";
mes "count for this server, count also for me.";
next;
mes "[Arnold]";
mes "So no advertising, spamming, insluting or provoking.";
next;
mes "[Arnold]";
mes "The fee for my service is " + @zeny + " zeny.";
close;
case 1:
mes "[Arnold]";
mes "All right, but you have";
mes "to follow the rules.";
mes "Abuse will be severly punished.";
next;
mes "[Arnold]";
mes "Please prepare your message";
mes "and fill it in, in the next screen.";
next;
input @msg$;
mes "[Arnold]";
mes "All right, this is";
mes "the message you want broadcasted?";
next;
mes "" + @msg$ + "";
next;
switch (select("Yes:No:Quit")){
case 1:
mes "[Arnold]";
mes "In what color do you want to have your announcement?";
next;
switch (select("Yellow:Red:Blue:Green:Pink")){
case 1:
//YELLOW
mes "[Arnold]";
mes "Then I will announce it.";
next;
if (zeny < @zeny) goto L_NO_ZENY;
set Zeny,Zeny-@zeny;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFFFF00;
mes "[Arnold]";
mes "Thanks, come back if you need more announcements.";
close;
case 2:
//RED
mes "[Arnold]";
mes "Then I will announce it.";
next;
if (zeny < @zeny) goto L_NO_ZENY;
set Zeny,Zeny-@zeny;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFF3333;
mes "[Arnold]";
mes "Thanks, come back if you need more announcements.";
close;
case 3:
//Blue
mes "[Arnold]";
mes "Then I will announce it.";
next;
if (zeny < @zeny) goto L_NO_ZENY;
set Zeny,Zeny-@zeny;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0x00CCFF;
mes "[Arnold]";
mes "Thanks, come back if you need more announcements.";
close;
case 4:
//Green
mes "[Arnold]";
mes "Then I will announce it.";
next;
if (zeny < @zeny) goto L_NO_ZENY;
set Zeny,Zeny-@zeny;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0x33FF00;
mes "[Arnold]";
mes "Thanks, come back if you need more announcements.";
close;
case 5:
//Pink
mes "[Arnold]";
mes "Then I will announce it.";
next;
if (zeny < @zeny) goto L_NO_ZENY;
set Zeny,Zeny-@zeny;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFF00CC;
mes "[Arnold]";
mes "Thanks, come back if you need more announcements.";
close;
}
case 2:
mes "[Arnold]";
mes "You'll have one chance to change your broadcast.";
next;
input @msg$;
mes "[Arnold]";
mes "In what color do you want to have your announcement?";
next;
switch (select("Yellow:Red:Blue:Green:Pink")){
case 1:
//YELLOW
mes "[Arnold]";
mes "Then I will announce it.";
next;
if (zeny < @zeny) goto L_NO_ZENY;
set Zeny,Zeny-@zeny;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFFFF00;
mes "[Arnold]";
mes "Thanks, come back if you need more announcements.";
close;
case 2:
//RED
mes "[Arnold]";
mes "Then I will announce it.";
next;
if (zeny < @zeny) goto L_NO_ZENY;
set Zeny,Zeny-@zeny;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFF3333;
mes "[Arnold]";
mes "Thanks, come back if you need more announcements.";
close;
case 3:
//Blue
mes "[Arnold]";
mes "Then I will announce it.";
next;
if (zeny < @zeny) goto L_NO_ZENY;
set Zeny,Zeny-@zeny;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0x00CCFF;
mes "[Arnold]";
mes "Thanks, come back if you need more announcements.";
close;
case 4:
//Green
mes "[Arnold]";
mes "Then I will announce it.";
next;
if (zeny < @zeny) goto L_NO_ZENY;
set Zeny,Zeny-@zeny;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0x33FF00;
mes "[Arnold]";
mes "Thanks, come back if you need more announcements.";
close;
case 5:
//Pink
mes "[Arnold]";
mes "Then I will announce it.";
next;
if (zeny < @zeny) goto L_NO_ZENY;
set Zeny,Zeny-@zeny;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFF00CC;
mes "[Arnold]";
mes "Thanks, come back if you need more announcements.";
close;
}
case 3:
mes "[Arnold]";
mes "If you never need to announce something";
mes "just drop by.";
close;
}
}
L_NO_ZENY:
mes "[Arnold]";
mes "You don't have enough zeny.";
mes "Please come back if you have enough.";
close;
//GM MENU
L_GM80:
mes "[Arnold]";
mes "Hello Master.";
mes "What can I do for you?";
next;
switch (select("Regular Broadcast:Periodical Announcement:Nothing")){
case 3:
mes "[Arnold]";
mes "All right Master";
mes "come back if you need my services.";
close;
case 2:
mes "[Arnold]";
mes "Here you can choose to send a message";
mes "every hour.";
next;
mes "[Arnold]";
mes "You can set to 3 messages";
mes "the server will randomly pick one of those mesages";
mes "to broadcast it once every hour";
next;
switch (select("Message Number 1:Message Number 2:Message Number 3: View current messages")){
case 1:
mes "[Arnold]";
mes "Put in message number 1 here";
next;
input $gm_msg1$;
mes "[Arnold]";
mes "The current message is:";
mes "" + $gm_msg1$ + "";
next;
mes "[Arnold]";
mes "Come back if you need my services Master.";
close;
case 2:
mes "[Arnold]";
mes "Put in message number 2 here";
next;
input $gm_msg2$;
mes "[Arnold]";
mes "The current message is:";
mes "" + $gm_msg2$ + "";
next;
mes "[Arnold]";
mes "Come back if you need my services Master.";
close;
case 3:
mes "[Arnold]";
mes "Put in message number 3 here";
next;
input $gm_msg3$;
mes "[Arnold]";
mes "The current message is:";
mes "" + $gm_msg3$ + "";
next;
mes "[Arnold]";
mes "Come back if you need my services Master.";
close;
case 4:
mes "[Arnold]";
mes "This are the current messages:";
mes "-" + $gm_msg1$ + "";
mes "-" + $gm_msg2$ + "";
mes "-" + $gm_msg3$ + "";
next;
mes "[Arnold]";
mes "Come back if you need my services Master.";
close;
}
case 1:
mes "[Arnold]";
mes "Please only use this for server purposes.";
mes "Not for fun messages.";
next;
input @msg$;
mes "[Arnold]";
mes "All right, this is";
mes "the message you want broadcasted?";
next;
mes "" + @msg$ + "";
next;
switch (select("Yes:No:Quit")){
case 1:
mes "[Arnold]";
mes "In what color do you want to have your announcement?";
next;
switch (select("Yellow:Red:Blue:Green:Pink")){
case 1:
//YELLOW
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFFFF00;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 2:
//RED
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFF3333;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 3:
//Blue
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0x00CCFF;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 4:
//Green
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0x33FF00;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 5:
//Pink
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFF00CC;
mes "[Arnold]";
mes "Thanks MAster, come back if you need more announcements.";
close;
}
case 2:
mes "[Arnold]";
mes "Please fill in the right message, I'll broadcast it rightaway.";
next;
input @msg$;
mes "I'll broadcast this message.";
next;
mes "[Arnold]";
mes "In what color do you want to have your announcement?";
next;
switch (select("Yellow:Red:Blue:Green:Pink")){
case 1:
//YELLOW
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFFFF00;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 2:
//RED
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFF3333;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 3:
//Blue
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0x00CCFF;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 4:
//Green
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0x33FF00;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 5:
//Pink
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFF00CC;
mes "[Arnold]";
mes "Thanks MAster, come back if you need more announcements.";
close;
}
case 3:
mes "[Arnold]";
mes "All right Master";
mes "come back if you need my services.";
close;
}
}
L_GM40:
mes "[Arnold]";
mes "Hello Master.";
mes "What can I do for you?";
next;
switch (select("Regular Broadcast:Nothing")){
case 2:
mes "[Arnold]";
mes "All right Master";
mes "come back if you need my services.";
close;
case 1:
mes "[Arnold]";
mes "Please only use this for server purposes.";
mes "Not for fun messages.";
next;
input @msg$;
mes "[Arnold]";
mes "All right, this is";
mes "the message you want broadcasted?";
next;
mes "" + @msg$ + "";
next;
switch (select("Yes:No:Quit")){
case 1:
mes "[Arnold]";
mes "In what color do you want to have your announcement?";
next;
switch (select("Yellow:Red:Blue:Green:Pink")){
case 1:
//YELLOW
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFFFF00;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 2:
//RED
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFF3333;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 3:
//Blue
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0x00CCFF;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 4:
//Green
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0x33FF00;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 5:
//Pink
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFF00CC;
mes "[Arnold]";
mes "Thanks MAster, come back if you need more announcements.";
close;
}
case 2:
mes "[Arnold]";
mes "Please fill in the right message, I'll broadcast it rightaway.";
next;
input @msg$;
mes "I'll broadcast this message.";
next;
mes "[Arnold]";
mes "In what color do you want to have your announcement?";
next;
switch (select("Yellow:Red:Blue:Green:Pink")){
case 1:
//YELLOW
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFFFF00;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 2:
//RED
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFF3333;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 3:
//Blue
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0x00CCFF;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 4:
//Green
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0x33FF00;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 5:
//Pink
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFF00CC;
mes "[Arnold]";
mes "Thanks MAster, come back if you need more announcements.";
close;
}
case 3:
mes "[Arnold]";
mes "All right Master";
mes "come back if you need my services.";
close;
}
}
L_GM60:
mes "[Arnold]";
mes "Hello Master.";
mes "What can I do for you?";
next;
switch (select("Regular Broadcast:Periodical Announcement:Nothing")){
case 3:
mes "[Arnold]";
mes "All right Master";
mes "come back if you need my services.";
close;
case 2:
mes "[Arnold]";
mes "Here you can view the periodical messages.";
next;
mes "[Arnold]";
mes "The server adminstrator can save to 3 messages.";
mes "The server will randomly pick one of those mesages";
mes "to broadcast it once every hour";
next;
switch (select("View current messages:Nothing")){
case 1:
mes "[Arnold]";
mes "This are the current messages:";
mes "-" + $gm_msg1$ + "";
mes "-" + $gm_msg2$ + "";
mes "-" + $gm_msg3$ + "";
next;
mes "[Arnold]";
mes "Come back if you need my services Master.";
close;
case 2:
mes "[Arnold]";
mes "All right Master";
mes "come back if you need my services.";
close;
}
case 1:
mes "[Arnold]";
mes "Please only use this for server purposes.";
mes "Not for fun messages.";
next;
input @msg$;
mes "[Arnold]";
mes "All right, this is";
mes "the message you want broadcasted?";
next;
mes "" + @msg$ + "";
next;
switch (select("Yes:No:Quit")){
case 1:
mes "[Arnold]";
mes "In what color do you want to have your announcement?";
next;
switch (select("Yellow:Red:Blue:Green:Pink")){
case 1:
//YELLOW
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFFFF00;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 2:
//RED
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFF3333;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 3:
//Blue
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0x00CCFF;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 4:
//Green
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0x33FF00;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 5:
//Pink
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFF00CC;
mes "[Arnold]";
mes "Thanks MAster, come back if you need more announcements.";
close;
}
case 2:
mes "[Arnold]";
mes "Please fill in the right message, I'll broadcast it rightaway.";
next;
input @msg$;
mes "I'll broadcast this message.";
next;
mes "[Arnold]";
mes "In what color do you want to have your announcement?";
next;
switch (select("Yellow:Red:Blue:Green:Pink")){
case 1:
//YELLOW
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFFFF00;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 2:
//RED
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFF3333;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 3:
//Blue
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0x00CCFF;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 4:
//Green
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0x33FF00;
mes "[Arnold]";
mes "Thanks Master, come back if you need more announcements.";
close;
case 5:
//Pink
mes "[Arnold]";
mes "Then I will announce it.";
next;
announce ""+strcharinfo(0)+": "+@msg$+"",bc_all,0xFF00CC;
mes "[Arnold]";
mes "Thanks MAster, come back if you need more announcements.";
close;
}
case 3:
mes "[Arnold]";
mes "All right Master";
mes "come back if you need my services.";
close;
}
}
}
// The Hourly Announce Part
- script GM_Announcer -1,{
OnMinute30:
announce callfunc("F_RandMes",3,""+ $gm_msg1$ +"",""+ $gm_msg2$ +"",""+ $gm_msg3$ +""),0;
end;
}
2. Attendance
- script AttendanceScript -1,{
OnPCLoginEvent:
// last login was BEFORE today
if (#lastDayOnline < gettimetick(2)/86400) {
// last login was exactly YESTERDAY, set consecutive_days +1
if (#lastDayOnline == (gettimetick(2)/86400 - 1))
set #consecutive_days, #consecutive_days+1;
else // reset their streak to 1
set #consecutive_days, 1;
set #lastDayOnline, gettimetick(2)/86400;
set #KAFRAPOINTS, #KAFRAPOINTS + 2;
dispbottom "You received 2 Kafrapoints for your daily attendance";
dispbottom "Current Balance ="+#KAFRAPOINTS+" Kafrapoints";
// check for 7-day streak
if (#consecutive_days % 7 == 0){
set #KAFRAPOINTS, #KAFRAPOINTS + 50; // Jellopy
dispbottom "You received 50 Kafrapoints for your daily attendance";
dispbottom "Current Balance ="+#KAFRAPOINTS+" Kafrapoints";
// check for 30-day streak
if (#consecutive_days % 30 == 0){
set #KAFRAPOINTS, #KAFRAPOINTS + 200; // Jellopy
dispbottom "You received 200 Kafrapoints for your daily attendance";
dispbottom "Current Balance ="+#KAFRAPOINTS+" Kafrapoints";
// save today as the Last Day they were Online
}
}
}
end;
}
3. Build Manager
prontera,142,180,5 script Build Manager 439,{
// Mode of NPC
// 1 = Switch & Save Status Build
// 2 = Reset Status
// 4 = Reset Skills
// 7 = All of Above [ 1+2+4 = 7 ]
set .BMMode,7;
// How Many Slots available to Save Status Builds.
set .MaxSlots,5;
// Enable Stats Slot Rename
set .StatRename,1;
setarray .BMCosts[1],
500000, // Switch Builds Cost
500000, // Save Build Cost
500000, // Reset Status Cost
500000; // Reset Skills Cost
while(1){
switch( select( ( .BMMode & 1 )?"^0000FFSwitch Status^000000":"",
( .BMMode & 1 )?"^0000FFSave Status^000000":"",
( .BMMode & 2 )?"^0000FFReset Status^000000":"",
( .BMMode & 4 )?"^0000FFReset Skills^000000":"")){
Case 1:
if( Zeny < .BMCosts[ @menu ] ){
mes "You required ^FF0000"+.BMCosts[ @menu ]+" Zeny^000000 to use this services.";
next;
break;
}
mes "^0000FFCost^000000 : ^FF0000"+.BMCosts[ @menu ]+"^000000 Zeny";
message strcharinfo(0),"Input 0 to Cancel";
mes "^FF0000Slot[X]^000000-[^0000FFSTR|AGI|VIT|INT|DEX|LUK^000000]";
mes "^0000FF_____________________________^000000";
for( set .@i,1; .@i <= .MaxSlots; set .@i,.@i + 1 ){
mes "^FF0000"+.@i+".^0000FF"+getd( "Slot_"+.@i+"$" )+"^000000 [^0000FF"+getd("STR_"+.@i)+"|"+getd("AGI_"+.@i)+"|"+getd("VIT_"+.@i)+"|"+getd("INT_"+.@i)+"|"+getd("DEX_"+.@i)+"|"+getd("LUK_"+.@i)+"^000000]";
}
mes "^0000FF_____________________________^000000";
input .@a,0,.MaxSlots;
if( .@a != 0 ){
callfunc("SwitchBuild",.@a);
message strcharinfo(0),"Done";
set Zeny,Zeny - .BMCosts[ @menu ];
}
next;
break;
Case 2:
if( Zeny < .BMCosts[ @menu ] ){
mes "You required ^FF0000"+.BMCosts[ @menu ]+" Zeny^000000 to use this services.";
next;
break;
}
mes "^0000FFCost^000000 : ^FF0000"+.BMCosts[ @menu ]+"^000000 Zeny";
mes "^0000FF_____________________________^000000";
mes "^FF0000@^000000 STR - "+readparam(bStr)+" ^FF0000@^000000 AGI - "+readparam(bAgi)+" ^FF0000@^000000 VIT - "+readparam(bVit)+"";
mes "^FF0000@^000000 INT - "+readparam(bInt)+" ^FF0000@^000000 DEX - "+readparam(bDex)+" ^FF0000@^000000 LUK - "+readparam(bLuk)+"";
mes "^0000FF_____________________________^000000";
message strcharinfo(0),"Input 0 to Cancel";
mes "^FF0000Slot[X]^000000-[^0000FFSTR|AGI|VIT|INT|DEX|LUK^000000]";
mes "^0000FF_____________________________^000000";
for( set .@i,1; .@i <= .MaxSlots; set .@i,.@i + 1 ){
mes "^FF0000"+.@i+".^0000FF"+getd( "Slot_"+.@i+"$" )+"^000000 [^0000FF"+getd("STR_"+.@i)+"|"+getd("AGI_"+.@i)+"|"+getd("VIT_"+.@i)+"|"+getd("INT_"+.@i)+"|"+getd("DEX_"+.@i)+"|"+getd("LUK_"+.@i)+"^000000]";
}
mes "^0000FF_____________________________^000000";
input .@a,0,.MaxSlots;
if( .@a != 0 ){
callfunc("SaveBuild",.@a,.StatRename);
set Zeny,Zeny - .BMCosts[ @menu ];
}
next;
break;
Case 3:
if( Zeny < .BMCosts[ @menu ] ){
mes "You required ^FF0000"+.BMCosts[ @menu ]+" Zeny^000000 to use this services.";
next;
break;
}
mes "^0000FFCost^000000 : ^FF0000"+.BMCosts[ @menu ]+"^000000 Zeny";
ResetStatus;
set Zeny,Zeny - .BMCosts[ @menu ];
mes "Your Status has been Reset. You have gained back your ^FF0000riginal Status Points^000000";
next;
break;
Case 4:
if( Zeny < .BMCosts[ @menu ] ){
mes "You required ^FF0000"+.BMCosts[ @menu ]+" Zeny^000000 to use this services.";
next;
break;
}
mes "^0000FFCost^000000 : ^FF0000"+.BMCosts[ @menu ]+"^000000 Zeny";
ResetSkill;
set Zeny,Zeny - .BMCosts[ @menu ];
mes "Your Skills has been Reset. You have gained back your ^FF0000riginal Skill Points^000000";
next;
break;
}
}
OnInit:
waitingroom "Build Manager",0;
end;
}
function script SaveBuild {
setd "STR_"+getarg(0),readparam(bStr);
setd "AGI_"+getarg(0),readparam(bAgi);
setd "VIT_"+getarg(0),readparam(bVIT);
setd "INT_"+getarg(0),readparam(bInt);
setd "DEX_"+getarg(0),readparam(bDex);
setd "LUK_"+getarg(0),readparam(bLuk);
if( getarg(1) ){
do{
message strcharinfo(0),"Input the Name for this Slot. [ Max. 12 Chars ]";
input getd( "Slot_"+getarg(0)+"$" );
}while( getstrlen( getd( "Slot_"+getarg(0)+"$" ) ) > 12 );
}else{
set getd( "Slot_"+getarg(0)+"$" ),"Stats "+getarg(0);
}
return;
}
function script SwitchBuild {
ResetStatus;
statusup2 bStr,getd( "STR_"+getarg(0) )-1;
statusup2 bAgi,getd( "AGI_"+getarg(0) )-1;
statusup2 bVit,getd( "VIT_"+getarg(0) )-1;
statusup2 bInt,getd( "INT_"+getarg(0) )-1;
statusup2 bDex,getd( "DEX_"+getarg(0) )-1;
statusup2 bLuk,getd( "LUK_"+getarg(0) )-1;
set StatusPoint,0;
return;
}
4. Cash Exchanger
// ===== eAthena Script =======================================
// = Kafra Points Exchanger NPC
// ===== By: ==================================================
// = Cruxiaer
// ===== Current Version: =====================================
// = 1.00
// ===== Compatible With: =====================================
// = eAthena 1.x
// ===== Description: =========================================
// = Exchange items for Kafra Points
// ===== How to use: ==========================================
// Edit the menu and item then set how much points can be
// exchanged for the selected item:
// @exitem = item code to be exchanged
// @point = point given for each item exchanged
// ===== Changelog: ===========================================
// 1.00 - First release
// =============================================================
prontera,164,160,3 script Kafra Points Exchanger::KafraPNPC 113,{
mes "[Kafra Point NPC]";
mes "Good day, how may I help you ?";
mes "Your current Kafra Points balance: ^336699" + #KAFRAPOINTS;
menu "Exchange items into Kafra Points",CS_Ex1,"See more information",Info,"Nothing",Exit1;
CS_Ex1:
next;
mes "[Kafra Point NPC]";
mes "Please tell which item do you wish to exchange for Kafra Points.";
menu "None:Research Chart:Handcuffs:Santa Poring Card:Poporing Card:Marin Card:Metaling Card:Mastering Card:Angeling Card:Arc Angeling Card:Ghostring Card:TCG Card",CS_Ex2;
CS_Ex2:
if (@menu==1) goto Exit1;
if (@menu==2) { set @exitem,7347;
set @sam,10;
set @point,1; }
if (@menu==3) { set @exitem,7345;
set @sam,10;
set @point,1; }
if (@menu==4) { set @exitem,4005;
set @sam,2;
set @point,50; }
if (@menu==5) { set @exitem,4033;
set @sam,2;
set @point,100; }
if (@menu==6) { set @exitem,4196;
set @sam,2;
set @point,100; }
if (@menu==7) { set @exitem,4341;
set @sam,2;
set @point,200; }
if (@menu==8) { set @exitem,4197;
set @sam,2;
set @point,500; }
if (@menu==9) { set @exitem,4054;
set @sam,2;
set @point,1000; }
if (@menu==10) { set @exitem,4241;
set @sam,2;
set @point,2000; }
if (@menu==11) { set @exitem,4047;
set @sam,2;
set @point,2000; }
if (@menu==12) { set @exitem,7227;
set @sam,30;
set @point,10; }
set @amount,(countitem(@exitem));
goto CS_Ex3;
CS_Ex3:
next;
mes "[Kafra Point NPC]";
mes "You have ^336699" + @amount + "^000000 of that item, how many do you wish to exchange?";
input @input;
if (@input<@sam) goto Exit2;
if ((countitem(@exitem) < @input)) goto Exit3;
set #KAFRAPOINTS,#KAFRAPOINTS+(@input*@point/@sam);
set @receive_points,@input*@point/@sam;
delitem @exitem,@input;
goto Exit1;
Info:
next;
mes "[Kafra Point NPC]";
mes "There is only a limited list of items which can be exchanged into Kafra Points. If you give me the items below, I will exchange them for Kafra Points.";
next;
mes "[Kafra Point NPC]";
mes "10 Research Chart = 1 point";
mes "10 Handcuffs = 1 point";
mes "1 Santa Poring Card = 50 points";
mes "1 Poporing Card = 100 points";
mes "1 Marin Card = 100 points";
mes "1 Metaling Card = 200 points";
mes "1 Mastering Card = 500 points";
mes "1 Angeling Card = 1,000 points";
mes "1 Arc Angeling Card = 2,000 points";
mes "1 Ghostring Card = 2,000 points";
mes "30 TCG Card = 10 points";
goto CS_Ex1;
Exit1:
next;
mes "[Kafra Point NPC]";
mes "Your current Kafra Points balance: ^336699" + #KAFRAPOINTS;
mes "^000000Please come again if you wish to exchange items for more Kafra Points, thank you!";
dispbottom "You received "+@receive_points+" Kafrapoints.";
dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints.";
close;
Exit2:
next;
mes "[Kafra Point NPC]";
mes "The item code you input was not valid, please try again.";
goto CS_Ex1;
Exit3:
next;
mes "[Kafra Point NPC]";
mes "I'm afraid you do not have that many.";
goto CS_Ex1;
}
5. Cluckers
//===== rAthena Script =======================================
//= Cluck! Cluck! Boom!
//===== By: ==================================================
//= Keale
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= Click the chicken and try retrieve the item at a low
//= chance. If you fail he will nuke, freeze, stone,
//= stun, or make you fall asleep.
//= The prize is configurable and triggered by the NPC.
//===== Additional Comments: =================================
//= 1.0 First release.
//= 1.1 Using 'switch rand' instead.
//= 1.2 Cleaned and standardized. [Euphy]
//============================================================
prontera,156,219,4 script Cluckers 800,{
set .@GMAccess,80; // GM level required to access NPC
if (.startcluck) {
specialeffect2 2;
switch(rand(15)) {
case 0: npctalk "CLUUUUUUCK!!!"; atcommand "@nuke "+strcharinfo(0); emotion 23; break;
case 1: npctalk "Cluuuuuck!~"; break;
case 2: atcommand "@nuke "+strcharinfo(0); break;
case 3: sc_start SC_Freeze,10000,0; break;
case 4: npctalk "CLUUUUUUUUUCK!!!"; atcommand "@nuke "+strcharinfo(0); emotion 23; break;
case 5: sc_start SC_Sleep,10000,0; break;
case 6: sc_start SC_Stone,10000,0; emotion 29; break;
case 7: npctalk "CLUUUUUUCK!!!"; atcommand "@nuke "+strcharinfo(0); emotion 23; break;
case 8: npctalk "Cluck! CLUUUCK!!"; atcommand "@nuke "+strcharinfo(0); emotion 23; break;
case 9: sc_start SC_Stun,10000,0; break;
case 10: sc_start SC_Sleep,10000,0; emotion 29; break;
case 11: npctalk "Cluck! Cluck!"; break;
case 12: sc_start SC_Stun,10000,0; break;
case 13: atcommand "@nuke "+strcharinfo(0); break;
default:
if (rand(50) < 4) {
npctalk "WOOF!...........";
specialeffect2 72;
announce "[Cluck! Cluck! Boom!] " + strcharinfo(0) + " squeezed out the prize! Well done!",0;
getitem $cluck_item_id,$cluck_item_amount;
set .startcluck,0;
} else {
npctalk "Cluck! CLUUUCK!!";
atcommand "@nuke "+strcharinfo(0);
}
break;
}
end;
}
mes "[Cluckers]";
if (getgmlevel() >= .@GMAccess) {
mes "Cluck cluck! Cluuuuuck? ^FF0000~Hi GM " + strcharinfo(0) + ", Wanna play today?~^000000";
mes "Cluck cluck... CLUCK! ^FF0000~Just tell me what to do!~^000000";
next;
while(1) switch(select("Start Event:Check Prize:Set Prize:Not today Cluckers")) {
case 1:
mes "[Cluckers]";
mes "CLUCK! ^FF0000~Sure thing!~^000000";
emotion 33;
close2;
announce "[Cluck! Cluck! Boom!] is about to start in Prontera!",bc_blue;
initnpctimer;
end;
case 2:
mes "[Cluckers]";
mes "Cluck, cluck cluck... Cluck! ^FF0000~The current prize is^000000 ^008000"+ $cluck_item_amount +" "+ getitemname($cluck_item_id) +".^000000";
next;
break;
case 3:
mes "[Cluckers]";
mes "Cluck cluck? Cluck??? ^FF0000~What should the prize for winning be? Please input the ID.~^000000";
input $cluck_item_id;
next;
mes "[Cluckers]";
mes "Cluck? cluuuck? ^FF0000~How many if this item should I give away?~^000000";
input $cluck_item_amount;
next;
mes "[Cluckers]";
mes "Cluck cluck..? Cluck. ^FF0000~So, the prize is^000000 ^008000"+ $cluck_item_amount +" "+ getitemname($cluck_item_id) +"^000000? ^FF0000Great.~^000000";
emotion 33;
next;
break;
case 4:
mes "[Cluckers]";
mes "Cluck cluck cluck...";
close;
}
}
mes "Cluck cluck! Cluuuuuck?";
mes "Cluck....";
close;
OnTimer10000:
announce "Please hurry behind the fountain if you want to play with the crazy chicken!",bc_blue;
end;
OnTimer20000:
announce "Cluckers has eaten one of my items! I'm too scared to retrieve it!",bc_blue;
end;
OnTimer30000:
announce "Click the insane chicken and try squeeze out the item, if you're lucky you'll win! Are you ready?",bc_blue;
end;
OnTimer40000:
announce "GO! Click the chicken to get the prize!",bc_blue;
if (!$cluck_item_id) set $cluck_item_id,7227;
if (!$cluck_item_amount) set $cluck_item_amount,3;
set .startcluck,1;
end;
}
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.