Jedzkie 58 Posted June 24, 2013 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. Quote Share this post Link to post Share on other sites
Weiss 3 Posted June 24, 2013 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.. Quote Share this post Link to post Share on other sites
Ind 945 Posted June 24, 2013 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. Quote Share this post Link to post Share on other sites
Weiss 3 Posted June 24, 2013 (edited) 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 June 24, 2013 by Weiss Quote Share this post Link to post Share on other sites
Ind 945 Posted June 24, 2013 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. Quote Share this post Link to post Share on other sites
Diurnal 3 Posted June 24, 2013 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" Quote Share this post Link to post Share on other sites
Jedzkie 58 Posted June 24, 2013 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 Quote Share this post Link to post Share on other sites
Relzz 32 Posted June 25, 2013 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: Quote Share this post Link to post Share on other sites
Sneaky 1 Posted June 29, 2013 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. Quote Share this post Link to post Share on other sites
Diurnal 3 Posted June 29, 2013 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. Quote Share this post Link to post Share on other sites
KeiKun 8 Posted June 29, 2013 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 Quote Share this post Link to post Share on other sites
Lelouch 10 Posted September 8, 2013 Maybe just add it on @reloaditemdb? Instead of making an custom @command for reloading cashshop_db Quote Share this post Link to post Share on other sites