Jump to content
The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades. ×
  • 0

Check for account ID and Character


Medusa

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  07/17/14
  • Last Seen:  

I want to give some items to people with a specific account ID + at least 1 maxed char on it.

It is supposed they get it upon first login afterwards

im not good with scripting. I thought of something like

 

if variable not = 1 and accountid < 123456 and at least 1 char max level

getitem 12345

set variable 1

 

thank you

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


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

Why not make it in a way that

If Specific account ID (Correct) then NPC will give the Item?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2373
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1282
  • Reputation:   393
  • Joined:  02/03/12
  • Last Seen:  

-	script	gain_reward	-1,{
OnInit:
	.max_level = getbattleconf( "max_level" );
	end;

OnPCLoginEvent:
	if( !#gain_reward ){
		query_sql( "SELECT `base_level` FROM `char` WHERE `account_id` = "+getcharid(3),.@lv );
		.@size = getarraysize( .@lv );

		for( .@i = 0; .@i < .@size; .@i++ )
			if( .@lv[.@i] >= .max_level )
				.@give_reward = 1;
		
		if( !.@give_reward )
			gain_reward = 1;
	}
	end;
}

 

I think you forgot the part where it gives them the item. :o

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2373
  • Joined:  10/28/11
  • Last Seen:  


if( !.@give_reward ){

gain_reward = 1;

getitem 512,1;

getitem 512,2;

getitem 512,3;

}

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