Eross Posted May 27, 2020 Group: Members Topic Count: 166 Topics Per Day: 0.09 Content Count: 377 Reputation: 12 Joined: 04/05/20 Last Seen: 13 hours ago Share Posted May 27, 2020 Hi, do you have a script that will restrict level 60 and below GM on summoning certain boss id ? For example my event gm wants to summon VALKYRIE ..there is a pop up message that will say "You are not allowed to summon this kind of mob" Quote Link to comment Share on other sites More sharing options...
0 Dazzu Posted May 27, 2020 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 12 Reputation: 3 Joined: 04/29/14 Last Seen: May 23, 2023 Share Posted May 27, 2020 (edited) OnMonsterCommand: .@mob = atoi(.@atcmd_parameters$[0]); if(!.@mob) //Input is not mob ID, store as string instead .@mob$ = .@atcmd_parameters$[0]; if(getgmlevel()<60 && (inarray(.restricted[0],.@mob)>-1 || inarray(.restricted$[0],.@mob$)>-1)){ message strcharinfo(0),"Your GM level does not allow you to summon this monster."; end; } if(.@atcmd_numparameters==2){ .@amt = atoi(.@atcmd_parameters$[1]); } atcommand "@monster "+(.@mob?.@mob:.@mob$)+" "+(.@amt>0?.@amt:""); end; OnInit: bindatcmd "monster","<npc name>::OnMonsterCommand",60,100; setarray .restricted[0],1751; //Add mob id as needed setarray .restricted$[0],"RANDGRIS"; //Added mob name that corresponds to mob id in the above array.This is required for mob name inputs instead of mob id Quick and dirty solution. Tested for functionality, but not tested for bugs. It accounts for both mob name and mob id inputs, but you'll have to add both the mob id and proper mob name in the arrays in OnInit. Personally, I don't like overwriting atcommands. Here's a nicer src-based solution that you could put under ACMD_FUNC(monster) in atcommand.ccp. Note that the MOBID_EMPERIUM statement is there for reference on where you should put it. if (mob_id == MOBID_EMPERIUM) { clif_displaymessage(fd, msg_txt(sd,83)); // Monster 'Emperium' cannot be spawned. return -1; } int restricted_mob_id[] {1751}; //Add mob ID as needed i = 0; int restricted_mob_id_size = ARRAYLENGTH(restricted_mob_id); ARR_FIND(0,restricted_mob_id_size,i,restricted_mob_id[i]==mob_id); if(pc_get_group_level(sd)<=60 && i<restricted_mob_id_size){ clif_displaymessage(fd, "Your GM level does not allow you to summon this monster."); return -1; } Edited May 27, 2020 by Dazzu Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted August 26, 2021 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted August 26, 2021 just configure your GM group properly with the necessary atcommands. https://github.com/rathena/rathena/blob/master/conf/groups.conf Quote Link to comment Share on other sites More sharing options...
Question
Eross
Hi, do you have a script that will restrict level 60 and below GM on summoning certain boss id ? For example my event gm wants to summon VALKYRIE ..there is a pop up message that will say "You are not allowed to summon this kind of mob"
Link to comment
Share on other sites
2 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.