Jump to content

Bg consume


Anubis-K

Recommended Posts


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   21
  • Joined:  01/15/13
  • Last Seen:  

File Name: Bg consume

File Submitter: Anubis-K

File Submitted: 25 Aug 2014

File Category: Source Modifications

Content Author: Brian (first) ->AnubisK (recoded)


Recode of Brian's Item consumption mapflag.
It allows to use BG consumables only in Battleground under bg_consume mapflag.


More information here:
http://rathena.org/board/topic/97556-bg-consume-items-tlema-comes-to-rathena/



Compatible with: 20ff69e



Click here to download this file

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:  

you know, there's un-consistency on BG_CHARID, first you decided on battleground.h then u redefine on script that might the value maybe different.

maybe better if:

  • BG_CHARID as constant in src/map/script.c#L2318script_set_constant("BG_CHARID",BG_CHARID,false); or,
  • make script command 'getitemgb' so the card0~3 assignment will be done here, easier for user to use maybe.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   21
  • Joined:  01/15/13
  • Last Seen:  

I did not know about the : script_set_constant(), therefore I do not now know how to use right now, but i'll search in the code to figure it out.

 
May be an other option could be to use a battle config option: 
// Battleground ID: if you want to use special battleground restricted items
// bg_charid: 14999
// Trade restrictions for battleground items
// bg_chartrade_restriction: 91

therefore in the code I can call it like: 

if( battle_config.bg_charid && bla = bla && bla bla)

And in the npc:

set .@cID, getbattleflag("bg_charid");

What do you think?

 

btw: as a first version I wanted to preserve the original code, new (hopefully-not-bugged) versions are coming.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...