Jump to content
  • 0

LEVEL REQUIREMENTS LVL 99


ProjectX

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.02
  • Content Count:  17
  • Reputation:   0
  • Joined:  03/29/23
  • Last Seen:  

-	script	atcmd_noitem	-1,{
OnInit:
	bindatcmd("item",strnpcinfo(3)+"::OnAtcommand",0,99);
	setarray .item_restrict,7227,607;	
end;
OnAtcommand:
	.@itemid = atoi(.@atcmd_parameters$[0]);
	if(!getgmlevel()){
		if(inarray(.item_restrict,.@itemid) != -1){
			message strcharinfo(0),"You cannot create this item.";
			end;
		}	
	}
	if(getitemname(.@itemid) != "null"){
		.@quantity = atoi( .@atcmd_parameters$[1] );
		if ( .@quantity < 1 ) .@quantity = 1;
		getitem .@itemid,.@quantity;
	}
end;
}

 

HELLO TO SCRIPTER. I WOULD LIKE TO REQUEST .  IF THE PLAYERS IS LVL 99 HE CAN USE THIS COMMAND. AND IF THE PLAYER 99 BELOW HE CANT USE THIS COMMAND.

 

THANK YOU .

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1191
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

34 minutes ago, Racaae said:

Hi, Find this line:

mes "Only for character with level 99 and above";

Change to:

else
	mes "Only for character with level 99 and above";

 

Thanks it's working now

-	script	atcmd_noitem	-1,{
  OnInit:
	bindatcmd("getitem",strnpcinfo(3)+"::OnAtcommand");
	setarray .item_restrict,7227,607;	
end;
OnAtcommand:
	if (baselevel >= 99){
	.@itemid = atoi(.@atcmd_parameters$[0]);
	if(!getgmlevel()){
		if(inarray(.item_restrict,.@itemid) != -1){
			message strcharinfo(0),"You cannot create this item.";
			end;
		}	
	}
	if(getitemname(.@itemid) != "null"){
		.@quantity = atoi( .@atcmd_parameters$[1] );
		if ( .@quantity < 1 ) .@quantity = 1;
		getitem .@itemid,.@quantity;
	}
}
else mes "Only for character with level 99 and above";
end;
}

it's so powerful command, can by pass for create any item for non GM user.

change into @getitem command, but using @item still can create any items

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  102
  • Reputation:   6
  • Joined:  03/02/18
  • Last Seen:  

 

if(BaseLevel < 99){
    bindatcmd("item",strnpcinfo(3)+"::OnAtcommand");
}end;

im not a good at script but try if its working..

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1191
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

12 hours ago, ProjectX said:
-	script	atcmd_noitem	-1,{
OnInit:
	bindatcmd("item",strnpcinfo(3)+"::OnAtcommand",0,99);
	setarray .item_restrict,7227,607;	
end;
OnAtcommand:
	.@itemid = atoi(.@atcmd_parameters$[0]);
	if(!getgmlevel()){
		if(inarray(.item_restrict,.@itemid) != -1){
			message strcharinfo(0),"You cannot create this item.";
			end;
		}	
	}
	if(getitemname(.@itemid) != "null"){
		.@quantity = atoi( .@atcmd_parameters$[1] );
		if ( .@quantity < 1 ) .@quantity = 1;
		getitem .@itemid,.@quantity;
	}
end;
}

 

HELLO TO SCRIPTER. I WOULD LIKE TO REQUEST .  IF THE PLAYERS IS LVL 99 HE CAN USE THIS COMMAND. AND IF THE PLAYER 99 BELOW HE CANT USE THIS COMMAND.

 

THANK YOU .

try this

-	script	atcmd_noitem	-1,{
  OnInit:
	bindatcmd("item",strnpcinfo(3)+"::OnAtcommand");
	setarray .item_restrict,7227,607;	
end;
OnAtcommand:
	if (baselevel >= 99){
	.@itemid = atoi(.@atcmd_parameters$[0]);
	if(!getgmlevel()){
		if(inarray(.item_restrict,.@itemid) != -1){
			message strcharinfo(0),"You cannot create this item.";
			end;
		}	
	}
	if(getitemname(.@itemid) != "null"){
		.@quantity = atoi( .@atcmd_parameters$[1] );
		if ( .@quantity < 1 ) .@quantity = 1;
		getitem .@itemid,.@quantity;
	}
}
mes "Only for character with level 99 and above";
end;
}

 

Edited by hendra814
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.02
  • Content Count:  17
  • Reputation:   0
  • Joined:  03/29/23
  • Last Seen:  

1 hour ago, hendra814 said:

try this

OnInit:
	bindatcmd("item",strnpcinfo(3)+"::OnAtcommand");
	setarray .item_restrict,7227,607;	
end;
OnAtcommand:
	if (baselevel >= 99){
	.@itemid = atoi(.@atcmd_parameters$[0]);
	if(!getgmlevel()){
		if(inarray(.item_restrict,.@itemid) != -1){
			message strcharinfo(0),"You cannot create this item.";
			end;
		}	
	}
	if(getitemname(.@itemid) != "null"){
		.@quantity = atoi( .@atcmd_parameters$[1] );
		if ( .@quantity < 1 ) .@quantity = 1;
		getitem .@itemid,.@quantity;
	}
}
mes "Only for character with level 99 and above";
end;
}

 

when i use this command. There were still items after using the un command.

screenrathenaRE000.jpg

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1191
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

Sorry i didn't test the script, i will inform you later when i'm back home.

 

Edit: already test the script, it's weird can't run as requested,

don't know where the problem, maybe need someone to fix it.

baselevel more than 99 and below 99 always show the same result.

Edited by hendra814
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  132
  • Reputation:   53
  • Joined:  06/02/12
  • Last Seen:  

8 hours ago, ProjectX said:

when i use this command. There were still items after using the un command.

Hi, Find this line:

mes "Only for character with level 99 and above";

Change to:

else
	mes "Only for character with level 99 and above";

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.02
  • Content Count:  17
  • Reputation:   0
  • Joined:  03/29/23
  • Last Seen:  

15 hours ago, hendra814 said:

Thanks it's working now

-	script	atcmd_noitem	-1,{
  OnInit:
	bindatcmd("getitem",strnpcinfo(3)+"::OnAtcommand");
	setarray .item_restrict,7227,607;	
end;
OnAtcommand:
	if (baselevel >= 99){
	.@itemid = atoi(.@atcmd_parameters$[0]);
	if(!getgmlevel()){
		if(inarray(.item_restrict,.@itemid) != -1){
			message strcharinfo(0),"You cannot create this item.";
			end;
		}	
	}
	if(getitemname(.@itemid) != "null"){
		.@quantity = atoi( .@atcmd_parameters$[1] );
		if ( .@quantity < 1 ) .@quantity = 1;
		getitem .@itemid,.@quantity;
	}
}
else mes "Only for character with level 99 and above";
end;
}

it's so powerful command, can by pass for create any item for non GM user.

change into @getitem command, but using @item still can create any items

thank you very much idol. is now working ?

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