Jump to content
  • 0

LEVEL REQUIREMENTS LVL 99


Question

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

7 answers to this question

Recommended Posts

  • 0
Posted
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

  • 0
Posted

 

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

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

 

  • 0
Posted (edited)
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
  • 0
Posted
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

  • 0
Posted (edited)

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
  • 0
Posted
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";

 

  • 0
Posted
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 ?

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...