kalabasa Posted February 12, 2022 Group: Members Topic Count: 123 Topics Per Day: 0.05 Content Count: 478 Reputation: 14 Joined: 11/30/17 Last Seen: January 23 Share 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 Link to comment Share on other sites More sharing options...
1 Racaae Posted February 17, 2022 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 212 Reputation: 94 Joined: 06/02/12 Last Seen: 2 hours ago Share 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 Link to comment Share on other sites More sharing options...
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
Link to comment
Share on other sites
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.