Jaytz 1 Posted May 9, 2020 - script test -1,{ OnMinute10: if( strcharinfo(PC_MAP) == "amatsu" ){ mes "Hello!"; close; } end; } is this right? i want to trigger npc script every 10minutes in specific map but this code is not working for me Quote Share this post Link to post Share on other sites
0 heroji 2 Posted May 9, 2020 you mean you want that msg appear for every player in a specific map? Quote Share this post Link to post Share on other sites
0 Caspian 23 Posted May 10, 2020 Try: - script test FAKE_NPC,{ OnMinute10: if( strcharinfo(PC_MAP) == "amatsu" ){ mes "Hello!"; close; end; } } Quote Share this post Link to post Share on other sites
0 Rynbef 3 Posted May 11, 2020 (edited) It will not working cause no player is attached. Strcharinfo needs a player attached. The same is the "mes" and "close" script command. If u want to message player every 10 minutes in amatsu u have to attach every player and check then the map per strcharinfo(3) and message them. Rynbef~ Edited May 11, 2020 by Rynbef Quote Share this post Link to post Share on other sites
0 Rynbef 3 Posted May 11, 2020 (edited) OnMinute10: query_sql( "SELECT `account_id` from `char` where `online` = '1'", .@account_id); for(set .@i,0; .@i<getarraysize(.@account_id); .@i++){ attachrid .@account_id[.@i]; If(strcharinfo(3)=="amatsu")mes "Hello and welcome in amatsu"; close2; detachrid; end; } It's should work. I have wrote it on my mobile phone. Rynbef~ Edited May 11, 2020 by Rynbef Quote Share this post Link to post Share on other sites
- script test -1,{ OnMinute10: if( strcharinfo(PC_MAP) == "amatsu" ){ mes "Hello!"; close; } end; }
is this right? i want to trigger npc script every 10minutes in specific map but this code is not working for me
Share this post
Link to post
Share on other sites