GmOcean Posted October 7, 2013 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.
QQfoolsorellina Posted October 7, 2013 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,{ .@i=501; .@a=10; addrid(0); getitem .@i,.@a; close; } Edited October 7, 2013 by QQfoolsorellina
Euphy Posted February 11, 2014 Posted February 11, 2014 Anyone opposed to this suggestion, or @QQfoolsorellina's suggestion?
GmOcean Posted August 26, 2014 Author 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.
Recommended Posts