Jump to content

[NOOB REQUEST (:P)]Searching for LUA function


Recommended Posts

Hello devs, as you may have noticed I'm one of the noobiest devs around here so I need your help today don't worry it's something simple :P
Alright so I need a simple LUA function. I have this array of skills

Spoiler

local anti_skill_list = {221, 222, 223, 224, 225, 226, 227, 228, 229}

and I want to check if some of them is Perfect Master and if it's not then say("You can't do this until one of these skills are Perfect Master and blah blah blah...")

Just that :)

So thank you in advance guys I appreciate every comment I get :)

 

EDIT: I got it don't worry about it :P

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Thanks for the reply @Denis I did it in a different way tho,

Spoiler

            PERFECT_MASTER_SKILL_LEVEL = 40
            local ward_perfect = 0
            local new_skill_list = {221, 222, 223, 224, 225, 226, 227, 228, 229}
            for i = 1, table.getn(new_skill_list) do
                skill_vnum = new_skill_list
                if pc.get_skill_level(skill_vnum) == PERFECT_MASTER_SKILL_LEVEL then
                    ward_perfect = 1
                end
            end
            
            if ward_perfect != 1 then
                say("Sorry, you need a Perfect Master and blah blah blah...")
                say("")
                return
            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

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.