Beispiel #1
0
BOOL NpcTalk(LPOBJ lpNpc, LPOBJ lpObj)
{
	int npcnum = lpNpc->Class;
	if ( npcnum < 0 )
	{
		return FALSE;
	}
	//ChatSend(lpObj, ShopC[lpNpc->ShopNumber].Messsage);
	if(lpNpc->ShopNumber > -1)
	{
		npcMSG->PM(lpObj->m_Index , ShopC[lpNpc->ShopNumber].Messsage);
	}
	if ( (lpObj->m_IfState.use) > 0 )
	{
		return TRUE;
	}
	if ( npcnum == 247 || npcnum == 371 || npcnum == 249)
	{
		return g_PKClear.NpcTallk(lpNpc , lpObj);
	}

	if ( npcnum == 229 ) // Marlon
	{
		gQeustNpcTeleport.TalkRefAdd();
		lpObj->TargetShopNumber = npcnum;
	}

	if ( NpcQuestCheck(lpNpc, lpObj) != FALSE )
	{
		return TRUE;
	}

	switch ( npcnum )
	{
		case 367:
			if ( NpcMainatenceMachine ( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 259:
			if ( NpcReira ( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 254:
			if ( NpcFasi ( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 241:
			if ( NpcGuildMasterTalk( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;
		
		case 239:
			if ( NpcBattleAnnouncer( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 249:
			if ( NpcRolensiaGuard( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 238:
			if ( NpcChaosGoblelin( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 237:
			if ( NpcRusipher( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 253:
			if ( NpcPosionGirl( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 245:
			if ( NpcDeviasWizard( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 247:
			if ( NpcDeviasGuard( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 240:
			if ( NpcWarehouse( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 226:
			if ( NpcDarkSpiritTrainer( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 242:
			if ( NpcNoriaRara( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 244:
			if ( NpcDeviasMadam( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 236:
			if ( NpcEventChipNPC( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 234:
			if ( NpcServerDivision( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 232:
			if ( NpcAngelKing( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 233:
			if ( NpcAngelMessanger( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 255:
			if ( NpcRolensiaMadam( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 250:
			if ( NpcRoadMerchant( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 246:
			if ( NpcDeviasWeapon( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 251:
			if ( NpcRorensiaSmith( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 243:
			if ( NpcNoriJangIn( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 256:
			if ( NpcJewelMixDealer( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 221:
			if ( NpcSiegeMachine_Attack( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 222:
			if ( NpcSiegeMachine_Defense( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 223:
			if ( NpcElderCircle( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 224:
			if ( NpcCastleGuard( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 219:
			if ( NpcCastleGateLever( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 216:
			if ( NpcCastleCrown( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 217:
		case 218:
			if ( NpcCastleSwitch( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 257:
			if ( NpcShadowPhantom( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 368:
		case 369:
		case 370:
			if ( g_kJewelOfHarmonySystem.NpcJewelOfHarmony( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;

		case 375:
			if ( NpcChaosCardMaster( lpNpc, lpObj ) == TRUE )
			{
				return TRUE;
			}
			break;
	}

	return FALSE;
}
BOOL NpcTalk(LPOBJ lpNpc, LPOBJ lpObj)
{
	int npcnum = lpNpc->Class;

	if ( npcnum < 0)
	{
		return FALSE;
	}

	if (g_ResetSystem.ProcDialog(lpObj, lpNpc))
	{
		return TRUE;
	}

	if ( (lpObj->m_IfState.use) > 0 )
	{
		return TRUE;
	}

	if ( npcnum == 229 ) // Marlon
	{
		gQeustNpcTeleport.TalkRefAdd();
		lpObj->TargetShopNumber = npcnum;
	}

#if(__CUSTOM_QUEST__ == 1)
	if ( npcnum == 371 )
	{
		g_MyQuest.NpcTalk(lpObj,lpNpc);
		return TRUE;
	}
#endif

	if ( NpcQuestCheck(lpNpc, lpObj) != FALSE )
	{
		return TRUE;
	}

	

	switch ( npcnum )
	{
		case 254:
			return NpcFasi ( lpNpc, lpObj );

		case 241:
			return NpcGuildMasterTalk( lpNpc, lpObj );

		case 239:
			return NpcBattleAnnouncer( lpNpc, lpObj );

		case 249:
			return NpcRolensiaGuard( lpNpc, lpObj );

		case 238:
			return NpcChaosGoblelin( lpNpc, lpObj );

		case 237:
			return NpcRusipher( lpNpc, lpObj );

		case 253:
			return NpcPosionGirl( lpNpc, lpObj );

		case 245:
			return NpcDeviasWizard( lpNpc, lpObj );

		case 247:
			return NpcDeviasGuard( lpNpc, lpObj );

		case 240:
			return NpcWarehouse( lpNpc, lpObj );

		case 226:
			return NpcDarkSpiritTrainer( lpNpc, lpObj );

		case 242:
			return NpcNoriaRara( lpNpc, lpObj );

		case 244:
			return NpcDeviasMadam( lpNpc, lpObj );

		case 236:
			return NpcEventChipNPC( lpNpc, lpObj );

		case 234:
			return NpcServerDivision( lpNpc, lpObj );

		case 232:
			return NpcAngelKing( lpNpc, lpObj );

		case 233:
			return NpcAngelMessanger( lpNpc, lpObj );

		case 255:
			return NpcRolensiaMadam( lpNpc, lpObj );

		case 250:
			return NpcRoadMerchant( lpNpc, lpObj );

		case 246:
			return NpcDeviasWeapon( lpNpc, lpObj );

		case 251:
			return NpcRorensiaSmith( lpNpc, lpObj );

		case 243:
			return NpcNoriJangIn( lpNpc, lpObj );

		case 256:
			return NpcJewelMixDealer( lpNpc, lpObj );

#if (GS_CASTLE == 0 || GS_SPEC == 1)
		case 367:
			return NpcMainatenceMachine ( lpNpc, lpObj );
#endif

		case 221:
			return NpcSiegeMachine_Attack( lpNpc, lpObj );

		case 222:
			return NpcSiegeMachine_Defense( lpNpc, lpObj );

		case 223:
			return NpcElderCircle( lpNpc, lpObj );

		case 224:
			return NpcCastleGuard( lpNpc, lpObj );

		case 219:
			return NpcCastleGateLever( lpNpc, lpObj );

		case 216:
			return NpcCastleCrown( lpNpc, lpObj );

		case 217:
		case 218:
			return NpcCastleSwitch( lpNpc, lpObj );

#if (GS_CASTLE == 1)
		case 220:
			return NpcCastleHuntZoneGuard( lpNpc, lpObj );
#endif
		case 257:
			return NpcShadowPhantom( lpNpc, lpObj );

#if (GS_CASTLE == 1)

		case 205:
			return NpcCrywolfAltar(lpNpc,lpObj);

		case 206:
			return NpcCrywolfAltar(lpNpc,lpObj);

		case 207:
			return NpcCrywolfAltar(lpNpc,lpObj);

		case 208:
			return NpcCrywolfAltar(lpNpc,lpObj);

		case 209:
			return NpcCrywolfAltar(lpNpc,lpObj);
#endif
#if (CUSTOM_OLYMP==1)
		case 258:
			return g_CustomOlymp.NpcTalk(lpNpc,lpObj);
#endif
		case 259:
			return NpcReira ( lpNpc, lpObj );

		case 368:
		case 369:
		case 370:
			return g_kJewelOfHarmonySystem.NpcJewelOfHarmony( lpNpc, lpObj );

		case 375:
			return NpcChaosCardMaster( lpNpc, lpObj );

		case 376:
			return NpcDrinkSellerHillary( lpNpc, lpObj );

		case 377:
			return NpcDrinkSellerLindsay( lpNpc, lpObj );

		case 379:
			return NpcFireWorkGirl( lpNpc, lpObj );

		case 385:
			return NpcIllusionMaster( lpNpc, lpObj );

		case 380:
			return NpcIllusionHolyStatue( lpNpc, lpObj );

		case 383:
			return NpcAlliedTeamForge( lpNpc, lpObj );

		case 384:
			return NpcIllusionTeamForge( lpNpc, lpObj );

		case 415:
			return NpcSilvia( lpNpc, lpObj );

		case 416:
			return NpcLeah( lpNpc, lpObj );

		case 417:
			return NpcMarseille( lpNpc, lpObj );

		case 452:
			return NpcSeedMaster( lpNpc, lpObj );

		case 453:
			return NpcSeedResearch( lpNpc, lpObj );

		case 450:
			return NpcCherryBlossom( lpNpc, lpObj );

		case 465:
			return NpcSanta( lpNpc,lpObj);

		case 467:
			return NpcSnowman( lpNpc,lpObj);

		case 468:
			return NpcLitleSanta( lpNpc,lpObj,0x5E);

		case 469:
			return NpcLitleSanta( lpNpc,lpObj,0x5F);

		case 470:
			return NpcLitleSanta( lpNpc,lpObj,0);

		case 471:
			return NpcLitleSanta( lpNpc,lpObj,1);

		case 472:
			return NpcLitleSanta( lpNpc,lpObj,0x5C);

		case 473:
			return NpcLitleSanta( lpNpc,lpObj,0x5D);

		case 474:
			return NpcLitleSanta( lpNpc,lpObj,0x60);

		case 475:
			return NpcLitleSanta( lpNpc,lpObj,0x61);

		case 478:
			return NpcDelgado( lpNpc, lpObj );
			break;

		case 479:
			return NpcTitus( lpNpc, lpObj );

		case 522:
			return NpcImperialFort( lpNpc, lpObj );

		case 540:
			return NpcLugard( lpNpc, lpObj );

		case 541:
			return NpcCompensationBox( lpNpc, lpObj );

		case 542:
			return NpcGoldCompensationBox( lpNpc, lpObj );

		case 543:
			return NpcDuprianSteward( lpNpc, lpObj );

		case 544:
			return NpcVanertSteward( lpNpc, lpObj );

		case 547:
			return NpcJulia( lpNpc, lpObj );

		case 579:
			return NpcDavid( lpNpc, lpObj );

		case 580:
			return NpcCaptainSlaugh( lpNpc, lpObj );

		case 582:
			return NpcAdniel( lpNpc, lpObj );

		case 584:
			return NpcSirLesnar( lpNpc, lpObj );

		case 651:
			return NpcPrivateStoreBoard(lpNpc, lpObj);

	}

	return FALSE;
}