Jump to content
Sign in to follow this  
Shako

Item that a Player Gets Everyday

Recommended Posts

Hello guys, I'm wondering how to make a function where: 

When a player logs on, if they haven't logged on, or received the item in 24 hours, it will give this item to him.

 

I think the function would be something like:

ON LOGGING ON:

 

Check if the player has gotten the Item from the system in 24H.

If they have, do nothing...

 

If they havent, give them item [X].

 

Could this be implemented into GameServer itself? If not, how should I do it in scripts? 
 

I was thinking to do something that is similar to the cooldown in Gyoza etc, but I think there is a better way. Any ideas?
 

:)

 


logo-big.png   logo.png

                                   Sunny Go! Online                                                                    pko.host                                                 

Share this post


Link to post
Share on other sites

There will be a problem when character moves between different GameServers if we want to use memory. Also use files is bad solution


Share this post


Link to post
Share on other sites

then, maybe by using the quest flags? they are stored into db. you will need also background job in your sqlserver, or some app that removes those flags at 00:00 O'clock


Discord: andresc

Share this post


Link to post
Share on other sites
2 minutes ago, kLabMouse said:

2.x servers have something called EXTENDED Attributes.

They are Character attributes that are used for daily quests. You can use them for Daily rewards too.

 

Is it possible to implement into 1.x server files?


logo-big.png   logo.png

                                   Sunny Go! Online                                                                    pko.host                                                 

Share this post


Link to post
Share on other sites
4 minutes ago, kLabMouse said:

1.x don't have EXTENDED attributes.

But You can probably use some other item Attributes. Like "Evil Crystal" item

 

ah, okay. thanks @kLabMouse


logo-big.png   logo.png

                                   Sunny Go! Online                                                                    pko.host                                                 

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