Jump to content
  • 0

How to make Arrow Cant be consume?


mathlister

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   2
  • Joined:  06/10/16
  • Last Seen:  

As title says.

i wanna Ask u guys how can i make This Arrow >>> Link << And This Bullet >>> Link <<< 

To be Unlimited... And just for this Arrow/Bullet Only.. but All the Other Arrow/Bullet still be like normal consume...

 

1750,Arrow,Arrow,10,1,,1,25,,,,0x000A1848,7,2,32768,,1,,1,{},{},{}

13200,Bullet,Bullet,10,1,,2,10,,,,0x41000000,7,2,32768,,1,,3,{},{},{}

 

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  50
  • Topics Per Day:  0.02
  • Content Count:  763
  • Reputation:   227
  • Joined:  02/11/17
  • Last Seen:  

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   2
  • Joined:  06/10/16
  • Last Seen:  

// Are arrows/ammo consumed when used on a bow/gun?
  // 0 = No
  // 1 = Yes
  // 2 = Yes even for skills that do not specify arrow consumption when said
  // skill is weapon-based and used with ranged weapons (auto-guesses which
  // skills should consume ammo when it's acquired via a card or plagiarize)
  arrow_decrement: 1

 

 

 

 

yeah i know this type.. but i just wanna make those arrow and bullet Only... so other Arrow still need to be come like normal..

1705 = Unlimite 

for silver,fire,wind,cursed arrow will be cosume.. if the user/player not carry enoghf of it .. its will be dead end for them.. so need to head back to town to buy more..  im searching for that kinda stuff

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   2
  • Joined:  06/10/16
  • Last Seen:  

Sorry for the Bump.. Need Help so much.....
?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  233
  • Reputation:   49
  • Joined:  12/20/18
  • Last Seen:  

 
You will not get what you are asking for.

This is a source configuration change and the configuration there is not DB query to see which item should be consumed or not.

Verification is dad by TYPE of consumer ammunition.

What you can try to do is something simple like.

If the ammo has ID x, y, z ... getitem <x, y, z>, amount used;

 
  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   2
  • Joined:  06/10/16
  • Last Seen:  

Yeah i know.. but i want to make if that Arrow has been use and its keep in iventory  so its will be unlimited.. is there any callfunc can do that?

If the ammo has ID x, y, z ... getitem <x, y, z>, amount used; <<<< like that u said earlier..
Link to comment
Share on other sites

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3122
  • Reputation:   1614
  • Joined:  03/26/12
  • Last Seen:  

You can go into /src/ and find the function where arrows are reduced and just add an if-statement to check for the used arrow/bullet item IDs - if the ID is not one of those then continue to remove item, if it is, don't remove the item.

  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  3
  • Reputation:   0
  • Joined:  07/28/22
  • Last Seen:  

you can go to src/map/battle.cpp and find "if (sd->equip_index[EQI_AMMO] >= 0" which is about at line 2470. just add a judge with pc_isequipped function.

it could be:

if (sd->equip_index[EQI_AMMO] >= 0 && !pc_isequipped(sd,<your specified itemid>)) //Qty check should have been done in skill_check_condition
        pc_delitem(sd,sd->equip_index[EQI_AMMO],qty,0,1,LOG_TYPE_CONSUME);

recompile and done.

I tried, it's working.

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