Kiosani

NpcTalk.cpp Golden Archer .90

Jun 13th, 2025
7
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. struct PMSG_REQ_VIEW_EC_MN
  2. {
  3. PBMSG_HEAD h; // C1:01
  4. int iINDEX; // 4
  5. char szUID[11]; // 8
  6. };
  7.  
  8. BOOL NpcEventChipNPC(LPOBJ lpNpc, LPOBJ lpObj)
  9. {
  10. if ( (lpObj->m_IfState.use) > 0 )
  11. {
  12. return TRUE;
  13. }
  14.  
  15. if ( lpNpc->MapNumber == 0 )
  16. {
  17. PMSG_REQ_VIEW_EC_MN pMsgTha;
  18.  
  19. PHeadSetB((LPBYTE)&pMsgTha, 0x01, sizeof(pMsgTha));
  20. pMsgTha.iINDEX = lpObj->m_Index;
  21. strcpy(pMsgTha.szUID, lpObj->AccountID);
  22. pEventObj = lpNpc;
  23.  
  24. DataSendEventChip((char*)&pMsgTha, sizeof(pMsgTha));
  25.  
  26. lpObj->m_IfState.type = 9;
  27. lpObj->m_IfState.state = 0;
  28. lpObj->m_IfState.use = 1;
  29.  
  30. return TRUE;
  31. }
  32.  
  33. if ( lpNpc->MapNumber == 2 )
  34. {
  35. PMSG_EVENTCHIPINFO Result;
  36.  
  37. PHeadSetB((LPBYTE)&Result, 0x94, sizeof(Result));
  38. Result.Type = 2;
  39.  
  40. DataSend(lpObj->m_Index, (LPBYTE)&Result, Result.h.size);
  41.  
  42. lpObj->m_IfState.type = 9;
  43. lpObj->m_IfState.state = 0;
  44. lpObj->m_IfState.use = 1;
  45.  
  46. return TRUE;
  47. }
  48.  
  49. return FALSE;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment