dantoki Posted August 6, 2019 Group: Members Topic Count: 67 Topics Per Day: 0.01 Content Count: 235 Reputation: 42 Joined: 10/21/12 Last Seen: April 5 Share Posted August 6, 2019 (edited) This command from eAmod /*========================================== * Creaci?e 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...
0 Lelouch vi Britannia Posted August 6, 2019 Group: Members Topic Count: 45 Topics Per Day: 0.01 Content Count: 715 Reputation: 84 Joined: 01/05/12 Last Seen: April 10, 2023 Share Posted August 6, 2019 Try this... - script flooritem FAKE_NPC,{ end; OnInit: bindatcmd "flooritem", strnpcinfo(0)+"::OnFI", 60,90; end; OnFI: .@hditemid = atoi(.@atcmd_parameters$[0]); .@damount = atoi(.@atcmd_parameters$[1]); if ( !.@damount ) { message strcharinfo(0), "@flooritem <Itemid or itemname> <amount>"; end; } if ( .@damount < 0 ) { message strcharinfo(0), "@flooritem -> Invalid amount"; end; } if ( getitemname(.@hditemid) == "null" && !searchitem(.@temp[0],.@atcmd_parameters$[0]) ) { message strcharinfo(0), "@flooritem -> Invalid Item ID"; end; } if(.@temp[0]) .@dropitemid = .@temp[0]; else .@dropitemid = .@hditemid; .@r = (sqrt(.@damount) > 16 ? 16 :sqrt(.@damount)); getmapxy(.@m$,.@px,.@py,0); .@min_x =((.@px-.@r) < 1?1:(.@px-.@r)); .@max_x =((.@px+.@r) > 512 ? 512:(.@px+.@r)); .@min_y =((.@py-.@r) < 1?1:(.@py-.@r)); .@max_y =((.@py+.@r) > 512 ? 512:(.@py+.@r)); freeloop(1); for(.@j=0;.@j< .@damount;.@j++) { while (checkcell(.@m$[.@i],.@px=rand(.@min_x, .@max_x),.@py=rand(.@min_y , .@max_y), cell_chknopass)); makeitem .@dropitemid,1,.@m$,.@px,.@py; } freeloop(0); end; } Quote Link to comment Share on other sites More sharing options...
0 dantoki Posted August 6, 2019 Group: Members Topic Count: 67 Topics Per Day: 0.01 Content Count: 235 Reputation: 42 Joined: 10/21/12 Last Seen: April 5 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...
1 Gerzzie Posted August 6, 2019 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 137 Reputation: 48 Joined: 06/18/12 Last Seen: Yesterday at 09:25 AM Share Posted August 6, 2019 Here use mine : https://pastebin.com/dc7Ye4GC Quote Link to comment Share on other sites More sharing options...
0 dantoki Posted August 6, 2019 Group: Members Topic Count: 67 Topics Per Day: 0.01 Content Count: 235 Reputation: 42 Joined: 10/21/12 Last Seen: April 5 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 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 137 Reputation: 48 Joined: 06/18/12 Last Seen: Yesterday at 09:25 AM Share Posted August 6, 2019 19 minutes ago, Lelouch vi Britannia said: getmapxy(.@m$,.@px,.@py,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...
Question
dantoki
This command from eAmod
can add to rathena ?
Edited by mharkekeLink to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.