Hi mam Angelmelody is this like this? http://herc.ws/board/topic/2706-itemmap/Isn't flooritem same as makeitem ?
nopeHi mam Angelmelody is this like this? http://herc.ws/board/topic/2706-itemmap/Isn't flooritem same as makeitem ?
it does not drop a certain amount of item on a map?nopeHi mam Angelmelody is this like this? http://herc.ws/board/topic/2706-itemmap/Isn't flooritem same as makeitem ?
its no need to create plugin ,you can try bindatcmd then makeitem param param.....it does not drop a certain amount of item on a map?nopeHi mam Angelmelody is this like this? http://herc.ws/board/topic/2706-itemmap/Isn't flooritem same as makeitem ?
- script test1235678 -1,{end;OnInit: setarray .dm$,"prontera","prt_fild08"; .msize = getarraysize(.dm$); 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), "@alootnoitem -> Invalid Item ID"; end; } if(.@temp[0]) .@dropitemid = .@temp[0]; else .@dropitemid = .@hditemid; freeloop(1); for(.@i=0;.@i<.msize;.@i++) { for(.@j=0;.@j< .@damount;.@j++) { while (checkcell(.dm$[.@i],.@x=rand(1, 512),.@y=rand(1, 512), cell_chknopass)); makeitem .@dropitemid,1,.dm$[.@i],.@x,.@y; } } freeloop(0); end;}
P.S , how can i make it just drop on where im standing the for example i just @flooritem apple 10 .. it will scatter 10 apple on where am standing and as i increase the flooritem amount that the time it will go far to me. sorry for my english
try this...Wow i didnt know that it can be done like that. thanks angel let me try this.
DONE is working m/
P.S , how can i make it just drop on where im standing the for example i just @flooritem apple 10 .. it will scatter 10 apple on where am standing and as i increase the flooritem amount that the time it will go far to me. sorry for my english
- script test1235678 -1,{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), "@alootnoitem -> 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(.dm$[.@i],.@dx=rand(.@min_x, .@max_x),.@dy=rand(.@min_y , .@max_y), cell_chknopass)); makeitem .@dropitemid,1,.@m$,.@dx,.@dy; } freeloop(0); end;}
[Warning]: Unexpected type for argument 1. Expected number.[Debug]: Data: label pos=849[Debug]: Function: __jump_zero[Debug]: Source (NPC): test1235678 (invisible/not on a map)[Debug]: mapindex_name2id: Map "" not found in index list![Warning]: checkcell: Attempted to run on unexsitent map '', type 6, x/y 159,157
you need change the map........................................Hi,
I've tried to use the script but i am getting an infinite loop error in my mapserver after executing the command
[Warning]: Unexpected type for argument 1. Expected number.[Debug]: Data: label pos=849[Debug]: Function: __jump_zero[Debug]: Source (NPC): test1235678 (invisible/not on a map)[Debug]: mapindex_name2id: Map "" not found in index list![Warning]: checkcell: Attempted to run on unexsitent map '', type 6, x/y 159,157
while (checkcell(.@m$[.@i],.@px=rand(.@min_x, .@max_x),.@py=rand(.@min_y , .@max_y), cell_chknopass));
makeitem .@dropitemid,1,.@m$,.@px,.@py;
- script test1235678 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;
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.