*addrid (addition)

Recommended Posts

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.


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.


Share this post

Link to post
Share on other sites




    case 5:
        int map_index;
        map_index = map_mapname2mapid(script_getstr(st,4));
        if(map_index < 0){
            return 0;
        for( sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); sd = (TBL_PC*)mapit_next(iter)){
            if( sd->bl.m == map_index)






another suggestion for addrid



Is it possible to persist temporary variable across the addrid command?




prontera,151,186,5    script    zxcvasdfqwe    721,{
[email protected]=501;
[email protected]=10;
getitem [email protected],[email protected];

Edited by QQfoolsorellina

Share this post

Link to post
Share on other sites


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.

Share this post

Link to post
Share on other sites