Jump to content

M.Sorin

Member
  • Posts

    279
  • Joined

  • Last visited

  • Days Won

    4
  • Feedback

    0%

Posts posted by M.Sorin

  1. Wait , i edit you code.

     

     

        if (pkKiller->GetLevel() >= 15 && abs(pkKiller->GetLevel() - pkChr->GetLevel()) <= 5)
        {
            int pct = quest::CQuestManager::instance().GetEventFlag("mondi_drop");

            if (pct > 0)
            {
                if (number(1,100) <= pct)
                {
                        const static DWORD moon_treasure = 50011;
                        pkKiller->AutoGiveItem(moon_treasure, 1);
                }
            }
        }

     

     

  2. 1 hour ago, xP3NG3Rx said:

    I know.^_^

    ch is not declared, but no need pointer to finish the action. You may use "this->" or nothing (or... LPCHARACTER pc = this;). I just wanted to know why exists that pc-> tag.

    Probably he missed that one :P

  3. 42 minutes ago, xP3NG3Rx said:

    LPITEM item2 = pc->GetInventoryItem(i);

    error: 'pc' was not declared in this scope.

     

     

    ch->GetInventoryItem(i); or just remove that pc->

  4.  

    bool CActorInstance::__IsRightHandWeapon(DWORD type)
    
    	{
    
    	    if (CItemData::WEAPON_DAGGER == type || (CItemData::WEAPON_FAN == type && __IsMountingHorse()))
    
    	        return true;
    
    	    else if (CItemData::WEAPON_BOW == type)
    
    	        return false;
    
    	    else if (CItemData::WEAPON_CLAW == type)
    
    	        return true;
    
    	    else 
    
    	        return false;
    
    	} 
    
     Show the rest of the code for attach.
  5. Try this:

     

    SET FOREIGN_KEY_CHECKS=0;
    
    -- ----------------------------
    -- Table structure for `loginlog2`
    -- ----------------------------
    DROP TABLE IF EXISTS `loginlog2`;
    CREATE TABLE `loginlog2` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `type` varchar(20) DEFAULT NULL,
      `is_gm` varchar(1) DEFAULT NULL,
      `login_time` datetime DEFAULT NULL,
      `channel` int(11) DEFAULT NULL,
      `account_id` int(11) DEFAULT NULL,
      `pid` int(11) DEFAULT NULL,
      `client_version` varchar(11) DEFAULT NULL,
      `ip` varchar(15) DEFAULT NULL,
      `logout_time` datetime DEFAULT NULL,
      `playtime` int(11) NOT NULL DEFAULT '0',
      PRIMARY KEY (`id`)
    ) ENGINE=MyISAM AUTO_INCREMENT=390511 DEFAULT CHARSET=latin1;

     

    • Love 2
  6. Second problem:

    function split(str, delim, maxNb)
        if str == nil then return str end
        if string.find(str, delim) == nil then return { str } end
        if maxNb == nil or maxNb < 1 then maxNb = 0 end
        local result = {}
        local pat = "(.-)" .. delim .. "()"
        local nb = 0
        local lastPos
        for part, pos in string.gfind(str, pat) do
            nb = nb + 1
            result[nb] = part
            lastPos = pos
            if nb == maxNb then break end
        end
        if nb ~= maxNb then result[nb + 1] = string.sub(str, lastPos) end
        return result
    end

     

    • 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.