viewing paste Unknown #6895 | 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 27 28 29 30 31 32 33 34
/*==========================================
 * Forces the player to make party [Haruna]
 * null if found existing party
 *------------------------------------------*/
BUILDIN(makeparty)
{
    TBL_PC* sd = script_rid2sd(st);
    char name[NAME_LENGTH];
    
    if( sd == NULL || !script_hasdata(st, 2) )
        return true;
        
    safestrncpy(name, script_getstr(st, 2), NAME_LENGTH);
    party->create(sd, name, 0, 0);
    return true;
}
 
/*==========================================
 * Forces the player to leave party [Haruna]
 * null if not found
 *------------------------------------------*/
BUILDIN(leaveparty)
{
    TBL_PC* sd = script_rid2sd(st);
    
    if( sd == NULL )
    {
        script_pushint(st, 0);
        return true;
    }
    
    script_pushint(st, party->leave(sd));
    return true;
}
Viewed 863 times, submitted by Guest.