kaeyih Posted October 31, 2020 Posted October 31, 2020 (edited) How to create script of boss monster spawn after 4 mini boss on the same map is killed? Edited October 31, 2020 by kaeyih Quote
0 DoomSlayer Posted November 18, 2020 Posted November 18, 2020 does this mini boss have only on that map or is it on another maps? if he is just on that map you can use something like this, didn't test it but should work fine! - script BOSSSPAWN -1,{ OnInit: set .bspawn,0; //Where the kills will be saved(don't change) set .bneed,4; //Kills needed set .bossid,XXXX; //Boss ID set .minibossid,XXXX; //Mini Boss ID set .reward,512; //Reward for killing the Boss set .map$"MAPNAME"; //Name of the map you kill mini bosses end; OnNPCKillEvent: if (killedrid == .minibossid){ set .bspawn,.bspawn +1; if (.bspawn >= .bneed){ mapannounce .map$,"The map boss has appeared!",0; monster .map$,0,0,"NAME OF BOSS MONSTER",.bossid,1,"BOSSSPAWN::OnBossKill"; set .bspawn, 0; } } end; OnBossKill: mapannounce "The player "+strcharinfo(0)+" has killed the boss!"; getitem .reward,1; end; } Quote
0 kaeyih Posted November 19, 2020 Author Posted November 19, 2020 Thank you for all your replies. Really appreicated! Quote
0 kaeyih Posted November 21, 2020 Author Posted November 21, 2020 Thank you for all your replies. Really appreicated! Ok I have tried out the script but I dont really understand how to edit it. losttower1b is my custommap that added in and is working. This is what I've written losttower1b,111,262,0,0 monster MH_COELACANTH_Y_A1 20787,1,90000,0,0 losttower1b,111,384,0,0 monster MH_COELACANTH_Y_A2 20788,1,90000,0,0 losttower1b,291,384,0,0 monster MH_COELACANTH_Y_A3 20789,1,90000,0,0 losttower1b,288,263,0,0 monster MH_COELACANTH_Y_A4 20790,1,90000,0,0 //losttower1b,199,327,0,0 monster MH_BAKONAWA 20863,1,90000,0,0 - script Losttower1b -1,{ OnInit: set .bspawn,0; //Where the kills will be saved(don't change) set .bneed,4; //Kills needed set .bossid,20863; //Boss ID set .minibossid,20787; //Mini Boss ID set .reward,512; //Reward for killing the Boss set .map$,"losttower1b"; //Name of the map you kill mini bosses end; OnNPCKillEvent: if (killedrid == .minibossid){ set .bspawn,.bspawn +1; if (.bspawn >= .bneed){ mapannounce .map$,"The map boss has appeared!",0; monster .map$,199,331,10,10,"MH_BAKONAWA",.bossid,1,"BOSSSPAWN::OnBossKill"; set .bspawn, 0; } } end; OnBossKill: mapannounce "The player "+strcharinfo(0)+" has killed the boss!", getitem (.reward,1), end; } But i end up getting these errors [Warning]: script: buildin_getmapxy: Invalid type 0. [Debug]: Source (NPC): Gold Room Warper at ordeal_1-2 (0,0) [Warning]: script: buildin_getmapxy: Invalid type 0. [Debug]: Source (NPC): Gold Room Warper at ordeal_1-2 (0,0) [Warning]: script: buildin_getmapxy: Invalid type 0. [Debug]: Source (NPC): Gold Room Warper at ordeal_1-2 (0,0) [Info]: Pinging SQL server to keep connection alive... [Info]: Pinging SQL server to keep connection alive... [Info]: Pinging SQL server to keep connection alive... [Warning]: script: buildin_getmapxy: Invalid type 0. [Debug]: Source (NPC): Gold Room Warper at ordeal_1-2 (0,0) [Warning]: Unexpected type for argument 4. Expected string. [Debug]: Data: number value=10 [Warning]: Unexpected type for argument 6. Expected number. [Debug]: Data: string value="MH_BAKONAWA" [Debug]: Function: monster [Debug]: Source (NPC): Losttower1b (invisible/not on a map) [Warning]: NPC event parameter deprecated! Please use 'NPCNAME::OnEVENT' instead of '20863'. [Debug]: Source (NPC): Losttower1b (invisible/not on a map) [Warning]: buildin_monster: Attempted to spawn non-existing monster class 10 [Debug]: Source (NPC): Losttower1b (invisible/not on a map) I am trying to make players kill 4 mini boss on same map 4 different fixed location to spawn the boss. Mini boss 20787, 20788, 20789, 20790, Boss spawn MH_BAKONAWA 20863 Quote
0 Poring King Posted December 14, 2020 Posted December 14, 2020 Quote [Warning]: script: buildin_getmapxy: Invalid type 0.[Debug]: Source (NPC): Gold Room Warper at ordeal_1-2 (0,0)[Warning]: script: buildin_getmapxy: Invalid type 0.[Debug]: Source (NPC): Gold Room Warper at ordeal_1-2 (0,0)[Warning]: script: buildin_getmapxy: Invalid type 0.[Debug]: Source (NPC): Gold Room Warper at ordeal_1-2 (0,0) On this Error you need to change the 0 into BL_NPC if NPC BL_PC if Player On this Error you need to use string not number & use number instead of stringEx: String = Word Number = Number Quote [Warning]: Unexpected type for argument 4. Expected string.[Debug]: Data: number value=10[Warning]: Unexpected type for argument 6. Expected number.[Debug]: Data: string value="MH_BAKONAWA"[Debug]: Function: monster On this error you need to use the NPCNAME:OnEventLabel Quote [Warning]: NPC event parameter deprecated! Please use 'NPCNAME::OnEVENT' instead of '20863'.[Debug]: Source (NPC): Losttower1b (invisible/not on a map)[Warning]: buildin_monster: Attempted to spawn non-existing monster class 10[Debug]: Source (NPC): Losttower1b (invisible/not on a map) Quote
0 kaeyih Posted December 14, 2020 Author Posted December 14, 2020 Thanks for the reply, this post solved. Quote
Question
kaeyih
How to create script of boss monster spawn after 4 mini boss on the same map is killed?
Edited by kaeyih5 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.