Adding @reloadcashshop

Jedzkie

The Master of White Spaces
Messages
632
Points
0
Age
33
Location
Philippines
Discord
✪ Jedzkie#0662
IRC Nickname
Jedzkie
Github
Jedzkie
Emulator
Client Version
2016-03-16 RE
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.

 
+1 if possible
default_smile.png


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

 
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?

 
Last edited by a moderator:
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.
 
Last edited by a moderator:
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" 

 
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

 
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:

 
Last edited by a moderator:
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.

 
Last edited by a moderator:
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.

 
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

 
Maybe just add it on @reloaditemdb? Instead of making an custom @command for reloading cashshop_db
default_sleep.png


 
Back
Top