kalabasa Posted February 12 Share Posted February 12 if ( getmonsterinfo( killedrid, MOB_MVPEXP ) ) { getmapxy([email protected]$,[email protected],[email protected],BL_PC); monster [email protected]$,rand([email protected],[email protected]),rand([email protected],[email protected]),"--ja--",1324,1; } // add mvp & mini boss mob id's here setarray [email protected]_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 Link to comment Share on other sites More sharing options...
1 Racaae Posted February 17 Share Posted February 17 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 Link to comment Share on other sites More sharing options...
if ( getmonsterinfo( killedrid, MOB_MVPEXP ) ) { getmapxy([email protected]$,[email protected],[email protected],BL_PC); monster [email protected]$,rand([email protected],[email protected]),rand([email protected],[email protected]),"--ja--",1324,1; } // add mvp & mini boss mob id's here setarray [email protected]_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
Link to comment
Share on other sites