Jump to content

Cash Shop Update Command


lupus

Recommended Posts


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  43
  • Reputation:   0
  • Joined:  01/19/13
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

we don't have yet?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  43
  • Reputation:   0
  • Joined:  01/19/13
  • Last Seen:  

As far as I can see ... no /wahor not this documented?

 

 


 

@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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  846
  • Reputation:   137
  • Joined:  02/26/14
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

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 /heh

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  43
  • Reputation:   0
  • Joined:  01/19/13
  • Last Seen:  

Ohhh okies :) thx

Link to comment
Share on other sites

×
×
  • Create New...