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.
[font="Arial, Verdana, Tahoma, 'Trebuchet MS', sans-serif, Georgia, Courier, 'Times New Roman', serif;font-size:13px;background-color:rgb(239,241,243);"][/font]
- download and apply this diff patch: battlegroud.diff 13.46K 178 downloads
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[color=#0000FF;font-weight:bold;]INSERT[/color] INTO `char` (`name`) VALUES ([color=#FF0000]'Battleground'[/color]);
- make note of the char_id (of the char named "Battleground")
SQL[color=#0000FF;font-weight:bold;]SELECT[/color] char_id [color=#008000]FROM[/color] [color=#FFA500]`char`[/color] [color=#FFA500][color=#008000]WHERE[/color] [/color]`name`[color=#FFA500]=[/color][color=#FF0000]'Battleground'[/color];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"- set BG_CHARID to the char_id from step #3
#define BG_TRADE 91 // trade mask of BG consumables
- 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
CODEset .@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.
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!
Edited by AnnieRuru, 20 February 2014 - 04:21 PM.