Jump to content

Tasho

Banned
  • Posts

    358
  • Joined

  • Last visited

  • Days Won

    11
  • Feedback

    0%

Posts posted by Tasho

  1. 1 hour ago, Nevisor said:

    That's my way I did year ago (same results) B)

    
            for i in xrange(len(self.NameList)):
                self.SelectBtnFaceList[i].AddFlag("not_pick")
                self.SelectBtnNameList[i].AddFlag("not_pick")

     

    That's not related with what he request.

    2 hours ago, Fleon said:
    
    eventlist = [ "mouse_click", "mouse_over_in", "mouse_over_out", "mouse_click", "mouse_over_in", "mouse_over_out"]
    
    for element in eventlist:
    	for i in xrange(5):
    		self.SelectBtnNameList[i].SetEvent(ui.__mem_func__(self.EventProgress), element, i)

     

    Doesn't looks exactly with what we need, and your loop will be very bad, repeat it x30 times for each one, and don't to the same. (http://tpcg.io/C4Vv2s)

    • That's like how should be.
    # No comprehension
    for eventKey, (srcNameList, srcFaceList) in enumerate(zip(self.SelectBtnNameList, self.SelectBtnFaceList)):
    	for eventName in ('mouse_click', 'mouse_over_in', 'mouse_over_out'):
    		(srcNameList.SetEvent(eventKey, eventName), srcFaceList.SetEvent(eventKey, eventName))
    		
    # Comprehension
    [(srcNameList.SetEvent(eventKey, eventName), srcFaceList.SetEvent(eventKey, eventName)) for eventKey, (srcNameList, srcFaceList) in enumerate(zip(self.SelectBtnNameList, self.SelectBtnFaceList)) for eventName in ('mouse_click', 'mouse_over_in', 'mouse_over_out')]

    Thanks @VegaS

    keLpeab.jpg

    PS: Let's don't make another replies about that.

    Let's go on https://metin2dev.org/board/index.php?/forum/34-offtopic/ and make one topic and we can talk 24/7 about that. :lol:

    • Metin2 Dev 1
  2. 7 hours ago, Fire said:

    I can write it better, more syntax are very big and you can write all in one string

    Syntax

    String

    SYNTAX != STRING

    I'm sure you are a better than gf developers...

    tumblr_lozdsb0bKx1qbnd1c.gif

    • Metin2 Dev 1
    • Angry 1
    • Sad 2
    • Confused 1
  3. First one, thanks for release.
    Here are some tips wich you can use on future.

    total_elements = sum(1 for line in open('rename_log'))
    • total_elements = len(open('rename_log').readlines())
    element.replace(str.upper(extension), str.lower(extension))
    • element.replace(extension.upper(), extension.lower())
    print("Total renamed files: {0}".format(str(total_elements)))
    • That's totally a bit unfriendly, the str.format() detected automatically the data type of argument, you don't have to convert it as string.
    • Also you don't need to enumerate your arguments as {0} {1} etc, you can do that only if you have more arguments and you get stuck.
    • Should look like:
    •         print("Total renamed files: {}".format(total_elements))
    return(extension)

    Why you return something (outside of loop) if you don't use the result?

            global extension
            global lenght

    Why you use global variables when you can declare them inside of your class FileManager?

    class FileManager:
        def __init__(self):
            self.length = 3 # Set here the size of the extension, default 3.
            self.extension = str()
    
    	def Main(self):
    		pass
    	def GetExtension(self):
    		pass
    	def GetLogFile(self):
    		pass
    	def RenameFile(self):
    		pass
    		
    Instance = FileManager()
    Instance.Main()

     

    Good luck on future and i hope you will use these small tips.

    • Love 3
  4. On 2/2/2018 at 8:58 PM, Fire said:

    Very ugly code in this script ahahaha

    660c1983df380ef11c352d3458c30676--bob-dy

    Can you code better then them? I'm sure you don't have 0.5% (percent) from them knowledges in programming.
    You understand how it's work a def function, for, while, if, else, elif statement and know to declare a list etc and you think you are a guru on python? and you can criticize developers who have over 10 years on programming?

    • If you was a man who have some years experience in programming you never criticize guys like them, because know how it's work that domain, you can refactor on every day your code, and all time exist "better then previous version", you think they do all efforts to make the code full organized & clean & pro & perfectly? No employee will do that, after a lot a years on domain, you don't care too much how code looks or how much optimized is it, if is working well. Especially if they are paid with a low sallary, they will not do the best.


    If i put you to explain some functions of them code you get mind fuck, because you are at a very low level.
    A lot a people talk about "shit code", and most of them (98%) doesn't know how to use a list/dict comprehension or a map, filter, lambadas, generators on python.
    Also if you think you are more good then them, then rewrite the game as you like it, or do your own MMORPG. < sarcasm level 999

    PS: I just saying my point of view, don't need to approve or disapprove it.\
    Sorry for the english level 999.

    On 2/2/2018 at 11:01 PM, Mali61 said:

    wtf?

    Was a joke.

    • Love 11
  5. Just stop spamming forum with your children acts.
    If you have something to share, do it, don't make a lot a reply without sense on this category, isn't off-topic.

    I_don_t_hate_you_20140221_Idonthateyou.j


    PS: Same guy like you was banned multiples time here (romanian guy), with fake accounts, he say he have "x10 years experience on programming" (and on reality he just do copy-paste of things and show just texts & photos), stole identity of anothers users of stackoverflow etc, i'm sure you are him, but i don't care, have fun with your new fake account. B)

     

    • Love 1
  6. //@../game/questlua_pc.cpp
    //1.)Search for:
    	int pc_warp_exit(lua_State * L)
    	{
    		CQuestManager::instance().GetCurrentCharacterPtr()->ExitToSavedLocation();
    		return 0;
    	}
    //1.)Add after:
    	int pc_equip(lua_State* L)
    	{
    		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
    		LPITEM item = ch->GetInventoryItem(lua_tonumber(L, 1));
    		if (item)
    			ch->EquipItem(item);
    		return 0;
    	}
    
    	int pc_unequip(lua_State* L)
    	{
    		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
    		LPITEM item = ch->GetWear(lua_tonumber(L, 1));
    		if (item)
    			ch->UnequipItem(item);
    		return 0;
    	}
    
    //2.)Search for:
    			{ "get_race",   pc_get_race         },
    //2.)Add after:
    			{ "equip",      pc_equip            },
    			{ "unequip",    pc_unequip          },
    			
    //quest_function:
    	pc.equip
    	pc.unequip
    
    //quest:
    	pc.equip(item.get_cell())
    	pc.unequip(WEAR_PET)

     

    • Love 1
  7. //@questlib.lua
    function pet.is_equipped()
    	--[[
    		pc.get_wear(bCell);
      	Returns: 
    		[1] lua_pushnumber: The equipped item vnum of the specific [cell].
    		[1] lua_pushnil: nil
    	--]]
    
    	local WEAR_PET = 27 -- ../common/length.h / enum EWearPositions [0 ~ WEAR_MAX - 1] 
    	return pc.get_wear(WEAR_PET) ~= nil; -- Returns: True or False
    end
    
    //@Quest:
    if not pet.is_equipped() then
        say('Pet isn't equipped.')
        return
    end

     

    • Love 1
  8. I don't really understand why you should bumping all your topics, that result you suffer for attention. :ph34r:

    If someone want 'your systems' they can easily find on that category, because it was max on page 2/3, is recently, isn't from 5 years ago to be on last page to need up's etc.

    PS: No hate, Happy New Year, aswell.

  9. 22 minutes ago, Darknetto said:

    Cython src  and mainline w19 are public......

    After 4 years you come to say that shit?
    Posted June 24,
    2014 - Today: January 05, 2018.
    Thanks Senpai.

    tumblr_lozdsb0bKx1qbnd1c.gif

    • Love 3
  10. 	#ifdef __NEW_EVENT_HANDLER__
    		CEventFunctionHandler EventFunctionHandler;
    	#endif

    That doesn't need to exist, but if someone really want to use:

    Search for:

    • CEventFunctionHandler::instance().Process();

    Replace with:

    • EventFunctionHandler.Process();

    Thanks for release, i like that structure, keep up the good work.

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