• TibiaFace

    Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...

    .
    demo menumenu

    Afiliados



    Votar:

    [Talkactions] Necesito addon doll que de un solo addon

    Compartir:

    Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje (Página 1 de 1.)

    diegoduran

    diegoduran
    Miembro
    Miembro
    Descripcion escribió:Necesito un addon adoll que dé un solo addon y no el completo

    como !first mage addon o !addon first mage
    o
    !second mage addon o !addon second mage

    Estoy trabajando en TFS 0.4
    Este es mi script

    Código:
    local femaleOutfits = {

      ["citizen"] = { 136 },

      ["hunter"] = { 137 },

      ["mage"] = { 138 },

      ["knight"] = { 139 },

      ["nobleman"] = { 140 },

      ["summoner"] = { 141 },

      ["warrior"] = { 142 },

      ["barbarian"] = { 147 },

      ["druid"] = { 148 },

      ["wizard"] = { 149 },

      ["oriental"] = { 150 },

      ["pirate"] = { 155 },

      ["assassin"] = { 156 },

      ["beggar"] = { 157 },

      ["shaman"] = { 158 },

      ["norsewoman"] = { 252 },

      ["nightmare"] = { 269 },

      ["jester"] = { 270 },

      ["brotherhood"] = { 279 },

      ["demonhunter"] = { 288 },

      ["yalaharian"] = { 324 }

    }



    local maleOutfits = {

      ["citizen"] = { 128 },

      ["hunter"] = { 129 },

      ["mage"] = { 130 },

      ["knight"] = { 131 },

      ["nobleman"] = { 132 },

      ["summoner"] = { 133 },

      ["warrior"] = { 134 },

      ["barbarian"] = { 143 },

      ["druid"] = { 144 },

      ["wizard"] = { 145 },

      ["oriental"] = { 146 },

      ["pirate"] = { 151 },

      ["assassin"] = { 152 },

      ["beggar"] = { 153 },

      ["shaman"] = { 154 },

      ["norsewoman"] = { 251 },

      ["nightmare"] = { 268 },

      ["jester"] = { 273 },

      ["brotherhood"] = { 278 },

      ["demonhunter"] = { 289 },

      ["yalaharian"] = { 325 }

    }



    function onSay(cid, words, param)

      local outfitName = string.lower(param)

      if string.len(outfitName) == 0 then

          return doPlayerSendCancel(cid, "The command requires 1 parameter.")

      end

      local dollCount = getPlayerItemCount(cid, 9693)

      if dollCount == 0 then

          return doPlayerSendCancel(cid, "You need a addondoll.")

      end

      local outfitList = getPlayerSex(cid) == 0 and femaleOutfits or maleOutfits

      local outfitId = outfitList[outfitName]

      if not outfitId then

          return doPlayerSendCancel(cid, "The name of the outfit does not exist.")

      end

      if canPlayerWearOutfit(cid, outfitId[1], 3) then

          return doPlayerSendCancel(cid, string.format("You already have the %s outfit.", outfitName))

      end

      doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)

      doPlayerRemoveItem(cid, 9693, 1)

      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string.format("You have obtained the complete %s outfit.", outfitName))

      doPlayerAddOutfit(cid, outfitId[1], 3)

      return true

    end
    Imagen Explicativa escribió:Imagen Explicativa: [Talkactions] Necesito addon doll que de un solo addon Sin_tz10
    Version del Scripts: TFs 0.4.0

    2 participantes
    https://www.facebook.com/diegoduran95

    akane

    akane
    Miembro
    Miembro
    donde dice doPlayerAddOutfit(cid, outfitId[1], 3) prueba con lo siguiente:

    doPlayerAddOutfit(cid, outfitId[1], 1) o doPlayerAddOutfit(cid, outfitId[1], 2) dependiendo del outfit que quieres que te de

    2 participantes

    Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje (Página 1 de 1.)

    Permisos de este foro:
    No puedes responder a temas en este foro.

     

    BienvenidosTibiaFace es una comunidad de Open Tibia. Para participar debes estar registrado (click para Regístrate).