ObjectScripter.cpp
上传用户:tt_chan
上传日期:2009-12-03
资源大小:4523k
文件大小:1k
- #include "stdafx.h"
- void CScripterObject::Create(int nX, int nY, CMirMap* pMap)
- {
- m_dwRunTime = GetTickCount();
- m_dwRunNextTick = 5000;
- strcpy(m_szName, "啊力飘");
- m_nCurrX = nX;
- m_nCurrY = nY;
- m_nDirection = 4;
- m_pMap = pMap;
- m_tFeature.btGender = 0;
- m_tFeature.btWear = 4;
- m_tFeature.btHair = 1;
- m_tFeature.btWeapon = 5;
- // m_fScriptFile = fopen("capture.txt", "r+");
-
- pMap->AddNewObject(nX, nY, OS_MOVINGOBJECT, this);
- AddRefMsg(RM_TURN, m_nDirection, nX, nY, 0, m_szName);
- }
- void CScripterObject::Operate()
- {
- int n = rand() % 7;
- if (rand() % 10 == 0)
- {
- char szText[128];
- char szEncodeText[128];
- if (rand() % 2 == 0)
- strcpy(szText, "救崇窍技夸. 历绰 ei 款康磊 啊力飘 涝聪促.");
- else
- strcpy(szText, "@各哩 荤娇 1");
- int nPos = fnEncode6BitBufA((unsigned char *)szText, szEncodeText, memlen(szText) - 1, sizeof(szEncodeText));
- szEncodeText[nPos] = ' ';
- ProcessForUserSaid(szEncodeText);
- }
- else
- WalkTo(n);
- }