bruno05 Posted December 11, 2019 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 3 Reputation: 2 Joined: 04/08/17 Last Seen: July 31, 2024 Share Posted December 11, 2019 View File CashShop Manager Well I searched this script a lot but I did not find any free, I found another on another site made by CarlosKiller, but for another emulator, so I adapted it to rathena. It has 2 script, one in English and one in Portuguese. Modifications made by me: Add item: A category has been added, a protection not to add the same item twice, after adding an item you will be asked if you want to add another item and at the end you will be asked if you want to do @reloaditemdb. Category: For example, 0 ~ 8 if you enter 9 you will receive a message stating that there is no such category and will ask you to retype the category. Delete item: The items in the store with the id appear in the list, making it easier to delete the desired item. Reload CashShop: After adding or removing an item in the cash shop is necessary to upgrade the store and must be logged in to be able to see the changes. It really took a lot of work, I hope you enjoy it. Note: I am not the creator of this script just adapted and modified many things in it to be compatible with rAthena. Note2: If it is allowed to put the original script link, let me know that post here. Below is the original script without modification. (remembering that does not work in rathena this script) There is a function that I removed, because I could not adapt correctly, that you could see the store items in npc, I was able to modify but when removing some item, he did not remove from the store, only giving restart, and when updating the store doubled the items as well. Spoiler /* -------------------- Tabela SQL ------------------------| DROP TABLE IF EXISTS `cash_shop`; CREATE TABLE `cash_shop` ( `id` int(11) unsigned not null auto_increment, `nameid` int(11) unsigned NOT NULL DEFAULT '0', `price` int(11) unsigned NOT NULL DEFAULT '0', `type` int(11) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM; */ // -/\- // / \Script Adaptado por Carloskiller. Bom uso, por favor não retirar os creditos. // // \\ //********** prontera,153,164,4 script Cash Shop 405,{ if(getgroupid() >= 80) goto Administrador; callshop "cash_shop",1; end; Administrador: set .npc$,"[^0000CDVerdedor de Rops^000000]"; mes .npc$; mes "Olá ^FF4500"+strcharinfo(0)+"^000000, vejo que você é um administrador !!"; mes "Lembre-se de sempre quando usar o comando --@reloadscript ou resetar o servidor"; mes "Atualizar o CASH SHOP !"; set @Menu$,"- ^FF0000Verificar loja.^000000:- ^8B4513Configurar Itens^000000:- ^006400Atualizar o CASH SHOP^000000:"; switch(select(@Menu$)){ case 1: callshop "cash_shop",1; end; case 2: mes "Nessa área posso adicionar e retirar itens da Loja de CASH."; mes "Basta você me indicar o que quer fazer que eu executo a ação."; mes "Porfavor escolha uma das opções."; next; switch(select("- ^00FFFFAdicionar Item^000000 ","- ^000080Retirar Item^000000","^FF4500- Atualizar Items^000000")) { case 1: mes "[ Gerente ]"; mes "Insira o ID do item."; input @id; mes "Insira o preço do item. (Cash)"; input @qtd; next; mes "[ Gerente ]"; mes "Item à adicionar ao Shop: ^EEAD2D"+getitemname(@id); mes "ID do Item: ^EEAD2D"+@id; mes "Preço: ^EEAD2D"+@qtd+" Cash's"; next; if(select("Prosseguir","Cancelar")==2) { close; } query_sql ("INSERT INTO `cash_shop` (nameid,price) VALUES ("+@id+","+@qtd+")"); mes "[ Gerente ]"; mes "Item adicionado com sucesso."; next; callfunc "UpdateShop",0; mes "Shop Atualizado com sucesso, bom jogo !"; goto Administrador; end; case 2: mes "[ Gerente ]"; mes "Insira o ID do item."; input @id; next; set @id1,0; set @id2,0; query_sql ("SELECT `id`,`nameid` FROM `cash_shop` WHERE `nameid`="+@id,@id1,@id2); mes "[ Gerente ]"; if(!@id2) { mes "Este item não existe no shop."; close; } mes "Item à retirar do Shop: ^EEAD2D"+getitemname(@id); mes "ID do Item: ^EEAD2D"+@id; next; if(select("Prosseguir","Cancelar")==2) { close; } query_sql ("DELETE FROM `cash_shop` WHERE `nameid`="+@id); npcshopdelitem "cash_shop",@id; next; mes "[ Gerente ]"; mes "Item retirado com sucesso."; goto Administrador; end; case 3: mes "[ Gerente ]"; mes "Deseja atualizar o Shop?"; if(select("Não","Sim")==1) { close; }; set .@a,1; callfunc "UpdateShop",0; mes "[ Gerente ]"; mes "Shop atualizado com sucesso."; close; } case 3: callfunc "UpdateShop",0; next; mes .npc$; mes "^0000FFCASH SHOP ATUALIZADO COM SUCESSO !^000000"; goto Administrador; end; } } function script UpdateShop { set $@InitShop,1; npcshopattach "cash_shop"; npcshopdelitem "cash_shop",512; for(set .@c,0;.@c < getarraysize($@cash_shop);set .@c,.@c+1){ npcshopdelitem "cash_shop",$@cash_shop[.@c]; } query_sql ("SELECT `nameid` , `price` FROM `cash_shop` WHERE `id`<'129' ORDER BY `nameid` asc",$@cash_shop,$@valoritem); for(set .@i,0;.@i!=getarraysize($@cash_shop);set .@i,.@i+1) npcshopadditem "cash_shop",$@cash_shop[.@i],$@valoritem[.@i]; if(getarraysize($@cash_shop)>=128) { query_sql ("SELECT `nameid` , `price` FROM `cash_shop` WHERE `id`>'127' ORDER BY `nameid` asc",$@cash_shop2,$@valoritem2); for(set .@i,0;.@i!=getarraysize($@cash_shop2);set .@i,.@i+1) npcshopadditem "cash_shop",$@cash_shop2[.@i],$@valoritem2[.@i]; } return; } - cashshop cash_shop -1,512:100 Submitter bruno05 Submitted 12/08/2019 Category Utilities Video Content Author CarlosKiller, bruno05 Quote Link to comment Share on other sites More sharing options...
sader1992 Posted December 11, 2019 Group: Content Moderator Topic Count: 55 Topics Per Day: 0.01 Content Count: 1691 Reputation: 716 Joined: 12/21/14 Last Seen: 13 hours ago Share Posted December 11, 2019 it could be useful for who don't have FluxCP but i would really suggest using FluxCP instead Quote Link to comment Share on other sites More sharing options...
M a p l e Posted December 11, 2019 Group: Members Topic Count: 22 Topics Per Day: 0.01 Content Count: 271 Reputation: 63 Joined: 02/04/19 Last Seen: October 27, 2023 Share Posted December 11, 2019 This is same script Quote Link to comment Share on other sites More sharing options...
bruno05 Posted December 11, 2019 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 3 Reputation: 2 Joined: 04/08/17 Last Seen: July 31, 2024 Author Share Posted December 11, 2019 1 hour ago, KeyMaster said: Este é o mesmo script The idea is the same but it's not the same, unless he used this free script as a base to make his, this script that I posted is from 2015 from the Cronus emulator, I just adapted it to rathena, and did some changes. Quote Link to comment Share on other sites More sharing options...
sader1992 Posted December 17, 2019 Group: Content Moderator Topic Count: 55 Topics Per Day: 0.01 Content Count: 1691 Reputation: 716 Joined: 12/21/14 Last Seen: 13 hours ago Share Posted December 17, 2019 (edited) both scripts have the same source , but they are not the same. Edited December 17, 2019 by sader1992 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.