Radian Posted August 15, 2014 Posted August 15, 2014 Is there any command on rAthena that drops an specific items on the floor? like @itemfloor 969 ? Quote
Capuche Posted August 29, 2014 Posted August 29, 2014 - script item_floor -1,{ OnInit: bindatcmd "itemfloor",strnpcinfo(3)+"::OnAtcommand",99,99; end; OnAtcommand: .@item_id = atoi(.@atcmd_parameters$[0]); .@amount = ( .@amount = atoi(.@atcmd_parameters$[1]) ) ? .@amount : 1; if ( getiteminfo( .@item_id,0 ) == -1 ) { message strcharinfo(0), "non existent item id"; message strcharinfo(0), "usage "+ .@atcmd_command$ +" <item_id> {<amount>}"; end; } getmapxy .@map$, .@x, .@y, 0; freeloop 1; while ( .@i < .@amount ) { do { .@dx = rand( -200, 200 ); .@dy = rand( -200, 200 ); } while( !checkcell( .@map$,(.@x+.@dx),(.@y+.@dy),cell_chkpass ) ); makeitem .@item_id, 1, .@map$, (.@x + .@dx), (.@y + .@dy); .@i++; } end; } .@item_id typo error 1 1 Quote
eKoh Posted August 15, 2014 Posted August 15, 2014 i dont think so, you might try google it, and maybe you can find it and add it to your server Quote
Capuche Posted August 15, 2014 Posted August 15, 2014 - script item_floor -1,{ OnInit: bindatcmd "itemfloor",strnpcinfo(3)+"::OnAtcommand"; end; OnAtcommand: .@item_id = atoi(.@atcmd_parameters$[0]); .@amount = ( .@amount = atoi(.@atcmd_parameters$[1]) ) ? .@amount : 1; if ( getiteminfo( .@item_id,0 ) == -1 ) { message strcharinfo(0), "non existent item id"; message strcharinfo(0), "usage "+ .@atcmd_command$ +" <item_id> {<amount>}"; end; } getmapxy .@map$, .@x, .@y, 0; makeitem .@item_id, .@amount, .@map$, .@x, .@y; end; } Quote
Radian Posted August 15, 2014 Author Posted August 15, 2014 - script item_floor -1,{ OnInit: bindatcmd "itemfloor",strnpcinfo(3)+"::OnAtcommand"; end; OnAtcommand: .@item_id = atoi(.@atcmd_parameters$[0]); .@amount = ( .@amount = atoi(.@atcmd_parameters$[1]) ) ? .@amount : 1; if ( getiteminfo( .@item_id,0 ) == -1 ) { message strcharinfo(0), "non existent item id"; message strcharinfo(0), "usage "+ .@atcmd_command$ +" <item_id> {<amount>}"; end; } getmapxy .@map$, .@x, .@y, 0; makeitem .@item_id, .@amount, .@map$, .@x, .@y; end; } thank but is it possible that only admin can use this command? or its already added it the script? Quote
Capuche Posted August 15, 2014 Posted August 15, 2014 use the optionnal parameter of bindatcmd https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L6863 Quote
Radian Posted August 15, 2014 Author Posted August 15, 2014 use the optionnal parameter of bindatcmd https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L6863 Alright thanks! capuche! use the optionnal parameter of bindatcmd https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L6863 Alright thanks! capuche! Its working fine but , how can we make it only 1pc of Gold will drop on the floor but 1000pcs on the map? Quote
Capuche Posted August 26, 2014 Posted August 26, 2014 - script item_floor -1,{ OnInit: bindatcmd "itemfloor",strnpcinfo(3)+"::OnAtcommand",99,99; end; OnAtcommand: .@item_id = atoi(.@atcmd_parameters$[0]); .@amount = ( .@amount = atoi(.@atcmd_parameters$[1]) ) ? .@amount : 1; if ( getiteminfo( .@item_id,0 ) == -1 ) { message strcharinfo(0), "non existent item id"; message strcharinfo(0), "usage "+ .@atcmd_command$ +" <item_id> {<amount>}"; end; } getmapxy .@map$, .@x, .@y, 0; while ( .@i < .@amount ) { do { .@dx = rand( -200, 200 ); .@dy = rand( -200, 200 ); } while( !checkcell( .@map$,(.@x+.@dx),(.@y+.@dy),cell_chkpass ) ); makeitem .@itemid, 1, .@map$, (.@x + .@dx), (.@y + .@dy); .@i++; } end; } Quote
Radian Posted August 26, 2014 Author Posted August 26, 2014 - script item_floor -1,{ OnInit: bindatcmd "itemfloor",strnpcinfo(3)+"::OnAtcommand",99,99; end; OnAtcommand: .@item_id = atoi(.@atcmd_parameters$[0]); .@amount = ( .@amount = atoi(.@atcmd_parameters$[1]) ) ? .@amount : 1; if ( getiteminfo( .@item_id,0 ) == -1 ) { message strcharinfo(0), "non existent item id"; message strcharinfo(0), "usage "+ .@atcmd_command$ +" <item_id> {<amount>}"; end; } getmapxy .@map$, .@x, .@y, 0; while ( .@i < .@amount ) { do { .@dx = rand( -200, 200 ); .@dy = rand( -200, 200 ); } while( !checkcell( .@map$,(.@x+.@dx),(.@y+.@dy),cell_chkpass ) ); makeitem .@itemid, 1, .@map$, (.@x + .@dx), (.@y + .@dy); .@i++; } end; } Thank you for the response but it's not working.. no errors at all Quote
Question
Radian
Is there any command on rAthena that drops an specific items on the floor? like @itemfloor 969 ?
9 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.