CheckPartyForItem(object, string)
パーティが指定のアイテムを所持しているかチェックします。
int CheckPartyForItem( object oMember, string sItem );
Parameters
oMember
チェックされるパーティのメンバー。
sItem
チェックしたいアイテムのタグ。
Description
sItemというタグのアイテムをoMemberが所属するファクションの誰かが所持しているかどうかチェックします。
			
もしoMemberのファクションの誰かがsItemを所持していた場合はTRUEを返します。
			
oMemberのファクションの誰もsItemを所持していない場はFALSEを返します。
				
			
Requirements
#include "NW_I0_TOOL"
Version
1.22
Example
// トリガーのOnClickに設定します。
// もしパーティメンバーの誰かが"TravelKey"というタグの鍵を所持していた場合は、
// クリックした人を”WP_Destination”と指定された
// ウェイポイントに転送させます。
// 持っていない場合は、パーティが鍵を持っていないという
// メッセージを表示させます。
#include "nw_i0_tool"
void main()
{
  object oClicker = GetClickingObject();
  object oTarget = GetWaypointByTag("WP_Destination");
  location lDest = GetLocation(oTarget);
  if(CheckPartyForItem(oClicker, "TravelKey"))
  {
    AssignCommand(oClicker, ActionJumpToLocation(lDest));
  }
  else
  {
    SpeakString("あなた達は正しい鍵を持っていません。");
  }
} 
See Also
| categories: | Get Data Functions | Inventory Functions | Party Functions | 
author: Kristian Markon, editor: Jeremy Spilinek, JP team: NamaYake, geshi
Send comments on this topic.