Getting information from MYSQL, zTeam season 6 sources.

Results 1 to 15 of 15
  1. #1
    Member BlackPaper is offline
    MemberRank
    Jun 2016 Join Date
    75Posts

    Getting information from MYSQL, zTeam season 6 sources.

    I want to get information/update information in MySQL through my source. For example, I want to create a VIP system, so I've made a new column in MySQL Character table named "vip".
    Now I've written a /setvip command for GMs, but I don't know how do update someone's VIP column to 1, and I don't know how to check if he isn't a VIP already as well.
    Can anyone help?
    Thanks in advance :)


  2. #2
    Member BlackPaper is offline
    MemberRank
    Jun 2016 Join Date
    75Posts

    Re: Getting information from MYSQL, zTeam season 6 sources.

    Anyone? @RevolGaming I saw that you were trying to do something similar, have you managed to do it?
    Nobody knows?
    I've tried to understand MySQL connectors for c++ but didn't quite understand how to use them.

  3. #3
    Account Upgraded | Title Enabled! ftewegw1 is offline
    MemberRank
    Sep 2012 Join Date
    292Posts

    Re: Getting information from MYSQL, zTeam season 6 sources.

    first off, you mean mssql and not mysql
    now, to do what you want to you have to code it into the dataserver and not the gameserver cause gameserver doesn't have an established connection to the db
    so either do it through dataserver or make a connection directly from gameserver to database (not a good idea)
    you just need a simple retrieve sql command, you can check how the dataserver retrieves/edits info on the database

  4. #4
    Don't be afraid to ask! RevolGaming is offline
    MemberRank
    Jun 2012 Join Date
    1,458Posts

    Re: Getting information from MYSQL, zTeam season 6 sources.

    There is two way.

    You can create a direct MSSQL connection from GS to the database (MSSQL) or code a request into the Gameserver -> handle it in the Dataserver -> Recv information from dataserver.

  5. #5
    Member BlackPaper is offline
    MemberRank
    Jun 2016 Join Date
    75Posts

    Re: Getting information from MYSQL, zTeam season 6 sources.

    Quote Originally Posted by RevolGaming View Post
    There is two way.

    You can create a direct MSSQL connection from GS to the database (MSSQL) or code a request into the Gameserver -> handle it in the Dataserver -> Recv information from dataserver.
    Can you please guide me on how to create a direct MSSQL connection from the GS to the database?

  6. #6
    Don't be afraid to ask! RevolGaming is offline
    MemberRank
    Jun 2012 Join Date
    1,458Posts

    Re: Getting information from MYSQL, zTeam season 6 sources.


  7. #7
    (づ。◕‿‿◕。) Natzugen is offline
    MemberRank
    Jun 2014 Join Date
    ElbelandLocation
    1,858Posts

    Re: Getting information from MYSQL, zTeam season 6 sources.

    you can use boost, you can use the sql.cpp and sql.h that everyone uses when they work with dll in old gameservers or you can use the ones from the link below its all the same, or just learn to use winsock and use the dataservers and its less work for the gs

  8. #8
    Member BlackPaper is offline
    MemberRank
    Jun 2016 Join Date
    75Posts

    Re: Getting information from MYSQL, zTeam season 6 sources.

    Quote Originally Posted by natzugen View Post
    you can use boost, you can use the sql.cpp and sql.h that everyone uses when they work with dll in old gameservers or you can use the ones from the link below its all the same, or just learn to use winsock and use the dataservers and its less work for the gs
    you didn't provide the link though, I'll be glad if you can provide a link for these sql.h and sql.cpp

  9. #9
    Don't be afraid to ask! RevolGaming is offline
    MemberRank
    Jun 2012 Join Date
    1,458Posts

    Re: Getting information from MYSQL, zTeam season 6 sources.

    Lol, I gived you link, sql.h is a simple #include module ...:)

    natzu only wrote, you can use boostlib to make this, you can use my linked thing, but the best way if you simple understand how GS working and code it into the dataserver.

  10. #10
    cMuServices™ L1ron is offline
    MemberRank
    Jun 2014 Join Date
    315Posts

    Re: Getting information from MYSQL, zTeam season 6 sources.

    actually u can add vip into the struct and actually control vip only at server with commands that u add that update that gObj->Vip = 1;
    understand me ? its my idea i've never touce zTeam Sources Yet ;)

  11. #11
    Don't be afraid to ask! RevolGaming is offline
    MemberRank
    Jun 2012 Join Date
    1,458Posts

    Re: Getting information from MYSQL, zTeam season 6 sources.

    Anyways zTeam s6 vip system totally working, so xD I dont understand why you want to remake it.

    You can make the vip system with two way:
    - ConnectMember.txt -> update the txt from website, when somebody buy vip... (reload txt in gs every 30 sec)
    Its build in and working.

    - Use the inbuild vip system its make ton of query, thats why I dont like, but its working.
    If the user is vip, he has vip function, for example bigger exp, bigger drop, but its update the database in every sec, thats why its not good.

  12. #12
    Member BlackPaper is offline
    MemberRank
    Jun 2016 Join Date
    75Posts

    Re: Getting information from MYSQL, zTeam season 6 sources.

    Quote Originally Posted by L1ron View Post
    actually u can add vip into the struct and actually control vip only at server with commands that u add that update that gObj->Vip = 1;
    understand me ? its my idea i've never touce zTeam Sources Yet ;)
    The struct saves its data aswell somewhere isnt it?
    Quote Originally Posted by RevolGaming View Post
    Anyways zTeam s6 vip system totally working, so xD I dont understand why you want to remake it.

    You can make the vip system with two way:
    - ConnectMember.txt -> update the txt from website, when somebody buy vip... (reload txt in gs every 30 sec)
    Its build in and working.

    - Use the inbuild vip system its make ton of query, thats why I dont like, but its working.
    If the user is vip, he has vip function, for example bigger exp, bigger drop, but its update the database in every sec, thats why its not good.
    I'm remaking the system just in order to learn. I'll be glad if you can help me on how to work with the dataserver in order to update and get info from the SQL.

  13. #13
    Don't be afraid to ask! RevolGaming is offline
    MemberRank
    Jun 2012 Join Date
    1,458Posts

    Re: Getting information from MYSQL, zTeam season 6 sources.

    But... the vip system working like as you want, if vip =1 he can connect to the vipserver if vip not 1 he cant... Its already coded in the source.

    MEMB_INFO - VIP column...

  14. #14
    Member BlackPaper is offline
    MemberRank
    Jun 2016 Join Date
    75Posts

    Re: Getting information from MYSQL, zTeam season 6 sources.

    Quote Originally Posted by RevolGaming View Post
    But... the vip system working like as you want, if vip =1 he can connect to the vipserver if vip not 1 he cant... Its already coded in the source.

    MEMB_INFO - VIP column...
    As I said, I want to recreate it for learning purposes.

  15. #15
    Don't be afraid to ask! RevolGaming is offline
    MemberRank
    Jun 2012 Join Date
    1,458Posts

    Re: Getting information from MYSQL, zTeam season 6 sources.

    Than learn how to replace dont ask it.

    We dont know what you want to do, you just wrote random things what you need.

    I gived you 2 way to make it, 1st was the link - where you can code direct MSSQL ODBC connection cross C++ code using SQL lib

    2nd was to code into your gameserver and than use the dataserver to make it.

    But we still dont know why you want to do something which is done.

    Its already coded, so if you want to code something like this, than recode the working module, or copy the module, delete the old one and build a new one, but its useless, if something done and working, you can recode it, if something not exist you need to code it.



Advertisement