Jump to content

blaxis

Active+ Member
  • Posts

    222
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by blaxis

  1. 1 hour ago, TMP4 said:

    Do you have the mount system renewal? Then your problem isn't realted to custome mount, but the mount system renewal.
    I quickly checked the code, that system does not mount you, it's only summoning it by default.

    char.cpp in void CHARACTER::CheckMount()

    mountSystem->Summon(mobVnum, mountItem, false);

    You can try to extend this with

    mountSystem->Mount(mobVnum, mountItem);

    Not tested. 

    I did what you said but it didn't work because the counter is not 0. So I made the following edit:

    	if(mountSystem->CountSummoned() == 0)
    	{
    		mountSystem->Summon(mobVnum, mountItem, false);
    	}
    	else if(mountSystem->CountSummoned() == 1)
    	{
    		mountSystem->Mount(mobVnum, mountItem);
    		return;
    	}

    I've tried this before. But a problem occurs:

    spacer.png

     

    I also tried to stop the code with "return" by trying this way, but nothing changes as in GIF.

     

    	if(mountSystem->CountSummoned() == 1)
    	{
    		mountSystem->Mount(mobVnum, mountItem);
    		return;
    	}
    	if(mountSystem->CountSummoned() == 0)
    	{
    		mountSystem->Summon(mobVnum, mountItem, false);
    	}

     

  2. 18 hours ago, TMP4 said:

    Why did you delete special_item_group.txt's 10300 group? Did the tutorial say that? 
    The costume mount system I use still using special_item_group.txt's 10300 to ride after warp / login.

    Yes, I did as I was told in the explanation files. Now I have manually added a group called 10300 and mounted 71128(lion).
    However, nothing changed. At first it was working thanks to the quest, but this time it was 2 mounts. That's why I deleted the quest. I'm trying to solve this problem by C++.

  3. Hello guys. When I teleport anywhere with the ring I get these errors:

    0108 15:09:32523 ::   File "uiPhaseCurtain.py", line 61, in OnUpdate
    
    0108 15:09:32523 ::   File "networkModule.py", line 148, in __ChangePhaseWindow
    
    0108 15:09:32524 ::   File "game.py", line 310, in Close
    
    0108 15:09:32524 ::   File "interfaceModule.py", line 539, in Close
    
    0108 15:09:32524 ::   File "uiOfflineShop.py", line 586, in Destroy
    
    0108 15:09:32525 ::   File "uiOfflineShop.py", line 844, in Close
    
    0108 15:09:32525 ::   File "interfaceModule.py", line 1988, in RefreshMarkInventoryBag
    
    0108 15:09:32525 ::   File "uiInventory.py", line 539, in RefreshBagSlotWindow
    
    0108 15:09:32526 :: AttributeError
    0108 15:09:32526 :: : 
    0108 15:09:32526 :: 'int' object has no attribute 'SetItemSlot'
    0108 15:09:32526 :: 
    
    0108 15:09:32527 :: Traceback (most recent call last):
    
    0108 15:09:32527 ::   File "uiMiniMap.py", line 406, in OnUpdate
    
    0108 15:09:32527 :: AttributeError
    0108 15:09:32528 :: : 
    0108 15:09:32528 :: 'int' object has no attribute 'SetText'
    0108 15:09:32528 :: 
    
    0108 15:09:32528 :: Traceback (most recent call last):
    
    0108 15:09:32528 ::   File "uiTaskBar.py", line 176, in OnUpdate
    
    0108 15:09:32528 :: AttributeError
    0108 15:09:32528 :: : 
    0108 15:09:32528 :: 'int' object has no attribute 'IsIn'
    0108 15:09:32528 :: 
    
    0108 15:09:32528 :: Traceback (most recent call last):
    
    0108 15:09:32528 ::   File "uiTaskBar.py", line 980, in OnUpdate
    
    0108 15:09:32528 ::   File "uiTaskBar.py", line 749, in RefreshQuickSlot
    
    0108 15:09:32529 :: TypeError
    0108 15:09:32529 :: : 
    0108 15:09:32529 :: 'int' object is not iterable
    0108 15:09:32529 :: 
    
    0108 15:09:32529 :: Traceback (most recent call last):
    
    0108 15:09:32529 ::   File "uiMiniMap.py", line 406, in OnUpdate
    
    0108 15:09:32529 :: AttributeError
    0108 15:09:32529 :: : 
    0108 15:09:32529 :: 'int' object has no attribute 'SetText'
    0108 15:09:32529 :: 
    
    0108 15:09:32529 :: Traceback (most recent call last):
    
    0108 15:09:32529 ::   File "uiTaskBar.py", line 176, in OnUpdate
    
    0108 15:09:32529 :: AttributeError
    0108 15:09:32529 :: : 
    0108 15:09:32529 :: 'int' object has no attribute 'IsIn'
    0108 15:09:32529 :: 
    
    0108 15:09:32530 :: Traceback (most recent call last):
    
    0108 15:09:32530 ::   File "uiTaskBar.py", line 982, in OnUpdate
    
    0108 15:09:32530 :: AttributeError
    0108 15:09:32530 :: : 
    0108 15:09:32530 :: 'int' object has no attribute 'IsIn'
    0108 15:09:32530 :: 
    
    0108 15:09:32530 :: Traceback (most recent call last):
    
    0108 15:09:32530 ::   File "uiMiniMap.py", line 406, in OnUpdate
    
    0108 15:09:32530 :: AttributeError
    0108 15:09:32530 :: : 
    0108 15:09:32530 :: 'int' object has no attribute 'SetText'
    0108 15:09:32530 :: 
    
    0108 15:09:32530 :: Traceback (most recent call last):
    
    0108 15:09:32530 ::   File "uiTaskBar.py", line 176, in OnUpdate
    
    0108 15:09:32531 :: AttributeError
    0108 15:09:32531 :: : 
    0108 15:09:32531 :: 'int' object has no attribute 'IsIn'
    0108 15:09:32531 :: 
    
    0108 15:09:32531 :: Traceback (most recent call last):
    
    0108 15:09:32531 ::   File "uiTaskBar.py", line 982, in OnUpdate
    
    0108 15:09:32531 :: AttributeError
    0108 15:09:32531 :: : 
    0108 15:09:32531 :: 'int' object has no attribute 'IsIn'
    0108 15:09:32531 :: 
    
    0108 15:09:32542 :: Traceback (most recent call last):
    
    0108 15:09:32542 ::   File "uiMiniMap.py", line 406, in OnUpdate
    
    0108 15:09:32543 :: AttributeError
    0108 15:09:32543 :: : 
    0108 15:09:32543 :: 'int' object has no attribute 'SetText'
    0108 15:09:32543 :: 
    
    0108 15:09:32543 :: Traceback (most recent call last):
    
    0108 15:09:32543 ::   File "uiTaskBar.py", line 176, in OnUpdate
    
    0108 15:09:32543 :: AttributeError
    0108 15:09:32543 :: : 
    0108 15:09:32543 :: 'int' object has no attribute 'IsIn'
    0108 15:09:32543 :: 
    
    0108 15:09:32543 :: Traceback (most recent call last):
    
    0108 15:09:32543 ::   File "uiTaskBar.py", line 982, in OnUpdate
    
    0108 15:09:32544 :: AttributeError
    0108 15:09:32544 :: : 
    0108 15:09:32544 :: 'int' object has no attribute 'IsIn'
    0108 15:09:32544 :: 

    But when I teleport with "/warp Nick" there is no problem. Help me please?

  4. Hello. I find items but cannot click on them. I've been struggling with this for days but couldn't figure it out. Anyone have knowledge on this?

     

    No syserr.

    spacer.png

     

    Code:

    		# search result screen code
     		self.icon_image = ui.MakeExpandedImageBox(self.slot_base_image, MAIN_PATH + "right_side/{}_slot.tga".format(itemSize), 0, 0)
    		self.icon_image.SAFE_SetStringEvent("MOUSE_OVER_IN", self.OnHover)
    		self.icon_image.SAFE_SetStringEvent("MOUSE_OVER_OUT", self.OnOut)
    		self.icon_image.SAFE_SetStringEvent("MOUSE_CLICK", self.OnMouseLeftButtonDown)
    		self.icon_image.SAFE_SetStringEvent("MOUSE_RCLICK", self.OnMouseRightButtonDown)
    		self.icon_image.SetWindowHorizontalAlignCenter()
    		self.icon_image.SetWindowVerticalAlignCenter()
            
            
            ##ui.py MakeExpandedImageBox():
            def MakeExpandedImageBox(parent, name, x, y):
              image = ExpandedImageBox()
              image.SetParent(parent)
              image.LoadImage(name)
              image.SetPosition(x, y)
              image.Show()
              return image
            

    class ImageBox:

    Spoiler
    class ImageBox(Window):
    	def __init__(self, layer = "UI"):
    		Window.__init__(self, layer)
    
    		self.name=""
    		self.argDict={}
    		self.eventDict={}
    		self.eventFunc = {"mouse_rclick" : None, "mouse_click" : None, "mouse_over_in" : None, "mouse_over_out" : None}
    		self.eventArgs = {"mouse_rclick" : None, "mouse_click" : None, "mouse_over_in" : None, "mouse_over_out" : None}
    
    	def __del__(self):
    		Window.__del__(self)
    		self.eventFunc = None
    		self.eventArgs = None
    
    	def RegisterWindow(self, layer):
    		self.hWnd = wndMgr.RegisterImageBox(self, layer)
    
    	def LoadImage(self, imageName):
    		self.name=imageName
    		wndMgr.LoadImage(self.hWnd, imageName)
    
    		if len(self.eventDict)!=0:
    			print "LOAD IMAGE", self, self.eventDict
    
    	def SetAlpha(self, alpha):
    		wndMgr.SetDiffuseColor(self.hWnd, 1.0, 1.0, 1.0, alpha)
    
    	def GetWidth(self):
    		return wndMgr.GetWidth(self.hWnd)
    
    	def GetHeight(self):
    		return wndMgr.GetHeight(self.hWnd)
    
    	def SAFE_SetStringEvent(self, event, func, *args):
    		self.eventDict[event]=(__mem_func__(func), args)
    
    	def SetEvent(self, func, *args):
    		result = self.eventFunc.has_key(args[0])
    		if result:
    			self.eventFunc[args[0]] = func
    			self.eventArgs[args[0]] = args
    		else:
    			print "[ERROR] ui.py SetEvent, Can`t Find has_key : %s" % args[0]
    
    
    	def OnMouseLeftButtonDown(self) :
    		if self.eventFunc["mouse_click"] :
    			apply(self.eventFunc["mouse_click"], self.eventArgs["mouse_click"])
    		else:
    			try:
    				apply(self.eventDict["MOUSE_CLICK"][0], self.eventDict["MOUSE_CLICK"][1])
    			except KeyError:
    				pass
    	
    	def OnMouseRightButtonDown(self) :
    		if self.eventFunc["mouse_rclick"] :
    			apply(self.eventFunc["mouse_rclick"], self.eventArgs["mouse_rclick"])
    		else:
    			try:
    				apply(self.eventDict["MOUSE_RCLICK"][0], self.eventDict["MOUSE_RCLICK"][1])
    			except KeyError:
    				pass
    
    	def OnMouseOverIn(self) :
    		if self.eventFunc["mouse_over_in"] :
    			apply(self.eventFunc["mouse_over_in"], self.eventArgs["mouse_over_in"])
    		else:
    			try:
    				apply(self.eventDict["MOUSE_OVER_IN"][0], self.eventDict["MOUSE_OVER_IN"][1])
    			except KeyError:
    				pass
    
    	def OnMouseOverOut(self) :
    		if self.eventFunc["mouse_over_out"] :
    			apply(self.eventFunc["mouse_over_out"], self.eventArgs["mouse_over_out"])
    		else :
    			try:
    				apply(self.eventDict["MOUSE_OVER_OUT"][0], self.eventDict["MOUSE_OVER_OUT"][1])
    			except KeyError:
    				pass
    
    	if app.ENABLE_PRIVATE_SHOP_SEARCH_SYSTEM:
    		def LeftRightReverse(self):
    			wndMgr.LeftRightReverseImageBox(self.hWnd)
    
    	def SetCoolTime(self, time, elapsedTime = 0.0):
    		wndMgr.SetCoolTimeImageBox(self.hWnd, time, elapsedTime)
    	
    	def IsInCoolTime(self):
    		return wndMgr.IsInCoolTime(self.hWnd)
    
    	def SetStartCoolTime(self, time):
    		wndMgr.SetStartCoolTimeImageBox(self.hWnd, time)

     

     

    class ExpandedImageBox:

    class ExpandedImageBox(ImageBox):
    	def __init__(self, layer = "UI"):
    		ImageBox.__init__(self, layer)
    
    	def __del__(self):
    		ImageBox.__del__(self)
    
    	def RegisterWindow(self, layer):
    		self.hWnd = wndMgr.RegisterExpandedImageBox(self, layer)
    
    	def SetScale(self, xScale, yScale):
    		wndMgr.SetScale(self.hWnd, xScale, yScale)
    
    	def SetOrigin(self, x, y):
    		wndMgr.SetOrigin(self.hWnd, x, y)
    
    	def SetRotation(self, rotation):
    		wndMgr.SetRotation(self.hWnd, rotation)
    
    	def SetRenderingMode(self, mode):
    		wndMgr.SetRenderingMode(self.hWnd, mode)
    
    	# [0.0, 1.0] ??? ??? ???? ??? ???.
    	def SetRenderingRect(self, left, top, right, bottom):
    		wndMgr.SetRenderingRect(self.hWnd, left, top, right, bottom)
    
    	def SetPercentage(self, curValue, maxValue):
    		if maxValue:
    			self.SetRenderingRect(0.0, 0.0, -1.0 + float(curValue) / float(maxValue), 0.0)
    		else:
    			self.SetRenderingRect(0.0, 0.0, 0.0, 0.0)
    
    	def GetWidth(self):
    		return wndMgr.GetWindowWidth(self.hWnd)
    
    	def GetHeight(self):
    		return wndMgr.GetWindowHeight(self.hWnd)
    
    	def SetCoolTime(self, time, elapsedTime = 0.0):
    		wndMgr.SetCoolTimeImageBox(self.hWnd, time, elapsedTime)
    	
    	def IsInCoolTime(self):
    		return wndMgr.IsInCoolTime(self.hWnd)
    
    	def SetStartCoolTime(self, time):
    		wndMgr.SetStartCoolTimeImageBox(self.hWnd, time)

     

  5. Thank you. However, it has a problem.
    The following part in EterBase/Stl.h:

    template <typename T>
    void DeleteListItem(std::list<T> * pList, T pItem)
    {
    	auto itor = pList->begin();
    	for (; itor != pList->end(); ++itor)
    	{
    		if (pItem == *itor)
    		{
    			if (1 == pList->size())
    			{
    				pList->clear();
    			}
    			else
    			{
    				pList->erase(itor);
    			}
    			break;
    		}
    	}
    }

    After doing this I get this error:

    spacer.png

  6. 1 hour ago, xTryhard said:

    it is the same with empty slots lock it on the server and send a callback to the client to update the slots

    you should have a basic understanding in C++ and the network if you dont you should not touch an inventory anyway you can destroy alot if you moddify only python

    What I am talking about has nothing to do with the server, and there is no situation that will create any security weakness. There is already WJ_TRADABLE_ICON system and it does what it should. I just want it to appear as the lock of the slots as an image.

  7. 1 hour ago, xTryhard said:

    if you want to lock an item i recommend to do this on the serverside if someone moddify your client he can still move it if you lock it only on the clientside this is really important when you are done with locking you send a packet back to the client and update the locked slot

    No I want to lock the slots with "SetCoverButton", not the item. (As in the picture)

    But for some reason it shows the slot where the item is in as locked. I just want to lock slots that are empty except for the item.

  8. 1 hour ago, xTryhard said:

    i dont know exactly what you want to do but :
    each item has a size of 1 even if they are 2 or 3 or whatever 
    for example lets take the inventory
    you have in a row 5 slots if you want to disable a sword with 2 size on top left corner you have to disable slot 0 and slot 0 +5

    if you have a inventory with 10 slots in a row it would be slot 0 and slot 0 +10 and so on

    for an item with 3 slots it is :
    slot 0
    slot 0 +5
    slot 0 +10

    The screen in the image is the offline shop screen.

    What I want to do is lock all slots if offline store is not in edit mode and item count is 0.

    Can you show me how to do it through the code I gave? The shop screen has 80 slots and the initial value is 0.

    But when I first open the shop, no matter how many conditions I put, the item on the store screen looks like this.

  9. Hi. I'm working on a small edit, but I couldn't solve the problem you see.

     

    spacer.png

    No syserr.

     

    My code:

    	def SlotKontrol(self):
    		if IsEditingOfflineShop():
    			return
            
    		getItemID = shop.GetOfflineShopItemID
    
    		for i in xrange(shop.OFFLINE_SHOP_SLOT_COUNT):
    			if (getItemID(i) <= 0): # only empty slot
    				self.itemSlotWindow.SetCoverButton(i, "d:/ymir work/ui/game/belt_inventory/slot_disabled.tga",\
    					"d:/ymir work/ui/game/belt_inventory/slot_disabled.tga",\
    					"d:/ymir work/ui/game/belt_inventory/slot_disabled.tga",\
    					"d:/ymir work/ui/game/belt_inventory/slot_disabled.tga", False, False)
    				self.itemSlotWindow.SetAlwaysRenderCoverButton(i)

     

  10. 17 hours ago, nazox said:

    I have great offline shop and i don't see this problem, i can edit shops, before and after stopping server etc, 

    Where you have this function and was version of Great are you using?

    i don't have this in my version.

    tell me to try help u.

    This code unlocks the market 5 seconds after editing is finished. When I remove the code, the market is not unlocked and cannot be viewed, even if the edit is finished.

  11. Hello, I'm not sure if it's just me, whatever you call this bug/problem, but it's very strange.

    Let me summarize the event as follows, computer and Virtual Box etc. When I first open and start the game, the offline shop's edit mode works without any problems. It continues to work smoothly in this way until I close the game and open it.

    But after this stage, for any reason, when I close the game with sh stop.sh and open it again with start.sh, this time the editing mode enters the bug and during the editing process, it says "The market has been updated, it will be active in 5 seconds" from the bottom as if the self-editing is finished. unlocking the market. (Meanwhile the edit mode is still on)

    Syserr vs nothing.
    I think it comes from this line in char.cpp:

     

    if(ch->GetShopEditMode() && get_global_time() - ch->GetShopEditModeTick() > 5)
        ch->SetShopEditMode(false);

    But I couldn't see a problem here, because it's the same everywhere. I think there is a problem with get_global_time() but unfortunately I couldn't solve it. Does anyone have any knowledge or experience the same?

     

    GREAT OFFLINE SHOP

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