Jump to content

xathenx

Members
  • Content Count

    38
  • Joined

  • Last visited


Reputation Activity

  1. Upvote
    xathenx reacted to AnnieRuru in Guild Package   
    no need src, just query_sql will do
     
    however there is no getguildlv script command, only getgdskilllv script command though
    very easy to code though
    prontera,147,175,6 script kjdhfksdjf 100,{ .@req_online = 11; // how many players need to online to claim. Default: 11 .@req_lv = MAX_LEVEL; // minimum level of .@online players that has to be. Default: MAX_LEVEL in mmo.h if ( !getcharid(2) ) { mes "you must have a guild"; close; } if ( getguildmasterid( getcharid(2) ) != getcharid(0) ) { mes "you are not a guild master"; close; } getguildmember getcharid(2), 1; getguildmember getcharid(2), 2; for ( .@i = 0; .@i < $@guildmembercount; .@i++ ) if ( isloggedin( $@guildmemberaid[.@i], $@guildmembercid[.@i] ) ) .@online++; if ( .@online < .@req_online ) { mes "your guild must have "+ .@req_online +" guild members online"; close; } .@origin = getcharid(3); for ( .@i = 0; .@i < $@guildmembercount; .@i++ ) { if ( isloggedin( $@guildmemberaid[.@i], $@guildmembercid[.@i] ) ) { attachrid $@guildmemberaid[.@i]; if ( BaseLevel < .@req_lv ) { .@deny_name$[.@c] = strcharinfo(0); .@c++; } } } attachrid .@origin; if ( .@c ) { mes "there are "+ .@c +" member does not meet the level requirement"; mes implode( .@deny_name$, "," ); close; } for ( .@i = 0; .@i < $@guildmembercount; .@i++ ) { if ( isloggedin( $@guildmemberaid[.@i], $@guildmembercid[.@i] ) ) { attachrid $@guildmemberaid[.@i]; if ( #guild_package_claimed ) { .@deny_name$[.@c] = strcharinfo(0); .@c++; } } } attachrid .@origin; if ( .@c ) { mes "there are "+ .@c +" members already claimed this package within their account"; mes implode( .@deny_name$, "," ); close; } if ( query_sql( "select account_id as aaa, ( select last_ip from login where account_id = aaa ) as last_ip from guild_member where guild_id = "+ getcharid(2) +" group by last_ip", .@aid, .@ip$ ) < .@req_online ) { mes "same ip detected"; .@nb = query_sql( "select name, account_id as aaa, ( select last_ip from login where account_id = aaa ) as last_ip from guild_member where guild_id = "+ getcharid(2), .@name$, .@aid, .@ip$ ); for ( .@i = 0; .@i < .@nb; .@i++ ) mes (.@i +1)+". "+ .@name$[.@i] +" ("+ .@ip$ +")"; next; } mes "pass"; for ( .@i = 0; .@i < $@guildmembercount; .@i++ ) { if ( isloggedin( $@guildmemberaid[.@i], $@guildmembercid[.@i] ) ) { attachrid $@guildmemberaid[.@i]; if ( getguildmasterid( getcharid(2) ) != $@guildmembercid[.@i] ) getitem 501, 1; else getitem 501, 10; #guild_package_claimed = 1; } } attachrid .@origin; close;}
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.