Jump to content

Recommended Posts

 Hi there fellow Devs, I am looking for a group dungeon that would have the following function:
- Check if all the members in the party have the required level.
- Check if all the members of the party have a pass.
- If they don't meet the requirements just quit.

Thanks, if anyone comes up with a solution.

  • Love 1
Link to comment
Share on other sites

  • Premium
1 minute ago, ForGGet said:

Syreldar, I would like to ask you to remove this comment because it has nothing to do with the topic, and it is an advertisement

 

23 minutes ago, ForGGet said:

I will repay you for help

 

He is asking for a service, so there he goes.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

Quote

 

                if party.is_party() then
                    local pids = {party.get_member_pids()}
                    local noTicketMembers = {}
                    local levelCheck = true
                    local notEnoughLevelMembers = {}
                    local ticketCheck = true
                    local ticketGroup = {201184, 1, 201185, 1}
                    for i, pid in next, pids, nil do
                        q.begin_other_pc_block(pid)
                        
                        local canPass = false
                        for idx=1, table.getn(ticketGroup),2 do 
                            if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx+1] then
                                canPass = true
                                break
                            end
                        end

                        if not canPass then
                            table.insert(noTicketMembers, pc.get_name())
                            ticketCheck = false
                        end                

                        if pc.level > 99 then
                            table.insert(notEnoughLevelMembers, pc.get_name())
                            levelCheck = false
                        end
                        if pc.level < 80 then
                            table.insert(notEnoughLevelMembers, pc.get_name())
                            levelCheck = false
                        end
                        
                        q.end_other_pc_block()    
                    end
                    
                    if not ticketCheck then
                        say_oliwka(mob_name(ENTRY_MAN))
                        say("")
                        say_oliwka("ticket:")
                        for i, name in next, noTicketMembers, nil do
                            say_golden("   - "..name)
                        end
                        if levelCheck then
                            return
                        else
                            wait()
                        end
                    end                    
                    
                    if not levelCheck then
                        say_title(mob_name(npc.get_race())..":")
                        say("")
                        say_oliwka("level:")
                        for i, name in next, notEnoughLevelMembers, nil do
                            say_golden("   - "..name)
                        end
                        return
                    end                    
                    if party.is_leader() then
                        if party.is_map_member_flag_lt("sluj_dung_exit_time", get_global_time() - ENTER_LIMIT_TIME * 60 ) then
                            say(" ")
                            say("")
                            say("")
                            local warp = select("-yes -","- no.. -")
                            if warp == 1 then
                                for i, pid in next, pids, nil do
                                    q.begin_other_pc_block(pid)
                                    canPass = false
                                    for idx=1, table.getn(ticketGroup),2 do 
                                        if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx+1] then
                                            canPass = true
                                            pc.remove_item(ticketGroup[idx], ticketGroup[idx+1])
                                            break
                                        end
                                    end
                                    q.end_other_pc_block()    
                                end                    
                            
                                if canPass then
                                    sluj_dung.make_dungeon()
                                end
                            end
                        else
                            setskin(NOWINDOW)
                            syschat("enter time.")
                        end    
                    else
                        setskin(NOWINDOW)
                        syschat("leader.")
                    end    

 

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • 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.