Jump to content

Question

Posted

requesting a npc check that if a player is equipped a hat or other items that have cards compounded, the npc will reject or not continuing the conversation. thank you so much.

6 answers to this question

Recommended Posts

Posted


setarray .NoCard_ids[0], 4236, 4359, 4425; // add more if you want.


for( set .@i,0; .@i<getarraysize(.NoCard_ids); set .@i,.@i+1 ) {

if (countitem(.NoCard_ids[.@i])) {

mes "You can not bring cards in this arena.";

close;

}

}

for( set .@i, 1; .@i < 11; set .@i, .@i + 1 ) {

for( set .@j, 0; .@j < GetArraySize(.NoCard_ids); set .@j, .@j + 1 ) {

if( getequipcardid (.@i,0) == .NoCard_ids[.@j] || getequipcardid (.@i,1) == .NoCard_ids[.@j] || getequipcardid (.@i,2) == .NoCard_ids[.@j] || getequipcardid (.@i,3) == .NoCard_ids[.@j] ) {

mes "You can not bring cards in this arena.";

close;

}

}

Posted

how about if all kinds of cards ?

for( .@i = 1; .@i <= 10; .@i++ )
	if( getequipcardcnt( .@i ) ){
		mes "Please remove all the card in your equipments.";
		close;
	}
Posted

How about compounded cards and weapons?

 

For example,

 

The NPC checks and won't allow you to go through if you have a Turtle general compounded to any weapon in your inventory? Is this possible? 

 

or a compounded turtle general on any weapon or turtle general card alone in you inventory, the NPC will not you get in or continue?

 

 

 

Thanks!

Posted

The NPC checks and won't allow you to go through if you have a Turtle general compounded to any weapon in your inventory? Is this possible? 

or a compounded turtle general on any weapon or turtle general card alone in you inventory, the NPC will not you get in or continue?

use

*checkequipedcard(<card id>)

This function will return 1 if the card specified by its item ID number is

inserted into any equipment they have in their inventory, currently equipped or

not.

and countitem to check if the player has a specific card in inventory

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