Jump to content
  • 0

QuestBoard NPC - Save Progress Database


calaluis

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   3
  • Joined:  04/13/15
  • Last Seen:  

Hello Community,

Through this channel, I would like to make the following approach below.

Although, the emulator includes the NPC QuestBoard script, which allows custom missions to be included very easily; I would like to consult or ask, if it is possible or not, that the progress of the missions of the players are saved in the database, because it is stored in memory. If possible, I await directions.

Stay tuned.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  35
  • Reputation:   24
  • Joined:  10/17/13
  • Last Seen:  

short answer: yes is possible


you can make a new table on db to store this, then if i remember correctly u can use querysql() on the npc or quest w/e...

try to find a pvp with rank usually it comes with the scripts to generate a table.

 

---------------------------------------

*query_sql("your MySQL query"{, <array variable>{, <array variable>{, ...}}});
*query_logsql("your MySQL query"{, <array variable>{, <array variable>{, ...}}});

Executes an SQL query. A 'select' query can fill array variables with up to 2 billion rows of
values, and will return the number of rows (i.e. array size) or -1 on failure.

Note that 'query_sql' runs on the main database while 'query_logsql' runs on the log database.

Example:
	.@nb = query_sql("select name,fame from `char` ORDER BY fame DESC LIMIT 5", .@name$, .@fame);
	mes "Hall Of Fame: TOP5";
	mes "1." + .@name$[0] + "(" + .@fame[0] + ")"; // largest fame value.
	mes "2." + .@name$[1] + "(" + .@fame[1] + ")";
	mes "3." + .@name$[2] + "(" + .@fame[2] + ")";
	mes "4." + .@name$[3] + "(" + .@fame[3] + ")";
	mes "5." + .@name$[4] + "(" + .@fame[4] + ")";

---------------------------------------

src: https://raw.githubusercontent.com/rathena/rathena/master/doc/script_commands.txt
 

 

Edited by HaureN
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  215
  • Reputation:   45
  • Joined:  05/03/13
  • Last Seen:  

Just a small tip, be carefull with the request you're doing, like doing a lot of select each time you talk to a npc ect.
At first it doesn't matter but after some times, if you use it a lot of times, it'll cost. Do as less request as possible (temporary storing table in npc/player var ect).

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  35
  • Reputation:   24
  • Joined:  10/17/13
  • Last Seen:  

i totally agree with kreustoo, maybe a good way is send to db only when player logoff, for example if player finish the quest without logout u don't even need to send to db

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   3
  • Joined:  04/13/15
  • Last Seen:  

Thanks @HaureN and @Kreustoo for responding.

The NPC QuestBoard file has not been touched in the processing source code.

However, today, I performed maintenance on my server, for which, I closed all three applications completely and also restarted the Mysql service to free up space in RAM memory.

All three applications are reloaded.

It is entered with a player account, for which, I can appreciate that the count of monsters killed has not been lost. There where I was quite intrigued where that value was saved, if the emulator in its entirety was closed.

I am very attentive, and thank you for reading this message.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  215
  • Reputation:   45
  • Joined:  05/03/13
  • Last Seen:  

That's the point of the sql save, it is saved permantaly in the sql database.

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