Jump to content

Traceur3RUN

Inactive Member
  • Posts

    408
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Posts posted by Traceur3RUN

  1. 21 minut temu, metin2team napisał:

    check your syserr/syslog because it has something to do with your player.quest table either crashed or corrupted.

    sysser is clean

     

    syslog when i click on npc i got this

     

    Oct 25 11:28:52 :: OnClick Stable Man[vnum 20349 ServerUniqueID 14621, pid 0] by Tester

     

    maybe mainline_released have bug with this function in source?

     

    i can without problem use it 

    if pc.getqf("test") == 0 then

    --todo

    elseif pc.getqf("test") == 1 then

    --todo

    end

    but i can't use it here:

    when 1231.chat."test" with pc.getqf("test") == 0 begin

    because always return null

     

    i think i can fix syslog return pid 0

    by change this:

    sys_log(0, "OnClick %s[vnum %d ServerUniqueID %d, pid %d] by %s", GetName(), GetRaceNum(), vid, GetPlayerID(), pkChrCauser->GetName());
    
    change to this:
    
    sys_log(0, "OnClick %s[vnum %d ServerUniqueID %d, pid %d] by %s", GetName(), GetRaceNum(), vid, ch->GetPlayerID(), pkChrCauser->GetName());

    but this is nothing to quest function.

  2. 3 minuty temu, Shogun napisał:

    It's cached, if you want to change it on the database, you will have to log off the character first, and possibly wait some minutes as well. Or restart the server.

    you wrong understand me...

    1.click on test chat-> it send to database "test" value 1.

    and dissapear chat."test"

    but if you change character or logout or server restart it will be always showed because allways pc.getqf("test") will return null (0) but on database you have 1

  3. 5 minut temu, ragem0re napisał:

    Just look for an existing part in your source code.

    so you mean like this:

     

    	int pc_set_test(lua_State* L){
    		char szQuery[QUERY_MAX_LEN];
    
    		if(!lua_isstring(L,1)){
    			return 0;
    		}
    
    		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
    
    		snprintf(szQuery,sizeof(szQuery),"update account%s set test = '%s' where id = '%d'",get_table_postfix(),lua_tostring(L,1), ch->GetAID()); //ch->GetAID() = get account id
    		std::auto_ptr<SQLMsg> pmsg(DBManager::instance().DirectQuery(szQuery));
    
    		if(pmsg->Get()->uiInsertID == 0){
    			return 0;
    		}
    
    		return 1;
    	}

    is correct?

    i think this is 

    LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); // = current character playing

     

    btw, how about use mysql_query in lua?

  4. Hello, i ask now how i can use MySQL

    insert/update/select from c++ and lua.

    can you post example how i can use it?

     

    i ask there for example how i can send packet from

    game->python

    game->client binary

    game->client binary->python

    client binary->python

    client binary->game

    client binary->game and python

    get values like from MySQL like[player->gold] and send it to client and receive

    binary/and or python

    if (gold >= 0){

    //todo

    }

    can someone make a tutorial or show under example code?

    i think it will be helpfull not only for me but for all people to understand how it work. thanks!

  5. Dnia 16.10.2018 o 11:44, .T4Ump napisał:

    If you have problem pm me, im author all of them tutorials yang limit, because i shared it.

    guy, don't use Bigint 255 just Bigint 20

    long long = 9,223,372,036,854,775,807 = 19 lenght

    unsgned long long = 18,446,744,073,709,551,615 = 20 lenght

  6. Hello, i do all the same as from this topic : 

    but when i try run metin2client i got this error:

    Screen-Shot-10-16-18-at-02-31-PM.png

    i rename locale.py to localeinfo.py 

    and change import locale to import localeinfo

    but now i got this:

    Screen-Shot-10-16-18-at-03-20-PM.png

    when i change all locale to localeinfo and locale. to localeinfo.

    i got this.

    Screen-Shot-10-16-18-at-03-40-PM.png

    can someone help to fix this issue? or give part of compatible root with python 2.7

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