Jump to content

[TUT] SQLx - the newest AMXX SQL driver set (advantages and usage)


Recommended Posts

Posted

Before we begin, it is important to understand that this tutorial assumes you know the basics about Pawn (syntactically and the implementation of it in AMXX). You should be at least an intermediate level scripter, and have knowledge of SQL (the language itself) and perhaps DBI (the now outdated and deprecated, although still functional SQL driver that was used in AMXX for a time). I will do small sections explaining the SQL code itself, but for the most part you should know the basics.

 

SQLx is one of the new SQL driver sets and APIs that were incorporated into AMXX 1.75 (?) and made publicly available shortly after the release of AMXX 1.70. The important new features include the ability to thread queries (to save gameplay interruption, the queries to the database are dispatched to a new thread and then a callback is made when the query is completed or fails), better API abstraction (easier to write plugins with and more understandable), connection "tuples" (a system used to store information about a database but not connect to it - very useful for writing APIs where a connection should be allowed to be independent across differen plugins), and the ability to load multiple modules (can load MySQL, SQLite and any other drivers).

 

The most important thing to understand about SQLx is that the entire system works with "Handles", which store all information such as a connection, tuple, result and prepared query. This makes it very simple to both screw up (trying to connect to a query's result, due to lack of tag differentiation, for example) but at the same time makes things a lot simpler - for example, a connection is dropped by running SQL_FreeHandle, the same native used to free a result, free a prepared query and free a database tuple.

 

Let's look at a comparison between DBI and SQLx:

 

DBI:

 

 

#include <amxmodx>
#include <amxmisc>
#include <dbi>

new Sql:g_SqlConnection
new g_Error[512]

public plugin_init()
{
    register_plugin("DBI Demonstration","1.0","Hawk552")
   
    new Host[64],User[64],Pass[64],Db[64]
    // let's fetch the cvars we will use to connect
    // no pcvars because we're only fetching them once
    get_cvar_string("amx_sql_host",Host,63)
    get_cvar_string("amx_sql_user",User,63)
    get_cvar_string("amx_sql_pass",Pass,63)
    get_cvar_string("amx_sql_db",Db,63)
   
    // ok, we're ready to connect
    g_SqlConnection = dbi_connect(Host,User,Pass,Db,g_Error,511)
    // indicates that the connection failed (it's either SQL_OK or SQL_FAILED)
    if(g_SqlConnection < SQL_OK)
        // stop the plugin with an error message
        set_fail_state(g_Error)
       
    new Result:Results[3]
   
    // run some queries
    if((Results[0] = dbi_query(g_SqlConnection,"CREATE TABLE IF NOT EXISTS zomg (you INT(11),are INT(11),a INT(11),noob INT(11))")) < RESULT_OK || (Results[1] = dbi_query(g_SqlConnection,"INSERT INTO zomg VALUES('1','2','3','4')")) < RESULT_OK || (Results[2] = dbi_query(g_SqlConnection,"INSERT INTO zomg VALUES('4','3','2','1')")) < RESULT_OK)
    {
        // fetch any error if there were problems
        dbi_error(g_SqlConnection,g_Error,511)
        // stop the plugin
        set_fail_state(g_Error)
    }
   
    // free the result handles
    for(new Count;Count < 3;Count++)
        dbi_free_result(Results[Count])
}

public client_disconnect(id)
{   
    // run a random query
    new Result:QueryResult = dbi_query(g_SqlConnection,"SELECT * FROM zomg WHERE you='1' OR you='4'")
   
    // query failed - database probably closed since the last time we used it
    if(!QueryResult)
    {
        dbi_error(g_SqlConnection,g_Error,511)
        set_fail_state(g_Error)
    }
   
    new Data
    // notice here that we run the dbi_nextrow first - one of the main reasons I don't like DBI.
    // you MUST do this, it doesn't start at the first row
    while(dbi_nextrow(Result))
    {
        // get the row
        // note that we could also use dbi_result(Result,"you")
        Data = dbi_field(Result,1)
        // tell the server console we have found data
        server_print("zomg, we have data: %d",Data)
    }
}

public plugin_end()
    // close the connection
    dbi_close(g_SqlConnection)

 

SQLx:

 

#include <amxmodx>
#include <amxmisc>
#include <sqlx>

new Handle:g_SqlTuple
new g_Error[512]

As you can see, there aren't too many differences when not using threaded querying (which, in case you were wondering, I did not include in this example).

Unfortunately, none of this demonstrates the true power of SQLx. The only thing it showcases really is the Handle: and SQL_FreeHandle system.

The true power lies in threaded querying. Threaded querying means nothing short of a rewrite of an entire plugin that's written with DBI, but has huge advantages, especially on slow connections. The idea of a threaded query is essentially that a new thread (a sub-process) with which its only goal is to send, monitor, and inform of the things that happen to a query. Because it is on a seperate thread, a query that would normally take 1 second (and 1 second of total connection loss for all clients in the server) still takes the same a-beep-t of time, but does not interrupt gameplay.

What are the disadvantages? As I wrote, it means basically a total rewrite, and a hell of a lot more code. When a threaded query is completed, it calls a function (that is declared in the prototype of SQL_ThreadQuery) that handles the result of the query. It could be any a-beep-t of time after this query is sent, meaning time sensitive events would be nearly impossible to work with.

Here's an example in action:

[code]#include <amxmodx>
#include <amxmisc>
#include <sqlx>

new Handle:g_SqlTuple
new g_Cache[512]

public plugin_init()
{
    register_plugin("SQLx Demonstration","1.0","Hawk552")
   
    new Host[64],User[64],Pass[64],Db[64]
    // let's fetch the cvars we will use to connect
    // no pcvars because we're only fetching them once
    get_cvar_string("amx_sql_host",Host,63)
    get_cvar_string("amx_sql_user",User,63)
    get_cvar_string("amx_sql_pass",Pass,63)
    get_cvar_string("amx_sql_db",Db,63)
   
    // we tell the API that this is the information we want to connect to,
    // just not yet. basically it's like storing it in global variables
    g_SqlTuple = SQL_MakeDbTuple(Host,User,Pass,Db)
   
    copy(g_Cache,511,"CREATE TABLE IF NOT EXISTS zomg (you INT(11),are INT(11),a INT(11),noob INT(11))")
    SQL_ThreadQuery(g_SqlTuple,"TableHandle",g_Cache)
}

public TableHandle(FailState,Handle:Query,Error[],Errcode,Data[],DataSize)
{
    // lots of error checking
    if(FailState == TQUERY_CONNECT_FAILED)
        return set_fail_state("Could not connect to SQL database.")
    else if(FailState == TQUERY_QUERY_FAILED)
        return set_fail_state("Query failed.")
   
    if(Errcode)
        return log_amx("Error on query: %s",Error)
       
    SQL_ThreadQuery(g_SqlTuple,"QueryHandle","INSERT INTO zomg VALUES('1','2','3','4')")
    SQL_ThreadQuery(g_SqlTuple,"QueryHandle","INSERT INTO zomg VALUES('4','3','2','1')")
   
    // notice that we didn't free the query - you don't have to
   
    return PLUGIN_CONTINUE
}

public QueryHandle(FailState,Handle:Query,Error[],Errcode,Data[],DataSize)
{
    // lots of error checking
    if(FailState == TQUERY_CONNECT_FAILED)
        return set_fail_state("Could not connect to SQL database.")
    else if(FailState == TQUERY_QUERY_FAILED)
        return set_fail_state("Query failed.")
   
    if(Errcode)
        return log_amx("Error on query: %s",Error)
   
    return PLUGIN_CONTINUE
}

public client_disconnect(id)
    SQL_ThreadQuery(g_SqlTuple,"SelectHandle","SELECT * FROM zomg WHERE you='1' OR you='4'")

public SelectHandle(FailState,Handle:Query,Error[],Errcode,Data[],DataSize)
{
    if(FailState == TQUERY_CONNECT_FAILED)
        return set_fail_state("Could not connect to SQL database.")
    else if(FailState == TQUERY_QUERY_FAILED)
        return set_fail_state("Query failed.")
   
    if(Errcode)
        return log_amx("Error on query: %s",Error)
   
    new DataNum
    while(SQL_MoreResults(Query))
    {
        DataNum = SQL_ReadResult(Query,0)
       
        server_print("zomg, some data: %d",DataNum)
    
        SQL_NextRow(Query)
    }
   
    return PLUGIN_CONTINUE
}

public plugin_end()
    // free the tuple - note that this does not close the connection,
    // since it wasn't connected in the first place
    SQL_FreeHandle(g_SqlTuple)
public plugin_init()
{
    register_plugin("SQLx Demonstration","1.0","Hawk552")
   
    new Host[64],User[64],Pass[64],Db[64]
    // let's fetch the cvars we will use to connect
    // no pcvars because we're only fetching them once
    get_cvar_string("amx_sql_host",Host,63)
    get_cvar_string("amx_sql_user",User,63)
    get_cvar_string("amx_sql_pass",Pass,63)
    get_cvar_string("amx_sql_db",Db,63)
   
    // we tell the API that this is the information we want to connect to,
    // just not yet. basically it's like storing it in global variables
    g_SqlTuple = SQL_MakeDbTuple(Host,User,Pass,Db)
   
    // ok, we're ready to connect
    new ErrorCode,Handle:SqlConnection = SQL_Connect(g_SqlTuple,ErrorCode,g_Error,511)
    if(SqlConnection == Empty_Handle)
        // stop the plugin with an error message
        set_fail_state(g_Error)
       
    new Handle:Queries[3]
    // we must now prepare some random queries
    Queries[0] = SQL_PrepareQuery(SqlConnection,"CREATE TABLE IF NOT EXISTS zomg (you INT(11),are INT(11),a INT(11),noob INT(11))")
    Queries[1] = SQL_PrepareQuery(SqlConnection,"INSERT INTO zomg VALUES('1','2','3','4')")
    Queries[2] = SQL_PrepareQuery(SqlConnection,"INSERT INTO zomg VALUES('4','3','2','1')")
   
    for(new Count;Count < 3;Count++)
    {
        // run the queries, check if they were alright
        // note that you can run the same query multiple times
        // we are not doing this here, but it's nice to have
        if(!SQL_Execute(Queries[Count]))
        {
            // if there were any problems
            SQL_QueryError(Queries[Count],g_Error,511)
            set_fail_state(g_Error)
        }
       
        // close the handle
        SQL_FreeHandle(Queries[Count])
    }
   
    // you free everything with SQL_FreeHandle
    SQL_FreeHandle(SqlConnection)   
}

public client_disconnect(id)
{   
    // ok, we're ready to connect
    new ErrorCode,Handle:SqlConnection = SQL_Connect(g_SqlTuple,ErrorCode,g_Error,511)
    if(SqlConnection == Empty_Handle)
        // stop the plugin with an error message
        set_fail_state(g_Error)
   
    // run a random query
    new Handle:Query = SQL_PrepareQuery(SqlConnection,"SELECT * FROM zomg WHERE you='1' OR you='4'")
   
    // run the query
    if(!SQL_Execute(Query))
    {
        // if there were any problems
        SQL_QueryError(Query,g_Error,511)
        set_fail_state(g_Error)
    }
   
    // checks to make sure there's more results
    // notice that it starts at the first row, rather than null
    new Data
    while(SQL_MoreResults(Query))
    {
        // columns start at 0
        Data = SQL_ReadResult(Query,0)
       
        server_print("Found data: %d",Data)

        SQL_NextRow(Query)
    }
   
    // of course, free the handle
    SQL_FreeHandle(Query)
   
    // and of course, free the connection
    SQL_FreeHandle(SqlConnection)
}

public plugin_end()
    // free the tuple - note that this does not close the connection,
    // since it wasn't connected in the first place
    SQL_FreeHandle(g_SqlTuple)

[/code]

 

Not so hard - especially if the result you get doesn't matter.

 

Finally, multiple modules running can be accomplished by running SQL_GetAffinity, comparing it to the database type you want to run, and setting it with SQL_SetAffinity. An example of this can be found in the sqlx.inc header:

 

new set_type[12]
//...
get_cvar_string("amx_sql_type", set_type, 11)
//...
    SQL_GetAffinity(get_type, 12)
   
    if (!equali(get_type, set_type))
    {
        if (!SQL_SetAffinity(set_type))
        {
            log_amx("Failed to set affinity from %s to %s.", get_type, set_type)
        }

 

SQLx is also useful for dealing with multiple plugins - the "tuple" and "handle" system makes for easy transfer of information across unknown territory (specifically addon plugins).

 

Here is an example:

 

#include <amxmodx>
#include <amxmisc>
#include <sqlx>

new Handle:g_SqlTuple

public plugin_init()
    register_plugin("SQLx Demonstration - Core","1.0","Hawk552")

public plugin_natives()
{
    new Host[64],User[64],Pass[64],Db[64]
    // let's fetch the cvars we will use to connect
    // no pcvars because we're only fetching them once
    get_cvar_string("amx_sql_host",Host,63)
    get_cvar_string("amx_sql_user",User,63)
    get_cvar_string("amx_sql_pass",Pass,63)
    get_cvar_string("amx_sql_db",Db,63)
   
    // we tell the API that this is the information we want to connect to,
    // just not yet. basically it's like storing it in global variables
    g_SqlTuple = SQL_MakeDbTuple(Host,User,Pass,Db)
   
    register_native("sql_demo_get_handle","_sql_demo_get_handle")
}
   
public _sql_demo_get_handle()
    return _:g_SqlTuple

public plugin_end()
    // free the tuple - note that this does not close the connection,
    // since it wasn't connected in the first place
    SQL_FreeHandle(g_SqlTuple)

 

#include <amxmodx>
#include <amxmisc>
#include <sqlx>

native Handle:sql_demo_get_handle()
   
public plugin_init()
{
    register_plugin("SQLx Demonstration - Attachment","1.0","Hawk552")
   
    SQL_ThreadQuery(sql_demo_get_handle(),"QueryHandle","CREATE TABLE IF NOT EXISTS zomg (rofl INT(11))")
}

public QueryHandle(FailState,Handle:Query,Error[],Errcode,Data[],DataSize)
{
    if(FailState == TQUERY_CONNECT_FAILED)
        return set_fail_state("Could not connect to SQL database.")
    else if(FailState == TQUERY_QUERY_FAILED)
        return set_fail_state("Query failed.")
   
    if(Errcode)
        return log_amx("Error on query: %s",Error)
       
    server_print("zomg, table made")

 

Accomplishing this in DBI is not hard, but a connection would constantly need to be left open, something that SQLx doesn't demand.

 

Remember that all SQLx modules contain support for DBI as well, and many people are more comfortable with it. DBI has its weaknesses however, and SQLx was designed to overcome them.

 

Like always, if you have any questions or comments, feel free to post.

 

By: Hawk552

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • General Trackers :   IPTorrents invite IPTorrents account 1 tb TorrentLeech invite Torrentleech account 1 tb buffer  InTheShaDow ( ITS ) account Acid-lounge invite Torrentday invite Crnaberza account Abn.Lol account Limit-of-eden account Norbits account Xspeeds account Xspeeds invite Bemaniso invite Wigornot account Bithumen invite Filelist account Funfile invite AvistaZ invite Potuk.net invite ResurrectThe.Net invite GrabThe.Info invite Greek-Team invite LinkoManija invite Fano.in account tracker.czech-server.com Speed.cd invite Arab-torrents.net account Arabscene.me account Scenetime account 4thd.xyz invite Btarg.com.ar account Dedbit invite Estone.cc account Speedapp invite Finvip invite Fluxzone account GigaTorrents account Gimmepeers account Haidan.video invite Mojblink account Mycarpathians invite Newinsane.info account Oscarworld.xyz account Peers.FM invite Pt.msg.vg account Ransackedcrew account Redemption invite Scene-rush account Seedfile.io invite Teracod invite Torrent.ai account Torrentmasters invite Ttsweb invite X-files invite X-ite invite Ncore account TorrentHR account Rptorrents account BwTorrents account Superbits invite Krazyzone account Immortalseed account Tntracker invite Pt.eastgame.org account Bitturk account Rstorrent account Tracker.btnext invite Torrent-turk.de account BeiTai.PT account Pt.keepfrds account 52pt.site account Pthome account Torrentseeds account Aystorrent account Blues-brothers.biz invite Divteam account Thesceneplace invite CinemaMovies.pl account Brasiltracker account Patiodebutacas account Newheaven.nl account  Swarmazon.club invite Bc-reloaded account Crazyspirits account Silentground invite Omg.wtftrackr invite Milkie.cc invite Breathetheword invite Madsrevolution account Chilebt account Yubraca account Uniongang.tv account Frboard account Exvagos account Diablotorrent account Microbit account Carp-hunter.hu account Majomparade.eu account Theshinning.me account Youiv.info account Dragonworld-reloaded account Sharewood.tv account Partis.si account Digitalcore.club invite Fuzer.me account R3vuk.wtf invite Ztracker account 1 tb buffer 3changtrai account Best-core.info account Bitsite.us account Eliteunitedcrew invite Exitorrent.org account Tophos invite Torrent.lt account Sktorrent.eu account Oshen account Blackhattorrent account Pirata.digital account Esharenet account Ohmenarikgi.la Pirate-share account Immortuos account Kiesbits account Cliente.amigos-share.club account Broadcity invite Ilovetorzz account Torrentbytes account Polishsource account Portugas invite Shareisland account ArabaFenice account Hudbt.hust.edu.cn account Audiences account Nanyangpt account Pt.sjtu.edu.cn account Pt.zhixing.bjtu.edu.cn account Byr.pt invite Ptfiles invite Red-bits account Pt.hdpost.top account Irrenhaus.dyndns.dk (NewPropaganda) account Mnvv2.info (MaxNewVision V2) account 1ptba.com account Spidertk.top account Film-paleis account Generation-free account Aftershock-tracker account Twilightsdreams account Back-ups.me invite Sor-next.tk ( Spirit Of Revolution ) account Tfa.tf ( The Falling Angels ) account Hdmayi account S-f-p.dyndns.dk ( Share Friends Projekt ) account Unlimitz.biz account Pttime account St-tracker.eu account New-retro.eu account Zbbit account Tigers-dl.net account Jptvts.us account Lat-team account Club.hares.top account Falkonvision-team account Concen account Drugari account T.ceskeforum account Peeratiko.org account Zamunda.se account Central-torrent.eu account h-o-d.org account Torrentleech.pl account Demonoid invite Lst.gg account Fakedoor.store account LaidBackManor account Vrbsharezone.co.uk invite Torrenteros account Arenaelite account Datascene account Tracker.0day.community Tapochek.net invite Ptchina invite Lesaloon account Exyusubs account Therebels.tv account Ubits.club invite Zmpt.cc account Turktorrent.us account Dasunerwarte account Hawke.uno account Monikadesign account Fearnopeer account Alpharatio account Wukongwendao.top account Chinapyg account Azusa.wiki account Yggtorrent.top account Torrentdd account Cyanbug.net invite Hhanclub.top account Wintersakura.net account Xthor account Tctg.pm account Finelite invite Agsvpt.com account Pt.0ff.cc invite Qingwapt.com account Xingtan.one account Ptcafe.club invite Theoldschool.cc account W-o-t.pro account Coastal-crew.bounceme.net account Darkpeers.org account Pianyuan.org account Seedpool.org  account Tempelbox account Pt.itzmx.com account Capybarabr.com account Itatorrents.xyz  account Letseed.org account The-new-fun.com  account Malayabits.cc account Trellas.me account Yu-scene.net account Futuretorrent.org account Bitpt.cn account Tocashare.biz  account Videoteka.org  account White-angel.hu account Xbytesv2.li account   Movies Trackers :   Anthelion account Pixelhd account Cinemageddon account DVDSeed account Cinemageddon account Cinemaz account Retroflix account Classix-unlimited - invite Movie-Torrentz (m2g.link) invite Punck-tracker.net account Tmghub account Tb-asian account Cathode-ray.tube account Greatposterwall account Telly account Arabicsource.net account Upload.cx account Crabpt.vip invite Onlyencodes.cc account Exyusubs account Hellashut.net invite Nordichd.sytes.net invite Locadora.cc account   HD Trackers :   Blutopia buffered account Hd-olimpo buffered account Hdf.world account Torrentland.li account HdSky account Hdchina account Chdbits account Totheglory account Hdroute account Hdhome account TorrentCCF aka et8.org account 3DTorrents invite HD-Torrents account Bit-HDTV account HDME.eu invite Hdarea.co account Asiancinema.me account JoyHD invite HDSpace invite CrazyHD invite Bluebird-hd invite Htpt.cc account Hdtime invite Ourbits.club account Hd4fans account Siambit account Privatehd account Springsunday account Tjupt account Hdcity.leniter invite Ccfbits account Discfan account Pt.btschool.club account Ptsbao.club invite Hdzone.me invite Danishbytes account Zonaq.pw account Tracker.tekno3d account Arabp2p account Hd-united account Reelflix.xyz account Hdatmos.club account Anasch.cc invite Tigris-t account Nethd.org account Hd.ai invite Hitpt.com account Hdmonkey account Dragonhd.xyz account Hdclub.eu account Forum.bluraycd.com account Carpt account Hdfun.me invite Pt.hdupt invite Puntotorrent account Ultrahd account Rousi.zip account Bearbit account Hdturk.club account Asiandvdclub account Star-space.net account Nordicq.org account Hdkyl.in account Utp.to account Music Trackers : Dicmusic account Music-Vid account Open.cd account LzTr account ProAudioTorrents invite Jpopsuki invite TranceTraffic invite Audionews invite Kraytracker invite Libble.me invite Losslessclub invite Indietorrents.com invite Dimeadozen account Funkytorrents invite Karaokedl account zombtracker.the-zomb account Concertos account Sugoimusic account Satclubbing.club invite Metal.iplay invite Psyreactor invite Panda.cd account Adamsfile account Freehardmusic account Tracker.hqmusic.vn accouunt Twilightzoom account 3 tb buffer Hiresmusic account Metalguru account Musictorrents.org account Musebootlegs.com invite Zappateers.com account Jungleland.dnsalias.com account Naftamusic account   E-Learning Trackers :   Thevault account BitSpyder invite Brsociety account Learnbits invite Myanonamouse account Libranet account 420Project account Learnflakes account Pt.soulvoice.club account P2pelite account Aaaaarg.fail invite Ebooks-shares.org account Abtorrents account Pt.tu88.men invite Docspedia.world invite   TV-Trackers :   Skipthecommericals Cryptichaven account TV-Vault invite Shazbat.TV account Myspleen account Tasmanit.es invite Tvstore.me account Tvchaosuk account Jptv.club account Tvroad.info   XXX - Porn Trackers :   FemdomCult account Pornbay account Pussytorrents account Adult-cinema-network account Bootytape account 1 Tb buffer Exoticaz account Bitporn account Kufirc account Gaytorrent.ru invite Nicept account Gay-torrents.org invite Ourgtn account Pt.hdbd.us account BitSexy account Happyfappy.org account Kamept.com account Lesbians4u.org account   Gaming Trackers :   Mteam.fr account BitGamer invite Retrowithin invite Gamegamept account   Cartoon/Anime/Comic Trackers :   Animeworld account Oldtoons.world account U2.dmhy account CartoonChaos invite Animetorrents account Mononoke account Totallykids.tv account Bakabt.me invite Revanime account Ansktracker account Tracker.shakaw.com.br invite Bt.mdan.org account Skyey2.com account Animetracker.cc Adbt.it.cx invite Tracker.uniotaku.com account Mousebits.com account   Sports Trackers :   MMA-Tracker invite T3nnis.tv invite AcrossTheTasman account RacingForMe invite Sportscult invite Ultimatewrestlingtorrents account Worldboxingvideoarchive invite CyclingTorrents account Xtremewrestlingtorrents account Tc-boxing invite Mma-torrents account Aussierul invite Xwt-classics account Racing4everyone account Talk.tenyardtracker account Stalker.societyglitch invite Extremebits invite Rgfootball.net account F1carreras.xyz account   Software/Apps Trackers :   Brokenstones account Appzuniverse invite Teamos.xyz account Macbb.org account   Graphics Trackers:   Forum.Cgpersia account Gfxpeers account Forum.gfxdomain account   Documentary Trackers:   Forums.mvgroup account   Others   Fora.snahp.eu account Board4all.biz account Filewarez.tv account Makingoff.org/forum account Xrel.to account Undergunz.su account Corebay account Endoftheinter.net ( EOTI ) account Thismight.be invite Skull.facefromouter.space account Avxhm.se (AvaxHome) account Ssdforum account Notfake.vip account Intotheinter.net account Tildes.net invite Thetoonz account Usinavirtual account Hdclasico invite HispaShare account Valentine.wtf account Adit-hd account Forum-andr.net account Warezforums account Justanothermusic.site account Forbiddenlibrary.moe account Senturion.to account Movieparadise account Militaryzone account Dcdnet.ru account Sftdevils.net account Heavy-r.com account New-team.org account Ddl.tv account Filewarez.club account Hispamula.org account Hubwarez.tv account   NZB :   Ninjacentral.co.za account Tabula-rasa.pw account Drunkenslug account Drunkenslug invite Usenet-4all account Brothers-of-Usenet account Dognzb.cr invite Kleverig account Nzb.cat account Nzbplanet.net invite Ng4you.com account Nzbsa.co.za account Bd25.eu account NZB.to account Samuraiplace account Abhdtv.net account Abook.link account Comix.pw account House-of-usenet Secretbinaries.net account Vnext.to account Stockboxx.top account Sky-of-use.net account   Prices start from 3 $ to 100 $   Payment methods: Crypto, Neteller, Webmoney, Revolut   If you want to buy something send me a pm or contact me on:   Email: morrison2102@gmail.com   Discord: LFC4LIFE#4173   Telegram: https://t.me/LFC4LIFE4173   Skype: morrison2102@hotmail.com
    • these are all my interfaces)
    • Updates:    Revision 568: 2020-10-28 Fix: -Mp potions thanks to RuLLezZ for report. -Archangels(Baium) attack. -geonegine doors npe. -geoengine layer correction. -boats are now properly working. -max enchant protection ,thanks to RuLLezZ-Fortitude for report. -character selection enchant effect,thanks to RuLLezZ-Fortitude for report. -multisell exploit. -SevenSigns leak-optimize. -pledge visual packet. -Party match room unhardcoded newid. -party match room auto join l2off like. Skills fix: -Force Meditation. -skill type: TARGET_MULTIFACE properly working. Rework: -sql connection pt2. -community board ClanList.java (from 120 lines to 65) -community board CastleStatus.java -community board RaidList.java optimize: -sql: player item restore. -Cboard HeroList update every 4 hours(avoid to execute sql connection on click.) Remove: -top players from cboard(and kept the one from rank system, in order to work you must enable the rank system) -   Revision 569: 2020-12-14 Fix: -npe onMagicFinalizer. -FrequentSkill npe. -Cyrillic characters support in cboard ,thanks to Fortitude for report. -255 tutorial message,thanks to Fortitude for report. -cboard switch typo,thanks to Fortitude for report. -multiply statement , thanks to Fortitude for report. -allow to interact with dead monsters to use "sweep" correctly. -potions are now visible under buffs(l2off like). -hp-mp negative value. -optimize-fix updateAbnormalEffect unnecessary packet broadcast. now it will send the update only if abnormal effects are in use or effected by somone,which is lead to a huge broadcast optimize. Monster behavior: -onAggression remove minion assist(l2 off like), -onAggression minions are following master and attacking only when we attack master-minion.tested on advext. Skills fix: -lure(skill) behavior on monster,thanks nijota for report. Rework: CharEffectList.java optimize: (Custom)EventEgnine: "asynchronize" teleport to avoid massive lag. -   Revision 570: 2021-04-11 Fix: -client-server desync(jump backward ,weird effect) while pressing attack and try to move away. -npe on player protection. -npe on summon magic skill use. -npe on use item. -on duel: you can attack summons properly.(with same duel id) -on duel finish: summons are now stop attacking and return to their owner. -soulshot properly usage after finish casting. -party member position. thanks Cibo for report. -combat-chase movement system. -Antharas-Valakas Shock skill effect l2off like. -properly remove cubics on restart-logout. -status update avoid sending unnecessary packets. -On equip-unequip item avoid sending unnecessary packets. -Revert L2GamePacketHandler.java to switch method. -shortcut doubling(properly update). thanks to ragef for report. -Event engine teleport , thanks to daffynash for report. Quest fix: -Q115_TheOtherSideOfTruth: Misa Spawn at night. thanks Cibo for report. -Q648_AnIceMerchantsDream: Steward on talk html. thanks Cibo for report. Skills fix: -augment stack. Rework: -Friend system (client-server packets l2off like). -   Revision 571: 2021-09-11 Bug fix: -avoid following target after restart-logout , thanks to EXCLUS1VE for report. -pick up stuck , thanks to EXCLUS1VE for report. -summon patk/matk speed visual animation. -summon attack request , thanks to EXCLUS1VE for report. -effect relax , thanks to EXCLUS1VE for report. -formulas hitmiss , thanks to EXCLUS1VE for report. -Social action request , thanks to EXCLUS1VE for report. -cubic attack , thanks to EXCLUS1VE for report. -Party match room chat, thanks to EXCLUS1VE for report. -pick up issue , thanks to EXCLUS1VE for report. -pet npe, thanks to EXCLUS1VE for report. Rework: -player template. -skilltreedata. -RequestAquireSkill. -RequestAquireSkillInfo. -RequestExEnchantSkill. -RequestExEnchantSkillInfo. -AcquireSkillList. -ExEnchantSkillList. Optimize: -players got their own getMoveSpeed getter , and triggers when speed change by user(walk/run commands) or buff-debuff, that way we avoid unnecessary speed calculation by updateposition task that literaly spam the calculators. -castle traps are optimized and enabled. damage calculation formula: -blow damage position bonus. -when you make a magic critical hit, the magic damage is now tripled. -melee normal attack Damage position bonus. Implement: -new vote api system.(npc-> //spawn 61) Organization: FenceManager moved in -> datatables/xml and rename to FenceData. Remove: -old antibot system and kept only one as main. -old vote system. -   Revision 572: 2022-01-08 fix -Elroki , ToIVortex , Pagan , Oracle teleporters. -shop distance(sell-buy) bug, thanks to exclusive for report. -Monster Derby Track teleport. thanks to lorka for report. -MissQueen multisell coupon. thanks to lorka for report. -Olympiad spectator error thanks to magister for report. -Quest ShowResult replace objId instead name. -html over 200++ corrections typo - bypass. -(Custom config) DAGGERS-ARCHERS wear HEAVY-LIGHT on use item unequip equipped item if config is false , to avoid stuck , thanks to exclusive for report. -Npe on connection close , thanks to exclusive for report. -Herbs auto destroy , thanks to exclusive for report. Spawn: -Implement L2off spawn data and territory system. -xml spawn list added inside datapack data/xml/spawn. -Sql spawn list has been merged with new spawn system and manage only the custom admin //spawn. -Territory Monsters randomly spawn in their territory. -Shift click on monters -> "visual" will allow you to check their territory. Skill fix: -fixed all chance skills. Optimize: -NpcData.java -PetNameTable -Siege(tasks - sql connection) Implement: -Server-Player Variable -ClientSetTime packet. -AttackDeadTarget packet. -AttackinCoolTime packet. -AttackOutOfRange packet. Rework: -L2BossSpawnInstance Clean up - Delete: -remove L2ProtectorInstance. -remove unused configs. -remove AdminUnblockIp. -remove VipTeleportCmd. -AdminCommands.xml clean up. Organization: -AutoSpawnHandler,L2Spawn,SpawnData,SpawnTerritory moved inside gameserver.model.spawn . Dont forget: to update your databse and use geodata!!! is important for the new spawn system! -   Revision 573-574: 2022-02-04 fix -Herbs auto destroy time (14 seconds) -Clan skills learn npe , thanks to Ziklis for report. -potions visual bug , thanks to Ziklis for report. Optimize: -Quest engine. -Hero engine. -SevenSigns. -Event engine. Implement: -Siegable Clan Halls (from l2j thanks to Zoey76) you can use //siege ingame for test. -Spawn data spawn_bydefault field. -CustomSpawnManager (holds npc spawn data by field "spawn_bydefault" that equals false) Clean up - Delete: -delete:EventStats.java -delete:pmoff - tradeoff handlers and merge in one (.menu voiced) -spawnlist old sql file. -   Revision 575: 2022-05-14 Fix: -Clan Skills , thanks to shush for report. -Olympiad doDie error , thanks to shush and Elliot for report. -backstub 100 % succes if attacker is behind of target. -player siege state status update. -CrownManager unhardcoded checkCrowns. -   Revision 576: 2022-07-21 Fix: -Elven Fortress teleport. thanks to JMD for report. -Traders when geodata enabled. thanks to JMD for report. -Summon Cp Potion(skills store-restore has been fixed) thanks to Noone4 for report. -Elixir reuse time , to Noone4 for report.   - Revision 577: 2022-09-25 Fix: -Drop item location.(items cannot be dropped inside wall etc, geodata must be enabled) -Hero count. Npc -Dark Choir Lancer heigh correction -Dark Choir Captain heigh correction Misc Ai: -Implement NpcWalkerTaskManager(handle npc walker ai). Misc: -isNewBie delete config-sql-getters and now depends on level. -TopRankManager is now available(merged with community board) holding stats for top players pvp-pk etc. -   Revision 578: 2022-11-07 Misc: Sql typo , thanks to noone4. Rework: -Balancer.(also save button added at the bottom) - Revision 579: 2023-03-28 Fix: -Multisell ingredient for clan points, thanks to noone4 for report. -Raid respawn time, thanks to noone4 for report. -Quest delay , thanks to noone4 for report. -Minion respawn task, thanks to noone4 for report. Rework: -Achievement Engine.(rework and optimize). -Couple - Wedding Manager.(rework and optimize). Delete: -WeddingCmd (voiced command) , wedding is now available only on npc manager. Dont forget to update your sql tables and config files.    -   Revision 580: Fix: -Start creatures AI only when they are in active region. -Subclass : In order to change the base class you can only manage it by using the master with the same type, thanks  to noone4 for report. -olympiad check item restriction and unharcoded. -monster properly delete by admin command , thanks to noone4 for report. -Zaken properly attack. thanks to l2valhalla for report. -QueenAnt nurse heal. thanks to l2valhalla for report. -Door region check to avoid stuck while wallking through.thanks to l2valhalla for report. -Rain of Fire (1296) skill radius , thanks to millerose for report. -Frost Wall (1174) skill radius , thanks to millerose for report. -RaidBossSpawnManager calendar replaced with system current time millis. -VIPTvT npe on selectNewVipOfTeam , .thanks to l2valhalla for report. -onActionShift spawn-territory npe. -L2Party properly change party leader. -AutoAttackable class cast exeption. -RequestMagicSkilluse AIOB. -L2StaticObjectInstance npe. Rework: -Project update to java 17.(you can download latest jdk version here: https://adoptium.net/temurin/releases/ ) -Remove MysqlConnector and implement MariaDb. -GeoEngine.(currently working only with l2j type , download the new geodata here: https://www.mediafire.com/file/c2tvxwt5bz086jh/geodata.rar/file ) -DoorData. -Geometry algorithm. -SQL account manager. -CustomSpawnManager(Handle npcs-monsters that are not spawned by default via xml spawn.) -L2Skill.java getTargetList rework and cleanup : case TARGET_AURA , case TARGET_AREA , case TARGET_MULTIFACE , case TARGET_PARTY ,  avoid unnecessary - heavy tasks(optimized). -Impement: -Support api for https://l2rankzone.com/ . -Admin Bookmark. -FakePlayer Chat. Organise: -CustomSpawnManager moved inside -> gameserver.model.spawn Delete: -Unused libs.   Revision 581: Fix -Fishing skill list properly show, thanks to ByDenisko for report. -Multisell enchanted items , thanks to ByDenisko for report. -Drop range between mercenary tickets. -Break Duress skill(461) , thanks to DevilMStar for report. -Interact-pickup tickets , thanks to DevilMStar for report. Rework: -refreshExpertisePenalty to avoid unnecessary calculation. -Mercenary tickets. -ClanGate skill handler.   -   Revision 582: Fix: -Siege guard aggro due to the last rework , thanks to ByDenisko for report. -Siege zone , thanks to ByDenisko for report. -Trade npe , thanks to ByDenisko for report. -Olympiad port player back position. -Antharas CCE , thanks to ByDenisko for report. -Interact exception , thanks to ByDenisko for report. -interact-pick up: action denied if the player is dead-fakedeath. (players can still interact with NPCs, but they must be within the designated interaction distance.) Rework: -Skills Array to ConcurrentSkipListMap. -L2AttackableAI think to avoid unnecessary - heavy tasks. Implement: -AutoSaveTaskManager. -AiThinkTaskManager wich handle attackable think. -Check for Event engine to activate-deactivate. -Admin zone cretion. Organization: -Rename gameserver.scrips -> gameserver.scripts   -   Revision:583 Java 21 ,DropItem-protection,ThreadPoolManager,Geongine,AdminTeleport,TopRankmanager Java 21: -The project has transitioned to Java (JDK) 21 for improved performance and features. Fix: -TopRankManager added snap list to avoid empty list while updating. -TopRankManager npe. -BookMark Teleport. -Siege: Allow pray only on the artifact spot. -Olympiad hp npe -Olympiad ip check npe -Olympiad teleport back npe Rework: -Reworked the whole Drop Protection concept and eliminated the need for synchronized methods and multiple tasks for each item.  The process is now centralized under a single manager: DropProtectionManager which centrally manages all items by one task for optimal efficiency. GeoEngine: -Maxiterations are now depends on mapsize and limit them to 13500. ThreadPoolManager: -ThreadPoolManager is now using java virtual pools.   -   Revision:584(latest 24/8/2025) RespawnTaskManager,TradeController,MerchantTaskManager,StatusListenerManager,FollowTaskManager,ItemAutoSaveTaskManager Rework: -Refactored inventory save system for improved efficiency The entire inventory save system has been restructured to eliminate redundancy and enhance performance. Previously, each item triggered its own database save Connection task (e.g., on equip, unequip, drop, add, etc.), resulting in overhead and complexity. Now, a centralized ItemAutoSaveTaskManager handles all pending item saves through a single, unified SQL connection task. -The entire creature respawn system has been restructured to eliminate redundant tasks and improve efficiency. Previously, each creature had its own separate respawn task, leading to potential overhead and complexity. Now, a centralized RespawnTaskManager handles all pending creature respawns through a single task. -TradeController has been restructured to eliminate redundant tasks by using MerchantTaskManager(same optimization as creature spawn) -StatusListenerManager now handles broadcast of statusUpdate(hp) -FollowTaskManager handles all following creatures through a single task. Fix: -clan hall buff support. thanks to Almaz. -Valakas Teleport. thanks to Almaz.  SQL Connection: Update MariaDB connector to 3.5.4          
    • isnt his i also find it on l2ketrawars  https://imgur.com/a/4BMldRQ someone lock the topic ,solved!
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and 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..

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock