Jump to content

pc.give_item2_select() para >34k game


Croqueta
 Share

Recommended Posts

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...