Jump to content
  • 0

Item Restriction Request


Dvrstle

Question


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  361
  • Reputation:   10
  • Joined:  12/30/11
  • Last Seen:  

i want a script that will restrict +11 above items on a specific map (GvG maps and payg_cas02)

/thx in advance

Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  102
  • Reputation:   1
  • Joined:  11/06/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  361
  • Reputation:   10
  • Joined:  12/30/11
  • Last Seen:  

ok i will try this one. . thank you! /heh

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  161
  • Reputation:   31
  • Joined:  12/06/11
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  361
  • Reputation:   10
  • Joined:  12/30/11
  • Last Seen:  

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$ );

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

~.~

set .@i,getarraysize( .Map$ );

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  71
  • Reputation:   25
  • Joined:  11/23/11
  • Last Seen:  

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
Link to comment
Share on other sites

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.

×
×
  • Create New...