qtdan Posted August 6, 2019 Share Posted August 6, 2019 (edited) This command from eAmod /*========================================== * Creacie items en el suelo, en un Area. *------------------------------------------*/ ACMD_FUNC(flooritem) { char item_name[100]; int number = 0, count; struct item_data *item_data; nullpo_retr(-1, sd); memset(item_name, '\0', sizeof(item_name)); if( !message || !*message || ( sscanf(message, "\"%99[^\"]\" %d", item_name, &number) < 1 && sscanf(message, "%99s %d", item_name, &number) < 1 )) { clif_displaymessage(fd, "Usage: @flooritem <itemname/itemid> [quantity]"); return -1; } if( number <= 0 ) number = 1; if ((item_data = itemdb_searchname(item_name)) == NULL && (item_data = itemdb_exists(atoi(item_name))) == NULL) { clif_displaymessage(fd, msg_txt(sd,19)); // Invalid item ID or name. return -1; } count = map_addflooritem_area(&sd->bl, 0, 0, 0, item_data->nameid, number); if( count != 0 ) if( number == count ) clif_displaymessage(fd, "All items created."); else { sprintf(atcmd_output, "%d item(s) created.", count); clif_displaymessage(fd, atcmd_output); } else { clif_displaymessage(fd, "No items created!!."); return -1; } return 0; } can add to rathena ? Edited August 6, 2019 by mharkeke Quote Link to comment Share on other sites More sharing options...
1 Gerzzie Posted August 6, 2019 Share Posted August 6, 2019 Here use mine : https://pastebin.com/dc7Ye4GC Quote Link to comment Share on other sites More sharing options...
0 Lelouch vi Britannia Posted August 6, 2019 Share Posted August 6, 2019 Try this... - script flooritem FAKE_NPC,{ end; OnInit: bindatcmd "flooritem", strnpcinfo(0)+"::OnFI", 60,90; end; OnFI: [email protected] = atoi([email protected]_parameters$[0]); [email protected] = atoi([email protected]_parameters$[1]); if ( [email protected] ) { message strcharinfo(0), "@flooritem <Itemid or itemname> <amount>"; end; } if ( [email protected] < 0 ) { message strcharinfo(0), "@flooritem -> Invalid amount"; end; } if ( getitemname([email protected]) == "null" && !searchitem([email protected][0],[email protected]_parameters$[0]) ) { message strcharinfo(0), "@flooritem -> Invalid Item ID"; end; } if([email protected][0]) [email protected] = [email protected][0]; else [email protected] = [email protected]; [email protected] = (sqrt([email protected]) > 16 ? 16 :sqrt([email protected])); getmapxy([email protected]$,[email protected],[email protected],0); [email protected]_x =(([email protected]@r) < 1?1:([email protected]@r)); [email protected]_x =(([email protected][email protected]) > 512 ? 512:([email protected][email protected])); [email protected]_y =(([email protected]@r) < 1?1:([email protected]@r)); [email protected]_y =(([email protected][email protected]) > 512 ? 512:([email protected][email protected])); freeloop(1); for([email protected]=0;[email protected]< [email protected];[email protected]++) { while (checkcell([email protected]$[[email protected]],[email protected]=rand([email protected]_x, [email protected]_x),[email protected]=rand([email protected]_y , [email protected]_y), cell_chknopass)); makeitem [email protected],1,[email protected]$,[email protected],[email protected]; } freeloop(0); end; } Quote Link to comment Share on other sites More sharing options...
0 qtdan Posted August 6, 2019 Author Share Posted August 6, 2019 item doesn't show [Debug]: (map_mapname2mapid) mapindex_name2id: Map "" not found in index list Quote Link to comment Share on other sites More sharing options...
0 qtdan Posted August 6, 2019 Author Share Posted August 6, 2019 7 minutes ago, Gerzzie said: Here use mine : https://pastebin.com/dc7Ye4GC Thanks boss! Quote Link to comment Share on other sites More sharing options...
0 Gerzzie Posted August 6, 2019 Share Posted August 6, 2019 19 minutes ago, Lelouch vi Britannia said: getmapxy([email protected]$,[email protected],[email protected],0); If you want to use Lelouch's script you can change 0 to BL_PC Quote Link to comment Share on other sites More sharing options...
This command from eAmod
can add to rathena ?
Edited by mharkekeLink to comment
Share on other sites