Jump to content
  • 0

newbie give item


kangfredy

Question


  • Group:  Members
  • Topic Count:  112
  • Topics Per Day:  0.03
  • Content Count:  388
  • Reputation:   4
  • Joined:  05/01/12
  • Last Seen:  

guys can i request newbie reward?

this is my schema for this script

1stly

someone make new account.

and then

make new characther...

in starting zone..

this is i need script for newbie giver (only one char in one ID).....

and this npc check in database login in sql.........

if IP new ID = IP in login database

not give reward

and if IP new ID different

give reward.......

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Something like this ?

prontera,155,159,5	script	infamy	56,{

// Check if already log in
// -----------------------
query_sql "SELECT `logincount` FROM `login` WHERE `account_id` = '"+ getcharid(3) +"'", .@logincount;
if( .@logincount > 1 ) end;

// Count account with the same ip xx.xx.xx.*
// -----------------------------------------
sscanf( getcharip(), "%d.%d.%d.%d", .@a, .@b, .@c, .@d );
query_sql( "SELECT COUNT(`account_id`) FROM `login` WHERE `last_ip` LIKE '%"+ .@a +"."+ .@b +"."+ .@c +".%'", .@count );

if( .@count == 1 ) {
	dispbottom "Here a reward for newbie.";
	getitem 501, 1;
}
query_sql "UPDATE `login` SET `logincount` = '2' WHERE `account_id` = '"+ getcharid(3) +"'";

end;

}

Edited by Capuche
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  112
  • Topics Per Day:  0.03
  • Content Count:  388
  • Reputation:   4
  • Joined:  05/01/12
  • Last Seen:  

yes...tq guys.......

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...