Jump to content

Recommended Posts

Hi,

I try to make alignment adding beans, but my quest suckk...

quest BeansUse begin
    state start begin
        when 30043.use begin
            local rank = pc.get_alignment()
            pc.change_alignment(rank + 1500)
            item.remove()
        end
    end
end 

I did something like that and didn't work :( 

Suggestions?

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Active Member

Here you go

Spoiler

quest bean begin
    state start begin
        when 71123.use begin
            say_title(item_name(item.vnum)) -- bean of glory
            say("Note: This magic bean raises your rank")
            say("to Chivalric.[ENTER]")
            say_reward("Do you want to eat it?")
            local choose = select("Yes", "No")

            local maxAlign = 20000
            local myAlign = pc.get_alignment()
            local align = math.abs(maxAlign-myAlign)
            if choose == 2 then
                return
            elseif choose == 1 then
                if myAlign == maxAlign then
                    say_title(item_name(item.vnum)) -- bean of glory
                    say_reward("Your rank is already Chivalric!")
                    return
                end

                if myAlign >= 6000 then
                    say_title(item_name(item.vnum)) -- bean of glory
                    say("|cffff3333ATTENTION|r: Your rank is high enough[ENTER]")
                    say_reward("Are you sure you want to eat the magic bean?[ENTER]")
                    local sigur = select("Yes", "No")

                    if sigur == 2 then
                        return
                    elseif sigur == 1 then
                        setskin(0)
                    end
                end

                pc.remove_item(71123,1)
                syschat(string.format(" Your grade has raised from %d to %d",myAlign,maxAlign))
                pc.change_alignment(align)
            end -- if
        end -- when
    end -- state
end -- quest

 

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.