Jump to content
  • 0
Pandaaa

2 Max Deadly Card

Question

Example:

 

1 High Priest Card [Equipped]

1 Assassin Cross Card [Equipped]

 

1 Lord Knight Card tried to equip (there will pop up that it cant be equip because of 2 Cards Max Deadly)

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

You can make a check in OnEquipScript and OnUnequipScript events, where you check if is equiped any kind of card and unequip in proper conditions.

 

Example:

 

	OnEquipScript: <"
		if (card_check >= 2) {
			message strcharinfo(PC_NAME), "You can't equip more than 2 of this kind of cards";
			unequip(EQI_HAND_R);
		}
		card_check += 1;
		end;
	">
	OnUnequipScript: <"
		card_check -= 1;
		end;
	">

In that script, when card is equiped will add +1 to card_check variable and -1 when unequiped. If card_check variable is more or equal to 2, it will bring a message and unequip the weapon (in the assmption that card is equiped on a weapon).

 

You can create groups of cards to have several conditions by creatin a new and different variable for every card group. However, the hard part is to make the proper unequip command to unequip the right gear, mostly because accesoryes can be equiped on two slots and assassins can equip weapons on both hands. To make it easy you can use nude() command so it will unequip everything, but remember to clear all the vars when that happen.

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.