maynard Posted March 28, 2012 Posted March 28, 2012 This is created by Emistry and it works fine for me. How can I bypass the 128 limit because I put so many that it over lap the first 1. - script Sample -1,{ OnWhisperGlobal: if( getgmlevel() < 40 ) end; mes "Please insert the Item ID"; input .@ItemID; for( set .@i,0; .@i < getarraysize( .Forbidden ); set .@i,.@i + 1 ) if( .@ItemID == .Forbidden[.@i] && getgmlevel() <= .MinGMLevel ){ mes "Sorry you cant create this item."; close; } mes "Input the Amount"; input .@Amount; mes "DOne."; getitem .@ItemID,.@Amount; close; OnInit: set .MinGMLevel,50; setarray .Forbidden[0],501,502,503; end; } Quote
QQfoolsorellina Posted March 28, 2012 Posted March 28, 2012 - script Sample -1,{ OnWhisperGlobal: if( getgmlevel() < 40 ) end; mes "Please insert the Item ID"; input .@ItemID; set .@size,getarraysize(.Forbidden); for( set .@i,0; .@i < .@size; set .@i,.@i + 1 ) if( (.@ItemID == .Forbidden[.@i] && getgmlevel() <= .MinGMLevel) || (.@ItemID == .Forbidden2[.@i] && getgmlevel() <= .MinGMLevel) ){ mes "Sorry you cant create this item."; close; } mes "Input the Amount"; input .@Amount; mes "DOne."; getitem .@ItemID,.@Amount; close; OnInit: set .MinGMLevel,50; setarray .Forbidden[0],501,502,503....128 elements; setarray .Forbidden2[0],504,505,506; end; } Quote
maynard Posted March 28, 2012 Author Posted March 28, 2012 nice, thank you very much. your a life saver.Its working. If by chance if get to the limit again, How can I add more? Quote
Emistry Posted March 28, 2012 Posted March 28, 2012 edit the condition checking if( getgmlevel() <= .MinGMLevel && ( .@ItemID == .Forbidden1[.@i] || .@ItemID == .Forbidden2[.@i] || .@ItemID == .Forbidden3[.@i] )){ Array setarray .Forbidden1[0],501,502,503; setarray .Forbidden2[0],501,502,503; setarray .Forbidden3[0],504,505,506; or you can try this [ Pastebin ] Forbid GM Create Item from NPC Quote
Question
maynard
This is created by Emistry and it works fine for me. How can I bypass the 128 limit because I put so many that it over lap the first 1.
3 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.