Jump to content

Question

Posted (edited)

im using this script to restrict some mvp monster for the event managers but when this script enable i cant use the command @monster even the admin account ...help pls thx :)

can some improve it or can some1 make a new a better 1 ? thx :)

-	script	Strict	-1,{
	OnInit:
		setarray .mob_restriction[0],1646,1647,1648,1649,1650,1651,1751,1708;
		.size = getarraysize(.mob_restriction);
		bindatcmd "monster",strnpcinfo(3)+"::OnExe";
		end;
	
	OnExe:
		.monster_id = atoi( .@atcmd_parameters$[0] );
		for ( .@i = 0; .@i < .size; .@i++ ) {
			if ( .monster_id == .mob_restriction[.@i] && getgmlevel() < 99 ) {
				dispbottom "You cannot summon this monster";
				end;
			}
		}
		if ( getmonsterinfo( .monster_id, 0 ) != "null" ) {
			.@amount = atoi( .@atcmd_parameters$[1] );
			atcommand "@monster " +.monster_id+ " " +(!.@amount?1:.@amount);
		}
		end;
	
}
Edited by keima25

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.

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