Hello. Inspired @xydius solution I've created possibility to make use for quivers for both TFS (1.X based on otland/forgottenserver (https://github.com/otland/forgottenserver) and 0.X on Fir3element/3777 (https://github.com/Fir3element/3777)).
I won't post what to change in what line, instead here you have GitHub branches:
- TFS 1.X
- TFS 0.X
Created Quiver will:
Hope you enjoy
I won't post what to change in what line, instead here you have GitHub branches:
- TFS 1.X otland/forgottenserver (https://github.com/otland/forgottenserver/compare/master...rookgaard:feature/quiver)
- TFS 0.X Fir3element/3777 (https://github.com/Fir3element/3777/compare/master...rookgaard:feature/quiver)
Quiver
:- TFS 1.X
Lua:
local item = Game.createItem(11241, 1) -- example ID, in my case Expedition Backpack
item:setAttribute(ITEM_ATTRIBUTE_NAME, 'Quiver')
item:setAttribute(ITEM_ATTRIBUTE_ARTICLE, 'a') -- in my case Expedition Backpack have prefix "an", so I'm changing it here
player:addItemEx(item)
Lua:
local item = doCreateItemEx(11241, 1)
doItemSetAttribute(item, 'name', 'Quiver')
doItemSetAttribute(item, 'article', 'a')
doPlayerAddItemEx(cid, item)
Created Quiver will:
- not allow to put inside otems other than ammo (
container.cpp
part) - have max items amount set to 4 both in "look at" and "put into" (
container.h
,item.cpp
andprotocolgame.cpp
part); if you don't want to set max amout, just skip that changes - get first matching ammo item from Quiver in arrow slot
- allow in newer versions to put Quiver in arrow slot without enabling
CLASSIC_EQUIPMENT_SLOTS
option
Hope you enjoy