Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
any method to block for example items diferent of xxx id inside container->getID() == 1999 ? for example?
because i tested here, i can put a normal backpack inside quiver container and work normally like a quiver.
Hello guys.
I just added the code preseted on this thread inside player.cpp on my fork from tfs 1.3 and made:
Lua:
mkdir build
cd build
cmake ..
make
It compiled just fine as usually and I'm using the new tfs file generated. But when I get into the game and try to equip a backpack (example /i 1988) it just says: [CODE] you cannot dress this object there [/CODE]
I'm starting with programming, I'm really lost and I don't know what is going wrong. I already tried evetything. Could someone be so kind to help me with this issue? This is my first source modification!
@kor No, it is the solution presented on this thread only. I plan to use your solution after I see this one working properly because since I never made any changes in source code, I want to see if my changes generate any effect inside the game before moving to some better-developed solutions like yours.
Do you have any suggestions that could help me see if my modifications are being considered or to make it work?
@rpierott author's solution don't include slot accessibility check (that's why you can't wear backpack in arrow slot) - so I asked if my solution will work for you.
@pink_panther it will use arrows in normal order, so if you have (looking from left to right), 100 poison arrow, 100 arrow and 100 burst arrow it will shoot them in that order.
@kor I see, I saw ppl saying that now all containers are usable as quiver. I will definitely check you post today.
To create a Quiver, in your post you say>
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)
Where should I put that? Should I create a spell and invoke in game to test?
Hello fellow otlanders heres a little edit i did for my custom ot and i felt like sharing it.
First of all what is a quiver? A quiver is a container where u can put your arrows/bolts and use them while equiped with a bow/crossbow like show in the picture below.