ROADefs.h
资源名称:ROA3.40.rar [点击查看]
上传用户:tianheyiqi
上传日期:2010-04-16
资源大小:282k
文件大小:24k
源码类别:
外挂编程
开发平台:
Visual C++
- #if !defined(AFX_ROADEFS_H__B246916D_8303_42EE_AF13_20D988742F4D__INCLUDED_)
- #define AFX_ROADEFS_H__B246916D_8303_42EE_AF13_20D988742F4D__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "ROAMap.h"
- #include "ROAField.h"
- typedef int (WINAPI *HOOKAPI)(DWORD ProcID, LPCTSTR dll);
- CString utlParseString(CString& str);
- const CString strWelcome[] =
- {
- "*******************************************************",
- "* 仙境传说 - ROA (Version: 3.40) *",
- "*-----------------------------------------------------*",
- "* 请勿在官方服务器上使用本程序,如不同意请马上退出 *",
- "*-----------------------------------------------------*",
- "* Author: Outman QQ: 298668119 outman_@hotmail.com *",
- "*******************************************************"
- };
- #define ROA_HEADER "[ROA]: "
- #define ROA_PORT (2350)
- #define MAX_BUFFER_LEN (32768)
- #define MAX_SKILL 337
- #define ROA_INI2_FILENAME _T(".\roa2.ini")
- #define ROA_INI2_OPTION _T("OPTION")
- #define ROA_INI2_OPT_TESTSVR _T("TestServer")
- #define ROA_INI2_OPT_PARTYCHAT _T("UsePartyChat")
- #define ROA_INI2_OPT_AUTOPICKUP _T("AutoPickup")
- #define ROA_INI2_OPT_BOSSINFO _T("InformBossTime")
- #define ROA_INI2_OPT_MOVEPICKUP _T("MovePickup")
- #define ROA_INI2_OPT_LAUNCHER _T("Launcher")
- #define ROA_INI2_OPT_LAUNCHERPAPRAM _T("LaunchParam")
- #define ROA_INI2_OPT_EMOTION _T("Emotion")
- #define ROA_INI2_OPT_AUTOCONT _T("AutoContinue")
- #define ROA_INI2_OPT_WELCOMEDELAY _T("WelcomeDelay")
- #define ROA_INI2_OPT_SEARCHDELAY _T("AutoSearchDelay")
- #define ROA_INI2_OPT_PICKUPDISTANCE _T("PickupDistance")
- #define ROA_INI2_OPT_ATTACKPERS _T("AttackPerSecond")
- #define ROA_INI2_OPT_HPITEMS _T("HPRecoverItems")
- #define ROA_INI2_OPT_SPITEMS _T("SPRecoverItems")
- #define ROA_INI2_OPT_ITEMUSEINT _T("ItemUseInterval")
- #define ROA_INI2_SETTING_CMN _T("CommonSetting")
- #define ROA_INI2_SETTING_MVP _T("MvpSetting")
- #define ROA_INI2_SETTING_PVP _T("PvpSetting")
- #define ROA_INI2_SETTING_GVG _T("GvgSetting")
- #define ROA_INI2_SETTING_KEY _T("ShortcutKey")
- #define ROA_INI2_BOSSINFO _T("BossInfo")
- #define ROA_MAP_ITEMTYPES "..\tables\itemtypes.txt"
- #define ROA_MAP_EQUIPTYPES "..\tables\equiptypes.txt"
- #define ROA_MAP_MAPNAME "..\tables\maps.txt"
- #define ROA_MAP_JOB "..\tables\jobs.txt"
- #define ROA_MAP_SEX "..\tables\sex.txt"
- #define ROA_MAP_SKILL "..\tables\skills.txt"
- #define ROA_MAP_STATUS011F "..\tables\status011f.txt"
- #define ROA_MAP_STATUS0119 "..\tables\status0119.txt"
- #define ROA_MAP_SKILLSST "..\tables\skillsst.txt"
- #define ROA_MAP_ITEMS "..\tables\items.txt"
- #define ROA_AVOID_AIDS "..\tables\avoidaid.txt"
- #define ROA_MAP_MVPMONSTER "..\tables\mvpmonster.txt"
- #define ROA_MAP_MONSTER "..\tables\monsters.txt"
- #define ROA_MAP_ELEMENTS "..\tables\elements.txt"
- #define MAX_NAME_LENGTH 24
- #define MAX_CHAT_MSG 1024
- const CString ATTACKSKILL[] =
- {
- _T("停止攻击"),
- _T("普通物理攻击"),
- _T("狂击"),
- _T("怒爆"),
- _T("连刺攻击"),
- _T("骑乘攻击"),
- _T("长矛刺击"),
- _T("投掷长矛攻击"),
- _T("怪物互击"),
- _T("二连矢"),
- _T("箭雨"),
- _T("闪电冲击"),
- _T("金钱攻击"),
- _T("手推车攻击"),
- _T("音速投掷"),
- // _T("背刺"),
- _T("圣十字攻击"),
- _T("缠箭投掷"),
- _T("乐器攻击"),
- _T("盾击"),
- _T("回旋盾击"),
- _T("治愈术"),
- _T("转生术"),
- _T("神圣之光"),
- _T("天使之怒"),
- };
- const int ATTACKSKILLNUM = sizeof(ATTACKSKILL) / sizeof(ATTACKSKILL[0]);
- const CString PROTECTSKILL[] =
- {
- _T("光之障壁"),
- _T("暗之障壁")
- };
- const int PROTECTSKILLNUM = sizeof(PROTECTSKILL) / sizeof(PROTECTSKILL[0]);
- const CString PROTECTSTATE[] =
- {
- _T("光之障壁"),
- _T("暗之障壁")
- };
- const int PROTECTSTATENUM = sizeof(PROTECTSTATE) / sizeof(PROTECTSTATE[0]);
- enum
- {
- eItemName = 0,
- eItemSlots = 1,
- eItemPriority =2,
- eItemMax
- };
- enum
- {
- eModeNormal = 0,
- eModeMvp = eModeNormal + 1,
- eModePvp = eModeMvp + 1,
- eModeGvg = eModePvp + 1,
- eModeMax = eModeGvg + 1,
- };
- enum
- {
- eSkillName = 0,
- eSkillAlias = 1,
- eSkillMax
- };
- typedef enum tagLogLevel
- {
- eLogNone = -1,
- eLogError = 0,
- eLogCommon = 1,
- eLogInfo = 2,
- eLogDebug = 3
- }LOG_LEVEL;
- typedef enum tagItemPriority
- {
- eIpGrab = 0,
- eIpGather = 1,
- eIpPickup = 2,
- eIpIgnore = 3,
- eIpMax
- }ITEMPRIORITY;
- class INVENTORY
- {
- public:
- INVENTORY()
- {
- init();
- }
- DWORD dwIndex;
- WORD wAmount;
- DWORD dwId;
- BOOL bIdentified;
- BYTE byAttrib;
- BYTE byRefine;
- WORD wCard[4];
- WORD wEquipType;
- WORD wType;
- WORD wEquipped;
- BYTE byElement;
- BYTE byStar;
- void init()
- {
- dwIndex = 0;
- wAmount = 0;
- dwId = 0;
- bIdentified = false;
- byAttrib = 0;
- byRefine = 0;
- wCard[0] = wCard[1] = wCard[2] = wCard[3] = 0;
- wEquipType = 0;
- wType = 0;
- wEquipped = 0;
- byElement = 0;
- byStar = 0;
- }
- };
- class ITEM
- {
- public:
- ITEM()
- {
- init();
- }
- DWORD dwId;
- DWORD dwAppearTime;
- WORD wAmount;
- WORD wType;
- POINT pntPos;
- int nPickupFailed;
- ITEMPRIORITY ePriority;
- void init()
- {
- dwAppearTime = 0;
- wAmount = 0;
- wType = 0;
- pntPos.x = 0;
- pntPos.y = 0;
- nPickupFailed = 0;
- ePriority = eIpGrab;
- }
- };
- class SPELL
- {
- public:
- SPELL()
- {
- init();
- }
- DWORD dwId;
- DWORD dwSourceId;
- POINT pntPos;
- WORD wSkill;
- void init()
- {
- dwId = 0;
- dwSourceId = 0;
- pntPos.x = 0;
- pntPos.y = 0;
- wSkill = 0;
- }
- };
- class MONSTER
- {
- public:
- MONSTER()
- {
- init();
- }
- DWORD dwId;
- WORD wType;
- POINT pntPos;
- POINT pntTo;
- BYTE byLookHead;
- BYTE byLookBody;
- char cName[MAX_NAME_LENGTH+1];
- int nProtecting;
- WORD wFrozen;
- void init()
- {
- dwId = 0;
- wType = 0;
- pntPos.x = 0;
- pntPos.y = 0;
- pntTo.x = 0;
- pntTo.y = 0;
- byLookHead = 0;
- byLookBody = 0;
- memset(cName, 0, MAX_NAME_LENGTH+1);
- nProtecting = 0;
- wFrozen = 0;
- }
- };
- class PLAYER
- {
- public:
- PLAYER()
- {
- init();
- }
- DWORD dwId;
- DWORD dwAppearTime;
- char cName[MAX_NAME_LENGTH+1];
- char cGuild[MAX_NAME_LENGTH+1];
- BYTE bySex;
- POINT pntPos;
- POINT pntTo;
- WORD wType;
- BOOL bSit;
- BYTE byLookHead;
- BYTE byLookBody;
- int nProtecting;
- BOOL bDied;
- WORD wStatus0119_01;
- WORD wStatus0119_02;
- WORD wStatus0119_03;
- void init()
- {
- pntPos.x = 0;
- pntPos.y = 0;
- pntTo.x = 0;
- pntTo.y = 0;
- dwId = 0;
- dwAppearTime = 0;
- memset(cName, 0, MAX_NAME_LENGTH);
- memset(cGuild, 0, MAX_NAME_LENGTH);
- bySex = 0;
- wType = 0;
- bSit = false;
- byLookHead = 0;
- byLookBody = 0;
- nProtecting = 0;
- bDied = false;
- wStatus0119_01 = wStatus0119_02 = wStatus0119_03 = 0;
- }
- };
- class YOU
- {
- public:
- YOU()
- {
- init();
- }
- char cName[MAX_NAME_LENGTH+1];
- char cGuild[MAX_NAME_LENGTH+1];
- char cJob[MAX_NAME_LENGTH+1];
- WORD wLevel;
- WORD wJobLevel;
- WORD wHp;
- WORD wHpMax;
- WORD wSp;
- WORD wSpMax;
- DWORD dwExp;
- DWORD dwExpMax;
- DWORD dwJobExp;
- DWORD dwJobExpMax;
- DWORD dwZenny;
- DWORD dwWeight;
- DWORD dwWeightMax;
- POINT pntPos;
- POINT pntTo;
- BYTE byLookHead;
- BYTE byLookBody;
- /* BYTE byStr;
- BYTE byAgi;
- BYTE byVit;
- BYTE byInt;
- BYTE byDex;
- BYTE byLuk;
- */ BOOL bSit;
- // BOOL bTwoHandsQuiken;
- BOOL bDied;
- WORD wStatus0119_01;
- WORD wStatus0119_02;
- WORD wStatus0119_03;
- int nProtecting;
- void init()
- {
- memset(cName, 0, sizeof(MAX_NAME_LENGTH+1));
- memset(cGuild, 0, sizeof(MAX_NAME_LENGTH+1));
- memset(cJob, 0, sizeof(MAX_NAME_LENGTH+1));
- wLevel = 0;
- wJobLevel = 0;
- wHp = 0;
- wHpMax = 0;
- wSp = 0;
- wSpMax = 0;
- dwExp = 0;
- dwExpMax = 0;
- dwJobExp = 0;
- dwJobExpMax = 0;
- dwZenny = 0;
- dwWeight = 0;
- dwWeightMax = 0;
- pntPos.x = 0;
- pntPos.y = 0;
- pntTo.x = 0;
- pntTo.y = 0;
- byLookHead = 0;
- byLookBody = 0;
- bSit = false;
- // bTwoHandsQuiken = false;
- bDied = false;
- wStatus0119_01 = wStatus0119_02 = wStatus0119_03 = 0;
- }
- };
- class PORTAL
- {
- public:
- PORTAL()
- {
- init();
- }
- DWORD dwId;
- DWORD dwAppearTime;
- WORD wType;
- POINT pntPos;
- void init()
- {
- dwId = 0;
- dwAppearTime = 0;
- wType = 0;
- pntPos.x = 0;
- pntPos.y = 0;
- }
- };
- class SKILL
- {
- public:
- SKILL()
- {
- init();
- }
- DWORD dwIndex;
- DWORD dwId;
- WORD wLevel;
- void init()
- {
- dwIndex = 0;
- dwId = 0;
- wLevel = 0;
- };
- };
- template<class TYPE, class ARG_TYPE>
- class CIdArray : public CArray<TYPE, ARG_TYPE>
- {
- public:
- int FindIndex(LPCTSTR lpszIndex)
- {
- DWORD dwIndex;
- sscanf(lpszIndex, "%d" , &dwIndex);
- return(FindIndex(dwIndex));
- }
- int FindIndex(DWORD nIndex)
- {
- int nRtn = -1;
- for(int i=0; i<GetSize(); i++)
- {
- if(nIndex == GetAt(i).dwIndex)
- {
- nRtn = i;
- break;
- }
- }
- return(nRtn);
- }
- int FindId(DWORD nId)
- {
- int nRtn = -1;
- for(int i=0; i<GetSize(); i++)
- {
- if(nId == GetAt(i).dwId)
- {
- nRtn = i;
- break;
- }
- }
- return(nRtn);
- }
- int FindId(LPCTSTR lpszId)
- {
- DWORD dwId;
- sscanf(lpszId, "%X" , &dwId);
- return(FindId(dwId));
- }
- // Damage
- int GetDamage(DWORD dwId1, DWORD dwId2)
- {
- int nIndex = FindDamage(dwId1, dwId2);
- int nRtn = 0;
- if(-1 != nIndex)
- {
- nRtn = GetAt(nIndex).dwDamage;
- }
- return(nRtn);
- }
- int FindDamage(DWORD dwId1, DWORD dwId2)
- {
- int nRtn = -1;
- for(int i=0; i<GetSize(); i++)
- {
- if(dwId1 == GetAt(i).dwId1 && dwId2 == GetAt(i).dwId2)
- {
- nRtn = i;
- break;
- }
- }
- return(nRtn);
- }
- BOOL FindDamageFrom(DWORD dwId, CString& strName, DWORD& dwDamage)
- {
- BOOL bRtn = false;
- int nCnt = 0;
- strName = "";
- dwDamage = 0;
- for(int i=0; i<GetSize(); i++)
- {
- if(GetAt(i).dwId2 == dwId)
- {
- dwDamage += GetAt(i).dwDamage;
- strName = utlFindTarget(GetAt(i).dwId1);
- nCnt++;
- }
- }
- if(nCnt > 0)
- bRtn = true;
- if(nCnt > 1)
- strName += "*";
- return(bRtn);
- }
- BOOL FindDamageTo(DWORD dwId, CString& strName, DWORD& dwDamage)
- {
- BOOL bRtn = false;
- int nCnt = 0;
- strName = "";
- dwDamage = 0;
- for(int i=0; i<GetSize(); i++)
- {
- if(GetAt(i).dwId1 == dwId)
- {
- dwDamage += GetAt(i).dwDamage;
- strName = utlFindTarget(GetAt(i).dwId2);
- nCnt++;
- }
- }
- if(nCnt > 0)
- bRtn = true;
- if(nCnt > 1)
- strName += "*";
- return(bRtn);
- }
- BOOL FindDamageFrom(DWORD dwId, CDWordArray &dwTargetArray, CDWordArray &dwDamageArray)
- {
- BOOL bRtn = false;
- DWORD dwDamage = 0;
- DWORD dwTarget = 0;
- dwTargetArray.RemoveAll();
- dwDamageArray.RemoveAll();
- for(int i=0; i<GetSize(); i++)
- {
- if(GetAt(i).dwId2 == dwId)
- {
- dwDamage = GetAt(i).dwDamage;
- dwTarget = GetAt(i).dwId1;
- dwTargetArray.Add(dwTarget);
- dwDamageArray.Add(dwDamage);
- bRtn = true;
- }
- }
- return(bRtn);
- }
- BOOL FindDamageTo(DWORD dwId, CDWordArray &dwTargetArray, CDWordArray &dwDamageArray)
- {
- BOOL bRtn = false;
- DWORD dwDamage = 0;
- DWORD dwTarget = 0;
- dwTargetArray.RemoveAll();
- dwDamageArray.RemoveAll();
- for(int i=0; i<GetSize(); i++)
- {
- if(GetAt(i).dwId1 == dwId)
- {
- dwDamage = GetAt(i).dwDamage;
- dwTarget = GetAt(i).dwId2;
- dwTargetArray.Add(dwTarget);
- dwDamageArray.Add(dwDamage);
- bRtn = true;
- }
- }
- return(bRtn);
- }
- void RemoveDamage(DWORD dwId)
- {
- BOOL bFinish = false;
- while(!bFinish)
- {
- bFinish = true;
- for(int i=0; i<GetSize(); i++)
- {
- if(GetAt(i).dwId1 == dwId || GetAt(i).dwId2 == dwId)
- {
- RemoveAt(i);
- bFinish = false;
- break;
- }
- }
- }
- }
- };
- class DAMAGE
- {
- public:
- DAMAGE()
- {
- init();
- }
- DWORD dwIndex; //DUMMY
- DWORD dwId1; // Damage from
- DWORD dwId2; // Damage to
- DWORD dwDamage;
- DWORD dwStart;
- DWORD dwHits[MAX_SKILL];
- DWORD dwDamage2[MAX_SKILL];
- DWORD dwMiss[MAX_SKILL];
- DWORD dwDamageMin[MAX_SKILL];
- DWORD dwDamageMax[MAX_SKILL];
- void init()
- {
- int i;
- dwId1 = 0;
- dwId2 = 0;
- dwDamage = 0;
- dwStart = 0;
- for(i=0; i<MAX_SKILL; i++)
- {
- dwHits[i] = 0;
- dwDamage2[i] = 0;
- dwMiss[i] = 0;
- dwDamageMin[i] = 99999;
- dwDamageMax[i] = 0;
- }
- }
- };
- class AUTOHEAL2
- {
- public:
- AUTOHEAL2() {init();}
- BOOL bHP;
- int nHP1Lower;
- int nHP1Upper;
- CString strHP1Item;
- int nHP2Lower;
- int nHP2Upper;
- BOOL bSP;
- int nSPUpper;
- CString strSPItem;
- BOOL bHPTele;
- int nHPTeleUpper;
- void init()
- {
- bHP = false;
- nHP1Lower = 1;
- nHP1Upper = 2000;
- strHP1Item = _T("未知物品");
- nHP2Lower = 1;
- nHP2Upper = 2000;
- bSP = false;
- nSPUpper = 30;
- strSPItem = _T("未知物品");
- bHPTele = false;
- nHPTeleUpper = 100;
- }
- AUTOHEAL2& operator= (const AUTOHEAL2& that)
- {
- bHP = that.bHP;
- nHP1Lower = that.nHP1Lower;
- nHP1Upper = that.nHP1Upper;
- strHP1Item = that.strHP1Item;
- nHP2Lower = that.nHP2Lower;
- nHP2Upper = that.nHP2Upper;
- bSP = that.bSP;
- nSPUpper = that.nSPUpper;
- strSPItem = that.strSPItem;
- bHPTele = that.bHPTele;
- nHPTeleUpper = that.nHPTeleUpper;
- return(*this);
- }
- CString GetProfileString()
- {
- CString strRtn, strTemp;
- strTemp.Format(_T("%d,%d,%d,%s,%d,%d"), bHP, nHP1Lower, nHP1Upper, strHP1Item, nHP2Lower, nHP2Upper);
- strRtn = strTemp;
- strTemp.Format(_T(",%d,%d,%s,%d,%d"), bSP, nSPUpper, strSPItem, bHPTele, nHPTeleUpper);
- strRtn += strTemp;
- return strRtn;
- }
- void ParseProfileString(CString& strProfile)
- {
- CString strTemp, nIndex;
- strTemp = utlParseString(strProfile); bHP = atoi(strTemp);
- strTemp = utlParseString(strProfile); nHP1Lower = atoi(strTemp);
- strTemp = utlParseString(strProfile); nHP1Upper = atoi(strTemp);
- strTemp = utlParseString(strProfile); strHP1Item = strTemp;
- strTemp = utlParseString(strProfile); nHP2Lower = atoi(strTemp);
- strTemp = utlParseString(strProfile); nHP2Upper = atoi(strTemp);
- strTemp = utlParseString(strProfile); bSP = atoi(strTemp);
- strTemp = utlParseString(strProfile); nSPUpper = atoi(strTemp);
- strTemp = utlParseString(strProfile); strSPItem = strTemp;
- strTemp = utlParseString(strProfile); bHPTele = atoi(strTemp);
- strTemp = utlParseString(strProfile); nHPTeleUpper = atoi(strTemp);
- }
- };
- class SETTING_CMN
- {
- public:
- SETTING_CMN() {init();}
- AUTOHEAL2 autoheal;
- CString strSavePoint;
- void init()
- {
- autoheal.init();
- strSavePoint.Empty();
- }
- SETTING_CMN& operator= (const SETTING_CMN& that)
- {
- autoheal = that.autoheal;
- strSavePoint = that.strSavePoint;
- return(*this);
- }
- CString GetProfileString()
- {
- CString strRtn, strTemp;
- strTemp.Format(_T("%s"), autoheal.GetProfileString());
- strRtn = strTemp;
- strTemp.Format(_T(",%s"), strSavePoint);
- strRtn += strTemp;
- return strRtn;
- }
- void ParseProfileString(CString& strProfile)
- {
- CString strTemp, nIndex;
- autoheal.ParseProfileString(strProfile);
- if(strProfile.GetLength() > 0 && strProfile[0] == _T(','))
- strProfile = strProfile.Mid(1);
- strSavePoint = strProfile;
- }
- };
- class SETTING_MVP
- {
- public:
- SETTING_MVP() {init();}
- AUTOHEAL2 autoheal;
- BOOL bAttack;
- CString strAttackSkill;
- BOOL bFollow;
- BOOL bRegionAtk;
- CString strRegionAtkSkill;
- int nRegionAtkNum;
- BOOL bAttack2;
- CString strAttack2Cond;
- CString strAttack2Skill;
- BOOL bProtect;
- CString strProtectSkill;
- BOOL bAntiBless;
- void init()
- {
- autoheal.init();
- bAttack = false;
- strAttackSkill.Empty();
- bFollow = false;
- bRegionAtk = false;
- strRegionAtkSkill.Empty();
- nRegionAtkNum = 4;
- bAttack2 = false;
- strAttack2Cond.Empty();
- strAttack2Skill.Empty();
- bProtect = false;
- strProtectSkill.Empty();
- bAntiBless = false;
- }
- SETTING_MVP& operator= (const SETTING_MVP& that)
- {
- autoheal = that.autoheal;
- bAttack = that.bAttack;
- strAttackSkill = that.strAttackSkill;
- bFollow = that.bFollow;
- bRegionAtk = that.bRegionAtk;
- strRegionAtkSkill = that.strRegionAtkSkill;
- nRegionAtkNum = that.nRegionAtkNum;
- bAttack2 = that.bAttack2;
- strAttack2Cond = that.strAttack2Cond;
- strAttack2Skill = that.strAttack2Skill;
- bProtect = that.bProtect;
- strProtectSkill = that.strProtectSkill;
- bAntiBless = that.bAntiBless;
- return(*this);
- }
- CString GetProfileString()
- {
- CString strRtn, strTemp;
- strTemp.Format(_T("%s"), autoheal.GetProfileString());
- strRtn = strTemp;
- strTemp.Format(_T("%d,%s,%d"), bAttack, strAttackSkill, bFollow);
- strRtn += _T(",");
- strRtn += strTemp;
- strTemp.Format(_T("%d,%s,%d"), bRegionAtk, strRegionAtkSkill, nRegionAtkNum);
- strRtn += _T(",");
- strRtn += strTemp;
- strTemp.Format(_T("%d,%s,%s"), bAttack2, strAttack2Cond, strAttack2Skill);
- strRtn += _T(",");
- strRtn += strTemp;
- strTemp.Format(_T("%d,%s,%d"), bProtect, strProtectSkill, bAntiBless);
- strRtn += _T(",");
- strRtn += strTemp;
- return strRtn;
- }
- void ParseProfileString(CString& strProfile)
- {
- CString strTemp, nIndex;
- autoheal.ParseProfileString(strProfile);
- if(strProfile.GetLength() > 0 && strProfile[0] == _T(','))
- strProfile = strProfile.Mid(1);
- strTemp = utlParseString(strProfile); bAttack = atoi(strTemp);
- strTemp = utlParseString(strProfile); strAttackSkill = strTemp;
- strTemp = utlParseString(strProfile); bFollow = atoi(strTemp);
- strTemp = utlParseString(strProfile); bRegionAtk = atoi(strTemp);
- strTemp = utlParseString(strProfile); strRegionAtkSkill = strTemp;
- strTemp = utlParseString(strProfile); nRegionAtkNum = atoi(strTemp);
- strTemp = utlParseString(strProfile); bAttack2 = atoi(strTemp);
- strTemp = utlParseString(strProfile); strAttack2Cond = strTemp;
- strTemp = utlParseString(strProfile); strAttack2Skill = strTemp;
- strTemp = utlParseString(strProfile); bProtect = atoi(strTemp);
- strTemp = utlParseString(strProfile); strProtectSkill = strTemp;
- strTemp = utlParseString(strProfile); bAntiBless = atoi(strTemp);
- }
- };
- class BOSSINFO
- {
- public:
- BOSSINFO()
- {
- init();
- }
- CString strBossName;
- CTime tmBossTime;
- BOOL bWaring[5];
- void init()
- {
- strBossName = _T("");
- reset();
- }
- void reset()
- {
- for(int i=0; i<5; i++)
- bWaring[i] = false;
- }
- };
- typedef void (*FUNCCALL)(DWORD dwPara);
- void ufDummy(DWORD dwPara);
- void ufAutoAttackMvp(DWORD dwPara);
- void ufAutoSearchMvp(DWORD dwPara);
- void ufUseSkillWhen(DWORD dwPara);
- void ufUseSkillOnMvp(DWORD dwPara);
- void ufTeleport(DWORD dwPara);
- void ufRuwach(DWORD dwPara);
- void ufAngelus(DWORD dwPara);
- void ufMagnificat(DWORD dwPara);
- void ufGloria(DWORD dwPara);
- void ufEndure(DWORD dwPara);
- void ufHome(DWORD dwPara);
- void ufBossList(DWORD dwPara);
- void ufPartyChat(DWORD dwPara);
- void ufTakeItem(DWORD dwPara);
- void ufShowStatus(DWORD dwPara);
- void ufLoud(DWORD dwPara);
- void ufMaximize(DWORD dwPara);
- void ufOverthrust(DWORD dwPara);
- void ufAdrenaline(DWORD dwPara);
- void ufWeaponperfect(DWORD dwPara);
- void ufSpeedUp(DWORD dwPara);
- void ufSpeedDown(DWORD dwPara);
- void ufSight(DWORD dwPara);
- void ufConcentration(DWORD dwPara);
- void ufEnergyCoat(DWORD dwPara);
- void ufAppleIdun(DWORD dwPara);
- void ufAssassinCross(DWORD dwPara);
- void ufFrostJoke(DWORD dwPara);
- void ufDissonance(DWORD dwPara);
- void ufUglyDance(DWORD dwPara);
- void ufScream(DWORD dwPara);
- void ufAutoSaClassChange(DWORD dwPara);
- void ufPopupRoaWindow(DWORD dwPara);
- void ufShowServerIp(DWORD dwPara);
- void ufShowPlayers(DWORD dwPara);
- void ufShowCarts(DWORD dwPara);
- void ufShowInventory(DWORD dwPara);
- void ufShowMonsters(DWORD dwPara);
- void ufShowSkills(DWORD dwPara);
- void ufShowEmotion(DWORD dwPara);
- typedef enum
- {
- eDummy = 0,
- eAutoAttackMvp,
- eAutoSearchMvp,
- eUseSkillWhen,
- eUseSkillOnMvp,
- eHome,
- eBossList,
- ePartyChat,
- eTakeItem,
- eTeleport,
- eRuwach,
- eAngelus,
- eMagnificat,
- eGloria,
- eEndure,
- eLoud,
- eMaximize,
- eOverthrust,
- eAdrenaline,
- eWeaponperfect,
- eSight,
- eConcentration,
- eEnergyCoat,
- eAppleIdun,
- eAssassinCross,
- eFrostJoke,
- eDissonance,
- eUglyDance,
- eScream,
- eAutoSaClassChange,
- eUFMax
- }USERFUNCTION;
- extern CString UFDESC[];
- extern FUNCCALL UFENTRY[];
- extern USERFUNCTION userfuncs[12];
- const int UFNUM = int(eUFMax);
- class OPTION
- {
- public:
- OPTION() { init(); }
- BOOL bTestServer;
- BOOL bUsePartyChat;
- BOOL bAutoPickup;
- BOOL bMovePickup;
- BOOL bBossInfo;
- CString strLauncher;
- CString strLaunchParam;
- BOOL bNpcTalkContinue;
- int nWelcomeDelay;
- int nAutoSearchDelay;
- int nAttackPerSecond;
- int nPickupDistance;
- CString strHPRecoverItems;
- CString strSPRecoverItems;
- int nItemUseInterval;
- void init()
- {
- bTestServer = false;
- bUsePartyChat = false;
- bAutoPickup = true;
- bMovePickup = false;
- bBossInfo = true;
- strLauncher.Empty();
- strLaunchParam.Empty();
- bNpcTalkContinue = true;
- nWelcomeDelay = 15000;
- nAutoSearchDelay = 300;
- nAttackPerSecond = 1;
- nPickupDistance = 5;
- strHPRecoverItems = _T("红色药水|赤色药水|黄色药水|白色药水");
- strSPRecoverItems = _T("蜂蜜|蓝色药水|蓝色药草|葡萄|葡萄汁|蜂胶");
- nItemUseInterval = 200;
- }
- OPTION& operator= (const OPTION& that)
- {
- bTestServer = that.bTestServer;
- bUsePartyChat = that.bUsePartyChat;
- bAutoPickup = that.bAutoPickup;
- bMovePickup = that.bMovePickup;
- bBossInfo = that.bBossInfo;
- strLauncher = that.strLauncher;
- strLaunchParam = that.strLaunchParam;
- bNpcTalkContinue = that.bNpcTalkContinue;
- nWelcomeDelay = that.nWelcomeDelay;
- nAutoSearchDelay = that.nAutoSearchDelay;
- nAttackPerSecond = that.nAttackPerSecond;
- nPickupDistance = that.nPickupDistance;
- strHPRecoverItems = that.strHPRecoverItems;
- strSPRecoverItems = that.strSPRecoverItems;
- nItemUseInterval = that.nItemUseInterval;
- return(*this);
- }
- };
- typedef CIdArray<INVENTORY, INVENTORY> INVENTORYARRAY;
- typedef CIdArray<MONSTER, MONSTER> MONSTERARRAY;
- typedef CIdArray<PLAYER, PLAYER> PLAYERARRAY;
- typedef CIdArray<PORTAL, PORTAL> PORTALARRAY;
- typedef CIdArray<ITEM, ITEM> ITEMARRAY;
- typedef CIdArray<SKILL, SKILL> SKILLARRAY;
- typedef CIdArray<DAMAGE, DAMAGE> DAMAGEARRAY;
- typedef CArray<BOSSINFO, BOSSINFO> BOSSINFOARRAY;
- typedef CIdArray<SPELL, SPELL> SPELLARRAY;
- extern CSocket sockInject;
- extern CSocket sockServer;
- extern int nConnState;
- extern DWORD dwAccountId;
- extern DWORD dwCharId;
- extern DWORD dwSessionId;
- extern BOOL bWelcomeSent;
- extern CFile fLog;
- extern YOU youTemp[3];
- extern int nCharSelected;
- extern INVENTORYARRAY inventory;
- extern MONSTERARRAY monsters;
- extern YOU you;
- extern PLAYERARRAY players;
- extern PLAYERARRAY partners;
- extern PORTALARRAY portals;
- extern ITEMARRAY items;
- extern INVENTORYARRAY cart;
- extern SKILLARRAY skills;
- extern DAMAGEARRAY damages;
- extern BOSSINFOARRAY bossinfo;
- extern SPELLARRAY spells;
- extern CWinThread *pWorkingThread;
- extern int nThreadTerm;
- extern BOOL bConnected;
- extern LOG_LEVEL llFile;
- extern LOG_LEVEL llDlg;
- extern LOG_LEVEL llRo;
- extern CROAMap mapItem;
- extern CROAMap mapItemType;
- extern CROAMap mapEquipType;
- extern CROAMap mapMapName;
- extern CROAMap mapJob;
- extern CROAMap mapSex;
- extern CROAMap mapSkill;
- extern CROAMap mapMvpMonster;
- extern CROAMap mapMonster;
- extern CROAMap mapStatus011f;
- extern CROAMap mapStatus0119;
- extern CROAMap mapElements;
- extern CROAMap mapSkillsst;
- extern CROAField field;
- //extern CRITICAL_SECTION criticalSection;
- extern OPTION option;
- extern SETTING_CMN settingcmn;
- extern SETTING_MVP settingmvp;
- extern BOOL bFlyUsed;
- extern BOOL bAutoSearch;
- extern CString strAutoSearchMap;
- extern DWORD dwAutoSearchTick;
- extern BOOL bAutoSa;
- extern DWORD dwAutoSaTick;
- extern BOOL bProfileLoaded;
- extern HHOOK hHook;
- extern HINSTANCE hInstDll;
- extern FUNCCALL curFunc;
- extern DWORD curFuncPara;
- extern BOOL bAiEnabled;
- extern CString EMOTIONDEF[];
- extern CString emotions[10];
- const int EMNUM = 48;
- //#define TIMEOUT_AUTOSEARCH 200
- #define TIMEOUT_SIT 2000
- #define TIMEOUT_STAND 2000
- #define TIMEOUT_PICKUP 6000
- #define TIMEOUT_ATTACK 5000
- #define TIMEOUT_MOVE 3000
- #define SECOND_PER_BLOCK 100
- extern DWORD dwUseItemTick;
- extern DWORD dwAttackTick;
- extern CROAMap mapAvoidAid;
- extern BYTE mode;
- extern DWORD dwMvpId;
- extern char cSendKey[MAX_PATH];
- extern CStringArray HPITEMS;
- extern CStringArray SPITEMS;
- enum
- {
- eUnknown,
- eRagexe,
- eSakexe,
- eSfExe
- };
- enum
- {
- eWindowBattle,
- eWindowOption
- };
- extern CRITICAL_SECTION csShortcutFuncs;
- extern BOOL bIsModal;
- extern BYTE serverip[3][6];
- //LRESULT CALLBACK KeyboardProc(int nCode, WPARAM wParam, LPARAM lParam);
- #endif //AFX_ROADEFS_H__B246916D_8303_42EE_AF13_20D988742F4D__INCLUDED_