viewing paste Unknown #23064 | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
int viewpointmap_sub(struct block_list *bl, va_list ap)
{
    struct map_session_data *sd;
    int npc_id, type, x, y, id, color;
    npc_id = va_arg(ap,int);
    type = va_arg(ap,int);
    x = va_arg(ap,int);
    y = va_arg(ap,int);
    id = va_arg(ap,int);
    color = va_arg(ap,int);
    sd = (struct map_session_data *)bl;
    clif->viewpoint(sd,npc_id,type,x,y,id,color);
    return 0;
}
 
BUILDIN(viewpointmap)
{
    int type,x,y,id,color,m;
    const char *map_name;
 
    map_name = script_getstr(st,2);
    if( (m = map->mapname2mapid(map_name)) < 0 )
        return true; // Invalid Map
 
    type=script_getnum(st,3);
    x=script_getnum(st,4);
    y=script_getnum(st,5);
    id=script_getnum(st,6);
    color=script_getnum(st,7);
 
    map->foreachinmap(viewpointmap_sub,m,BL_PC,st->oid,type,x,y,id,color);
    return true;
}
Viewed 650 times, submitted by Guest.