View Single Post
09/16/15, 11:31 PM   #1
Motokosworld
Join Date: Sep 2015
Posts: 6
move item from bag to bank

Hi!
I a new to this forum here, i hope i got the right tread to ask a question. I am from Germany so sorry for any wrong English sentences/words.
I wanna make some Addons for TESO.
On the first hand to get better in coding on the other hand to have some to fit my needs.
I learn java at university and I am new to lua.
I tried to move an item from the bagpack to the bank but it do not work.
I used the "my first addon" help out of the wiki from esoui. And looked into other persons code. But still not working.

I want to move all items of a special kind to the bank, for example all food. I also wanted to use the "y" key function to stack if you can use it. ATM i do not find that function.

Hope someone can give me an example or some tipps. Also some webseites with more tutorials or code explanation would be helpful.
AT my programming its always a little problem /wrong thinking that stops all. >.<""!


My code atm: move 1 item and then crash game >.<



function FooAddon.OnOpenBank(eventcode)
for num = 1, GetBagSize(1), 1 do
firstFreeSlot = FindFirstEmptySlotInBag(2)
icon, istack, sellPrice, meetsUsageRequirement, locked, equipType, itemStyle, quality = GetItemInfo(1, num)
if 0 ~= GetNumBagFreeSlots(2) then
if IsProtectedFunction("RequestMoveItem") then
CallSecureProtected("RequestMoveItem", 1, num, 2, firstFreeSlot, istack)
else
RequestMoveItem(1, num, 2, firstFreeSlot, istack)
end
end
end
end

Last edited by Motokosworld : 09/17/15 at 01:23 AM.
  Reply With Quote