Jump to content

Question

Posted

if( query_sql( "SELECT `account_id` FROM `char` WHERE `guild_id`='"+$koegid+"' AND `online`= 1 ",.@AID ) )
for( set .@i,0; .@i < getarraysize( .@AID ); set .@i,.@i + 1 ){
 getitem 600,1,.@AID[.@i];
 getitem 601,1,.@AID[.@i];
 getitem 602,1,.@AID[.@i];
 
 }
end;



CAN SOMEONE make this IP base reward, 1 reward per 1 IP.. thanks

2 answers to this question

Recommended Posts

  • 0
Posted (edited)
if(strcharinfo(2) != $koegid) end; // if the character is not from the guild
goto GetReward;
break;

GetReward:
query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@IP$);
query_sql("SELECT account_id FROM `login` WHERE last_ip = '"+.@IP$+"'", .@AID);

if(getarraysize(.@AID) > 1) end; // If more than 1 account_id shares the same IP
getitem 600,1;
end;


Just make them talk to an NPC with this function. This is the simplest way to do it. I hope it helps. ~

Edited by Neffletics

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...