Jump to content
  • 0

@itemfloor command?


Radian

Question


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

Is there any command on rAthena that drops an specific items on the floor? like @itemfloor 969 ?

Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

-	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

  • Upvote 1
  • Love 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  206
  • Reputation:   13
  • Joined:  01/07/12
  • Last Seen:  

i dont think so, you might try google it, and maybe you can find it and add it to your server

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  


- 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;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

-	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?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

 

Alright thanks! capuche!

 

 

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?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  


- 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;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

-	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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

Thanks i will test it now..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...