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

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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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