Jump to content
  • 0

Place vip player with infinite arrows


Kater

Question


  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.20
  • Content Count:  175
  • Reputation:   2
  • Joined:  04/03/24
  • Last Seen:  

Configure for VIP player that only 1 arrow of each copy is needed in the inventory, giving the benefit of having infinite arrows

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  05/06/19
  • Last Seen:  

the simple way is something like that if(vip_status(VIP_STATUS_ACTIVE) ){getitem 607,1;}

or you can make a if on consumable itens in the source

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  407
  • Reputation:   55
  • Joined:  07/24/12
  • Last Seen:  

Try on battle.cpp https://github.com/rathena/rathena/blob/c74ad5c8c227f1464de790651a52b2b1f8f92b38/src/map/battle.cpp#L2618

add

if (pc_isvip(sd))
        return;

after

if (!battle_config.arrow_decrement)
        return;

 

final result

 

void battle_consume_ammo(map_session_data*sd, int skill, int lv)
{
    int qty = 1;
 
    if (!battle_config.arrow_decrement)
        return;
 
    if (pc_isvip(sd))
        return;
 
    if (skill) {....................................................
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.20
  • Content Count:  175
  • Reputation:   2
  • Joined:  04/03/24
  • Last Seen:  

17 hours ago, Jayz said:

Try on battle.cpp https://github.com/rathena/rathena/blob/c74ad5c8c227f1464de790651a52b2b1f8f92b38/src/map/battle.cpp#L2618

add

if (pc_isvip(sd))
        return;

after

if (!battle_config.arrow_decrement)
        return;

 

final result

 

void battle_consume_ammo(map_session_data*sd, int skill, int lv)
{
    int qty = 1;
 
    if (!battle_config.arrow_decrement)
        return;
 
    if (pc_isvip(sd))
        return;
 
    if (skill) {....................................................

 

I made the change, but the arrows are being consumed normally for VIP players.

 

void battle_consume_ammo(map_session_data*sd, int skill, int lv)
{
	int qty = 1;

	if (!battle_config.arrow_decrement)
		return;
	
	if (pc_isvip(sd))
        return;

	if (skill) {
		qty = skill_get_ammo_qty(skill, lv);
		if (!qty) qty = 1;
	}

	if (sd->equip_index[EQI_AMMO] >= 0) //Qty check should have been done in skill_check_condition
		pc_delitem(sd,sd->equip_index[EQI_AMMO],qty,0,1,LOG_TYPE_CONSUME);

	sd->state.arrow_atk = 0;
}

 

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
Answer this question...

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