Jump to content

Quest Function - Party Check Level


deadman

Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

Well guys, i do this bcs i need to put a minimum lv in a party and i dont know how i do so, for that i do this :)

function party:check_lv(value)
    local player_count,status = d.getf("player_count")
    for i = 1,player_count,1 do
        if(d.getf(string.format("player%d",tonumber(i))) != 0) then
            local vid = pc.select_vid(d.getf(string.format("player%d",tonumber(i))))
            if(party.is_party()) then
                if (pc.get_level() < value) then
				 table.insert(names,pc.get_name())
                status = false
            else
                status = true
            end
            pc.select_vid(vid)
        else
            status = false
        end
    end
    return status,names
	end
end

With that you check the lv of all characters in the group and you have the option to show the names of the ppl who dont have the minimum lv for enter :)

 

King Regards Deadman

  • Metin2 Dev 5
  • Good 5
  • Love 8
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.