Chaos92 Posted August 13, 2014 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 1826 Reputation: 288 Joined: 08/03/12 Last Seen: 4 hours ago Share Posted August 13, 2014 I need some modification of this script so that vendors excluded - script itemall -1,{ OnWhisperGlobal: if( getgroupid() >= 99 ){ // check map if( @whispervar0$ == "all" ) set .@type$,""; else if( @whispervar0$ == "map" ) set .@type$,strcharinfo(3); else { dispbottom "Error, pick 'map' or 'all' "; end; } // check item set .@itemid,atoi( @whispervar1$ ); set .@amount,atoi( @whispervar2$ ); if( getitemname( .@itemid ) == "null" || .@amount < 1 ){ dispbottom "Enter valid item id and amount."; } set .@self_id,getcharid(3); query_sql( "SELECT COUNT(`account_id`) FROM `char` WHERE `online` = 1 ", .@total ); while( .@count < .@total ){ query_sql( "SELECT `account_id`,`name` FROM `char` WHERE `online` = 1 ORDER BY `account_id` LIMIT 128 OFFSET "+.@offset, .@aid,.@name$ ); set .@i,0; set .@size,getarraysize( .@aid ); while( .@i < .@size ){ if( .@aid[.@i] != .@self_id ){ if( .@type$ != "" ){ getmapxy( .@map$,.@x,.@y,0,.@name$[.@i] ); if( .@map$ == .@type$ ){ getitem .@itemid,.@amount,.@aid[.@i]; set .@gave,.@gave + 1; } }else{ getitem .@itemid,.@amount,.@aid[.@i]; set .@gave,.@gave + 1; } } set .@count,.@count + 1; set .@i,.@i + 1; } set .@offset,.@offset + .@size; deletearray .@aid,.@size; deletearray .@name$,.@size; } dispbottom "Gave "+.@amount+" x "+getitemname( .@itemid )+" to "+.@gave+" Player(s)."; } end; } Hope someone can help :3 Quote Link to comment Share on other sites More sharing options...
Capuche Posted August 15, 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 August 15, 2014 if( .@aid[.@i] != .@self_id && !checkvending(.@name$[.@i]) ){ Quote Link to comment Share on other sites More sharing options...
Emistry Posted August 13, 2014 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted August 13, 2014 if( .@aid[.@i] != .@self_id ){ change to if( .@aid[.@i] != .@self_id && !checkvending( .@name$[.@i] ){ Quote Link to comment Share on other sites More sharing options...
Chaos92 Posted August 14, 2014 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 1826 Reputation: 288 Joined: 08/03/12 Last Seen: 4 hours ago Author Share Posted August 14, 2014 (edited) if( .@aid[.@i] != .@self_id ){ change to if( .@aid[.@i] != .@self_id && !checkvending( .@name$[.@i] ){ not working sir up Edited August 13, 2014 by Chaos92 Quote Link to comment Share on other sites More sharing options...
Question
Chaos92
I need some modification of this script so that vendors excluded
Hope someone can help :3
Link to comment
Share on other sites
3 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.