Jump to content
execretioluck2

R>@shower for 3ceam

Recommended Posts

My script 

-	script	asdfgadhjkl	-1,{  end;OnInit:	bindatcmd "shower",strnpcinfo(3)+"::OnShowerCommand",99,99;	end;OnShowerCommand:	.@showeritemid = atoi(.@atcmd_parameters$[0]);    	.@showeritamount = atoi(.@atcmd_parameters$[1]);	if ( !.@showeritemid ) {		message strcharinfo(0), "@shower <Item ID> <amount>";        	end;	}    	if ( getiteminfo(.@showeritemid,2) == -1 ) {        	message strcharinfo(0), "Invalid Item ID";		message strcharinfo(0), "@shower <Item ID> <amount>";        	end;    	}	if(.@showeritamount <= 0) {        	message strcharinfo(0), "Invalid Item Amount";		message strcharinfo(0), "@shower <Item ID> <amount>";        	end;    	}	query_sql("SELECT `account_id` FROM `login` WHERE `sex`!='S' ORDER BY `account_id` ASC LIMIT 1", .@minaid);	query_sql("SELECT `account_id` FROM `login` WHERE `sex`!='S' ORDER BY `account_id` DESC LIMIT 1", .@maxid);	.@showermap$ = strcharinfo(3);	freeloop(1);	while ( .@minaid <= .@maxid ) {		if(!attachrid(.@minaid++)) continue;		if(strcharinfo(3) !=.@showermap$ ) continue;		if(checkvending()) continue;		getitem .@showeritemid,.@showeritamount;		announce "Something has been drop from the sky!",bc_self,0xFFC0CB;	}	freeloop(0);end;}

Error when putting @shower 7227 10 

post-10767-0-04510000-1460350523_thumb.jpg

Share this post


Link to post
Share on other sites

bindatcmd is custom patch on 3CeAM you must have it to run this script and you can't do direct variable on 3CeAM since it's not supported by the script engine

here the requested script may it satisfy you

 

-	script	asdfgadhjkl	-1,{
end;
OnInit:
	bindatcmd "shower",strnpcinfo(3)+"::OnShowerCommand",99,99;
	end;
	
OnShowerCommand:
	set .@showeritemid, atoi(.@atcmd_parameters$[0]);
	set .@showeritamount, atoi(.@atcmd_parameters$[1]);
	if ( !.@showeritemid ) {
		message strcharinfo(0), "@shower <Item ID> <amount>";
		end;
	}
	if ( getiteminfo(.@showeritemid,2) == -1 ) {
		message strcharinfo(0), "Invalid Item ID";
		message strcharinfo(0), "@shower <Item ID> <amount>";
		end;
	}
	if(.@showeritamount <= 0) {
		message strcharinfo(0), "Invalid Item Amount";
		message strcharinfo(0), "@shower <Item ID> <amount>";
		end;
	}
	query_sql("SELECT `account_id` FROM `char` WHERE `online` = 1 ORDER BY `account_id` LIMIT 128", .@account_id);
	set .@showermap$, strcharinfo(3);
	while ( .@count < .@account_id ) {
		if(!attachrid(.@account_id[.@count])) continue;
		if(strcharinfo(3) != .@showermap$ ) continue;
		if(checkvending()) continue;
		getitem .@showeritemid,.@showeritamount;
		announce "Something has been drop from the sky!",bc_self,0xFFC0CB;
		set .@count, .@count +1;
		sleep2 100;
	}	
	end;
}

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.