Jump to content

.Rise

Inactive Member
  • Posts

    85
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by .Rise

  1. On 26. 1. 2018 at 2:50 PM, cubex33 said:

    Hello Communitiy,

     

    I have a problem with the private shop. If I want to open a shop passed this:

    5a6b31dc219d2_imshop.PNG.f940829541e6d7223148ed60f25ab4a4.PNG that's normal

    5a6b31fdb18ee_0Yang..PNG.0518c020adc8f5790fd003f55e1bdfd2.PNG  but here it indicates 0

    Can somebody help me please?

    Go to Binary Source and in PythonShop.cpp find function:

    PyObject * shopGetItemPrice(PyObject * poSelf, PyObject * poArgs)

    There replace this:

    return Py_BuildValue("i", c_pItemData->price);

    to:

    return Py_BuildValue("L", c_pItemData->price);

    and replace this:

    return Py_BuildValue("i", 0);

    to:

    return Py_BuildValue("L", 0);

     

    And you are done.

  2. 6 hours ago, Galet said:

    Hello,

    I may probably sound offtopic but overall I don't think locking player's ip is a good idea... In fact, if someone is using a dynamic ip, a mobile phone connection or if he is living in two different places or just if he moves he won't be able to connect anymore and it will probably be a source of issue more than a protection.

    I think you should give the option to enable or disable the check on the fly so that every player will be able to add this security willingly.

    Hi, yes. I made it to check if player is in table IP_login, it will check the player.

  3. Hello,

    I tried to add feature like "IP Login". It locks your IP and you can not login using different IP adress.

    I tried to write this code:

    	char ip;
    	char query[1024];
    	snprintf(query, sizeof(query),"SELECT ip FROM account.ip_login WHERE ip = '%s' AND login = '%s'", inet_ntoa(d->GetAddr().sin_addr), login);
    	std::auto_ptr<SQLMsg> execquery(DBManager::instance().DirectQuery(query));
    
    	MYSQL_ROW row = mysql_fetch_row(execquery->Get()->pSQLResult);
    	str_to_number(ip, row[0]);
    	
    	
    	if (ip != '0' && execquery->Get()->uiNumRows < 1)
    	{
    		LoginFailure(d, "IP_MATCH");
    		return;		
    	}

    But when I run it and try to login, core gets dumped.

    I have tried a lot of variations of this code.
    One time I could not login when there were not IP adress in table. (It was recognising IP address, but when I cleared table, I could not login due bad IP)

     

    Any solution, please? (I pay 10€ - after solution)
    Thanks.

  4. Hello,

    I have got problem while compiling.

    Quote

    char_horse.cpp: In member function 'virtual DWORD CHARACTER::GetMyHorseVnum()':
    char_horse.cpp:261: error: expected primary-expression before 'int'
    char_horse.cpp:261: error: expected `)' before 'int'
    char_horse.cpp:262: error: expected `)' before ';' token
    gmake: *** [Makefile:131: OBJDIR/char_horse.o] Error 1

    My Code:
     

    DWORD CHARACTER::GetMyHorseVnum()
    {
    	
    	int delta = 0;
    	
    	if((DWORD horse_looks = GetHorseAppearance()) > 0)
    		return horse_looks;
    	
    	if (GetGuild())
    	{
    		++delta;
    
    		if (GetGuild()->GetMasterPID() == GetPlayerID())
    			++delta;
    	}
    
    	return c_aHorseStat[GetHorseLevel()].iNPCRace + delta;
    }

    Can somebody help me? :(

    10 minutes ago, .Rise said:

    Hello,

    I have got problem while compiling.

    My Code:
     

    
    DWORD CHARACTER::GetMyHorseVnum()
    {
    	
    	int delta = 0;
    	
    	if((DWORD horse_looks = GetHorseAppearance()) > 0)
    		return horse_looks;
    	
    	if (GetGuild())
    	{
    		++delta;
    
    		if (GetGuild()->GetMasterPID() == GetPlayerID())
    			++delta;
    	}
    
    	return c_aHorseStat[GetHorseLevel()].iNPCRace + delta;
    }

    Can somebody help me? :(

    SOLVED by:
     

    DWORD CHARACTER::GetMyHorseVnum()
    {
    	
    	int delta = 0;
    	DWORD horse_looks;
    	
    	if((horse_looks = GetHorseAppearance()) > 0)
    		return horse_looks;
    	
    	if (GetGuild())
    	{
    		++delta;
    
    		if (GetGuild()->GetMasterPID() == GetPlayerID())
    			++delta;
    	}
    
    	return c_aHorseStat[GetHorseLevel()].iNPCRace + delta;
    }

     

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