Jump to content

Aerrow

Member
  • Posts

    168
  • Joined

  • Last visited

  • Days Won

    3
  • Feedback

    0%

Posts posted by Aerrow

  1. I added the EMobRanks enum. No other changes.

    Spoiler
    #pragma once
    
    /*
     *	NPC µ¥ÀÌÅÍ ÇÁ·ÎÅä ŸÀÙÀ» °ü¸® ÇÑ´Ù.
     */
    class CPythonNonPlayer : public CSingleton<CPythonNonPlayer>
    {
    	public:
    		enum EClickEvent
    		{
    			ON_CLICK_EVENT_NONE		= 0,
    			ON_CLICK_EVENT_BATTLE	= 1,
    			ON_CLICK_EVENT_SHOP		= 2,
    			ON_CLICK_EVENT_TALK		= 3,
    			ON_CLICK_EVENT_VEHICLE	= 4,
    
    			ON_CLICK_EVENT_MAX_NUM,
    		};
    
    		enum EMobEnchants
    		{   
    			MOB_ENCHANT_CURSE,
    			MOB_ENCHANT_SLOW,   
    			MOB_ENCHANT_POISON,
    			MOB_ENCHANT_STUN,   
    			MOB_ENCHANT_CRITICAL,
    			MOB_ENCHANT_PENETRATE,
    			MOB_ENCHANTS_MAX_NUM
    		};
    		enum EMobResists
    		{
    			MOB_RESIST_SWORD,
    			MOB_RESIST_TWOHAND,
    			MOB_RESIST_DAGGER,
    			MOB_RESIST_BELL,
    			MOB_RESIST_FAN,
    			MOB_RESIST_BOW,
    			MOB_RESIST_FIRE,
    			MOB_RESIST_ELECT,
    			MOB_RESIST_MAGIC,
    			MOB_RESIST_WIND,
    			MOB_RESIST_POISON,
    			MOB_RESISTS_MAX_NUM 
    		};
    
    		enum EMobRanks
    		{
    			MOB_RANK_PAWN,
    			MOB_RANK_S_PAWN,
    			MOB_RANK_KNIGHT,
    			MOB_RANK_S_KNIGHT,
    			MOB_RANK_BOSS,
    			MOB_RANK_KING,
    		};
    
    		#define MOB_ATTRIBUTE_MAX_NUM	12
    		#define MOB_SKILL_MAX_NUM		5
    
    #pragma pack(push)
    #pragma pack(1)
    		typedef struct SMobSkillLevel
    		{
    			DWORD       dwVnum;
    			BYTE        bLevel;
    		} TMobSkillLevel;
    
    		typedef struct SMobTable
    		{
    			DWORD       dwVnum;
    			char        szName[CHARACTER_NAME_MAX_LEN + 1]; 
    			char        szLocaleName[CHARACTER_NAME_MAX_LEN + 1];
    
    			BYTE        bType;                  // Monster, NPC
    			BYTE        bRank;                  // PAWN, KNIGHT, KING
    			BYTE        bBattleType;            // MELEE, etc..
    			BYTE        bLevel;                 // Level
    			BYTE        bSize;
    
    			DWORD       dwGoldMin;
    			DWORD       dwGoldMax;
    			DWORD       dwExp;
    			DWORD       dwMaxHP;
    			BYTE        bRegenCycle;
    			BYTE        bRegenPercent;
    			WORD        wDef;
    
    			DWORD       dwAIFlag;
    			DWORD       dwRaceFlag;
    			DWORD       dwImmuneFlag;
    
    			BYTE        bStr, bDex, bCon, bInt;
    			DWORD       dwDamageRange[2];
    
    			short       sAttackSpeed;
    			short       sMovingSpeed;
    			BYTE        bAggresiveHPPct;
    			WORD        wAggressiveSight;
    			WORD        wAttackRange;
    
    			char        cEnchants[MOB_ENCHANTS_MAX_NUM];
    			char        cResists[MOB_RESISTS_MAX_NUM];
    
    			DWORD       dwResurrectionVnum;
    			DWORD       dwDropItemVnum;
    
    			BYTE        bMountCapacity;
    			BYTE        bOnClickType;
    
    			BYTE        bEmpire;
    			char        szFolder[64 + 1];
    			float       fDamMultiply;
    			DWORD       dwSummonVnum;
    			DWORD       dwDrainSP;
    			DWORD		dwMonsterColor;
    		    DWORD       dwPolymorphItemVnum;
    
    			TMobSkillLevel	Skills[MOB_SKILL_MAX_NUM];
    
    		    BYTE		bBerserkPoint;
    			BYTE		bStoneSkinPoint;
    			BYTE		bGodSpeedPoint;
    			BYTE		bDeathBlowPoint;
    			BYTE		bRevivePoint;
    		} TMobTable;
    #pragma pack(pop)
    
    		typedef std::list<TMobTable *> TMobTableList;
    		typedef std::map<DWORD, TMobTable *> TNonPlayerDataMap;
    
    	public:
    		CPythonNonPlayer(void);
    		virtual ~CPythonNonPlayer(void);
    
    		void Clear();
    		void Destroy();
    
    		bool				LoadNonPlayerData(const char * c_szFileName);
    
    		const TMobTable *	GetTable(DWORD dwVnum);
    		bool				GetName(DWORD dwVnum, const char ** c_pszName);
    		bool				GetInstanceType(DWORD dwVnum, BYTE* pbType);
    		BYTE				GetEventType(DWORD dwVnum);
    		BYTE				GetEventTypeByVID(DWORD dwVID);
    		DWORD				GetMonsterColor(DWORD dwVnum);
    		const char*			GetMonsterName(DWORD dwVnum);
    
    		// Function for outer
    		void				GetMatchableMobList(int iLevel, int iInterval, TMobTableList * pMobTableList);
    
    	protected:
    		TNonPlayerDataMap	m_NonPlayerDataMap;
    };

     

  2. Hi all.

    I would like to include PythonNonPlayer.h into ActorInstance.cpp to automate the IS_HUGE_RACE method. 

    Something like:

    bool IS_HUGE_RACE(unsigned int vnum)
    {
    	const CPythonNonPlayer::TMobTable* mobTable = CPythonNonPlayer::instance().GetTable(vnum);
    	if (mobTable && mobTable->bRank >= CPythonNonPlayer::MOB_RANK_BOSS)
    		return true;
    	return false;
    }

    But I got the following errors:

     .png

    I guess it is not possible to use the files in UserInterface outside the folder.

    Any workaround?

    Thank you in advance!

  3. Frist of all thank you for the release, it is nice system.

    Just I can remember more than 10 years before when I played on GF my lvl 10-15 character was not able to go to the Monkey dungeon, the port simple did nothing when I wanted to go in. But when I reached higher level (at least 20) I was able to go inside. So I believe some kind of level check should already exist in the source. Or I'm wrong? Maybe they completely removed this feature or just my memories not correct?

    • Think 1
    • Love 1
  4. On 6/18/2015 at 5:45 PM, Koray said:

    I think this bug due from mount so is not energy

    Nope, the problem within the energy system, not for the mounts.

    For example:

    1. get naked?
    2. use the energy crystal (51002)
    3. equip a piece of equipment which has APPLY_ENERGY (18060-18069 has by default)
    4. equip for example your armor which has 2000 HP
    5. now start unequip and equip your belt -> your HP will start to decrease each time ?

    The problem probably within the calculation of the energy or something.

  5. Works very well, thanks! :D

    On 8/2/2018 at 6:03 AM, Dean said:

    Hi there Werwolf, I have tested the potential bug you mentioned and I failed to encounter it.
    The only aspect of the script which I'm still working on is the possibility to hide the cooldown whilst holding down Alt.
    It's not a bug, just a simple adjustment I'd like to add in the future to assure 100% functionability.

    Thank you all for the warm feedback, it gladdens me knowing my scripts are useful. :D 

    Keep me posted if potential bugs arise.

    Cheers!

    And I solve your problem! :D

    First of all we don't need this:

    					elif not player.IsSkillCoolTime(Position):
    						self.cooldownText[slotNumber].Hide()

    Then search for this:

    slotNumber = i+startNumber

    And paste under this:

    self.cooldownText[slotNumber].Hide()

    That's all.

    • Love 1
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.