Jump to content
Jedzkie

Adding @reloadcashshop

Recommended Posts

Hi guys u would like to suggest a command to reload cashshop. Because when i update some new items in the cash shop i need to restart my server in order to update its contents. Thank you.

Share this post


Link to post
Share on other sites
ACMD(reloadcashshop)
{
nullpo_retr(-1, sd);
clif->cashshop_load();
clif->message(fd, "Cash Shop database has been reloaded.");
 
return true;
}
 
Not sure if this will work..

Share this post


Link to post
Share on other sites

We have received requests to do this when we first introduced cash shop, the reason we didnt do it yet is because its troublesome, the clients request the cash shop data upon char login and never again, if you reload it with players online their data will be off (the client doesnt accept you to send it over to my knowledge), so when they try to request something from it they'll get mismatching responses (e.g. they see a item but the server thinks its another), one way to make this work against this problem would be to either kick everyone upon refresh or to have each player unit assigned when they last received the data, so when they try to request it (e.g. buy a item) and they're off of sync, the server kicks them.

Share this post


Link to post
Share on other sites

I've tried the command and the newly added items didn't show up immediately after typing the command. Though, they appeared when I re-logged. Isn't that fine if it works that way?

Edited by Weiss

Share this post


Link to post
Share on other sites

I've tried the command and the newly added items didn't show up immediately after typing the command. Though, they appeared when I re-logged. Isn't that fine if it works that way?

say in the update the items orders are changed, online players will still see it differently, say a player has 1000 points, wanna buy a a 100 point thing but as he is out of sync the server makes him buy something different (since the order changed), say, a -700 point thing. I'd say its pretty troublesome doing it that way -- the thing to check when the player last received the list vs when it was last updated (upon trying to purchase something or opening the shop) would be a work around to this as I mentioned in the other post.

Share this post


Link to post
Share on other sites

Maybe we could add a display message that tells the player to relogin when they open the cash shop and their out of sync?

For example:

"Cash Shop has been updated, please re-login to view the updated list" 

Share this post


Link to post
Share on other sites

Maybe we could add a display message that tells the player to relogin when they open the cash shop and their out of sync?

For example:

"Cash Shop has been updated, please re-login to view the updated list" 

 

+1 to this :3

Share this post


Link to post
Share on other sites

But this maybe requiere another checks xD like

 

TheCashShop:

OnOpen:

if (cshopreload) end; (send nullpacket)

 

OnBuy:

if (cshopreload) end; (send nullpacket)

 

 

@reloadcashshop:

(only to all connected players(?)

set cshopreload, 1;

announce "blabla cashshop relogin pls";

end;

 

OnPCLogoutEvent(?:

if (cshopreload) set cshopreload, 0;

end;

 

 

 

Im just giving my idea D: do not kill me D:

Share this post


Link to post
Share on other sites

Maybe we could add a display message that tells the player to relogin when they open the cash shop and their out of sync?

For example:

"Cash Shop has been updated, please re-login to view the updated list" 

This wouldn't work, or most likely it's not efficient, I'd rather make all players log again, would be the same thing if I just re-start the server.

Share this post


Link to post
Share on other sites

 

Maybe we could add a display message that tells the player to relogin when they open the cash shop and their out of sync?

For example:

"Cash Shop has been updated, please re-login to view the updated list" 

This wouldn't work, or most likely it's not efficient, I'd rather make all players log again, would be the same thing if I just re-start the server.

 

I think you misunderstood my post. I'm saying if we could make it "pop-up" a message after clicking the cash shop button stating that the cash shop has been updated and they need to login again in order to view the updated list. They will always get that pop up message unless they login again.

Share this post


Link to post
Share on other sites

 

 

Maybe we could add a display message that tells the player to relogin when they open the cash shop and their out of sync?

For example:

"Cash Shop has been updated, please re-login to view the updated list" 

This wouldn't work, or most likely it's not efficient, I'd rather make all players log again, would be the same thing if I just re-start the server.

 

I think you misunderstood my post. I'm saying if we could make it "pop-up" a message after clicking the cash shop button stating that the cash shop has been updated and they need to login again in order to view the updated list. They will always get that pop up message unless they login again.

 

well a custom message in message.conf can do that

not really a big deal if you want

 

if i'm not mistaken on official they update stuff every maintenance

though i like the idea but not really that important

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.

Loading...

×
×
  • Create New...

Important Information

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