Jump to content

flygun

Former Staff
  • Posts

    729
  • Joined

  • Last visited

  • Days Won

    7
  • Feedback

    0%

Posts posted by flygun

  1. Backup your source code with this script ... my source code include(client, server, tools, extern) which there size exactly = 4.69 GB (5,044,632,548 bytes)

    after compressing size of archive = 32.5 MB (34,117,184 bytes)

    but you must first install WinRar archiver  which you can download it from here

    http://filehippo.com/download_winrar_32/

    or from here

    http://www.softpedia.com/get/Compression-tools/WinRAR.shtml#download

    import os , shutil, sys
    from os import path , system
    ignored = [".sdf",".opensdf", "",".pch", ".vcproj", ".tlog", ".log", ".exe", ".Release",
    ".obj", ".sbr", ".bak", ".ipch", ".pdb", ".cod", ".lastbuildstate", ".bsc" ,".res", ".idb"
    ,".cache", ".htm", ".cmd"]
    ignoreddirs = ["MfcDebug", "Release", "Debug","ipch","bin","obj", "Distribute", ".tlog", ".*cmd"]
    bCMD = "temp.cmd"
    i = 0
    def comperess_writer(foldername):
    	if not os.listdir(foldername): 
    		print("Error: %s folder is empty \nsystem will close the script now"%(foldername))
    		system("pause")# this is an optinal command if you want to see what is going on
    		return
    	x = open(bCMD, 'w')
    	x.write('set path="C:\Program Files\WinRAR\";%path% c:/Program Files/WinRAR/\n')
    	x.write('Rar.exe a -ac -r -m5 -esh -mc12t -ep1 ')
    	i = 0
    	while i <= (len(ignoreddirs) - 1):
    		x.write(' -x\*%s\*'%(ignoreddirs[i]))
    		i += 1
    	x.write(" \"Backup\" ")
    	chkdict = {}
    	setdef = chkdict.setdefault
    	for root, dirs, files in os.walk(foldername):
    		for file in files:
    			ext = path.splitext(file)[1]
    			if ext in chkdict or ext in ignored:
    				continue
    			print("%s" % setdef(ext,ext))
    			x.write(foldername + "\*%s " % setdef(ext,ext))
    	x.write(" *makefile *Depend *readme *tags\npause")
    	x.close()
    	type = yes_no("Do you want to backup now?", "yes")
    	if type == True:
    		comperess()
    	exit()
    def comperess():
    	os.system(bCMD)
    	os.remove(bCMD)
    	
    def yes_no(question, default="yes"):
    	valid = {"yes": True, "y": True, "ye": True, "no": False, "n": False}
    	if default is None:
    		prompt = " [y/n] "
    	elif default == "yes":
    		prompt = " [Y/n] "
    	elif default == "no":
    		prompt = " [y/N] "
    	else:
    		raise ValueError("invalid default answer: '%s'" % default)
    
    	
    	sys.stdout.write(question + prompt)
    	choice = raw_input().lower()
    	if default is not None and choice == '':
    		return valid[default]
    	if choice in valid:
    		return valid[choice]
    	else:
    		sys.stdout.write("Please respond with 'yes' or 'no' ", "(or 'y' or 'n').\n")
    
    def main():
    	global i
    	if i == 0:
    		print ("Hello This is Auto Backup program\nfor Metin2 C++ source code")
    		print ("type the number of the command you want to execute")
    	print ("1:Comperess\n2:Exit")
    	type = raw_input("Type Number:")
    	type = int(type)
    	if type == 1:
    		folder = raw_input("Folder Name:")
    		if not os.path.isdir(folder):
    			exit()
    		comperess_writer(folder)
    	if type == 2:
    		exit()
    	else:
    		i +=1
    		os.system("cls")
    		print ("Please Type 1 or 2")
    		main()
    		
    main()

    #updated --> fixed the archiving problem "archiving very folder in the current folder"

    #updated --> more compressing plus cleaning attributes after finishing

    • Metin2 Dev 3
    • Good 1
    • Love 4
  2. oh

    and how should the game save the item and mob protos ??

     

    plus ... problem 2 is fixed ... it was python code problem :/

    it's stored in the memory and refreshed with a "reload p" or a restart.

    the db mirroring is useless as @ds_aim said.

     

    and how should the game save the item and mob protos ??

     

    plus ... problem 2 is fixed ... it was python code problem :/

    it's stored in the memory and refreshed with a "reload p" or a restart.

    the db mirroring is useless as @ds_aim said.

    It's not useless!

     

    But as I said, it is basically useless.
    I have not removed it, it is helpful to me when I use debug mode, and development.

    aha ok... i think i will leave it there until i make the source a bit more stable  (as you said for debug and development uses)

    but it's not my problem at the moment the specular is my problem now

    ItemTable x MobTable  from where read? TXT ? SQL ?

    what ?? you mean my server reads TXT or SQL .... i this is what are you asking i'm using TXT

  3. oh

    and how should the game save the item and mob protos ??

     

    plus ... problem 2 is fixed ... it was python code problem :/

    it's stored in the memory and refreshed with a "reload p" or a restart.

    the db mirroring is useless as @ds_aim said.

    and how should the game save the item and mob protos ??

     

    plus ... problem 2 is fixed ... it was python code problem :/

    it's stored in the memory and refreshed with a "reload p" or a restart.

    the db mirroring is useless as @ds_aim said.

    It's not useless!

     

    But as I said, it is basically useless.
    I have not removed it, it is helpful to me when I use debug mode, and development.

    aha ok... i think i will leave it there until i make the source a bit more stable  (as you said for debug and development uses)

    but it's not my problem at the moment the specular is my problem now

  4. One question,when i'm trying to extract etc,pc2 or others files it doesn't work it shows me only the name of the files but when i'm extracting root/locale/uiscript it's working fine why?

    because it goes to d:ymir work ^^

  5.  

    This paste has been removed!

    :(

    mLHSWOX.png

    Btw, the specular behavior never changed. It's for this: (alpha blending)

     

     

    The refine effect is detected from item vnum % 10 (e.g. 309 % 10 = 9) + socket_pct (0-3).

    It's quite a mess because if you want to show the "red effect" in a weapon with vnum e.g. 403, you have to set the socket_pct as "9".

     

     

     

    vnum socket_pct
    xx9 3
    xx8 4
    xx7 5
    xx6 6
    xx5 7
    xx4 8
    xx3 9
    xx2 10
    xx1 11
    xx0 12

    I'm serious. ^ This (ymir) system is pretty fucked up.

    can you tell me where is this function ... and is it necessary to make a Specular function in both server and client ?? 

  6. net.SendM2DevPacket(53

    Push ...

    (I'm just getting disconnected when I press the test button.) My function (53 is a test):

    net.SendM2DevPacket(53)


    I have an error in the sysser when my crash client ...:

    SYSERR: Jun 24 21:11:11.804832 :: Process: UNKNOWN HEADER: 44, LAST HEADER: 0(0), REMAIN BYTES: 6, fd: 25

    Header 44: Header CG Pong
    Regarding the condition:

    bool CPythonNetworkStream::SendMetin2DevOrgPacket(int data)
    {
        TPacketCGMetin2DevOrg M2DevPacket;
        M2DevPacket.byHeader = HEADER_CG_METIN2DEVORG;
        M2DevPacket.data = data;

        if (!Send(sizeof(M2DevPacket), &M2DevPacket))
            return false;

        LogBox("test");
        return SendSequence();
    }

    The fonction return SendSequence and not false !
    I did a test to see if the packet is received by the game:

            case HEADER_CG_METIN2DEVORG:
                sys_log(0, "TEST");
                Metin2DevReceivePacket(ch, c_pData);
                break;

    But I have nothing in the syslog.
    The packet is not received.

    I don't understand at all what the problem is ....

     

    replace this net.SendM2DevPacket(53) with this

    net.SendM2DevPacket(self,53)

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