Jump to content

avertuss

Inactive Member
  • Posts

    480
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by avertuss

  1. 2 godziny temu, WeedHex napisał:

    Shitty c++ at least remove useless comments...

    You're using "null" key to check in LUA?

    You're passing deltaTime var without use it?

    Pet bonus are from SQL, item_proto on the call item, you know?

     

    https://stackoverflow.com/questions/31323443/lua-whats-the-difference-between-null-and-nil

    I used that "system" with old pet system and it works well so idk. So how i can make it? I know that bonuses are from mysql. Any tips?

  2. Hi. I have

    bool CNewPetActor::Update(DWORD deltaTime)
    {
    	bool bResult = true;
    
    	// Ćę ÁÖŔÎŔĚ Á׾ú°ĹłŞ, ĽŇČŻµČ ĆęŔÇ »óĹ°ˇ ŔĚ»óÇϴٸé ĆęŔ» ľřľÚ. (NOTE: °ˇ˛ű°ˇ´Ů ŔĚ·± Ŕú·± ŔĚŔŻ·Î ĽŇČŻµČ ĆęŔĚ DEAD »óĹÂżˇ şüÁö´Â °ćżě°ˇ ŔÖŔ˝-_-;)
    	// ĆęŔ» ĽŇČŻÇŃ ľĆŔĚĹŰŔĚ ľř°ĹłŞ, ł»°ˇ °ˇÁř »óĹ°ˇ ľĆ´Ď¶ó¸é ĆęŔ» ľřľÚ.
    	if (IsSummoned()) {
    		if (m_pkOwner->IsImmortal() && Pet_Skill_Table[16][2 + m_dwskill[m_dwslotimm]] <= (get_global_time() - m_dwImmTime)*10) {
    			//m_pkOwner->ChatPacket(CHAT_TYPE_INFO, "%d - %d  diff %d  Skilltable %d", get_global_time(), m_dwImmTime, (get_global_time() - m_dwImmTime) * 10, Pet_Skill_Table[16][2 + m_dwskill[m_dwslotimm]]);
    			m_dwImmTime = 0;
    			m_pkOwner->SetImmortal(0);
    		}
    	}
    	// if (m_pkOwner->IsDead() || (IsSummoned() && m_pkChar->IsDead()) || (IsSummoned() && (m_pkOwner->GetExchange() || m_pkOwner->GetMyShop() || m_pkOwner->GetShopOwner() || m_pkOwner->IsOpenSafebox() || m_pkOwner->IsCubeOpen() || m_dwduration <= 0))
    		// || NULL == ITEM_MANAGER::instance().FindByVID(this->GetSummonItemVID())
    		// || ITEM_MANAGER::instance().FindByVID(this->GetSummonItemVID())->GetOwner() != this->GetOwner()
    		// )
    	if((this->GetSummonItemVID() != 0 && (NULL == ITEM_MANAGER::instance().FindByVID(this->GetSummonItemVID()) || ITEM_MANAGER::instance().FindByVID(this->GetSummonItemVID())->GetOwner() != this->GetOwner())))
    	{
    		m_pkOwner->SetQuestFlag("PetSystems.pet_vnum", 0);
    		m_pkOwner->SetQuestFlag("pet_item_id.pet_vnum", 0);
    		this->Unsummon();
    		return true;
    	}
    
    	if(this->IsSummoned() && HasOption(EPetOption_Followable))
    	{
    		bResult = bResult && this->_UpdateFollowAI();
    	}
    
    	return bResult;
    }

    and quest

    quest PetSystems begin
    	state start begin
    		function get_pet_info(itemVnum)
    			pet_info_map = {
    			--  [ITEM VNUM] MOB_VNUM, DEFAULT NAME, buff_idx, spawn_effect_idx
    				[55701]     = { 34041, "'s Kleiner Affe", 0},
    				[55702]     = { 34045, "'s Kleine Spinne", 0},
    				[55703]     = { 34049, "'s Kleiner Razador", 0},
    				[55704]     = { 34053, "'s Kleiner Nemere", 0},
    				
    			}
    			itemVnum = tonumber(itemVnum)
    			return pet_info_map[itemVnum]
    		end
    		when login with pc.getqf("pet_vnum") != 0 begin
    			item.select(pc.getqf("pet_item_id"))
    			newpet.summon(pc.getqf("pet_vnum"), petName, false)
    		end	
    		when 55701.use or 55702.use or 55703.use or 55704.use begin
    			local pet_info = PetSystems.get_pet_info(item.vnum)
    			pc.setqf("pet_item_id", item.get_id())
    			if null != pet_info then
    
    				local mobVnum = pet_info[1]
    				local petName = pet_info[2]
    				
    
    				if true == newpet.is_summon(mobVnum) then					
    					newpet.unsummon(mobVnum)
    					pc.setqf("pet_vnum", 0)
    				else
    					if newpet.count_summoned() < 1 then
    						newpet.summon(mobVnum, petName, false)
    						pc.setqf("pet_vnum", mobVnum)
    					else
    						syschat("You already summoned a pet.")
    					end					
    				end -- if pet.is_summon
    			end  -- if null != pet_info
    		end -- when
    	end
    end

    Pet summons after relog but he doesn't give real bonuses. For example without pet: 103014 with pet: 104971, after relog 103166. Any ideas? 

  3. Hi i have problem. I want to show model when someone wants to buy someting in gui so i have:

    	def OnUpdate(self):
    		if self.button_buy[0].IsIn():
    			self.ModelPreview(2001)
    		else:
    			self.ModelPreviewClose()
    
    	def ModelPreview(self, Vnum):
    		#if constInfo.DISABLE_MODEL_PREVIEW == 1:
    		#	return
    
    		RENDER_TARGET_INDEX = 1
    
    		self.ModelPreviewBoard = ui.ThinBoard()
    		self.ModelPreviewBoard.SetParent(self)
    		self.ModelPreviewBoard.SetSize(190+10, 210+30)
    		self.ModelPreviewBoard.SetPosition(-202, 0)
    		self.ModelPreviewBoard.Show()
    
    		self.ModelPreview = ui.RenderTarget()
    		self.ModelPreview.SetParent(self.ModelPreviewBoard)
    		self.ModelPreview.SetSize(190, 210)
    		self.ModelPreview.SetPosition(5, 22)
    		self.ModelPreview.SetRenderTarget(RENDER_TARGET_INDEX)
    		self.ModelPreview.Show()
    
    		self.ModelPreviewText = ui.TextLine()
    		self.ModelPreviewText.SetParent(self.ModelPreviewBoard)
    		self.ModelPreviewText.SetPackedFontColor(grp.GenerateColor(0.8824, 0.9804, 0.8824, 1.0))
    		self.ModelPreviewText.SetPosition(0, 5)
    		self.ModelPreviewText.SetText("Model")
    		self.ModelPreviewText.SetOutline()
    		self.ModelPreviewText.SetFeather(False)
    		self.ModelPreviewText.SetWindowHorizontalAlignCenter()
    		self.ModelPreviewText.SetHorizontalAlignCenter()
    		self.ModelPreviewText.Show()
    
    		renderTarget.SetBackground(RENDER_TARGET_INDEX, "d:/ymir work/ui/game/myshop_deco/model_view_bg.sub")
    		renderTarget.SetVisibility(RENDER_TARGET_INDEX, True)
    		renderTarget.SelectModel(RENDER_TARGET_INDEX, Vnum)
    			
    	def ModelPreviewClose(self):
    		RENDER_TARGET_INDEX = 1
    
    		self.ModelPreviewBoard.Hide()
    		self.ModelPreview.Hide()
    		self.ModelPreviewText.Hide()
    
    		renderTarget.SetVisibility(RENDER_TARGET_INDEX, False)

    it works once when i have mouse 1st time on the button it works but if i want to show that again i see 

    'RenderTarget' object is not callable

    in my syserr. When i change map i can show render again but only once. 

  4. Hi. I wanted make tooltip when mouse is over textline. I tried like that

    	def __init__(self):
    		ui.ScriptWindow.__init__(self)
    		self.toolTip = uiToolTip.ToolTip()
    		self.toolTip.Hide()			
    		self.__Initialize()
    		self.__Load()
    	
    	def __Load_BindObject(self):
    		try:
    			GetObject = self.GetChild
    			self.titleBar = GetObject("titlebar")	
    			
    			self.marble1_txt = GetObject("marble1_txt")					
    			self.marble2_txt = GetObject("marble2_txt")					
    			self.marble3_txt = GetObject("marble3_txt")								
    			self.marble5_txt = GetObject("marble5_txt")								
    			self.marble5_txt = GetObject("marble5_txt")								
    			self.marble6_txt = GetObject("marble6_txt")		
    			self.marble1_txt.SAFE_SetStringEvent("MOUSE_OVER_IN", self.__ShowMarbleToolTip)
    			self.marble2_txt.SAFE_SetStringEvent("MOUSE_OVER_IN", self.__ShowMarbleToolTip)
    			self.marble3_txt.SAFE_SetStringEvent("MOUSE_OVER_IN", self.__ShowMarbleToolTip)
    			self.marble5_txt.SAFE_SetStringEvent("MOUSE_OVER_IN", self.__ShowMarbleToolTip)
    			self.marble5_txt.SAFE_SetStringEvent("MOUSE_OVER_IN", self.__ShowMarbleToolTip)
    			self.marble6_txt.SAFE_SetStringEvent("MOUSE_OVER_IN", self.__ShowMarbleToolTip)
    			# self.marble1_txt.OnMouseOverIn(self.__ShowMarbleToolTip())
    			# self.marble2_txt.OnMouseOverIn(self.__ShowMarbleToolTip())
    			# self.marble3_txt.OnMouseOverIn(self.__ShowMarbleToolTip())
    			# self.marble5_txt.OnMouseOverIn(self.__ShowMarbleToolTip())
    			# self.marble5_txt.OnMouseOverIn(self.__ShowMarbleToolTip())
    			# self.marble6_txt.OnMouseOverIn(self.__ShowMarbleToolTip())
    			
    			self.button_buy = []
    			self.button_buy.append(self.GetChild("buy1"))			
    			self.button_buy.append(self.GetChild("buy2"))			
    			self.button_buy.append(self.GetChild("buy3"))	
    			self.button_buy.append(self.GetChild("buy4"))	
    			self.button_buy.append(self.GetChild("buy5"))	
    			self.button_buy.append(self.GetChild("buy6"))	
    			self.button_buy.append(self.GetChild("buy7"))
    					
    		except:
    			import exception
    			exception.Abort("OptionDialog.__Load_BindObject")
    			
    		
    		for i in xrange(len(self.button_buy)):
    			self.button_buy[i].SetEvent(ui.__mem_func__(self.Buy_Marble), i)	
    			
    			
    	def __ShowMarbleToolTip(self):
    		self.toolTip.ShowToolTip()
    		self.toolTip.AutoAppendTextLine("TEXT")
    		self.toolTip.AppendSpace(5)
    		self.toolTip.AlignHorizonalCenter()		

    but it doesn't work. Any ideas? Syserr is clean. 

    • Sad 1
  5. 4 godziny temu, VegaS™ napisał:
    
    #ifdef ENABLE_EXTENDED_ALIGNMENT_SYSTEM
    		const auto itor = g_TitleNameMap.find(iAlignmentGrade);
    #else
    		std::map<int, std::string>::iterator itor = g_TitleNameMap.find(iAlignmentGrade);
    #endif

     

    Yee, one error fixed but still i have this

    cfe70484c9101e928be7618e1accab9f.png

    when i want to use that system. Without this system i can compile bin.

  6. 16 godzin temu, martysama0134 napisał:

    "Target Platform Version" is blank.

    By the way, vs2015 has mostly the same abi of vs2017, so you can even think to upgrade it.

    I already fix that error but now i have problem 

    17>  InstanceBaseEffect.cpp
    17>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0(665): error C2338: The C++ Standard forbids containers of const elements because allocator<const T> is ill-formed.
    17>  InstanceBaseEffect.cpp(750): note: see reference to class template instantiation 'std::allocator<_Ty>' being compiled
    17>          with
    17>          [
    17>              _Ty=const std::string
    17>          ]
    17>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0(695): error C2535: 'const std::basic_string<char,std::char_traits<char>,std::allocator<char>> *std::allocator<_Ty>::address(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &) noexcept const': member function already defined or declared
    17>          with
    17>          [
    17>              _Ty=const std::string
    17>          ]
    17>  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0(689): note: see declaration of 'std::allocator<_Ty>::address'
    17>          with
    17>          [
    17>              _Ty=const std::string
    17>          ]
    17>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0(930): error C2535: 'const std::basic_string<char,std::char_traits<char>,std::allocator<char>> *std::_Wrap_alloc<std::allocator<_Ty>>::address(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &) const': member function already defined or declared
    17>          with
    17>          [
    17>              _Ty=const std::string
    17>          ]
    17>  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0(924): note: see declaration of 'std::_Wrap_alloc<std::allocator<_Ty>>::address'
    17>          with
    17>          [
    17>              _Ty=const std::string
    17>          ]
    17>  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vector(450): note: see reference to class template instantiation 'std::_Wrap_alloc<std::allocator<_Ty>>' being compiled
    17>          with
    17>          [
    17>              _Ty=const std::string
    17>          ]
    17>  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vector(502): note: see reference to class template instantiation 'std::_Vec_base_types<_Ty,_Alloc>' being compiled
    17>          with
    17>          [
    17>              _Ty=const std::string,
    17>              _Alloc=std::allocator<const std::string>
    17>          ]
    17>  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vector(680): note: see reference to class template instantiation 'std::_Vector_alloc<std::_Vec_base_types<_Ty,_Alloc>>' being compiled
    17>          with
    17>          [
    17>              _Ty=const std::string,
    17>              _Alloc=std::allocator<const std::string>
    17>          ]
    17>  InstanceBaseEffect.cpp(750): note: see reference to class template instantiation 'std::vector<const std::string,std::allocator<_Ty>>' being compiled
    17>          with
    17>          [
    17>              _Ty=const std::string
    17>          ]

     

    code

    26b7b2645181d2cbe69cccb543d41d26.png

  7. 15 minut temu, tierrilopes napisał:

    Never saw that one before actually

    Already defined or declared, perhaps some old code in your source that now exists in windows libraries already?

    I guess that pythoncore is for static python, try compiling it outside of your binary solution (no references to it or custom build steps), then place the lib in your lib folder and compile  your binary source normally.

    I found where is the problem but i don't know how to fix it. 

    There is my post with error logs and code. Can you check? 

  8. @VegaS™

    Hi Vegas. I updated vs2008 to vs2015 and i have problem with compile.

    logs

    17>  InstanceBaseEffect.cpp
    17>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0(665): error C2338: The C++ Standard forbids containers of const elements because allocator<const T> is ill-formed.
    17>  InstanceBaseEffect.cpp(750): note: see reference to class template instantiation 'std::allocator<_Ty>' being compiled
    17>          with
    17>          [
    17>              _Ty=const std::string
    17>          ]
    17>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0(695): error C2535: 'const std::basic_string<char,std::char_traits<char>,std::allocator<char>> *std::allocator<_Ty>::address(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &) noexcept const': member function already defined or declared
    17>          with
    17>          [
    17>              _Ty=const std::string
    17>          ]
    17>  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0(689): note: see declaration of 'std::allocator<_Ty>::address'
    17>          with
    17>          [
    17>              _Ty=const std::string
    17>          ]
    17>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0(930): error C2535: 'const std::basic_string<char,std::char_traits<char>,std::allocator<char>> *std::_Wrap_alloc<std::allocator<_Ty>>::address(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &) const': member function already defined or declared
    17>          with
    17>          [
    17>              _Ty=const std::string
    17>          ]
    17>  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0(924): note: see declaration of 'std::_Wrap_alloc<std::allocator<_Ty>>::address'
    17>          with
    17>          [
    17>              _Ty=const std::string
    17>          ]
    17>  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vector(450): note: see reference to class template instantiation 'std::_Wrap_alloc<std::allocator<_Ty>>' being compiled
    17>          with
    17>          [
    17>              _Ty=const std::string
    17>          ]
    17>  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vector(502): note: see reference to class template instantiation 'std::_Vec_base_types<_Ty,_Alloc>' being compiled
    17>          with
    17>          [
    17>              _Ty=const std::string,
    17>              _Alloc=std::allocator<const std::string>
    17>          ]
    17>  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vector(680): note: see reference to class template instantiation 'std::_Vector_alloc<std::_Vec_base_types<_Ty,_Alloc>>' being compiled
    17>          with
    17>          [
    17>              _Ty=const std::string,
    17>              _Alloc=std::allocator<const std::string>
    17>          ]
    17>  InstanceBaseEffect.cpp(750): note: see reference to class template instantiation 'std::vector<const std::string,std::allocator<_Ty>>' being compiled
    17>          with
    17>          [
    17>              _Ty=const std::string
    17>          ]

    code

    26b7b2645181d2cbe69cccb543d41d26.png

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