viewing paste Unknown #211 | 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
/**
 * mouse (<type>, { <duration>, <RID> }) -> Blocks any skill, item and walking requests. [Masao]
 * <type> : 0  = disabled, 1 = enabled.
 * <duration> : Duration in milliseconds.
 * <RID> : Characters Account ID.
 **/
BUILDIN_FUNC(mouse) {
 
        int type, id;
        unsigned int duration;
        TBL_PC *sd = NULL;
 
        if( script_hasdata(st,2) )
                type = 1;
        else
                type = 0;
 
        if( script_hasdata(st,3) )
                duration = 1000*duration;
        else
                duration = 0;
 
        if( script_hasdata(st,4) )
                sd=map_id2sd(script_getnum(st,4)); // <Account ID>
        else
                sd=script_rid2sd(st); // Attached player
 
        switch(type){
                case 1: ; // Block usage of skills, items and walking.
                default: ; // Enables usage of skills, items and walking.
        }
 
    return 0;
}
Viewed 324 times, submitted by unknown.