Jump to content
  • 0
Sign in to follow this  
luan122

does we has any documentation to source functions?

Question

Hello, i'm comin' back to ragnarok emulators and since the last time i did something with emulators alot has changed, so i'm trying to use an old atcommand that I made in the past and need to update it to become a plugin, so, in my plugin i'm trying to using somethings like sql commands (sql_query, sql_numrows and etc), sc_start, clif_displaymessage and run_script, can someone help me how I can use those commands in source or point a guide please, thanks!
 
sql commands:

 

 

 

if ( SQL_ERROR == Sql_Query(mmysql_handle, "SELECT* FROM `login` WHERE `account_id` = '%d'", sd->status.account_id) )
clif_displaymessage(fd, "Erro 101. Notifique a Administração.");
else if ( Sql_NumRows(mmysql_handle) == 0 )
clif_displaymessage(fd, "Conta não encontrada. Notifique a Administração.");
else {
Sql_NextRow(mmysql_handle);
Sql_GetData(mmysql_handle, 0, &data, NULL); diasvip = atoi(data);
}
Sql_FreeResult(mmysql_handle);
 

 

 

 

 

sc_start:

 

 

 

sc_start(NULL,&sd->bl,SC_ASSUMPTIO,100,5,360000);
 

 

 

 

 

run_script:

 

 

 

nd = npc_name2id("vipquests");
        if( nd == NULL )
            return -1;run_script(nd->u.scr.script, 0, sd->bl.id, fake_nd->bl.id);
 

 

 

 

Edited by luan122

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.