Jump to content
  • 0

how to disable cards on woe time?


Question

12 answers to this question

Recommended Posts

Posted

Use item_noequip.txt. Find it inside your db/pre-re or db/re

 

// The equipment/items/cards restriction file 
// here you define which items may not be used at PvP / GvG 
// format: <item id>,<mode>
// mode
// 1    - restricted in normal maps
// 2    - restricted in PVP
// 4    - restricted in GVG
// 8    - restricted in Battlegrounds
// Restricted zones - they're configured by 'restricted <number>' mapflag
// 32   - restricted in zone 1
// 64   - restricted in zone 2
// 128  - restricted in zone 3
// 256  - restricted in zone 4
// 512  - restricted in zone 5
// 1024 - restricted in zone 6
// 2048 - restricted in zone 7

//Examples:
//1201,1 you can't use KNIFE(ID 1201) on normal maps
//608,4 you can't use Yggdrasil Seed(ID 608) on both GvG and WoE Castles
//4174,6 Forbid Deviling Card in every PVP or GVG map, and during woes.
//501,32 you can't use Red Potion on map marked as 'restricted zone 1'
//502,64 you can't use Orange Potion on map marked as 'restricted zone 2'
//503,128 you can't use Yellow Potion on map marked as 'restricted zone 3'
// you can even mix modes
//519,322 (256+64+2) you can't use Milk on PVP, and maps marked as 'restricted zone 2' and 'restricted zone 4'
Posted

Use item_noequip.txt. Find it inside your db/pre-re or db/re

 

// The equipment/items/cards restriction file 
// here you define which items may not be used at PvP / GvG 
// format: <item id>,<mode>
// mode
// 1    - restricted in normal maps
// 2    - restricted in PVP
// 4    - restricted in GVG
// 8    - restricted in Battlegrounds
// Restricted zones - they're configured by 'restricted <number>' mapflag
// 32   - restricted in zone 1
// 64   - restricted in zone 2
// 128  - restricted in zone 3
// 256  - restricted in zone 4
// 512  - restricted in zone 5
// 1024 - restricted in zone 6
// 2048 - restricted in zone 7

//Examples:
//1201,1 you can't use KNIFE(ID 1201) on normal maps
//608,4 you can't use Yggdrasil Seed(ID 608) on both GvG and WoE Castles
//4174,6 Forbid Deviling Card in every PVP or GVG map, and during woes.
//501,32 you can't use Red Potion on map marked as 'restricted zone 1'
//502,64 you can't use Orange Potion on map marked as 'restricted zone 2'
//503,128 you can't use Yellow Potion on map marked as 'restricted zone 3'
// you can even mix modes
//519,322 (256+64+2) you can't use Milk on PVP, and maps marked as 'restricted zone 2' and 'restricted zone 4'

what if i want only in a certain map?

Posted
-	script	1CastleDisable	-1,{

OnPCLoadMapEvent:
getmapxy(.@map$,.@mapx,.@mapy,0);
if(.@map$ == "prtg_cas01"){
    for(set .@i,0; .@i < getarraysize(.itemcheck); set .@i, .@i + 1){
        if(countitem(.itemcheck[.@i])){
            dispbottom "You cannot have any "+getitemname(.itemcheck[.@i])+" in your possession on this map.";            
            warp "prontera",200,180;
            end;
            }
        }
    }
end;

OnInit:
setarray .itemcheck[0],2383;
end;
}

prtg_cas01	mapflag	loadevent

This one is for not allowing players bring specific item to a map. Maybe other members can help restrict cards also.

Posted
-	script	1CastleDisable	-1,{

OnPCLoadMapEvent:
getmapxy(.@map$,.@mapx,.@mapy,0);
if(.@map$ == "prtg_cas01"){
    for(set .@i,0; .@i < getarraysize(.itemcheck); set .@i, .@i + 1){
        if(countitem(.itemcheck[.@i])){
            dispbottom "You cannot have any "+getitemname(.itemcheck[.@i])+" in your possession on this map.";            
            warp "prontera",200,180;
            end;
            }
        }
    }
end;

OnInit:
setarray .itemcheck[0],2383;
end;
}

prtg_cas01	mapflag	loadevent

This one is for not allowing players bring specific item to a map. Maybe other members can help restrict cards also.

 

So how about many maps? it should be like this.

 

