viewing paste Unknown #5731 | 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
BUILDIN_FUNC(flooritem)
{
        struct map_session_data *sd = script_rid2sd(st);
        struct item item_tmp;
        struct item_data *item_data;
        int nameid, amount;
 
        if( sd == NULL ) return 0;
 
        nameid = script_getnum(st,2);
        if( (item_data = itemdb_search(nameid)) == NULL )
                return 0;
 
        amount = script_getnum(st,3);
        if( amount <= 0 )
                return 0;
 
 
        if(nameid > 0) {
                memset(&item_tmp,0,sizeof(item_tmp));
                item_tmp.nameid=nameid;
                item_tmp.identify=1;
                map_addflooritem(&item_tmp,amount,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,4);
        }
 
        return 0;
}
Viewed 224 times, submitted by unknown.