Luffy 14 Posted August 23, 2014 (edited) @flooritem <itemname/itemid> [quantity] Drops item on the floor on a certain map. its like the one i saw, Shower event. XD Edited August 23, 2014 by Luffy Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted August 23, 2014 Isn't flooritem same as makeitem ? Quote Share this post Link to post Share on other sites
0 Luffy 14 Posted August 23, 2014 Isn't flooritem same as makeitem ? Hi mam Angelmelody is this like this? http://herc.ws/board/topic/2706-itemmap/ Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted August 24, 2014 Isn't flooritem same as makeitem ? Hi mam Angelmelody is this like this? http://herc.ws/board/topic/2706-itemmap/ nope Quote Share this post Link to post Share on other sites
0 Luffy 14 Posted August 24, 2014 Isn't flooritem same as makeitem ? Hi mam Angelmelody is this like this? http://herc.ws/board/topic/2706-itemmap/ nope it does not drop a certain amount of item on a map? Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted August 24, 2014 (edited) Isn't flooritem same as makeitem ? Hi mam Angelmelody is this like this? http://herc.ws/board/topic/2706-itemmap/ nope it does not drop a certain amount of item on a map? its no need to create plugin ,you can try bindatcmd then makeitem param param..... Edited August 24, 2014 by Angelmelody Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted August 24, 2014 ok, I finished it ....you can add map by editing .dm$ array - 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;} Quote Share this post Link to post Share on other sites
0 Luffy 14 Posted August 24, 2014 (edited) Wow i didnt know that it can be done like that. thanks angel let me try this.DONE is working m/ Angelmelody 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 Edited August 24, 2014 by Luffy Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted August 24, 2014 (edited) Wow i didnt know that it can be done like that. thanks angel let me try this. DONE is working m/ AngelmelodyP.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... - 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;} Edited August 25, 2014 by Angelmelody Quote Share this post Link to post Share on other sites
0 Luffy 14 Posted August 24, 2014 (edited) THANK YOU Edited August 24, 2014 by Luffy Quote Share this post Link to post Share on other sites
0 rans 7 Posted January 28, 2015 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 Quote Share this post Link to post Share on other sites
0 Namine 8 Posted April 11, 2015 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 you need change the map........................................ Quote Share this post Link to post Share on other sites
0 rans 7 Posted April 13, 2015 you mean. this only works on a certain map? Quote Share this post Link to post Share on other sites
0 GmOcean 92 Posted September 5, 2015 The issue is this right here: while (checkcell(.dm$[.@i],.@dx=rand(.@min_x, .@max_x),.@dy=rand(.@min_y , .@max_y), cell_chknopass)); change to this: while (checkcell(.@m$[.@i],.@px=rand(.@min_x, .@max_x),.@py=rand(.@min_y , .@max_y), cell_chknopass)); it was checking for a map using a variable that contained no data. Quote Share this post Link to post Share on other sites
0 Virtue 10 Posted February 17, 2016 (edited) can't see the code properly. Edited February 17, 2016 by Virtue Quote Share this post Link to post Share on other sites
0 rans 7 Posted September 13, 2016 (edited) Okay i found solution to make it work needed to change dx and dy into px and py 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; } Edited September 13, 2016 by Ranz Quote Share this post Link to post Share on other sites
0 Katar 0 Posted August 25, 2017 can u send me script to make showeritem Quote Share this post Link to post Share on other sites
@flooritem <itemname/itemid> [quantity]
Drops item on the floor on a certain map.
its like the one i saw, Shower event. XD
Edited by LuffyShare this post
Link to post
Share on other sites