Snaehild Posted June 10, 2021 Posted June 10, 2021 I was playing around on AnnieRuru's code here, as I want to spawn warps on a specific day and time and bind it to an atcommand in case that fails. I'm getting this error [Error]: npc_event: event not found [day_night_npc::Warpact] - script day_night_npc -1,{ OnInit: bindatcmd("summonwarps", strnpcinfo(3) +"::Warpact"); } //OnClock1151: //OnInit: OnWarpact: sleep 1; // if you want to use different script file, then slow down the script execution if(gettime(DT_DAYOFMONTH)==10) { // day warp enablenpc "launchwarp#1"; disablenpc "nightwarp#1"; } else { enablenpc "nightwarp#1"; disablenpc "launchwarp#1"; } end; } map,90,87,0 warp launchwarp#1 1,1,iz_int,18,26 //test Quote
0 mihaamiharu Posted June 10, 2021 Posted June 10, 2021 (edited) 47 minutes ago, Snaehild said: [Error]: npc_event: event not found [day_night_npc::Warpact] - script day_night_npc -1,{ OnInit: bindatcmd("summonwarps", strnpcinfo(3) +"::Warpact"); // Youre' Calling Warpact function here instead OnWarpact } //OnClock1151: //OnInit: OnWarpact: // This is different with ::Warpact map,90,87,0 warp launchwarp#1 1,1,iz_int,18,26 //test look at my Comment // Edited June 10, 2021 by mihaamiharu Quote
0 Snaehild Posted June 10, 2021 Author Posted June 10, 2021 (edited) Thanks @mihaamiharu I still get an error by using OnWarpact [Error]: npc_parsesrcfile: Unknown syntax in file '/warps_launch.txt', line '8'. Stopping... * w1=OnWarpact: - script day_night_npc -1,{ OnInit: bindatcmd("summonwarps", strnpcinfo(3) +"::OnWarpact"); } //OnClock1151: //OnInit: OnWarpact: sleep 1; // if you want to use different script file, then slow down the script execution Edited June 10, 2021 by Snaehild Quote
0 Emistry Posted June 12, 2021 Posted June 12, 2021 - script day_night_npc -1,{ OnInit: bindatcmd("summonwarps", strnpcinfo(3) +"::OnWarpact"); end; //OnClock1151: //OnInit: OnWarpact: sleep 1; // if you want to use different script file, then slow down the script execution if(gettime(DT_DAYOFMONTH)==10) { // day warp enablenpc "launchwarp#1"; disablenpc "nightwarp#1"; } else { enablenpc "nightwarp#1"; disablenpc "launchwarp#1"; } end; } map,90,87,0 warp launchwarp#1 1,1,iz_int,18,26 //test your event label is wrong, and your script has extra curley bracket that ended the script, and causing errors Quote
Question
Snaehild
I was playing around on AnnieRuru's code here, as I want to spawn warps on a specific day and time and bind it to an atcommand in case that fails.
I'm getting this error
[Error]: npc_event: event not found [day_night_npc::Warpact]
- script day_night_npc -1,{ OnInit: bindatcmd("summonwarps", strnpcinfo(3) +"::Warpact"); } //OnClock1151: //OnInit: OnWarpact: sleep 1; // if you want to use different script file, then slow down the script execution if(gettime(DT_DAYOFMONTH)==10) { // day warp enablenpc "launchwarp#1"; disablenpc "nightwarp#1"; } else { enablenpc "nightwarp#1"; disablenpc "launchwarp#1"; } end; } map,90,87,0 warp launchwarp#1 1,1,iz_int,18,26 //test
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.