Jump to content
  • 0

Item Restriction Request


Question

9 answers to this question

Recommended Posts

Posted (edited)

Can not remember the part to check equipment but after that bit, somthing like this?

if(getrefine()>10) goto noentery;

noentry:
  mes "Sorry you cannot access this arena";
  close;

Edited by Rayhan
Posted (edited)

Emistry, its better to make the person warp right away. In case its a guild castle, the above can be bypassed if a player doesn't click the 'close' button and is being e-called while in the same castle. Just have a dispbottom message like so.

Nevermind, didn't notice the sleep. Still though, I think it would be more efficient to use the dispbottom and warping right away other than running the same thing every 5 seconds :P.

-	script	Sample#checkrefine	-1,{
OnInit:
setarray .Map$[0],"payg_cas02","guild_vs1","guild_vs2","guild_vs3","guild_vs4";

.size = getarraysize( .Map$ );
for( .@i = 0; .@i < .size; .@i++ )
setmapflag .Map$[.@i],mf_loadevent;
end;

OnPCLoadMapEvent:
for( .@i = 0; .@i < .size; .@i++ )
while( strcharinfo(3) == .Map$[.@i] ){
	getinventorylist;
	for( .@i = 0; .@i < @inventorylist_count; .@i++ )
		if( @inventorylist_refine[.@i] > 10 ){
			dispbottom "Please remove all Equipment that have Refine +10 or above.";
			warp "SavePoint",0,0;
		}
	sleep2 5000;
}
end;

Edited by garet999
Posted

@garet

actually it will work the same...

no mater how they try enter these map with restriction....the message will pop out...and when user click the close button...they get warped out.

and...this message will keep on show even though they try to bypass it using @warp / @jump ...etc.....

because whenever a character is 'reloaded' / teleported within the map.. OnPCLoadMapEvent will be trigger again..and same checking / message will be shown

i didnt use dispbottom because some users doesnt like to view chat window sometime.... not to mention some player "hide" / close their chat window sometime...

the sleep2 command is just a timer / delay before the script load on same player to check again...just incase player found a way to bring these item inside...like... storage.... cart ..... mailbox..... etc...

Posted

tnx for the information @emistry

/no1

sir emistry, i found an error

parse_line: expect command, missing function name or calling undeclared function
1: {
2: OnInit:
3: setarray .Map$[0],"payg_cas02","guild_vs1","guild_vs2","guild_vs3","guild_vs4";
4:
* 5: .size = getarraysize( .Map$ );

Posted (edited)

Credits to ToastOfDoom (if I remember well he used this method before):

-	script	Sample#checkrefine	-1,{
OnInit:
setarray .@map$[0],"payg_cas02","guild_vs1","guild_vs2","guild_vs4";

set .@size, getarraysize( .@map$ );
for(set .@i,0; .@i < .@size; set .@i,.@i+ 1 ){
setd ".map_"+ .@map$[.@i], 1;	
setmapflag .@map$[.@i],mf_loadevent;
}
end;

OnPCLoadMapEvent:
if(getd( ".map_"+ strcharinfo(3) ) ){
set .@map$,strcharinfo(3);
while( strcharinfo(3) == .@map$ ){
	getinventorylist;
	for(set .@i,0; .@i < @inventorylist_count; set .@i,.@i+ 1 )
		if( @inventorylist_refine[.@i] >= 10 ){
			mes "Please remove all Equipment that have Refine +10 or above.";
			close2;
			warp "SavePoint",0,0;
		}
	sleep2 5000;
}
end;
}

Edited by Omnipotent

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