Jump to content
  • 0

Commands for lvl 20 up players


Quesooo

Question


  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.07
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

good day masters is this possible???

 

when the player is lvl 1 only he/she cant use commands unless he reach a base lvl of 20??

 

commands can be use starting from lvl20 up to max lvl thank you

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

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

-	script	commands_start	-1,{
	OnPCBaseLvUpEvent:
		if ( BaseLevel >= 20 && getgroupid(0) == 0 ) {
			query_sql("UPDATE `login` SET `group_id` = 1 WHERE `account_id` ="+getcharid(3)+"");
			announce strcharinfo(0)+" has unlocked player commands",0;
			dispbottom "congratulations! now you need to relog to use commands";
		}
		end;
}

add the groupid checking before alter the groupid, this help to prevent the script affecting any GM in case they level up their characters, or cases where player assigned to different group id that isn't equal to 0.

  • Upvote 2
Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

-	script	commands_start	-1,{
OnPCBaseLvUpEvent:
		if ( BaseLevel >= 20  ) {
          query_sql("UPDATE `login` SET `group_id` = 1 WHERE `account_id` ="+getcharid(3)+"");
	announce strcharinfo(0)+" has unlocked player commands",0;
	dispbottom "congratulations! now you need to relog to use commands";
	end;
        }
}

give commands to group one instead of group 0, so when they reach level 20 script change groupid to 1 ( i didn't test the script though )

Edited by Cyro
  • Upvote 1
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...