Jayzy Posted March 19, 2013 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 62 Reputation: 0 Joined: 12/08/11 Last Seen: August 22, 2018 Share Posted March 19, 2013 How to disallow players from jumping to GM accounts using the @jumpto command Quote Link to comment Share on other sites More sharing options...
Brian Posted March 19, 2013 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 593 Joined: 10/26/11 Last Seen: June 2, 2018 Share Posted March 19, 2013 Do you have @jumpto enabled for normal players ?!! There is no GM level check in trunk/src/map/atcommand.c, but you could add one. Quote Link to comment Share on other sites More sharing options...
Jayzy Posted March 21, 2013 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 62 Reputation: 0 Joined: 12/08/11 Last Seen: August 22, 2018 Author Share Posted March 21, 2013 Yes I did for premium users. How can I add one? Quote Link to comment Share on other sites More sharing options...
Brian Posted March 21, 2013 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 593 Joined: 10/26/11 Last Seen: June 2, 2018 Share Posted March 21, 2013 trunk/src/map/atcommand.c line 485, add this code: if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) { clif_displaymessage(fd, msg_txt(81)); // Your GM level doesn't authorize you to preform this action on the specified player. return -1; } So the final @jumpto block looks like this: /*========================================== * *------------------------------------------*/ ACMD_FUNC(jumpto) { struct map_session_data *pl_sd = NULL; nullpo_retr(-1, sd); if (!message || !*message) { clif_displaymessage(fd, msg_txt(911)); // Please enter a player name (usage: @jumpto/@warpto/@goto <char name/ID>). return -1; } if((pl_sd=map_nick2sd((char *)message)) == NULL && (pl_sd=map_charid2sd(atoi(message))) == NULL) { clif_displaymessage(fd, msg_txt(3)); // Character not found. return -1; } if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif_displaymessage(fd, msg_txt(247)); // You are not authorized to warp to this map. return -1; } if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif_displaymessage(fd, msg_txt(248)); // You are not authorized to warp from your current map. return -1; } if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) { clif_displaymessage(fd, msg_txt(81)); // Your GM level doesn't authorize you to preform this action on the specified player. return -1; } if( pc_isdead(sd) ) { clif_displaymessage(fd, msg_txt(664)); return -1; } pc_setpos(sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, CLR_TELEPORT); sprintf(atcmd_output, msg_txt(4), pl_sd->status.name); // Jumped to %s clif_displaymessage(fd, atcmd_output); return 0; } Save and recompile. Quote Link to comment Share on other sites More sharing options...
Jayzy Posted March 21, 2013 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 62 Reputation: 0 Joined: 12/08/11 Last Seen: August 22, 2018 Author Share Posted March 21, 2013 Thanks! It works! Quote Link to comment Share on other sites More sharing options...
Question
Jayzy
How to disallow players from jumping to GM accounts using the @jumpto command
Link to comment
Share on other sites
4 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.