I would like to make npc script for top-up in rAthena system.
When I run "runserver.bat" I find error > npc_addsrcfile: Can't find source file "npc/[path]" in map-server.bat and npc not work,
but when I run server eAthena I can run the script as usual and npc script can working.
So, I think it may be caused by npc.cpp file int path "/src/map/npc.cpp" but I am not sure.
Is there a way to help me fix this problem?
this is my npc script .
- script TMPAY -1,{//--- Check TimerOnPCLoginEvent:
query_sql "select SUM(amount) as sum_refill_amount from truemoney where account_id='"+getcharid(3)+"' and status='1'",.@sum_refill_amount;if(.@sum_refill_amount>0){set#CASHPOINTS,(#CASHPOINTS + .@sum_refill_amount);
query_sql "update truemoney set status='2' where account_id='"+getcharid(3)+"' and status='1'";
dispbottom "you got CASH "+.@sum_refill_amount+" cash";
close;}
end;}- script TMPAYMONEY 111,{//--- Check credit card every 10 secondOnTimer10000:
debugmes "asdf";// <-- I added this line to see your timer is running or not
query_sql "select card_id,account_id,amount from truemoney where status='1' and amount>0",.card_id,.account_id,.amount;
sleep2 500;if(getarraysize(.card_id)>0){for(set.i,0;.i < getarraysize(.card_id);set.i,.i+1){if(attachrid(.account_id[.i])==1){
query_sql "select status from truemoney where card_id='"+.card_id[.i]+"'",.check_refill$;if(.check_refill$=="1"){
dispbottom "You got cash "+.amount[.i]+" Cash";set#CASHPOINTS,(#CASHPOINTS + .amount[.i]);
query_sql "update truemoney set status='2' where card_id='"+.card_id[.i]+"'";}}
detachrid;}}
deletearray .card_id,getarraysize(.card_id);
deletearray .account_id,getarraysize(.account_id);
deletearray .amount,getarraysize(.amount);//--- Bonus credit
query_sql "select card_id,account_id,item_id,item_name,item_amount from cutrue_item_bonus where bonus_refill='1' and item_amount>0",.idb,.account_idb,.item_id,.item_name$,.item_amount;
sleep2 500;if(getarraysize(.idb)>0){for(set.j,0;.j < getarraysize(.idb);set.j,.j+1){if(attachrid(.account_idb[.j])==1){
query_sql "select bonus_refill from cutrue_item_bonus where card_id='"+.idb[.j]+"'",.check_refill$;if(.check_refill$=="1"){
dispbottom "You got bonus Item : "+.item_name$[.j]+" "+.item_amount[.j]+" ea";
getitem .item_id[.j],.item_amount[.j];
query_sql "update cutrue_item_bonus set bonus_refill='2' where card_id='"+.idb[.j]+"'";}}
detachrid;}}
deletearray .card_id,getarraysize(.idb);
deletearray .account_id,getarraysize(.account_idb);
deletearray .item_id$,getarraysize(.item_id$);
deletearray .item_name$,getarraysize(.item_name$);
deletearray .item_amount,getarraysize(.item_amount);
initnpctimer;
end;OnInit:
initnpctimer;
end;}
Question
mansanalchamp
Could you help me, please ?
I would like to make npc script for top-up in rAthena system.
When I run "runserver.bat" I find error > npc_addsrcfile: Can't find source file "npc/[path]" in map-server.bat and npc not work,
but when I run server eAthena I can run the script as usual and npc script can working.
So, I think it may be caused by npc.cpp file int path "/src/map/npc.cpp" but I am not sure.
Is there a way to help me fix this problem?
this is my npc script .
this is a result
Link to comment
Share on other sites
2 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.