EL Dragon Posted June 27, 2014 Group: Members Topic Count: 86 Topics Per Day: 0.02 Content Count: 591 Reputation: 146 Joined: 06/19/12 Last Seen: December 10, 2016 Share Posted June 27, 2014 this is the script - script Haze2 -1,{ Onitemrain: .@itemid = atoi( .@atcmd_parameters$ ); if ( getitemname( .@itemid ) == "null" ) { message strcharinfo(0), "Invalid Item ID"; end; } .@area = getbattleflag("area_size"); getmapxy .@map$, .@x, .@y, 0; while ( .@i < 100 ) { makeitem .@itemid, 1, .@map$, .@x + rand( -.@area, .@area ), .@y + rand( -.@area, .@area ); .@i++; } end; OnInit: bindatcmd "itemrain", strnpcinfo(0) +"::Onitemrain", 60,100; end; } So who do I use it @itemrain ID but I will gladly @itemrain ID item number 1-100 Quote Link to comment Share on other sites More sharing options...
Capuche Posted June 27, 2014 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted June 27, 2014 - script Haze2 -1,{ Onitemrain: .@itemid = atoi( .@atcmd_parameters$ ); .@amount = atoi( .@atcmd_parameters$[1] ); if ( getitemname( .@itemid ) == "null" ) { message strcharinfo(0), "Invalid Item ID"; end; } if ( .@amount <= 0 || .@amount > 100 ) .@amount = 100; .@area = getbattleflag("area_size"); getmapxy .@map$, .@x, .@y, 0; while ( .@i < .@amount ) { do { .@dx = rand( -.@area, .@area ); .@dy = rand( -.@area, .@area ); } while( !checkcell( .@map$,(.@x+.@dx),(.@y+.@dy),cell_chkpass ) ); makeitem .@itemid, 1, .@map$, .@x + .@dx, .@y + dy; .@i++; } end; OnInit: bindatcmd "itemrain", strnpcinfo(0) +"::Onitemrain", 60,100; end; } 1 Quote Link to comment Share on other sites More sharing options...
EL Dragon Posted June 27, 2014 Group: Members Topic Count: 86 Topics Per Day: 0.02 Content Count: 591 Reputation: 146 Joined: 06/19/12 Last Seen: December 10, 2016 Author Share Posted June 27, 2014 but it does drop the item in a line , not random Quote Link to comment Share on other sites More sharing options...
Capuche Posted June 27, 2014 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted June 27, 2014 there is a mistake makeitem .@itemid, 1, .@map$, .@x + .@dx, .@y + dy; should be makeitem .@itemid, 1, .@map$, .@x + .@dx, .@y + .@dy; Quote Link to comment Share on other sites More sharing options...
EL Dragon Posted June 27, 2014 Group: Members Topic Count: 86 Topics Per Day: 0.02 Content Count: 591 Reputation: 146 Joined: 06/19/12 Last Seen: December 10, 2016 Author Share Posted June 27, 2014 thx Capuche for the help Quote Link to comment Share on other sites More sharing options...
Question
EL Dragon
this is the script
So who do I use it @itemrain ID but I will gladly @itemrain ID item number 1-100
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.