Kuroyama 6 Posted November 3, 2020 So my current timer right now for thanatos is 4 hours fix when thanatos phantom dies in his tower. OnTimer28800000: $@thana_summon = 0; $@thana_summon2 = 0; donpcevent "Memory Seal#tt1::OnEnable"; donpcevent "Memory Seal#tt2::OnEnable"; donpcevent "Memory Seal#tt3::OnEnable"; donpcevent "Memory Seal#tt4::OnEnable"; donpcevent "#thanatos_seal::OnEnable"; stopnpctimer; end; } I wan't it to become random like 2, 3 or 4hrs. Not with fix time. Is that even possible? Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted November 3, 2020 needs to do some calculation on official repo is OnTimer7200000: means 2 hours btw OnTimer28800000: is 8 hours, not 4 hours so let's leave it at OnTimer28800000: then if you want 2 hours then setnpctimer 28800000 - 2*60*60*1000; startnpctimer; if you want 3 hours then setnpctimer 28800000 - 3*60*60*1000; startnpctimer; if you want 4 hours then setnpctimer 28800000 - 4*60*60*1000; startnpctimer; so it should look like this OnTimer36000: OnTimer37000: mapwarp "thana_boss","tha_t12",130,52; stopnpctimer; setnpctimer 28800000 - F_Rand(2,3,4)*60*60*1000; startnpctimer; end; OnTimer28800000: $@thana_summon = 0; $@thana_summon2 = 0; donpcevent "Memory Seal#tt1::OnEnable"; donpcevent "Memory Seal#tt2::OnEnable"; donpcevent "Memory Seal#tt3::OnEnable"; donpcevent "Memory Seal#tt4::OnEnable"; donpcevent "#thanatos_seal::OnEnable"; stopnpctimer; end; didn't hard to test ... hopefully you don't say its bug Spoiler at least I tested with this prontera,155,185,5 script kjdsfdsjhf 1_F_MARIA,{ initnpctimer; end; OnTimer1000: stopnpctimer; setnpctimer 28800000 - F_Rand(1,2,3,4,5)*1000; .start = gettimetick(0); startnpctimer; end; OnTimer28800000: announce "test = "+(gettimetick(0) - .start), bc_all; end; } 2 1 xJhay, evilpuncker and Kuroyama reacted to this Quote Share this post Link to post Share on other sites
0 Kuroyama 6 Posted November 24, 2020 On 11/4/2020 at 1:05 AM, AnnieRuru said: needs to do some calculation on official repo is OnTimer7200000: means 2 hours btw OnTimer28800000: is 8 hours, not 4 hours so let's leave it at OnTimer28800000: then if you want 2 hours then setnpctimer 28800000 - 2*60*60*1000; startnpctimer; if you want 3 hours then setnpctimer 28800000 - 3*60*60*1000; startnpctimer; if you want 4 hours then setnpctimer 28800000 - 4*60*60*1000; startnpctimer; so it should look like this OnTimer36000: OnTimer37000: mapwarp "thana_boss","tha_t12",130,52; stopnpctimer; setnpctimer 28800000 - F_Rand(2,3,4)*60*60*1000; startnpctimer; end; OnTimer28800000: $@thana_summon = 0; $@thana_summon2 = 0; donpcevent "Memory Seal#tt1::OnEnable"; donpcevent "Memory Seal#tt2::OnEnable"; donpcevent "Memory Seal#tt3::OnEnable"; donpcevent "Memory Seal#tt4::OnEnable"; donpcevent "#thanatos_seal::OnEnable"; stopnpctimer; end; OnTimer36000: OnTimer37000: mapwarp "thana_boss","tha_t12",130,52; stopnpctimer; setnpctimer 28800000 - F_Rand(2,3,4)*60*60*1000; startnpctimer; end; OnTimer28800000: $@thana_summon = 0; $@thana_summon2 = 0; donpcevent "Memory Seal#tt1::OnEnable"; donpcevent "Memory Seal#tt2::OnEnable"; donpcevent "Memory Seal#tt3::OnEnable"; donpcevent "Memory Seal#tt4::OnEnable"; donpcevent "#thanatos_seal::OnEnable"; stopnpctimer; end; didn't hard to test ... hopefully you don't say its bug Hide contents at least I tested with this prontera,155,185,5 script kjdsfdsjhf 1_F_MARIA,{ initnpctimer; end; OnTimer1000: stopnpctimer; setnpctimer 28800000 - F_Rand(1,2,3,4,5)*1000; .start = gettimetick(0); startnpctimer; end; OnTimer28800000: announce "test = "+(gettimetick(0) - .start), bc_all; end; } prontera,155,185,5 script kjdsfdsjhf 1_F_MARIA,{ initnpctimer; end; OnTimer1000: stopnpctimer; setnpctimer 28800000 - F_Rand(1,2,3,4,5)*1000; .start = gettimetick(0); startnpctimer; end; OnTimer28800000: announce "test = "+(gettimetick(0) - .start), bc_all; end; } Just wanna send a feedback ms @AnnieRuru. first spawn works, however. After thanatos dies, it won't spawn anymore in the next random time. Quote Share this post Link to post Share on other sites
So my current timer right now for thanatos is 4 hours fix when thanatos phantom dies in his tower.
OnTimer28800000: $@thana_summon = 0; $@thana_summon2 = 0; donpcevent "Memory Seal#tt1::OnEnable"; donpcevent "Memory Seal#tt2::OnEnable"; donpcevent "Memory Seal#tt3::OnEnable"; donpcevent "Memory Seal#tt4::OnEnable"; donpcevent "#thanatos_seal::OnEnable"; stopnpctimer; end; }
I wan't it to become random like 2, 3 or 4hrs. Not with fix time.
Is that even possible?
Share this post
Link to post
Share on other sites