Why not to add a item to release the archer's bag .
I know some mods have a item to restack the ammo.
i.e. if i have 34 arrow in a stack . i use the item on the arrows , it will become 99 arrows and i will lose some GP equal to 65 arrow.
the code may like this in the mod event(i wrote them by myself and don't know if any bug in it):
if (GetTag(GetItemActivated()) == "MagicAmmo")
{
if ((GetBaseItemType(oTarget) == BASE_ITEM_ARROW)
|| (GetBaseItemType(oTarget) == BASE_ITEM_BOLT)
|| (GetBaseItemType(oTarget) == BASE_ITEM_DART)
|| (GetBaseItemType(oTarget) == BASE_ITEM_THROWINGAXE)
|| (GetBaseItemType(oTarget) == BASE_ITEM_SHURIKEN)
|| (GetBaseItemType(oTarget) == BASE_ITEM_BULLET)){
int nCrtSize = GetItemStackSize(oTarget);
int nMaxAmmo;
if ((GetBaseItemType(oTarget) == BASE_ITEM_ARROW)
|| (GetBaseItemType(oTarget) == BASE_ITEM_BOLT)
|| (GetBaseItemType(oTarget) == BASE_ITEM_BULLET)){
nMaxAmmo = 99;
}
else{
nMaxAmmo = 50;
}
int nValue = GetGoldPieceValue(oTarget) * (nMaxAmmo - nCrtSize) ; //the value,change to what u dms wanna
int nGP = GetGold(oPC);
if (nGP >= nValue){
SetItemStackSize(oTarget,nMaxAmmo);
SetStolenFlag(oTarget,TRUE); // make sure no one use this to make gp
AssignCommand(oPC , TakeGoldFromCreature(nValue,oPC,TRUE));
}
else{
FloatingTextStringOnCreature("You have not enough money to do this...",oPC);
}
}
else{
FloatingTextStringOnCreature("You can not use it on this...",oPC);
}
}
Magical Ammo
Post your tips, ideas for improvements, requests for new features, etc. here
Locked
1 post
• Page 1 of 1
Return to “NS4 Ideas and Suggestions”
Jump to
- NWN1
- ↳ Neversummer 4
- ↳ Servers
- ↳ Neversummer 4
- ↳ Neversummer 4 Reflections (Closed)
- ↳ Neversummer Discussion
- ↳ NS4 News and Announcements
- ↳ General NS4 Discussion
- ↳ NS4 Ideas and Suggestions
- ↳ NS4 Help and Support
- ↳ The Bearded Bard II
- ↳ Neversummer 4 Documentation
- ↳ Guilds
- ↳ Your Guild Here
- ↳ Profiteers of War and Destruction
- ↳ Ragnar's Reavers
- ↳ Brotherhood of Pain
- ↳ Guild of Death & Strife
- ↳ Neversummer 3
- ↳ Neversummer Discussion
- ↳ Tweaks and mod updates
- ↳ NS3.5 News and Announcements
- ↳ Neversummer 3.5 General Discussion
- ↳ Help and Support
- ↳ NS3.5 Ideas and Suggestions
- ↳ Server Boards
- ↳ Neversummer3.5 East
- ↳ Neversummer3.5 North
- ↳ Neversummer3.5 West
- ↳ Guild Forums
- ↳ Your Guild Here
- ↳ Guardians of Neversummer
- ↳ The Chosen [TC]
- ↳ Chaotic Protectors
- ↳ Hells Angels
- ↳ Bloody Axes of Neversummer
- ↳ Guild of Triton Dragon
- ↳ Rogue Squadron
- ↳ Thunderhead Clan
- ↳ Phoenix Dragoons
- ↳ NWN Discussion
- Global Neversummer Discussion
- Meta-Forum
- General Computer Support
- General Linux Support
- NWN2 (Cancelled)
- ↳ Neversummer 5 (Cancelled)
- ↳ NS5 News and Announcements
- ↳ NS5 General Discussion
- ↳ NS5 Ideas and Suggestions
- ↳ Neversummer 5 Documentation
- ↳ NS5 Player Polls
- ↳ NS5 Help and Support
- ↳ NWN2 Rants and Raves
- ↳ The Bearded Bard III
- ↳ NS5 Development Forums