Croqueta Posted March 30, 2014 Report Share Posted March 30, 2014 function pc.give_item2_select(...) local tmp = { ['Alt']={}, ['Neu']={} } for i =0,89 do item.select_cell(i) if not tmp.Alt[item.get_id()] then tmp.Alt[item.get_id()] = i end end if table.getn(arg)< 2 then pc.give_item2(arg[1]) else pc.give_item2(arg[1],arg[2]) end for i =0,89 do item.select_cell(i) if not tmp.Neu[item.get_id()] then tmp.Neu[item.get_id()] = i end end local data = {{},{}} for id,slot in next,tmp.Alt do table.insert(data[1],slot) end for id,slot in next,tmp.Neu do table.insert(data[2],slot) end table.sort(data[1]);table.sort(data[2]) for i = 1,table.getn(data[1]) do for i = 1,table.getn(data[2]) do if data[1][i] ~= data[2][i] then item.select_cell(data[2][i]) return end end endend te da un item y selectiona por ejemplo: quest test begin state start begin when login begin pc.give_item2_select(19)-- te da el item y te lo selectiona for i = 0,6 do -- 0-6 = 7 bonus item.set_value(i,1,50000)-- espada+9 con 50000 TP-Bonus end end endend La funcion es para la game rev q es menos de 34k por q esa funcion ai no existe Para los expertos de ustedes en Lua, una simulasion de el 'Inventory' Debes iniciar sesión para ver el contenido del enlace en esta publicación. Alexitto0508, Jfirewall, Lincoln and 3 others 6 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.