This source modification adds a new mapflag: bg_consume, and adds an NPC (Telma)
that sells consumable items which can only be used on maps with the 'bg_consume' mapflag.
create a char named "Battleground"
First you should check if that name exists:- delete their char, then create a new one
When you are ready to create the char named "Battleground", use this SQL query:
Compatible Hercules/rAthena/eAthena
credits:
The original idea is from someone else, I'm just not sure who. It started in 2009 when a player showed us screenshots (from another server) of the Telma NPC and asked if we could implement something similar--Battleground's consumables that could only be used in BG. Based on the screenshots, I came up with this. Since then, several people have asked about it on eAthena but I was too lazy to update it so I just linked them to our old SVN/Trac. Finally I updated it, and here it is!
Thanks again to whoever came up with the idea!
that sells consumable items which can only be used on maps with the 'bg_consume' mapflag.
- download and apply this diff patch: battlegroud.diff
create a char named "Battleground"
First you should check if that name exists:- delete their char, then create a new one
- use a different name
- use the existing char (WARNING: if they rename the char named "Battleground", it will rename the "Battleground's items" too! If they delete the char named "Battleground", they will become "Unknown's item".)
When you are ready to create the char named "Battleground", use this SQL query:
- SQL
INSERT INTO `char` (`name`) VALUES ('Battleground'); - make note of the char_id (of the char named "Battleground")
SQL
SELECT char_id FROM `char` WHERE `name`='Battleground';
Write this down somewhere or remember it for the next steps.
- edit source
- open /src/map/battleground.h
CODE
#define BG_CHARID 165100 // char named "Battleground"
#define BG_TRADE 91 // trade mask of BG consumables
- set BG_CHARID to the char_id from step #3
- set BG_TRADE to the trade mask (trade restrictions) you want for Battleground's consumables
(trade bits are the same as /db/item_trade.txt)
CODE
// Trading mask values:
// 1: Item can't be dropped
// 2: Item can't be traded (nor vended)
// 4: Wedded partner can override restriction 2.
// 8: Item can't be sold to npcs
// 16: Item can't be placed in the cart
// 32: Item can't be placed in the storage
// 64: Item can't be placed in the guild storage
If you want BG potions to be ranked (ranked Condensed White Potions, ranked Blue Potions, etc.),
open /src/map/pc.c and uncomment this:
CODE
// else if(BG_CHARID == char_id)
// return 5; - edit NPC script (Telma)
- open /npc/battleground/bg_supplier.txt
CODE
set .@BG_CHARID, 165100; // character named "Battleground"
- (line 43) set .@BG_CHARID to the char_id from step #3
- (lines 25-39) edit the menu/prices to your liking
- (line 88) add the 'bg_consume' mapflag to any other maps you want to allow "Battleground's consumables" to be used on
- Save and close all files. Recompile.
Compatible Hercules/rAthena/eAthena
credits:
The original idea is from someone else, I'm just not sure who. It started in 2009 when a player showed us screenshots (from another server) of the Telma NPC and asked if we could implement something similar--Battleground's consumables that could only be used in BG. Based on the screenshots, I came up with this. Since then, several people have asked about it on eAthena but I was too lazy to update it so I just linked them to our old SVN/Trac. Finally I updated it, and here it is!
Thanks again to whoever came up with the idea!
Attachments
Last edited by a moderator: