Jump to content


Photo

bg_consume mapflag, "Battleground's items" that can only be used in BG

Script

  • Please log in to reply
7 replies to this topic

#1 Hideki

Hideki

    Member

  • Members
  • PipPip
  • 15 posts

Posted 17 April 2013 - 04:21 AM

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);"]Posted ImagePosted Image[/font]

  • download and apply this diff patch: Attached File  battlegroud.diff   13.46K   188 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"
    #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!


Edited by AnnieRuru, 20 February 2014 - 04:21 PM.

1_Sem_Tiacutetulo-1.png

Member


#2 jaBote

jaBote

    Advanced Member

  • Global Moderators
  • 2067 posts
  • Github:jaBote

Posted 17 April 2013 - 12:19 PM

Very nice release! I know this feature comes with eAmod and similar, so it's possible either that player took the idea from Zephyrus' package (which is absolutely legal) or that Zeph took that same idea from elsewhere and coded it, but as long as I remember the adjustments of this feature on eAmod is in a conf file.

 

It's quite a helpful release, I've seen tons of servers craving to only have this mod from eAmod, so it's quite useful. Thank you for your release!



#3 Hideki

Hideki

    Member

  • Members
  • PipPip
  • 15 posts

Posted 18 April 2013 - 12:40 PM

I'm glad you like it

 

This helps for those who have not zephyrus Mod.
People who have some kind of problem, do not hesitate to report.

 

:meow:


1_Sem_Tiacutetulo-1.png

Member


#4 GM Aspire

GM Aspire

    Member

  • Members
  • PipPip
  • 26 posts

Posted 13 May 2013 - 06:21 AM

wow nice :D



#5 Edgar

Edgar

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts
  • LocationMexico
  • Emulator:Hercules
  • Github:Edgar

Posted 28 October 2014 - 06:51 PM

Can someone please fix it to new revision?



#6 milk

milk

    Advanced Member

  • Members
  • PipPipPip
  • 91 posts
  • Location/dev/urandom
  • Emulator:Hercules

Posted 23 November 2014 - 12:41 PM

Can someone please fix it to new revision?

Bump.

Please update it for new Hercules version.


Spoiler


#7 JohnyRox

JohnyRox

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 18 March 2015 - 12:40 AM

Can someone please fix it to new revision?

Bump.

Please update it for new Hercules version.

 

Yes plz !



#8 Huitzilopotchli

Huitzilopotchli

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 21 April 2017 - 05:03 PM

I just change line to the new syntax of recent hercule's version ^^

Attached Files







Also tagged with one or more of these keywords: Script

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


This topic has been visited by 276 user(s)