Jump to content
  • 0

Reward IP BASE


balanar12321

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   0
  • Joined:  04/11/15
  • Last Seen:  

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

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  241
  • Reputation:   18
  • Joined:  06/04/14
  • Last Seen:  

This might help.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   24
  • Joined:  02/11/16
  • Last Seen:  

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
Link to comment
Share on other sites

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.

×
×
  • Create New...