kalabasa Posted February 12, 2022 Posted February 12, 2022 if ( getmonsterinfo( killedrid, MOB_MVPEXP ) ) { getmapxy(.@map$,.@x,.@y,BL_PC); monster .@map$,rand(.@x,.@x-3),rand(.@y-3,.@y),"--ja--",1324,1; } // add mvp & mini boss mob id's here setarray .@monster_list[0], 1312, 1087,1086,1511; also only the monster that is available that are in the array list here i can't figure it out can someone do a quick fix Quote
1 Racaae Posted February 17, 2022 Posted February 17, 2022 Hi. You need to set the array with IDs before using the conditional. You can use inarray to check if the monster killed ID is in the array. Quote *inarray <array name>,<value>; This command returns the index of the first matching value found in the array. It will return -1 if the value is not found. //Only monsters in the given array if ( inarray(.@monster_list, killedrid) > -1) //Only monsters who give MvP exp if ( getmonsterinfo( killedrid, MOB_MVPEXP) ) //Or both if ( inarray(.@monster_list, killedrid) > -1 || getmonsterinfo( killedrid, MOB_MVPEXP) ) Example: - script boss_treasure HIDDEN_WARP_NPC,{ end; OnNPCKillEvent: // add mvp & mini boss mob id's here setarray .@monster_list[0], 1312,1087,1086,1511; if ( inarray(.@monster_list, killedrid) > -1 || getmonsterinfo( killedrid, MOB_MVPEXP) ) { getmapxy(.@map$,.@x,.@y, BL_PC); monster .@map$, rand(.@x,.@x-3),rand(.@y-3,.@y), "--ja--", 1324, 1; } end; } 1 Quote
Question
kalabasa
if ( getmonsterinfo( killedrid, MOB_MVPEXP ) ) { getmapxy(.@map$,.@x,.@y,BL_PC); monster .@map$,rand(.@x,.@x-3),rand(.@y-3,.@y),"--ja--",1324,1; } // add mvp & mini boss mob id's here setarray .@monster_list[0], 1312, 1087,1086,1511;
also only the monster that is available that are in the array list here
i can't figure it out can someone do a quick fix
1 answer 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.