-	script	1CastleDisable	-1,{

OnPCLoadMapEvent:
getmapxy(.@map$,.@mapx,.@mapy,0);
if(.@map$ == "prtg_cas01","prtg_cas02","prtg_cas02"){
    for(set .@i,0; .@i < getarraysize(.itemcheck); set .@i, .@i + 1){
        if(countitem(.itemcheck[.@i])){
            dispbottom "You cannot have any "+getitemname(.itemcheck[.@i])+" in your possession on this map.";            
            warp "prontera",200,180;
            end;
            }
        }
    }
end;

OnInit:
setarray .itemcheck[0],2383,4174,4047;
end;
}

prtg_cas01	mapflag	loadevent
prtg_cas02	mapflag	loadevent
prtg_cas03	mapflag	loadevent

like this?

ahh dont mind the "prtg_cas02","prtg_cas02" xD got wrong type

Posted
-	script	Sample	-1,{
OnInit:
setarray .map$,"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05";
set .map_size,getarraysize( .map$ );
for( .@i = 0; .@i < .map_size; .@i++ )
	setmapflag .map$[.@i],mf_loadevent;
end;

OnPCLoadMapEvent:
.@map$ = strcharinfo(3);
for( .@i = 0; .@i < .map_size; .@i++ )
	if( .@map$ == .map$[.@i] ){
		getinventorylist;
		if( getarraysize( @inventorylist_card1 ) || getarraysize( @inventorylist_card2 ) || getarraysize( @inventorylist_card3 ) || getarraysize( @inventorylist_card4 ) ){
			mes "Make sure you didnt bring any Item that have Card Compounded or Signed with Name.";
			close2;
			warp "prontera",155,181;
		}
		break;
	}
end;
}

how to make this script disable specific equips and cards on a specific map every saturday at 7pm to 8pm only?

 

can i just put  OnSat1900: ?

Posted
-	script	Sample	-1,{
OnInit:
setarray .map$,"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05";
set .map_size,getarraysize( .map$ );
for( .@i = 0; .@i < .map_size; .@i++ )
	setmapflag .map$[.@i],mf_loadevent;
end;

OnPCLoadMapEvent:
.@map$ = strcharinfo(3);
for( .@i = 0; .@i < .map_size; .@i++ )
	if( .@map$ == .map$[.@i] ){
		getinventorylist;
		if( getarraysize( @inventorylist_card1 ) || getarraysize( @inventorylist_card2 ) || getarraysize( @inventorylist_card3 ) || getarraysize( @inventorylist_card4 ) ){
			mes "Make sure you didnt bring any Item that have Card Compounded or Signed with Name.";
			close2;
			warp "prontera",155,181;
		}
		break;
	}
end;
}

how to make this script disable specific equips and cards on a specific map every saturday at 7pm to 8pm only?

 

can i just put  OnSat1900: ?

 

 

Add this under the OnPCLoadMapEvent label to determine whether or not it's Saturday:

if (gettime(4) == 6) {
	end;
}
  • Upvote 1
Posted

 

-	script	Sample	-1,{
OnInit:
setarray .map$,"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05";
set .map_size,getarraysize( .map$ );
for( .@i = 0; .@i < .map_size; .@i++ )
	setmapflag .map$[.@i],mf_loadevent;
end;

OnPCLoadMapEvent:
.@map$ = strcharinfo(3);
for( .@i = 0; .@i < .map_size; .@i++ )
	if( .@map$ == .map$[.@i] ){
		getinventorylist;
		if( getarraysize( @inventorylist_card1 ) || getarraysize( @inventorylist_card2 ) || getarraysize( @inventorylist_card3 ) || getarraysize( @inventorylist_card4 ) ){
			mes "Make sure you didnt bring any Item that have Card Compounded or Signed with Name.";
			close2;
			warp "prontera",155,181;
		}
		break;
	}
end;
}

how to make this script disable specific equips and cards on a specific map every saturday at 7pm to 8pm only?

 

can i just put  OnSat1900: ?

 

 

Add this under the OnPCLoadMapEvent label to determine whether or not it's Saturday:

if (gettime(4) == 6) {
	end;
}

how about making it works to block all specified item not just the cards?

Posted

how about making it works to block all specified item not just the cards?

Inject a blacklist to check for items.

setarray .@blacklist[0], 1201, 1202, 1203, 607;

for (.@i = 0; .@i < getarraysize(.@blacklist); .@i++) {
	if (countitem(.@blacklist[.@i])) {
		message strcharinfo(0), getitemname(.@blacklist[.@i]) +" is restricted from this map.";
		warp "SavePoint", 0, 0;
		end;
	}
}

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