Jump to content
  • 0

How to check if the character are in Autotrade with mysql


Tales

Question


  • Group:  Members
  • Topic Count:  163
  • Topics Per Day:  0.04
  • Content Count:  319
  • Reputation:   8
  • Joined:  02/05/12
  • Last Seen:  

How? How to check if the character are in Autotrade with mysql

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  164
  • Reputation:   55
  • Joined:  11/25/11
  • Last Seen:  

Check if the character ID has 'autotrade' = 1 in table 'vendings'

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  163
  • Topics Per Day:  0.04
  • Content Count:  319
  • Reputation:   8
  • Joined:  02/05/12
  • Last Seen:  

It's not working...
This script aways show my Online Character and my Autotrade character.


dali,133,80,5 script TesteAutoTr 677,{




  .@query_result = query_sql("SELECT login.account_id FROM login LEFT JOIN `char` ON login.account_id=`char`.account_id WHERE login.last_ip=(SELECT last_ip FROM login WHERE account_id="+getcharid(3)+") AND `char`.online=1 AND login.account_id NOT IN (SELECT account_id FROM vendings WHERE account_id="+getcharid(3)+")", .@account_id);
    
    if ( .@query_result > 1 && compare( $whiteList$,getcharid(3) +"" ) == 0 ) {
        mes "[AVISO]";
        mes "Você não poderá acessar as funções deste npc enquanto houverem mais de 1 conta conectada no mesmo IP. Foram encontrados "+ .@query_result +" registros.";
        end;
    }
    else {
     mes "Funcinou?";
     close;
    }




}
Edited by Tales
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  163
  • Topics Per Day:  0.04
  • Content Count:  319
  • Reputation:   8
  • Joined:  02/05/12
  • Last Seen:  

Bump?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...