Jump to content

avertuss

Inactive Member
  • Posts

    480
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by avertuss

  1. 12 godzin temu, Raylee napisał:

    Hmm..
    Maybe in char.cpp?:unsure:
     

        // MINING
        if (mining::IsVeinOfOre (GetRaceNum()))
        {
            char_event_info* info = AllocEventInfo<char_event_info>();

            info->ch = this;

            m_pkMiningEvent = event_create(kill_ore_load_event, info, PASSES_PER_SEC(number(7 * 60, 15 * 60)));
        }
        // END_OF_MINING


    I'm not sure :P
    But you can try :)


    Best regards
    Raylee

    It is destroying the vein after x seconds.

  2. Hi. Do you know how to cancel mining animation faster? I changed mining time and i'm getting drop but animation is still continue. I tried like that

    if (number(1, 100) <= iPct)
    		{
    			OreDrop(ch, load->GetRaceNum());
    			ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("채광에 성공하였습니다."));
    			ch->mining_cancel();
    			ch->ChatPacket(CHAT_TYPE_INFO, "i wanna stop you XD");
    		}
    		else
    		{
    			ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("채광에 실패하였습니다."));
    			ch->mining_cancel();
    			ch->ChatPacket(CHAT_TYPE_INFO, "i wanna stop you XD");
    		}

    and it doesn't work. 

  3. 26 minut temu, Den napisał:

    You can make a new lua function in source then use it.

    
    	int item_is_equipped(lua_State* L)
    	{
    		CQuestManager& q = CQuestManager::instance();
    		LPITEM item = q.GetCurrentItem();
    
    		if (item)
    			lua_pushboolean(L, item->IsEquipped());
    		else
    			lua_pushboolean(L, false);
    
    		return 1;
    	}

     

    I added your function, it worked one time but now it doesn't work XD

    Quest:

    quest nixo_kd begin
    	state start begin
    		when login begin
    			cmdchat("KD_QUEST "..q.getcurrentquestindex())
    		end
    		when button or info begin
    			if not pc.can_warp() then
    				chat("You need to wait 10s.")
    				return
    			end
    			if item.is_equipped() then
    				chat("You can't do this! ")
    				return
    			end
    			if pc.count_item(25100) >= 1 then
    				info = get_input("KD_SEND")
    				splited = string.split(info, '|')
    				if item.select_cell(tonumber(splited[1])) then
    					if item.vnum == tonumber(splited[2]) then
    						if item.get_type() == 1 or item.get_type() == 2 and item.get_sub_type() == 0 then
    							for i = 0, 2 do
    								if item.get_socket(i) == tonumber(splited[3]) then
    									if item.get_socket(i) > 20000 and item.get_socket(i) != 28960 then
    										item.set_socket(i, 1)
    										pc.give_item2(tonumber(splited[3]))
    										pc.remove_item(25100, 1)
    										break
    									end
    								end
    							end
    						end
    					end
    				end
    			end
    		end
    	end
    end

    Any ideas? 

  4. Hi. How to fix that bug? 

     

    i already have 

    if (item2->IsEquipped())
    	return false;

    but i'm using quest with gui

    quest nixo_kd begin
    	state start begin
    		when login begin
    			cmdchat("KD_QUEST "..q.getcurrentquestindex())
    		end
    		when button or info begin
    			if pc.count_item(25100) >= 1 then
    				info = get_input("KD_SEND")
    				splited = string.split(info, '|')
    				if item.select_cell(tonumber(splited[1])) then
    					if item.vnum == tonumber(splited[2]) then
    						if item.get_type() == 1 or item.get_type() == 2 and item.get_sub_type() == 0 then
    							for i = 0, 2 do
    								if item.get_socket(i) == tonumber(splited[3]) then
    									if item.get_socket(i) > 20000 and item.get_socket(i) != 28960 then
    										item.set_socket(i, 1)
    										pc.give_item2(tonumber(splited[3]))
    										pc.remove_item(25100, 1)
    										break
    									end
    								end
    							end
    						end
    					end
    				end
    			end
    		end
    	end
    end

    and this bugfix doesn't work. Any ideas? 

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