R>@shower for 3ceam

execretioluck2

New member
Messages
2
Points
0
Github
execretioluck2
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 

Untitled.jpg

 
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

Code:
-	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;
}
 
Back
Top