Jump to content

*addrid (addition)


GmOcean

Recommended Posts


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

Seems like a good idea.

 

Peopleperson49

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

@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 by QQfoolsorellina
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

@QQfoolsorellina - Thanks for that lol.

Link to comment
Share on other sites

  • 4 months later...

  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

Anyone opposed to this suggestion, or @QQfoolsorellina's suggestion?

Link to comment
Share on other sites

  • 6 months later...

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

-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

  • 1 year later...

  • Group:  Development Manager
  • Topic Count:  56
  • Topics Per Day:  0.01
  • Content Count:  732
  • Reputation:   525
  • Joined:  12/13/11
  • Last Seen:  

Implemented in b98ba7a.

Link to comment
Share on other sites

×
×
  • Create New...