Jump to content
  • 0

Requesting NPC check


Limestone

Question


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

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.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  


if(countitem2(5151,1,0,0,4305,4305,4035,4035) >= 1){

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

how about if all kinds of cards ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  


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;

}

}

Link to comment
Share on other sites


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

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


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   6
  • Joined:  10/14/12
  • Last Seen:  

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!

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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

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