lupus Posted July 26, 2014 Posted July 26, 2014 It would be really useful, an command @reloadcshop. Having to restart the server to update the cash shop ... is something that would be good to avoid ...
lupus Posted July 26, 2014 Author Posted July 26, 2014 As far as I can see ... no /wahor not this documented? https://github.com/rathena/rathena/blob/master/doc/atcommands.txt @reload <type> @reloadatcommand @reloadbattleconf @reloadinstancedb @reloaditemdb @reloadmobdb @reloadmotd @reloadmsgconf @reloadpacketdb @reloadpcdb @reloadquestdb @reloadscript @reloadskilldb @reloadstatusdb Reloads a database or configuration file. Databases: -- instancedb: Instance Database -- itemdb: Item Database -- mobdb: Monster Database -- packetdb: Packet Database -- questdb: Quest Database -- script: NPC Scripts -- skilldb: Skill Database Configuration files: -- atcommand: Atcommand Settings -- battleconf: Battle Settings (may require relog) -- motd: Message of the Day -- msgconf: Message Configuration -- pcdb: Player Settings -- statusdb: Status Settings
Pneuma Posted July 26, 2014 Posted July 26, 2014 if you use sql db then @reloaditemdb works. you just need to relog or else it won't update. prontera,164,174,3 script CS Manager 510,{ //NPC Name set .npcname$, "Cash Shop"; mes "[^00AAAA"+.npcname$+"^000000]"; mes "Welcome to the ^00AAAACash Shop^000000!"; if (getgmlevel() == 99){ menu "Add Cash Item",AddCash,"Remove Cash Item",RemoveCash,"View Cash Items",ViewCash;} else { menu "View Cash Items",ViewCashPlayer;} AddCash: next; mes "[^00AAAA"+.npcname$+"^000000]"; mes "Please input the following Variables:"; mes "Cash Type, Item ID, Price"; mes "[Types]","New: 0","Hot: 1","Limited: 2","Rental: 3","Equipment: 4","Scrolls: 5","Consumable: 6","Miscellaneous: 7"; input .@Type$; input .@ItemID$; input .@Price$; query_sql("INSERT INTO `ragnarok`.`item_cash_db` (`tab`, `item_id`, `price`) VALUES ('"+.@Type$+"', '"+.@ItemID$+"', '"+.@Price$+"')"); atcommand "@reloaditemdb"; next; mes "[^00AAAA"+.npcname$+"^000000]"; mes "Alrighty! I think that worked~ Just relog to see if it worked."; close; RemoveCash: next; mes "[^00AAAA"+.npcname$+"^000000]"; mes "Please input the following Variables:"; mes "Cash Type and Item ID"; mes "[Types]","New: 0","Hot: 1","Limited: 2","Rental: 3","Equipment: 4","Scrolls: 5","Consumable: 6","Miscellaneous: 7"; input .@Type$; input .@ItemID$; query_sql("DELETE FROM `ragnarok`.`item_cash_db` WHERE `tab`='"+.@Type$+"' and `item_id`='"+.@ItemID$+"';"); atcommand "@reloaditemdb"; next; mes "[^00AAAA"+.npcname$+"^000000]"; mes "Alrighty! I think that worked~ Just relog to see if it worked."; close; ViewCash: next; next; mes "[^00AAAA"+.npcname$+"^000000]"; mes "[^00AA00Type^000000] [^00AAAAItem Name^000000]"; for( .@i = 0; .@i < .num_items; .@i++ ) mes "[^00AA00"+.tab[.@i]+"^000000] [^00AAAA"+getitemname(.itemid[.@i])+"^000000]("+.itemid[.@i]+")"; close; ViewCashPlayer: next; mes "[^00AAAA"+.npcname$+"^000000]"; for( .@i = 0; .@i < .num_items; .@i++ ) mes "[^00AAAA"+getitemname(.itemid[.@i])+"^000000]("+.itemid[.@i]+")"; close; OnInit: .num_items = query_sql("SELECT `tab`, `item_id` FROM `item_cash_db` ORDER BY `tab`", .tab,.itemid ); end; } this is my own custom cashshop manager.
Cydh Posted July 26, 2014 Posted July 26, 2014 cash shop is part of itemdb. it's reloaded the @reloaditemdb and if the question, "why after @reloaditemdb the cash shop isn't updated?" -> relog
Recommended Posts