Item Restriction

Shiro

New member
Messages
42
Points
0
Age
29
Location
Philippines
Emulator
Hello, how do you make it that only one item will take effect if the user wears the same item? For example, you can't equip two megingjards, even if you equip two of them only one should take effect. And also, if possible you can do that with other equips too, like you can't equip megingjard + brisingamen, only one would take effect. Thanks

 
You can use

Code:
isequippedcnt


Like this?

Code:
{
	Id: 2629
	AegisName: "Magingiorde"
	Name: "Megingjard"
	Type: "IT_ARMOR"
	Buy: 20
	Weight: 8000
	Def: 2
	Loc: "EQP_ACC"
	EquipLv: 94
	Refine: false
	Script: <"
		if (isequippedcnt(2629)<2) {	
			bonus bStr,40;
			bonus bMdef,7;
		}
	">
},

 
isequippedcnt

Code:
isequippedcnt


Like this?

{
Id: 2629
AegisName: "Magingiorde"
Name: "Megingjard"
Type: "IT_ARMOR"
Buy: 20
Weight: 8000
Def: 2
Loc: "EQP_ACC"
EquipLv: 94
Refine: false
Script: <"
if (isequippedcnt(2629)<2) {
bonus bStr,40;
bonus bMdef,7;
}
">
},

Code:
{
	Id: 2629
	AegisName: "Magingiorde"
	Name: "Megingjard"
	Type: "IT_ARMOR"
	Buy: 20
	Weight: 8000
	Def: 2
	Loc: "EQP_ACC"
	EquipLv: 94
	Refine: false
	Script: <"
		if (isequippedcnt(2629)<2) {	
			bonus bStr,40;
			bonus bMdef,7;
		}
	">
},
Thanks for this. I think I had a different of way of doing this with rathena but this seems much easier.

 
Back
Top