'PACI 2,317 Posted February 24, 2014 Mais tarde traduzo o tópico: Hello.I made this quest some time ago, I was still using rev 34083 and iMer posted a very useful lib. So, thanks to the quest functions which this lib has included, it allowed me to do something like belt system, but without belt inventory.Also, nowadays, we have that crap systems full, and that's why I post this here.Now first of all, iMer's stuff:libgame_item2_pc2.solibstdc++.so.6And now the quest: quest belt_system begin state start begin function is_belt() return item.vnum >= 18000 and item.vnum <= 18089 end function equip_belt() item2.equip(11) pc.setqf('belt', item.vnum) end when 18000.use or 18001.use or 18002.use or 18003.use or 18004.use or 18005.use or 18006.use or 18007.use or 18008.use or 18009.use or 18010.use or 18011.use or 18012.use or 18013.use or 18014.use or 18015.use or 18016.use or 18017.use or 18018.use or 18019.use or 18020.use or 18021.use or 18022.use or 18023.use or 18024.use or 18025.use or 18026.use or 18027.use or 18028.use or 18029.use or 18030.use or 18031.use or 18032.use or 18033.use or 18034.use or 18035.use or 18036.use or 18037.use or 18038.use or 18039.use or 18040.use or 18041.use or 18042.use or 18043.use or 18044.use or 18045.use or 18046.use or 18047.use or 18048.use or 18049.use or 18050.use or 18051.use or 18052.use or 18053.use or 18054.use or 18055.use or 18056.use or 18057.use or 18058.use or 18059.use or 18060.use or 18061.use or 18062.use or 18063.use or 18064.use or 18065.use or 18066.use or 18067.use or 18068.use or 18069.use or 18070.use or 18071.use or 18072.use or 18073.use or 18074.use or 18075.use or 18076.use or 18077.use or 18078.use or 18079.use or 18080.use or 18081.use or 18082.use or 18083.use or 18084.use or 18085.use or 18086.use or 18087.use or 18088.use or 18089.use begin local v = item.vnum local bonus = {{item2.get_attr(0)}, {item2.get_attr(1)}, {item2.get_attr(2)}, {item2.get_attr(3)}, {item2.get_attr(4)}, {item2.get_attr(5)}, {item2.get_attr(6)}} if belt_system.is_belt() and v ~= pc.getqf('belt') then belt_system.equip_belt() elseif item.select_cell(101) then item.remove() pc2.give_or_drop_item_and_select(v) for i = 1, table.getn(bonus) do if tonumber(bonus[i][1]) > 0 then item2.set_attr(i-1, bonus[i][1], bonus[i][2]) end end else belt_system.equip_belt() end end when 20090.take with belt_system.is_belt() begin local maintab = { [0] = { {18000, 1, 50}, {18010, 2, 20}, {18020, 44, 1}, {18030, 44, 1}, {18040, 78, 1}, {18050, 79, 1}, {18060, 80, 1}, {18070, 81, 1}, {18080, 63, 1} }, [1] = { {18000, 1, 50}, {18010, 2, 20}, {18020, 44, 1}, {18030, 44, 1}, {18040, 78, 1}, {18050, 79, 1}, {18060, 80, 1}, {18070, 81, 1}, {18080, 63, 1} }, [2] = { {18000, 1, 100}, {18010, 2, 40}, {18020, 44, 1}, {18030, 44, 1}, {18040, 78, 1}, {18050, 79, 1}, {18060, 80, 1}, {18070, 81, 1}, {18080, 63, 1} } } if pc.count_item(18900) < 1 then syschat("You dont have "..item_name(18900)..".") return end for i = 0, 2 do if item.vnum >= maintab[i][1] and item.vnum <= maintab[i][1]+9 and item2.get_attr(i) == 0 then if number(1,3) == 1 then item2.set_attr(i, maintab[i][2], maintab[i][3]) syschat('Your belt received a bonus.') else syschat('Wasnt possible to put a bonus in your belt.') end pc.remove_item(18900, 1) end end end endendIt also wasn't possible to add the stones to belt's, so I made also a NPC which gives your belt a bonus in exchange for that item.All we have to do in clientside, is adding a new line on our inventorywindow.py which is localed in locale.So we search this:{"index":EQUIPMENT_START_INDEX+10, "x":75, "y":35, "width":32, "height":32},And we write down the following line:{"index":EQUIPMENT_START_INDEX+11, "x":39, "y":106, "width":32, "height":32},We also need equipment_bg_without_ring.tga, or with_ring as you wish. And change the inventory image path to that file.That's all.Special thanks to iMer who had written the lib that made this possible, and without cmdchats and affects, because, since the item is equipped into a true slot, the bonuses are defined on item_proto, like a normal weapon, armor, etc. 8 ɓʀuɳѳ Martiɳs, Apolo, SINVAL o.O and 5 others reacted to this Share this post Link to post Share on other sites
SINVAL o.O 728 Posted February 24, 2014 Muito Obrigado, meu sistema de start files é o das files do sg será que se qu pedisse pra me dizer como ponho a lib no start do sg seria pedir muito ? 1 'PACI reacted to this Share this post Link to post Share on other sites
'PACI 2,317 Posted February 24, 2014 env LD_PRELOAD="/path/to/lib.so/" ./game & Share this post Link to post Share on other sites
RulleZ 311 Posted February 24, 2014 Bom trabalho. 1 'PACI reacted to this Share this post Link to post Share on other sites
Karbust 1,143 Posted February 24, 2014 boaskuais são as funções pro quest_functions e onde posso obter a imagem do inventario e como instalar as lib's corretamente?obrigado e assim ke for ao pc levas o teu +1 Share this post Link to post Share on other sites
'PACI 2,317 Posted February 24, 2014 Quando compilares a quest aquilo vai te dizer: Calls undeclared function:.........Essas funções todas que disser aí por baixo dessa frase são as que tens que meter.Imagem do inventário encontras por aí.Dependendo do teu SO FreeBSD (32 ou 64 bits) metes a ++.so6 em /usr/lib32 ou /usr/lib, e a outra já disse no comentário anterior como se faz. Share this post Link to post Share on other sites
kimameixede 70 Posted February 24, 2014 Desculpa pacificador mas podias ser mais explicito plz e que nunca instalei uma lib. Meto as libs em que pasta? esta: /usr/rain/channel/share_data/lib ? e que comandos tenho de executar? desde ja agradeço Share this post Link to post Share on other sites
'PACI 2,317 Posted February 24, 2014 Desculpa pacificador mas podias ser mais explicito plz e que nunca instalei uma lib. Meto as libs em que pasta? esta: /usr/rain/channel/share_data/lib ? e que comandos tenho de executar? desde ja agradeço como ponho a lib no start ? env LD_PRELOAD="/path/to/lib.so/" ./game &Na que quiseres. Share this post Link to post Share on other sites
kimameixede 70 Posted February 24, 2014 meu desculpa mas não perci peço desculpa. mas aqui vai a minha duvida: eu meti as libs nesta pasta /usr/lib esta correto? e agora existe algum comando para as instalar ou ativar? ou tenho de adicionar o ficheiro em algum lado? nao percebi mesmo. Peço que me expliques como se fosse burro. "Se ja nao for trololololo" Share this post Link to post Share on other sites
'PACI 2,317 Posted February 24, 2014 :tumbleweed:1. Metes a ++.so.6 em /usr/lib, ou /usr/lib32.2. Metes o .so onde quiseres.3. No teu script de start, adicionas env LD_PRELOAD=/caminho/ate/a/lib.so ./game &E pronto.Se não usas a rev 34083, não te aventures nisso. Share this post Link to post Share on other sites
kimameixede 70 Posted February 24, 2014 n da para por isso em game 2089m? Share this post Link to post Share on other sites
xxAndrexx 101 Posted February 24, 2014 Alguem poderia reupar o link libstdc++.so.6 esta offf por favor !!! Att. André.... quando tento abrir o link no navegador me aparece isto, ja tentei com o Chrome, Explorer e Mozila e todos aperece 404 not Found deixo imagem Share this post Link to post Share on other sites
'PACI 2,317 Posted February 24, 2014 Não, não está. Share this post Link to post Share on other sites