Jump to content

SussyFlore96

Member
  • Posts

    27
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by SussyFlore96

  1. Hello! 

    How we can fix name sort for multilanguage?

    I used this function for name sort, but it doesn't work. The system read only default language "English".

     

    Return for name sort:

    return std::strcmp(i1->GetLocaleName(), i2->GetLocaleName()) < 0;

     

    item.cpp function:

    const char* CItem::GetLocaleName(BYTE bLocale)
    {
        if (bLocale == LOCALE_MAX_NUM)
        {
            if (m_pOwner != NULL)
                bLocale = m_pOwner->GetLanguage();
            else
            {
                if (GetDesc())
                    bLocale = GetDesc()->GetLanguage();
                else
                    bLocale = LOCALE_DEFAULT;
            }
        }
        return m_pProto ? LC_ITEM_NAME(GetVnum(), bLocale) : NULL;
    }

  2. On 10/21/2023 at 6:28 AM, SussyFlore96 said:

    Any tips on how to do not to change the alignment's color as well? I want only the effect in place, but changing the color of the alignment looks a bit pokemonish.

    Sorry. Seems I have missed this part of the code initially.
    So to answer to myself:

     In CPythonTextTail::ShowCharacterTextTail change bRandomTitleColor to false. This stops the tiles to be randomly generated, and therefore the alignment's color is not changed anymore.

  3. Hi. It's been working for me with no issues when I added the system, but now it's only working to switch off and on the night mode
    Using the snow or snow texture buttons doesn't do anything. No sysser or any suggestive errors.

    I've triple checked anything client and server side and I can't understand why.

    Any clues/hints please?

  4. Guys, one small question. It seems that it's working only for B1 map (chunjo town), but not for other maps as well.
    Also it's being switched off and on wheter I'm using night more or not.

    Strange things 😄

    Is it possible that my other maps use other lamp objects rather than 'ob-b1-013-lamp02.gr2'?

  5. 23 minutes ago, xXIntelXx said:

    Oh hell no, I also use c++2a. That's odd. AH NO WAIT hold up lmao.

    You need to add: #include <tuple> in input_main.cpp and item_manager.cpp

    Thanks for your answer, but stil doesn't work, same error. In item_manager.h no need to add something? I don't know how to fix this...

  6. 7 hours ago, xXIntelXx said:

    Example for drop item group, replace:

    vec_item.push_back(std::make_pair(std::make_pair(v[i].dwVnum, v[i].iCount),v[i].rarity));

    with:

    vec_item.emplace_back(std::make_tuple(v[i].dwVnum, v[i].iCount, rarity));

    (so make_pair with make_tuple and add rarity as the third parameter)

    Rarities functions I've made:

    int CalculateDropRarityCommonDropItem(int x)
    {
    	int pct = x;
    	int rarity = 0;
    	if(pct >= 4000000)
    		rarity = 1;
    	else if(pct < 40000000 && pct >= 200000 )
    		rarity = 2;
    	else if(pct < 200000 && pct >= 10000 )
    		rarity = 3;
    	else if(pct < 10000 && pct >= 5000 )
    		rarity = 4;
    	else if(pct < 5000 && pct >= 1000 )
    		rarity = 5;
    	else if(pct < 1000 && pct >= 0 )
    		rarity = 6;
    	
    	return rarity;
    }
    
    int CalculateDropRarityKillDrop(int x, BYTE bType)
    {
    	int pct = x;
    	int rarity = 0;
    	if(pct == 1)
    		rarity = 1;
    	else if(pct > 1 && pct <= 300 )
    		rarity = 2;
    	else if(pct > 300 && pct <= 500 )
    		rarity = 3;
    	else if(pct > 500 && pct <= 2000 )
    		rarity = 4;
    	else if(pct > 2000 && pct <= 5000 )
    		rarity = 5;
    	else if(pct > 5000 )
    		rarity = 6;
    	
    	return rarity;
    }
    
    int CalculateDropRarityDropItemGroup(int x, BYTE bType)
    {
    	int pct = x;
    	int rarity = 0;
    	switch(bType)
    	{
    		case CHAR_TYPE_BOSS:
    		{
    			if(pct >= 4000000)
    				rarity = 1;
    			else if(pct < 4000000 && pct >= 2600000 ) //100~65
    				rarity = 2;
    			else if(pct < 2600000 && pct >= 1600000 ) //65~40
    				rarity = 3;
    			else if(pct < 1600000 && pct >= 1000000 ) //40~25
    				rarity = 4;
    			else if(pct < 1000000 && pct >= 600000 ) //25~15
    				rarity = 5;
    			else if(pct < 600000 )
    				rarity = 6;
    		}
    		break;	
    		case CHAR_TYPE_MONSTER:
    		{
    			if(pct >= 4000000)
    				rarity = 1;
    			else if(pct < 4000000 && pct >= 1600000 ) //100~40
    				rarity = 2;
    			else if(pct < 1600000 && pct >= 800000 ) //40~20
    				rarity = 3;
    			else if(pct < 800000 && pct >= 200000 ) //20~5
    				rarity = 4;
    			else if(pct < 200000 && pct >= 20000 ) //5~0.5
    				rarity = 5;
    			else if(pct < 20000 )
    				rarity = 6;
    		}
    		break;		
    		case CHAR_TYPE_STONE:
    		{
    			if(pct >= 4000000)
    				rarity = 1;
    			else if(pct < 4000000 && pct >= 2000000 ) //100~50
    				rarity = 2;
    			else if(pct < 2000000 && pct >= 1000000 ) //50~25
    				rarity = 3;
    			else if(pct < 1000000 && pct >= 600000 ) //25~15
    				rarity = 4;
    			else if(pct < 600000 && pct >= 200000 ) //15~5
    				rarity = 5;
    			else if(pct < 200000 )
    				rarity = 6;
    		}
    		break;
    		default:
    		{
    			if(pct >= 4000000)
    				rarity = 1;
    			else if(pct < 4000000 && pct >= 2000000 ) //100~50
    				rarity = 2;
    			else if(pct < 2000000 && pct >= 1000000 ) //50~25
    				rarity = 3;
    			else if(pct < 1000000 && pct >= 600000 ) //25~15
    				rarity = 4;
    			else if(pct < 600000 && pct >= 200000 ) //15~5
    				rarity = 5;
    			else if(pct < 200000 )
    				rarity = 6;
    		}
    		break;	
    	}
    	return rarity;
    }
    
    int CalculateDropRarityLevelItemGroup(float x, BYTE bType)
    {
    	float pct = x / 10000.0000;
    	int rarity = 0;
    	switch(bType)
    	{
    		case CHAR_TYPE_BOSS:
    		{
    			if(pct >= 100.0000)
    				rarity = 1;
    			else if(pct < 100.0000 && pct >= 65.0000 )
    				rarity = 2;
    			else if(pct < 65.0000 && pct >= 40.0000 )
    				rarity = 3;
    			else if(pct < 40.0000 && pct >= 25.0000 )
    				rarity = 4;
    			else if(pct < 25.0000 && pct >= 15.0000 )
    				rarity = 5;
    			else if(pct < 15.0000 )
    				rarity = 6;				
    		}
    		break;
    		case CHAR_TYPE_STONE:
    		{
    			if(pct >= 100.0000)
    				rarity = 1;
    			else if(pct < 100.0000 && pct >= 50.0000 )
    				rarity = 2;
    			else if(pct < 50.0000 && pct >= 25.0000 )
    				rarity = 3;
    			else if(pct < 25.0000 && pct >= 15.0000 )
    				rarity = 4;
    			else if(pct < 15.0000 && pct >= 5.0000 )
    				rarity = 5;
    			else if(pct < 5.0000 )
    				rarity = 6;
    		}
    		break;
    		case CHAR_TYPE_MONSTER:
    		{
    			if(pct >= 100.0000)
    				rarity = 1;
    			else if(pct < 100.0000 && pct >= 30.0000 )
    				rarity = 2;
    			else if(pct < 30.0000 && pct >= 15.0000 )
    				rarity = 3;
    			else if(pct < 15.0000 && pct >= 1.0000 )
    				rarity = 4;
    			else if(pct < 1.0000 && pct >= 0.1000 )
    				rarity = 5;
    			else if(pct < 0.1000 )
    				rarity = 6;			
    		}
    		break;
    		default:
    		{
    			if(pct >= 100.0000)
    				rarity = 1;
    			else if(pct < 100.0000 && pct >= 65.0000 )
    				rarity = 2;
    			else if(pct < 65.0000 && pct >= 40.0000 )
    				rarity = 3;
    			else if(pct < 40.0000 && pct >= 25.0000 )
    				rarity = 4;
    			else if(pct < 25.0000 && pct >= 15.0000 )
    				rarity = 5;
    			else if(pct < 15.0000 )
    				rarity = 6;				
    		}	
    	}	
    	return rarity;
    }
    
    int CalculateDropRarityTimeDrop(int x, BYTE bType)
    {
    	int pct = x;
    	int rarity = 0;
    	switch(bType)
    	{
    		case CHAR_TYPE_BOSS:
    		{
    			if(pct == 1000000)
    				rarity = 1;
    			else if(pct < 1000000 && pct >= 650000 )
    				rarity = 2;
    			else if(pct < 650000 && pct >= 400000 )
    				rarity = 3;
    			else if(pct < 400000 && pct >= 250000 )
    				rarity = 4;
    			else if(pct < 250000 && pct >= 150000 )
    				rarity = 5;
    			else if(pct < 150000 )
    				rarity = 6;
    		}
    		break;	
    		case CHAR_TYPE_MONSTER:
    		{
    			if(pct == 1000000)
    				rarity = 1;
    			else if(pct < 1000000 && pct >= 400000 )
    				rarity = 2;
    			else if(pct < 400000 && pct >= 200000 )
    				rarity = 3;
    			else if(pct < 200000 && pct >= 100000 )
    				rarity = 4;
    			else if(pct < 100000 && pct >= 5000 )
    				rarity = 5;
    			else if(pct < 5000 )
    				rarity = 6;
    		}
    		break;		
    		case CHAR_TYPE_STONE:
    		{
    			if(pct == 1000000)
    				rarity = 1;
    			else if(pct < 1000000 && pct >= 500000 )
    				rarity = 2;
    			else if(pct < 500000 && pct >= 250000 )
    				rarity = 3;
    			else if(pct < 250000 && pct >= 150000 )
    				rarity = 4;
    			else if(pct < 150000 && pct >= 50000 )
    				rarity = 5;
    			else if(pct < 50000 )
    				rarity = 6;
    		}
    		default:
    		{
    			if(pct == 1000000)
    				rarity = 1;
    			else if(pct < 1000000 && pct >= 500000 )
    				rarity = 2;
    			else if(pct < 500000 && pct >= 250000 )
    				rarity = 3;
    			else if(pct < 250000 && pct >= 150000 )
    				rarity = 4;
    			else if(pct < 150000 && pct >= 50000 )
    				rarity = 5;
    			else if(pct < 50000 )
    				rarity = 6;
    		}
    		break;	
    	}	
    	return rarity;
    }

    Hint: instead of the char type, since the BOSS type is not by default in the sources, you could pass the rank as well, then put the rank on the switch case and, if the rank is 5, check if it's a metin or not.

    Therefore in the drop item group example would be like this:

    	// Drop Item Group
    	{
    		auto it = m_map_pkDropItemGroup.find(pkChr->GetRaceNum());
    
    		if(it != m_map_pkDropItemGroup.end())
    		{
    			auto v = it->second->GetVector();
    			
    
    			for (DWORD i = 0; i < v.size(); ++i)
    			{
    				if( iLevel >= (iMobLevel - 15) && iLevel <= (iMobLevel + 15) ) //don't show outside level limits
    				{
    					uint8_t rarity = CalculateDropRarityDropItemGroup(v[i].dwPct, bType);
    					vec_item.emplace_back(std::make_tuple(v[i].dwVnum, v[i].iCount, rarity));
    					//vec_item.push_back(std::make_pair(std::make_pair(v[i].dwVnum, v[i].iCount),v[i].rarity));
    				}
    			}
    		}
    	}

    and in input_main.cpp:

    			pInfo.dwVID	= m_pkChrTarget->GetVID();
    			pInfo.race = m_pkChrTarget->GetRaceNum();
    			pInfo.dwVnum = std::get<0>(x);
    			pInfo.count = std::get<1>(x);
    			pInfo.rarity = std::get<2>(x);

    this is how you get the data from the tuple and s_vec_item declaration changes to:

    static std::vector<std::tuple<int,int,int>> s_vec_item;

    Obviously you should change the packet accordingly and in bool CPythonNetworkStream::RecvTargetInfoPacket() change:

    Py_BuildValue("(iii)", pInfoTargetPacket.race, pInfoTargetPacket.dwVnum, pInfoTargetPacket.count));

    into:

    Py_BuildValue("(iiii)", pInfoTargetPacket.race, pInfoTargetPacket.dwVnum, pInfoTargetPacket.count, pInfoTargetPacket.rarity));

    game.py change of BINARY_AddTargetMonsterDropInfo:

    	if app.ENABLE_SEND_TARGET_INFO:
    		def BINARY_AddTargetMonsterDropInfo(self, raceNum, itemVnum, itemCount, rarity):
    			if not raceNum in uiTarget.MONSTER_INFO_DATA:
    				uiTarget.MONSTER_INFO_DATA.update({raceNum : {}})
    				uiTarget.MONSTER_INFO_DATA[raceNum].update({"items" : []})
    			curList = uiTarget.MONSTER_INFO_DATA[raceNum]["items"]
    
    			isUpgradeable = False
    			isMetin = False
    			item.SelectItem(itemVnum)
    			if item.GetItemType() == item.ITEM_TYPE_WEAPON or item.GetItemType() == item.ITEM_TYPE_ARMOR:
    				isUpgradeable = True
    			elif item.GetItemType() == item.ITEM_TYPE_METIN:
    				isMetin = True
    
    			for curItem in curList:
    				if isUpgradeable:
    					if curItem.has_key("vnum_list") and curItem["vnum_list"][0] / 10 * 10 == itemVnum / 10 * 10:
    						if not (itemVnum in curItem["vnum_list"]):
    							curItem["vnum_list"].append(itemVnum)
    						return
    				elif isMetin:
    					if curItem.has_key("vnum_list"):
    						baseVnum = curItem["vnum_list"][0]
    					if curItem.has_key("vnum_list") and (baseVnum - baseVnum%1000) == (itemVnum - itemVnum%1000):
    						if not (itemVnum in curItem["vnum_list"]):
    							curItem["vnum_list"].append(itemVnum)
    						return
    				else:
    					if curItem.has_key("vnum") and curItem["vnum"] == itemVnum and curItem["count"] == itemCount and curItem["rarity"] == rarity:
    						return
    
    			if isUpgradeable or isMetin:
    				curList.append({"vnum_list":[itemVnum], "count":itemCount, "rarity":rarity})
    			else:
    				curList.append({"vnum":itemVnum, "count":itemCount, "rarity":rarity})

    and in uitarget.py, the class ItemListBoxItem:

    			class ItemListBoxItem(ui.Window):
    				def __init__(self, width):
    					ui.Window.__init__(self)
    
    					image = ui.ExpandedImageBox()
    					image.SetParent(self)
    					image.Show()
    					self.image = image
    
    					nameLine = ui.TextLine()
    					nameLine.SetParent(self)
    					nameLine.SetPosition(32 + 5, 0)
    					nameLine.Show()
    					self.nameLine = nameLine
    
    					rarity = ui.TextLine()
    					rarity.SetParent(self)
    					rarity.SetPosition(32 + 5, 13)
    					rarity.Show()
    					self.rarity = rarity
    
    					self.SetSize(width, 32 + 5)
    
    				def LoadImage(self, image, name = None):
    					self.image.LoadImage(image)
    					self.SetSize(self.GetWidth(), self.image.GetHeight() + 5)
    					if name != None:
    						self.SetText(name)
    
    				def SetText(self, text):
    					self.nameLine.SetText(text)
    
    				def SetRarityText(self, text, rarity):
    					TEXT_COLORS = [
    					grp.GenerateColor(1.0, 0.0, 0.0, 1.0),	
    					grp.GenerateColor(1.0, 1.0, 1.0, 1.0), 
    					grp.GenerateColor(0.33, 1.0, 0.12, 1.0),
    					grp.GenerateColor(0.42, 0.93, 0.76, 1.0),
    					grp.GenerateColor(0.0, 0.89, 1.0, 1.0),
    					grp.GenerateColor(0.41, 0.0, 1.0, 1.0),
    					grp.GenerateColor(1.0, 0.86, 0.0, 1.0)
    					]
    					if rarity != 1:
    						self.rarity.SetPackedFontColor(TEXT_COLORS[rarity])
    					self.rarity.SetText(text)

    __LoadInformation_Drops:

    			def __LoadInformation_Drops(self, race):
    				self.AppendSeperator()
    
    				if race in MONSTER_INFO_DATA:
    					if len(MONSTER_INFO_DATA[race]["items"]) == 0:
    						self.AppendTextLine(localeInfo.TARGET_INFO_NO_ITEM_TEXT)
    					else:
    						itemListBox = ui.ListBoxExNew(32 + 5, self.MAX_ITEM_COUNT)
    						itemListBox.SetSize(self.GetWidth() - 15 * 2 - ui.ScrollBar.SCROLLBAR_WIDTH, (32 + 5) * self.MAX_ITEM_COUNT)
    						height = 0
    						for curItem in MONSTER_INFO_DATA[race]["items"]:
    							if curItem.has_key("vnum_list"):
    								height += self.AppendItem(itemListBox, curItem["vnum_list"], curItem["count"], curItem["rarity"], race)
    							else:
    								height += self.AppendItem(itemListBox, curItem["vnum"], curItem["count"], curItem["rarity"], race)
    						if height < itemListBox.GetHeight():
    							itemListBox.SetSize(itemListBox.GetWidth(), height)
    						self.AppendWindow(itemListBox, 15)
    						itemListBox.SetBasePos(0)
    
    						if len(MONSTER_INFO_DATA[race]["items"]) > itemListBox.GetViewItemCountFixed():
    							itemScrollBar = ui.ScrollBar()
    							itemScrollBar.SetParent(self)
    							itemScrollBar.SetPosition(itemListBox.GetRight(), itemListBox.GetTop())
    							itemScrollBar.SetScrollBarSize(32 * self.MAX_ITEM_COUNT + 5 * (self.MAX_ITEM_COUNT - 1))
    							itemScrollBar.SetMiddleBarSize(float(self.MAX_ITEM_COUNT) / float(height / (32 + 5)))
    							itemScrollBar.Show()
    							itemListBox.SetScrollBar(itemScrollBar)
    							self.scrollBar = itemListBox.GetScrollBar()
    				else:
    					self.AppendTextLine(localeInfo.TARGET_INFO_NO_ITEM_TEXT)

     

    AppendItem:

    			def AppendItem(self, listBox, vnums, count, rarity, race):
    				if type(vnums) == int:
    					vnum = vnums
    				else:
    					vnum = vnums[0]
    
    				item.SelectItem(vnum)
    				itemName = item.GetItemName()
    				if type(vnums) != int and len(vnums) > 1:
    					#vnums = sorted(vnums)
    					realName = itemName[:itemName.find("+")]
    					if item.GetItemType() == item.ITEM_TYPE_METIN:
    						realName = localeInfo.TARGET_INFO_STONE_NAME
    						itemName = realName + "+0 - +4"
    					else:
    						itemName = realName + "+" + str(vnums[0] % 10) + " - +" + str(vnums[len(vnums) - 1] % 10)
    					vnum = vnums[len(vnums) - 1]
    
    				myItem = self.ItemListBoxItem(listBox.GetWidth())
    				myItem.LoadImage(item.GetIconImageFileName())
    				if count <= 1:
    					myItem.SetText(itemName)
    				else:
    					myItem.SetText("%dx %s" % (count, itemName))
    				
    				RARITY_NAMES_LIST = [localeInfo.DROP_RARITY_ERROR, localeInfo.DROP_GUARANTEED, localeInfo.DROP_COMMON, localeInfo.DROP_UNCOMMON, localeInfo.DROP_RARE, localeInfo.DROP_MYTHIC, localeInfo.DROP_LEGENDARY]
    				myItem.SetRarityText("%s" % RARITY_NAMES_LIST[rarity], rarity)
    				myItem.SAFE_SetOverInEvent(self.OnShowItemTooltip,vnum)
    				myItem.SAFE_SetOverOutEvent(self.OnHideItemTooltip)
    				listBox.AppendItem(myItem)
    
    				if item.GetItemType() == item.ITEM_TYPE_METIN:
    					self.stoneImg = myItem
    					self.stoneVnum = vnums
    					self.lastStoneVnum = self.STONE_LAST_VNUM + vnums[len(vnums) - 1] % 1000 / 100 * 100
    
    				return myItem.GetHeight()

     

    Thank you! Now I get this:

    Spoiler

  7. Thanks, Syreldar. It indeed seems to be very nicely done and I have tried to test it, maybe I could enhance and use it in the future.

    Few things I have noticed: global variables did not work for me, even with ./pre_qc, so I had to put them directly in the functions that uses them, as I got an error stating the quest must start with quest...

    Furthermore, I found one little bug - the counter of the mobs killed did not work. I've tried multiple things, and what did the trick was to edit the when statement within "in_mission".

    From:

            when kill with not npc.is_pc() and npc.get_race() == pc.getqf("to_kill") begin
                pc.setqf("killed", pc.getqf("killed")+1);

    To:

    	when kill with not npc.is_pc() and pc.getqf("to_kill") begin
    		notice_all(string.format("to_kill: %d, killed: %d", pc.getqf("to_kill"), pc.getqf("killed"))); -- test how many monsters you have to kill, and how many you have killed so far
    		pc.setqf("killed", pc.getqf("killed")+1);


    Not sure why did you use npc.get-race() = pc.getqf("to_kill), yet I'm more than open to learn and understand the logic, if you're down and willing to detail a little.

  8. There are few things that could be improved, I didn't test it, but it should be something like this:

     

    quest daily_quest begin
    	state start begin
    		when login or levelup with pc.get_level() >= 50 begin
    			if pc.getqf("daily_cd") < get_global_time() then
    				set_state(daily)
    			end
    		end
    
    		when letter with pc.get_level() >= 50 begin
    			send_letter("Daily Quest")
    		end
    
    		when button or info begin
    			say_title("Daily Quest")
    			if (pc.getqf("daily_cd") + (60 * 60 * 24) - get_global_time() > 0) then
    				local remaining_wait_time = (pc.getqf("daily_cd") + (60 * 60 * 24) - get_global_time())
    				say("You must wait for timer")
    				say_reward("You can repeat in: "..get_time_remaining(remaining_wait_time)..'[ENTER]')
    				return
    			end
    			say("Now you can repeat the quest.")
    			set_state(daily)
    		end
    	end
    
    	state daily begin
    		when letter begin
    			send_letter("Daily Quest")
    		end
    		
    		when button or info begin
    			say_title("Daily Quest")
    			say("Daily quest active")
    		end
    
    		// mission
    		when 101.kill begin
    			chat("daily quest completed.")
    			pc.setqf("daily_cd", get_global_time() + (60 * 60 * 24));
    			set_state(start)
    		end
    	end
    end

    Or even better, lets supposedly say that we have a given array with mobs and items from which we can randomly pick both the vnum of the monster and how many to be killed, and a random reward as well:

     

    quest daily_quest begin
    	state start begin
    		when login or levelup with pc.get_level() >= 50 begin
    			if pc.getqf("daily_cd") < get_global_time() then
    				set_state(daily)
    			end
    		end
    
    		when letter with pc.get_level() >= 50 begin
    			send_letter("Daily Quest")
    		end
    
    		when button or info begin
    			say_title("Daily Quest")
    			if (pc.getqf("daily_cd") + (60 * 60 * 24) - get_global_time() > 0) then
    				local remaining_wait_time = (pc.getqf("daily_cd") + (60 * 60 * 24) - get_global_time())
    				say("You must wait for timer")
    				say_reward("You can repeat in: "..get_time_remaining(remaining_wait_time)..'[ENTER]')
    				return
    			end
    			say("Now you can repeat the quest.")
    			set_state(daily)
    		end
    	end
    
    	state daily begin
    		// define the array of monsters and rewards
    		local monsters = {101, 102, 103, 104, 105};
    		local rewards = {{"itemVnum", 19, 1}, {"itemVnum", 19, 2}, {"itemVnum", 19, 3}, {"itemVnum", 19, 4}, {"itemVnum", 19, 5}};
    
    		// pick a random monster and reward. By using math.random() function, this will randomly select a monster and reward from the defined arrays every time the quest is taken, making the quest different each time it is taken.
    		local random_monster = monsters[math.random(1, #monsters)];
    		local random_reward = rewards[math.random(1, #rewards)];
    
    		when letter begin
    			send_letter("Daily Quest", "Kill "..random_monster.." monsters and receive "..random_reward[1].." "..random_reward[2].." x"..random_reward[3])
    		end
    
    		when button or info begin
    			say_title("Daily Quest")
    			say("Kill "..random_monster.." monsters and receive "..random_reward[1].." "..random_reward[2].." x"..random_reward[3])
    		end
    
    		// mission
    		when random_monster.kill with pc.count_item(random_reward[2]) < random_reward[3] begin
    			pc.give_item2(random_reward[2], random_reward[3])
    			chat("daily quest completed.")
    			pc.setqf("daily_cd", get_global_time() + (60 * 60 * 24));
    			set_state(start)
    		end
    	end
    end

    Again, not sure it will work. Maybe @ VegaS™ can spare few minutes to shade some light for both of us 🙂

  9. On 1/4/2023 at 10:23 AM, josehdelaro said:

    for the special inventory it is the same step as for the normal inventory, look for def __UseItem(self, slotIndex): and after item.SelectItem(ItemVNum) paste the tutorial lines

    works without any problems

     

    test.png

     

    Thanks for you relpy! 

    I tryed, but it's doesn't work.

    Ddfpruj.png

    a20B4mz.png

  10. 2 hours ago, TMP4 said:

    0826-184827.jpg

    27994	ÇÇÁřÁÖ	ITEM_RESOURCE	RESOURCE_BLOOD_PEARL	1	NONE	ITEM_STACKABLE	NONE	NONE	24000	24000	0	0	0	LIMIT_NONE	0	LIMIT_NONE	0	APPLY_NONE	0	APPLY_NONE	0	APPLY_NONE	0	0	0	0	0	0	0	0	0	0

    Working fine for me🤔

    That's some strange things going on there. I literally could not find anything on the entire source. Not even related to client, nothing on uiinventory...


    Someone else with any brilliant idea please?

    • Eyes 1
    • Think 1
    • Love 1
  11. Anyone managed to make soul stones (50513) and pearls (27992, 27993, 27994) stackable?

    Even if the items have ITEM_STACKABLE they simply won't stack in inventory. I have tried to search the entire db/game source for anything that might help and had no joy with it.

    Any idea would be greatly appreciated.

    @ TMP4, perhaps you might have an idea of this behavior?

    Thanks!

  12. Hi! 

    I have a problem with special storage and chest view drop system

    The problem is this:

    https://metin2.download/picture/Cu16RyuuPDqPcYSP1BIAH7HaeD0X0sl5/.gif

    I want to open this window for chest view drop only in chest inventory page from special storage.

    Additional infos:

    The code from specialstorage.py for opening the window is this:

    https://metin2.download/picture/RMM3da3uTSUk8x3mtC6rjgPbISIZ1k3t/.png

    I tried to add a return statement for the other inventory (upgrade, book, stone, switchers), but if I add this statement before the upper code the return will apply for all windows inventory from special storage and I can't open the chests.

    Can you help me? Thank you! 

     

    • Not Good 1
    • Think 1
    • 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.