GmOcean Posted October 7, 2013 Share Posted October 7, 2013 I'm suggestion that the *addrid script command have 1 more Type added to the list and that would be for a specification of a map. Currently it only supports either the map an invoking player or NPC is in. But this kind of limit's the use to NPCs that are either invoked by a player or are on a map to begin with, so floating NPCs are kinda nulled from this (except when invoked by a player). Not a big deal, but don't see why it shouldn't be there. *addrid(<type>{,<flag>{,<parameters>}}); This command will attach other RIDs to the current script without detaching the invoking RID. It returns 1 if successful and 0 upon failure. <type> determines what RIDs are attached: 0: All players in the server. 1: All players in the map of the invoking player, or the invoking NPC if no player is attached. 2: Party members of a specified party ID. [ Parameters: <party id> ] 3: Guild members of a specified guild ID. [ Parameters: <guild id> ] 4: All players in a specified area of the map of the invoking player (or NPC). [ Parameters: <x0>,<y0>,<x1>,<y1> ] 5: All players in a specified map. [ Parameters: <map_name> ] Account ID: The specified account ID. <flag> can prevent certain players from being attached: 0: Players are always attached. (default) 1: Players currently running another script will not be attached. Link to comment Share on other sites More sharing options...
Peopleperson49 Posted October 7, 2013 Share Posted October 7, 2013 Seems like a good idea. Peopleperson49 Link to comment Share on other sites More sharing options...
QQfoolsorellina Posted October 7, 2013 Share Posted October 7, 2013 (edited) @GmOcean case 5: { int map_index; map_index = map_mapname2mapid(script_getstr(st,4)); if(map_index < 0){ script_pushint(st,0); return 0; } for( sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); sd = (TBL_PC*)mapit_next(iter)){ if(!script_getnum(st,3)||!sd->st) if( sd->bl.m == map_index) run_script(st->script,st->pos,sd->status.account_id,st->oid); } } another suggestion for addrid Is it possible to persist temporary variable across the addrid command? ex: prontera,151,186,5 script zxcvasdfqwe 721,{ [email protected]=501; [email protected]=10; addrid(0); getitem [email protected],[email protected]; close; } Edited October 7, 2013 by QQfoolsorellina Link to comment Share on other sites More sharing options...
GmOcean Posted October 7, 2013 Author Share Posted October 7, 2013 @QQfoolsorellina - Thanks for that lol. Link to comment Share on other sites More sharing options...
Euphy Posted February 11, 2014 Share Posted February 11, 2014 Anyone opposed to this suggestion, or @QQfoolsorellina's suggestion? Link to comment Share on other sites More sharing options...
GmOcean Posted August 26, 2014 Author Share Posted August 26, 2014 -NecroPost- I'd like to revist this suggestion, to see if we can get a final decision on this. I vote we should implement both features suggested in this topic. Link to comment Share on other sites More sharing options...
Aleos Posted March 8, 2016 Share Posted March 8, 2016 Implemented in b98ba7a. Link to comment Share on other sites More sharing options...