ProjectX Posted April 4, 2023 Group: Members Topic Count: 7 Topics Per Day: 0.01 Content Count: 17 Reputation: 0 Joined: 03/29/23 Last Seen: June 12, 2023 Share Posted April 4, 2023 - 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 . Quote Link to comment Share on other sites More sharing options...
0 hendra814 Posted April 4, 2023 Group: Members Topic Count: 59 Topics Per Day: 0.01 Content Count: 1281 Reputation: 170 Joined: 06/12/12 Last Seen: 12 minutes ago Share Posted April 4, 2023 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 Quote Link to comment Share on other sites More sharing options...
0 AceofSpades Posted April 4, 2023 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 114 Reputation: 6 Joined: 03/02/18 Last Seen: 40 minutes ago Share Posted April 4, 2023 if(BaseLevel < 99){ bindatcmd("item",strnpcinfo(3)+"::OnAtcommand"); }end; im not a good at script but try if its working.. Quote Link to comment Share on other sites More sharing options...
0 hendra814 Posted April 4, 2023 Group: Members Topic Count: 59 Topics Per Day: 0.01 Content Count: 1281 Reputation: 170 Joined: 06/12/12 Last Seen: 12 minutes ago Share Posted April 4, 2023 (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 April 4, 2023 by hendra814 Quote Link to comment Share on other sites More sharing options...
0 ProjectX Posted April 4, 2023 Group: Members Topic Count: 7 Topics Per Day: 0.01 Content Count: 17 Reputation: 0 Joined: 03/29/23 Last Seen: June 12, 2023 Author Share Posted April 4, 2023 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. Quote Link to comment Share on other sites More sharing options...
0 hendra814 Posted April 4, 2023 Group: Members Topic Count: 59 Topics Per Day: 0.01 Content Count: 1281 Reputation: 170 Joined: 06/12/12 Last Seen: 12 minutes ago Share Posted April 4, 2023 (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 April 4, 2023 by hendra814 Quote Link to comment Share on other sites More sharing options...
0 Racaae Posted April 4, 2023 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 210 Reputation: 92 Joined: 06/02/12 Last Seen: 6 hours ago Share Posted April 4, 2023 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"; Quote Link to comment Share on other sites More sharing options...
0 ProjectX Posted April 5, 2023 Group: Members Topic Count: 7 Topics Per Day: 0.01 Content Count: 17 Reputation: 0 Joined: 03/29/23 Last Seen: June 12, 2023 Author Share Posted April 5, 2023 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 Quote Link to comment Share on other sites More sharing options...
Question
ProjectX
- 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.