OnInit:
set .maxLoan, 10000000;
set .interestRate, 0.05;
set .bankName, "Prontera Bank Inc.";
set .bankLocation, "Prontera";
addtimer 7200000, strnpcinfo(0) + "::OnAdvertise";
end;
OnPCLoginEvent:
if (#LOANAMOUNT > 0) {
dispbottom "Banker: You have an outstanding loan of " + #LOANAMOUNT + " zeny. Please remember to pay it back with interest.";
addtimer 3600000, strnpcinfo(0) + "::OnRemind";
addtimer 86400000, strnpcinfo(0) + "::OnBroadcast";
}
end;
OnAdvertise:
announce "Visit " + .bankName + " located in " + .bankLocation + " for all your banking needs!", bc_all;
addtimer 7200000, strnpcinfo(0) + "::OnAdvertise";
end;
OnRemind:
if (#LOANAMOUNT > 0) {
dispbottom "Banker: You have an outstanding loan of " + #LOANAMOUNT + " zeny. Please remember to pay it back with interest.";
addtimer 3600000, strnpcinfo(0) + "::OnRemind";
}
end;
OnBroadcast:
if (#LOANAMOUNT > 0) {
announce "Player " + strcharinfo(0) + " has failed to repay their loan of " + #LOANAMOUNT + " zeny within 24 hours!", bc_all;
addtimer 1800000, strnpcinfo(0) + "::OnBroadcast";
}
end;
OnTalk:
mes "[Banker]";
mes "Hello! I am the banker from " + .bankName + ". How can I help you today?";
next;
switch(select("Loan Zeny:Pay Loan:Cancel")) {
case 1:
if (#LOANAMOUNT > 0) {
mes "[Banker]";
mes "You already have an outstanding loan of " + #LOANAMOUNT + " zeny.";
close;
}
mes "[Banker]";
mes "How much zeny would you like to loan? The maximum amount is " + .maxLoan + " zeny.";
input .loanAmount;
if (.loanAmount > .maxLoan) {
mes "[Banker]";
mes "I'm sorry, but the maximum loan amount is " + .maxLoan + " zeny.";
close;
}
#LOANAMOUNT = .loanAmount;
Zeny += .loanAmount;
mes "[Banker]";
mes "You have successfully loaned " + .loanAmount + " zeny. Please remember to pay it back with interest.";
addtimer 3600000, strnpcinfo(0) + "::OnRemind";
addtimer 86400000, strnpcinfo(0) + "::OnBroadcast";
close;
case 2:
if (#LOANAMOUNT == 0) {
mes "[Banker]";
mes "You do not have any outstanding loans.";
close;
}
.paybackAmount = #LOANAMOUNT * (1 + .interestRate);
if (Zeny < .paybackAmount) {
mes "[Banker]";
mes "You do not have enough zeny to pay back your loan. You need " + .paybackAmount + " zeny.";
close;
}
Zeny -= .paybackAmount;
#LOANAMOUNT = 0;
mes "[Banker]";
mes "You have successfully paid back your loan with interest. Thank you for your business!";
close;
case 3:
mes "[Banker]";
mes "Goodbye!";
close;
}
}
Spoiler
Please Help
It seems my code is not working at all i cant see whats wrong
npc_parsesrcfile: Unknown syntax in file 'npc/jobs/banker.txt', line '1'. Stopping...
* w1=prt_in,43,109,4 script Prontera Banker 894,{
Question
hikoshijiro
prt_in,43,109,4 script Prontera#Banker 105,{
OnInit:
set .maxLoan, 10000000;
set .interestRate, 0.05;
set .bankName, "Prontera Bank Inc.";
set .bankLocation, "Prontera";
addtimer 7200000, strnpcinfo(0) + "::OnAdvertise";
end;
OnPCLoginEvent:
if (#LOANAMOUNT > 0) {
dispbottom "Banker: You have an outstanding loan of " + #LOANAMOUNT + " zeny. Please remember to pay it back with interest.";
addtimer 3600000, strnpcinfo(0) + "::OnRemind";
addtimer 86400000, strnpcinfo(0) + "::OnBroadcast";
}
end;
OnAdvertise:
announce "Visit " + .bankName + " located in " + .bankLocation + " for all your banking needs!", bc_all;
addtimer 7200000, strnpcinfo(0) + "::OnAdvertise";
end;
OnRemind:
if (#LOANAMOUNT > 0) {
dispbottom "Banker: You have an outstanding loan of " + #LOANAMOUNT + " zeny. Please remember to pay it back with interest.";
addtimer 3600000, strnpcinfo(0) + "::OnRemind";
}
end;
OnBroadcast:
if (#LOANAMOUNT > 0) {
announce "Player " + strcharinfo(0) + " has failed to repay their loan of " + #LOANAMOUNT + " zeny within 24 hours!", bc_all;
addtimer 1800000, strnpcinfo(0) + "::OnBroadcast";
}
end;
OnTalk:
mes "[Banker]";
mes "Hello! I am the banker from " + .bankName + ". How can I help you today?";
next;
switch(select("Loan Zeny:Pay Loan:Cancel")) {
case 1:
if (#LOANAMOUNT > 0) {
mes "[Banker]";
mes "You already have an outstanding loan of " + #LOANAMOUNT + " zeny.";
close;
}
mes "[Banker]";
mes "How much zeny would you like to loan? The maximum amount is " + .maxLoan + " zeny.";
input .loanAmount;
if (.loanAmount > .maxLoan) {
mes "[Banker]";
mes "I'm sorry, but the maximum loan amount is " + .maxLoan + " zeny.";
close;
}
#LOANAMOUNT = .loanAmount;
Zeny += .loanAmount;
mes "[Banker]";
mes "You have successfully loaned " + .loanAmount + " zeny. Please remember to pay it back with interest.";
addtimer 3600000, strnpcinfo(0) + "::OnRemind";
addtimer 86400000, strnpcinfo(0) + "::OnBroadcast";
close;
case 2:
if (#LOANAMOUNT == 0) {
mes "[Banker]";
mes "You do not have any outstanding loans.";
close;
}
.paybackAmount = #LOANAMOUNT * (1 + .interestRate);
if (Zeny < .paybackAmount) {
mes "[Banker]";
mes "You do not have enough zeny to pay back your loan. You need " + .paybackAmount + " zeny.";
close;
}
Zeny -= .paybackAmount;
#LOANAMOUNT = 0;
mes "[Banker]";
mes "You have successfully paid back your loan with interest. Thank you for your business!";
close;
case 3:
mes "[Banker]";
mes "Goodbye!";
close;
}
}
Please Help


It seems my code is not working at all i cant see whats wrong
npc_parsesrcfile: Unknown syntax in file 'npc/jobs/banker.txt', line '1'. Stopping...
Edited by hikoshijiro* w1=prt_in,43,109,4 script Prontera Banker 894,{
Link to comment
Share on other sites
11 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.