Signup Now
Results 1 to 2 of 2
  1. #1
    Free User
    Join Date
    Jun 2017
    Posts
    6
    Reputation
    10
    Rep Power
    0

    Post Action move sword

    Hiho Guys, I'm using embuiment, and when the char is coming out of the cave he wanted to strip himself of the sword and when he turns up he equips himself, so I need an action that takes off and equips himself X sword.

    thanks in advance

  2. #2
    Free User Cisco's Avatar
    Join Date
    Aug 2014
    Location
    Brazil
    Posts
    1,424
    Reputation
    119
    Rep Power
    23
    Quote Originally Posted by miiguelccruz View Post
    Hiho Guys, I'm using embuiment, and when the char is coming out of the cave he wanted to strip himself of the sword and when he turns up he equips himself, so I need an action that takes off and equips himself X sword.

    thanks in advance
    1- Wrong area, post Lua ->> Requests

    2-

    test...Tomorrow I'll do a shorter version.

    auto(1000)

    --General Config

    local ChangeItems = true
    local HuntSections = {"Hunt"} --{"Hunt"} or {"Floor 1", "Floor 2"}
    --Weapon
    local UseWeapon = true
    local WeaponHunt = "name" --name weapon using hunt
    local WeaponNoHunt = "name" --name weapon no using hunt
    --Shield
    local UseShield = true
    local ShieldHunt = "name" --name shield using hunt
    local ShieldNoHunt = "name" --name shield no using hunt
    --Armor
    local UseArmor = true
    local ArmorHunt = "name" --name armor using hunt
    local ArmorNoHunt = "name" --name armor no using hunt
    --Helmet
    local UseHelmet = true
    local HelmetHunt = "name" --name helmet using hunt
    local HelmetNoHunt = "name" --name helmet no using hunt
    --Boots
    local UseBoots = true
    local BootsHunt = "name" --name boots using hunt
    local BootsNoHunt = "name" --name boots no using hunt

    --=========================================================================

    if $connected then
    if ChangeItems then
    if table.find(HuntSections, $wptsection) then
    if UseWeapon and itemcount(WeaponHunt) > 0 then
    equipitem(WeaponHunt, 'rhand', 100)
    wait(300,500)
    end
    if UseShield and itemcount(ShieldHunt) > 0 then
    equipitem(ShieldHunt, 'lhand', 100)
    wait(300,500)
    end
    if UseArmor and itemcount(ArmorHunt) > 0 then
    equipitem(ArmorHunt, 'chest', 100)
    wait(300,500)
    end
    if UseHelmet and itemcount(HelmetHunt) > 0 then
    equipitem(HelmetHunt, 'head', 100)
    wait(300,500)
    end
    if UseBoots and itemcount(BootsHunt) > 0 then
    equipitem(BootsHunt, 'feet', 100)
    wait(300,500)
    end
    else
    if UseWeapon and itemcount(WeaponNoHunt) > 0 then
    equipitem(WeaponNoHunt, 'rhand', 100)
    wait(300,500)
    end
    if UseShield and itemcount(ShieldNoHunt) > 0 then
    equipitem(ShieldNoHunt, 'lhand', 100)
    wait(300,500)
    end
    if UseArmor and itemcount(ArmorNoHunt) > 0 then
    equipitem(ArmorNoHunt, 'chest', 100)
    wait(300,500)
    end
    if UseHelmet and itemcount(HelmetNoHunt) > 0 then
    equipitem(HelmetNoHunt, 'head', 100)
    wait(300,500)
    end
    if UseBoots and itemcount(BootsNoHunt) > 0 then
    equipitem(BootsNoHunt, 'feet', 100)
    wait(300,500)
    end
    end
    end
    end


    Update, test... @miiguelccruz

    ChangeItem(CheckMonster, CheckPlayer, NameItemImbuing, NameItemNoImbuing)

    CheckMonster --> true or false
    CheckPlayer --> true or false
    NameItemImbuing --> 'name item'
    NameItemNoImbuing --> 'name item'

    example line 28

    auto(1000)

    local function ChangeItem(CheckMonster, CheckPlayer, NameItemImbuing, NameItemNoImbuing)
    if table.find(HuntSections, $wptsection) then
    if (not CheckPlayer) or (CheckPlayer and paround() == 0) or (not CheckMoster) or (CheckMonster and maroundreachable() == 0) then
    if itemcount(NameItemImbuing) > 0 then
    equipitem(NameItemImbuing)
    wait(300,500)
    end
    end
    else
    if (not CheckPlayer) or (CheckPlayer and paround() == 0) or (not CheckMoster) or (CheckMonster and maroundreachable() == 0) then
    if itemcount(NameItemNoImbuing) > 0 then
    equipitem(NameItemNoImbuing)
    wait(300,500)
    end
    end
    end
    end

    --===================================================================

    local ChangeItems = true
    local HuntSections = {"Hunt"} --{"Hunt"} or {"Floor 1", "Floor 2"}

    if $connected then
    if ChangeItems then
    ChangeItem(true, false, 'emerald sword', 'shiny blade') --emerald sword using hunt, shiny blade no using hunt
    end
    end

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •