Jump to content
Sign in to follow this  
wouter2004

Question: login function and onkill function

Recommended Posts

Dear All,

 

I have a question, I am working on an automated event which occurs every week and for this I need a clear "onkill" function for monsters?

This means that when you kill a particular monster this function is automatically triggered and can give you items.

 

Additionally I was wondering if there is a clean "onlogin" function, which only starts when you logon to the GameServer.

I would like to use this for the function to deliver daily gifts to players.

 

Last but not least, is there a package function which allows you to show pictures on client side?

The example below is the "GmMail" package, but I would like to make a nice login GUI with more details about daily gifts.

 

image.png.5b7e528fdea07e8c7192373eab8e3bdb.png

Share this post


Link to post
Share on other sites

Hello, @wouter2004!

 

Quote

I have a question, I am working on an automated event which occurs every week and for this I need a clear "onkill" function for monsters?

This means that when you kill a particular monster this function is automatically triggered and can give you items.

You can use function 'GetExp_PKM' from file exp_and_level.lua (GameServer\resource\scripts\calculate) as "OnKill" event function.

 

For example:

 

Quote

Additionally I was wondering if there is a clean "onlogin" function, which only starts when you logon to the GameServer.

I would like to use this for the function to deliver daily gifts to players.

I recently posted a turnkey gift system solution here:

 

Pay attention to the function 'private:on_player_entered_map', it is called every time the player enters a map. Also there is function 'private:on_player_leaved_map' it is called every time the player leaves the map, respectively.

 

Quote

Last but not least, is there a package function which allows you to show pictures on client side?

The example below is the "GmMail" package, but I would like to make a nice login GUI with more details about daily gifts.

I have not seen such function. I think need to patch Game.exe or add the function to the source code of client.


Share this post


Link to post
Share on other sites

Hi V3ctor many thanks for your support!
 

that is indeed very helpful, I will check if I can make a derived function based on monster kills and check special monster kills, like Boses and event mobs.

 

Player enter map will also help. I will use an ODBC script to keep track of login timestamps. Already use some new tables for game and website integration.
 

Regarding the client pictures:

I see that most server package functions are in the character.cpp, I will copy one and try to make a new package on both client and server, then on client side create a nice daily gift window with checkmarks, which will open on request.

 

 

will share it when I am done, but you already helped me a lot thanks!

  • Thanks 1

Share this post


Link to post
Share on other sites
On 11/16/2021 at 9:57 PM, wouter2004 said:

Regarding the client pictures:

I see that most server package functions are in the character.cpp, I will copy one and try to make a new package on both client and server, then on client side create a nice daily gift window with checkmarks, which will open on request.

Check out this thread, I think you will be interested

 


Share this post


Link to post
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
Reply to this topic...

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

Sign in to follow this  

×
×
  • Create New...