viewing paste Unknown #23000 | C

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
BUILDIN(bg_single) {
    const char* map_name;
    struct map_session_data *sd;
    int x, y, map_index, bg_id;
 
    if( sd == NULL )
        return true;
    
    bg_id = script_getnum(st,2);
    map_name = script_getstr(st,3);
    if( (map_index = script->mapindexname2id(st,map_name)) == 0 )
        return true;
 
    x = script_getnum(st,4);
    y = script_getnum(st,5);
    
    if( bg->team_join(bg_id, sd) )
    {
        pc->setpos(sd, map_index, x, y, CLR_TELEPORT);
        script_pushint(st,1);
    }
    else
        script_pushint(st,0);
 
    return true;
}
Viewed 619 times, submitted by Guest.