EL Dragon Posted June 27, 2014 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
Capuche Posted June 27, 2014 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
EL Dragon Posted June 27, 2014 Author Posted June 27, 2014 but it does drop the item in a line , not random Quote
Capuche Posted June 27, 2014 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
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
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.