Jump to content

Mali

Honorable Member
  • Posts

    918
  • Joined

  • Days Won

    877
  • Feedback

    100%

Posts posted by Mali

  1. 13 minutes ago, Tasho said:
    
    # import constInfo - at the beginning of the file
    def GetChName(percentage):
    	name = constInfo.loadingname
    	return name[:(len(name) * percentage) / 100]

    And please stop to use turkish name for variables when you share something, looks very creepy..

    return name[:(len(name) * percentage) / 100]

    Bro please stop this I know this easy way but i want to show every way and turkish variables, everyone can change the names. I m turkish and this is my choice :)

    • Love 1
  2. M2 Download Center

    This is the hidden content, please
    ( Internal )

     

    Spoiler

     

    Find in locale/xx/ui/loadingwindow.py:

    				{
    					"name" : "FullGage",
    					"type" : "expanded_image",
    
    					"x" : 40,
    					"y" : 25,
    
    					"image" : uiScriptLocale.LOCALE_UISCRIPT_PATH + "loading/gauge_full.dds",
    				},

    Add this;

    				{
                                          "name" : "LoadingName_Text",
                                          "type" : "text",
    
                                          "x" : 190,
                                          "y" : -8,
    
                                          "text" : "", 
                                          "vertical_align" : "center",                    
                                    },

    Add in constInfo.py;

    loadingname = ""

    Find in root/introloading.py:

    			self.loadingGage=self.GetChild("FullGage")

    Add this;

    			self.loadingName_txt=self.GetChild("LoadingName_Text")

    Find:

    	def __SetProgress(self, p):

    Change like this;

    	def GetChName(self, p):
    		import constInfo
    		text = constInfo.loadingname
    		uzunluk = len(text)
    		asd = uzunluk*p/100
    		return text[0:asd]
    	
    	def __SetProgress(self, p):
    		if self.loadingGage:
    			self.loadingGage.SetPercentage(2+98*p/100, 100)
    			name = self.GetChName(2+98*p/100)
    			self.loadingName_txt.SetText(name)

    Last one if you use the official pack introselect(unpacked 2015 & 2018 packs), use this:

    Spoiler

    Find in new_introselect.py:

    
    
    
    			playTime = net.GetAccountCharacterSlotDataInteger(chrSlot, net.ACCOUNT_CHARACTER_SLOT_PLAYTIME)

    Add this;

    
    
    
    			constInfo.loadingname = net.GetAccountCharacterSlotDataString(chrSlot, net.ACCOUNT_CHARACTER_SLOT_NAME)

     

    If you use the fake official introselect or old introselet, use this:

    Spoiler

    Find in introselect.py:

    
    
    
    				player.SetPlayTime(playTime)

    Add this;

    
    
    
    				constInfo.loadingname = net.GetAccountCharacterSlotDataString(self.slot, net.ACCOUNT_CHARACTER_SLOT_NAME)

     

    2852191.jpg

    • Metin2 Dev 5
    • Not Good 1
    • Good 4
    • Love 6
  3. M2 Download Center

    This is the hidden content, please
    ( Internal )

    //Find in PythonNetworkStreamModule.cpp:

    PyObject* netGetBettingGuildWarValue(PyObject* poSelf, PyObject* poArgs)
    {
    	char* szName;
    	if (!PyTuple_GetString(poArgs, 0, &szName))
    		return Py_BuildException();
    
    	
    	CPythonNetworkStream& rkNetStream=CPythonNetworkStream::Instance();
    	return Py_BuildValue("i", rkNetStream.EXPORT_GetBettingGuildWarValue(szName));
    }

    ///Add;

    static const char* ServerIPVName[4][2] = {
    	{"192.168.0.100", 	"BETA-1"}, 
    	{"76.342.12.12", 	"BETA-2"}, 
    	{"145.12.231.12", 	"BETA-3"}, 
    	{"192.31.52.69", 	"BETA-4"}
    };
    static unsigned int ServerPORT[] = {{13000},{1600},{1900},{21000},{11002},{13000}};
    PyObject* netGetServer_IPNAME(PyObject* poSelf, PyObject* poArgs)
    {
    	return Py_BuildValue("ssssssss", 
    		ServerIPVName[0][0], ServerIPVName[0][1],
    		ServerIPVName[1][0], ServerIPVName[1][1],
    		ServerIPVName[2][0], ServerIPVName[2][1],
    		ServerIPVName[3][0], ServerIPVName[3][1]
    	);
    }
    PyObject* netGetServer_PORT(PyObject* poSelf, PyObject* poArgs)
    {
    	return Py_BuildValue("iiiiii", ServerPORT[0],ServerPORT[1],ServerPORT[2],ServerPORT[3],ServerPORT[4],ServerPORT[5]);
    }

    //Find:

    		{ "SendOnClickPacket",					netOnClickPacket,						METH_VARARGS },

    ///Add;

    		{ "GetServer_IPNAME",					netGetServer_IPNAME,					METH_VARARGS },
    		{ "GetServer_PORT",						netGetServer_PORT,						METH_VARARGS },

    Example ServerInfo.py

    import net
    (sv1_ip, sv1_name, sv2_ip, sv2_name, sv3_ip, sv3_name, sv4_ip, sv4_name) = net.GetServer_IPNAME()
    (ch1_port, ch2_port, ch3_port, ch4_port, auth_port, mark_port) = net.GetServer_PORT()
    
    CH_1_NAME	= "|cFF00FFFF|hCH1"
    CH_2_NAME	= "|cFF00FFFF|hCH2"
    CH_3_NAME	= "|cFF00FFFF|hCH3"
    CH_4_NAME	= "|cFF00FFFF|hCH4"
    
    STATE_NONE = "|cFFFF0000|hKAPALI"
    	
    STATE_DICT = {
    	0 : "|cFFFF0000|hKAPALI",
    	1 : "|cff00ff00|hNORMAL",
    	2 : "|cff00ff00|hYOGUN",
    	3 : "|cff00ff00|hDOLU"
    }
    
    SERVER01_CHANNEL_DICT = {
    	1:{"key":11,"name":CH_1_NAME,"ip":sv1_ip,"tcp_port":ch1_port,"udp_port":ch1_port,"state":STATE_NONE,},
    	2:{"key":12,"name":CH_2_NAME,"ip":sv1_ip,"tcp_port":ch2_port,"udp_port":ch2_port,"state":STATE_NONE,},
    	3:{"key":13,"name":CH_3_NAME,"ip":sv1_ip,"tcp_port":ch3_port,"udp_port":ch3_port,"state":STATE_NONE,},
    	4:{"key":14,"name":CH_4_NAME,"ip":sv1_ip,"tcp_port":ch4_port,"udp_port":ch4_port,"state":STATE_NONE,},
    }
    
    SERVER02_CHANNEL_DICT = {
    	1:{"key":11,"name":CH_1_NAME,"ip":sv2_ip,"tcp_port":ch1_port,"udp_port":ch1_port,"state":STATE_NONE,},
    	2:{"key":12,"name":CH_2_NAME,"ip":sv2_ip,"tcp_port":ch2_port,"udp_port":ch2_port,"state":STATE_NONE,},
    	3:{"key":13,"name":CH_3_NAME,"ip":sv2_ip,"tcp_port":ch3_port,"udp_port":ch3_port,"state":STATE_NONE,},
    	4:{"key":14,"name":CH_4_NAME,"ip":sv2_ip,"tcp_port":ch4_port,"udp_port":ch4_port,"state":STATE_NONE,},
    }
    
    SERVER03_CHANNEL_DICT = {
    	1:{"key":11,"name":CH_1_NAME,"ip":sv3_ip,"tcp_port":ch1_port,"udp_port":ch1_port,"state":STATE_NONE,},
    	2:{"key":12,"name":CH_2_NAME,"ip":sv3_ip,"tcp_port":ch2_port,"udp_port":ch2_port,"state":STATE_NONE,},
    	3:{"key":13,"name":CH_3_NAME,"ip":sv3_ip,"tcp_port":ch3_port,"udp_port":ch3_port,"state":STATE_NONE,},
    	4:{"key":14,"name":CH_4_NAME,"ip":sv3_ip,"tcp_port":ch4_port,"udp_port":ch4_port,"state":STATE_NONE,},
    }
    
    SERVER04_CHANNEL_DICT = {
    	1:{"key":11,"name":CH_1_NAME,"ip":sv4_ip,"tcp_port":ch1_port,"udp_port":ch1_port,"state":STATE_NONE,},
    	2:{"key":12,"name":CH_2_NAME,"ip":sv4_ip,"tcp_port":ch2_port,"udp_port":ch2_port,"state":STATE_NONE,},
    	3:{"key":13,"name":CH_3_NAME,"ip":sv4_ip,"tcp_port":ch3_port,"udp_port":ch3_port,"state":STATE_NONE,},
    	4:{"key":14,"name":CH_4_NAME,"ip":sv4_ip,"tcp_port":ch4_port,"udp_port":ch4_port,"state":STATE_NONE,},
    }
    
    REGION_NAME_DICT = {
    	0 : "",	
    }
    
    REGION_AUTH_SERVER_DICT = {
    	0 : {
    		1 : { "ip":sv1_ip, "port":auth_port, },
    		2 : { "ip":sv2_ip, "port":auth_port, },
    		3 : { "ip":sv3_ip, "port":auth_port, },
    		4 : { "ip":sv4_ip, "port":auth_port, },
    	}		
    }
    
    REGION_DICT = {
    	0 : {
    		1 : { "name" :sv1_name, "channel" : SERVER01_CHANNEL_DICT, },
    		2 : { "name" :sv2_name, "channel" : SERVER02_CHANNEL_DICT, },
    		3 : { "name" :sv3_name, "channel" : SERVER03_CHANNEL_DICT, },
    		4 : { "name" :sv4_name, "channel" : SERVER04_CHANNEL_DICT, },
    	},
    }
    
    MARKADDR_DICT = {
    	10 : { "ip" : sv1_ip, "tcp_port" : mark_port, "mark" : "10.tga", "symbol_path" : "10", },
    	20 : { "ip" : sv2_ip, "tcp_port" : mark_port, "mark" : "20.tga", "symbol_path" : "20", },
    	30 : { "ip" : sv3_ip, "tcp_port" : mark_port, "mark" : "30.tga", "symbol_path" : "30", },
    	40 : { "ip" : sv4_ip, "tcp_port" : mark_port, "mark" : "40.tga", "symbol_path" : "40", },
    }

     

    • Metin2 Dev 19
    • Dislove 1
    • Not Good 1
    • Confused 1
    • Good 6
    • Love 18
  4. int x, y;

    x= abs(-11);

    y = abs(11);

    x==y

    17 minutes ago, Tasho said:

    You should think better and read again.

    0D73aab.jpg

    
    #include <iostream>
    #include <algorithm>
    using namespace std;
    
    typedef int INT;
    typedef unsigned int UINT;
    
    INT GetGold()
    {
        return 25000;   
    }
    
    void PointChange(INT iAmount)
    {
        UINT nTotalMoney = GetGold() + iAmount;
        printf("GetGold: %d\n", GetGold());
        printf("amount: %d\n", iAmount);
        printf("nTotalMoney: %d", nTotalMoney);
    }
    
    int main()
    {
        INT val;
        cout << "Please enter an integer amount of gold: ";
        cin >> val;
        PointChange(val);
    }

     

    I love getline(cin, val) 

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