• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    [Actions] Un item que de set

    Compartir:

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

    1default [Actions] Un item que de set el Mar Nov 27, 2018 9:27 pm

    zephiro

    avatar
    Miembro
    Miembro
    Descripcion escribió:Hola miembros de la comunidad.

    Hoy pido de su sabiduría para poder tener un ítem que al darle clic se convierta en un plate set.

    Tfs 1.0

    Id: 11402 -> item que se usara para convertilo en set.
    Id: 2457 > Steel Helmet
    id: 2463 -> Plate Armor
    id: 2647 -> Plate Legs
    id: 2171 -> Platinum Amulet

    intente realizar un scrip, pero realmente no se lo que hice xD

    function onUse(cid, item, fromPosition, itemEx, toPosition)

    if item.itemid == 11402 then
    doplayeradditem(cid,2457,1)

    retunr false
    end
    end

    Algo asi pensaba hacerlo, pero no funciono xD, espero me puedan ayudar  D:
    Imagen Explicativa escribió:Imagen Explicativa:
    Version del Scripts: TFs 1.x

    Ver perfil de usuario https://www.youtube.com/channel/UCN7LXy4Jk7x8qiYA4ohvIeg?view_as

    2default Re: [Actions] Un item que de set el Mar Nov 27, 2018 9:37 pm

    [Admin] God Maya

    avatar
    Administrador
    Administrador
    Código:
    <action itemid="xxxx" script="set.lua"/>

    xxxx ------< id del item que dara el set



    Código:
    function onUse(player, item, fromPosition, target, toPosition, isHotkey)

          player:addItem(xxxx, ccccc)  ------> xxxx id del item/ ccccc cantidad del item
          player:addItem(xxxx, ccccc)  ------> xxxx id del item/ ccccc cantidad del item
          player:addItem(xxxx, ccccc)  ------> xxxx id del item/ ccccc cantidad del item
          player:addItem(xxxx, ccccc)  ------> xxxx id del item/ ccccc cantidad del item
          player:addItem(xxxx, ccccc)  ------> xxxx id del item/ ccccc cantidad del item
       
       
       item:remove(1)

       return true
    end



    Ver perfil de usuario http://www.tibiaface.com

    3default Re: [Actions] Un item que de set el Mar Nov 27, 2018 9:48 pm

    zephiro

    avatar
    Miembro
    Miembro
    Mucchas gracias God Maya, me funciono.

    Me interesaria saber que code .lua es lo que acepta mi ot. es decir.. exite alguna libreria dentro de mi ot y si es asi. donde la puedo consultar?

    por lo que veo son muuy diferentes el mio al tuyo... no sabia que version estaba tratando de meter ami ot si 1.2 o 0.3 o X version. donde puedo aprender mas al respecto?

    GRACIAS!



    Very Happy Resuelto Gracias Very Happy

    Ver perfil de usuario https://www.youtube.com/channel/UCN7LXy4Jk7x8qiYA4ohvIeg?view_as

    4default Re: [Actions] Un item que de set el Mar Nov 27, 2018 9:57 pm

    [Admin] God Maya

    avatar
    Administrador
    Administrador
    Código:

    Game
       Game.createContainer(itemId, size[, position])
       Game.createItem(itemId[, count[, position]])
       Game.createMonster(monsterName, position[, extended = false[, force = false]])
       Game.createNpc(npcName, position[, extended = false[, force = false]])
       Game.createTile(position[, isDynamic = false])
       Game.createTile(x, y, z[, isDynamic = false])
       Game.getExperienceStage(level)
       Game.getGameState()
       Game.getHouses()
       Game.getMonsterCount()
       Game.getNpcCount()
       Game.getPlayerCount()
       Game.getPlayers()
       Game.getReturnMessage(value)
       Game.getSpectators(position[, multifloor = false[, onlyPlayer = false[, minRangeX = 0[, maxRangeX = 0[, minRangeY = 0[, maxRangeY = 0]]]]]])
       Game.getTowns()
       Game.getWorldType()
       Game.loadMap(path)
       Game.setGameState(state)
       Game.setWorldType(type)   
       Game.startRaid(raidName)

    Combat
       Combat()   
       combat:execute(creature, variant)
       combat:setArea(area)
       combat:setCallback(key, function)
       combat:setCondition(condition)
       combat:setFormula(type, mina, minb, maxa, maxb)
       combat:setOrigin(origin)
       combat:setParameter(key, value)
       
    Condition
       Condition(conditionType[, conditionId = CONDITIONID_COMBAT])   
       condition:addDamage(rounds, time, value)
       condition:clone()
       condition:delete()
       condition:getEndTime()
       condition:getIcons()
       condition:getId()
       condition:getSubId()
       condition:getTicks()
       condition:getType()
       condition:setFormula(mina, minb, maxa, maxb)
       condition:setOutfit(lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet[, lookAddons[, lookMount]])
       condition:setOutfit(outfit)
       condition:setParameter(key, value)
       condition:setTicks(ticks)
       
    Container
       Container(uid)   
       container:addItem(itemId[, count/subType = 1[, index = INDEX_WHEREEVER[, flags = 0]]])
       container:addItemEx(item[, index = INDEX_WHEREEVER[, flags = 0]])
       container:getCapacity()
       container:getEmptySlots([recursive = false])
       container:getItem(index)
       container:getItemCountById(itemId[, subType = -1])
       container:getItemHoldingCount()
       container:getSize()
       container:hasItem(item)
       
    Creature
       Creature(id or name or userdata)
       creature:addCondition(condition[, force = false])
       creature:addHealth(healthChange)
       creature:addMana(manaChange[, animationOnLoss = false])
       creature:canSee(position)
       creature:canSeeCreature(creature)
       creature:changeSpeed(delta)
       creature:getBaseSpeed()
       creature:getCondition(conditionType[, conditionId = CONDITIONID_COMBAT[, subId = 0]])
       creature:getDamageMap()
       creature:getDescription(distance)
       creature:getDirection()
       creature:getFollowCreature()
       creature:getHealth()
       creature:getId()
       creature:getLight()
       creature:getMana()
       creature:getMaster()
       creature:getMaxHealth()
       creature:getMaxMana()
       creature:getName()
       creature:getOutfit()
       creature:getParent()
       creature:getPathTo(pos[, minTargetDist = 0[, maxTargetDist = 1[, fullPathSearch = true[, clearSight = true[, maxSearchDist = 0]]]]])
       creature:getPosition()
       creature:getSkull()
       creature:getSpeed()
       creature:getSummons()
       creature:getTarget()
       creature:getTile()
       creature:isCreature()
       creature:isHealthHidden()
       creature:isInGhostMode()
       creature:isRemoved()
       creature:registerEvent(name)
       creature:remove()
       creature:removeCondition(conditionType[, conditionId = CONDITIONID_COMBAT[, subId = 0[, force = false]]])
       creature:say(text, type[, ghost = false[, target = nullptr[, position]]])
       creature:setDirection(direction)
       creature:setDropLoot(doDrop)
       creature:setFollowCreature(followedCreature)
       creature:setHiddenHealth(hide)
       creature:setLight(color, level)
       creature:setMaster(master)
       creature:setMaxHealth(maxHealth)
       creature:setOutfit(outfit)
       creature:setSkull(skull)
       creature:setTarget(target)
       creature:teleportTo(position[, pushMovement = false])
       creature:unregisterEvent(name)
       
    Group
       Group(id)   
       group:getAccess()
       group:getFlags()
       group:getId()
       group:getMaxDepotItems()
       group:getMaxVipEntries()
       group:getName()
       
    Guild
       Guild(id)   
       guild:addRank(id, name, level)
       guild:getId()
       guild:getMembersOnline()
       guild:getMotd()
       guild:getName()
       guild:getRankById(id)
       guild:getRankByLevel(level)
       guild:setMotd(motd)
       
    House
       House(id)   
       house:getAccessList(listId)
       house:getBedCount()
       house:getBeds()
       house:getDoorCount()
       house:getDoors()
       house:getExitPosition()
       house:getId()
       house:getName()
       house:getOwnerGuid()
       house:getRent()
       house:getTileCount()
       house:getTiles()
       house:getTown()
       house:setAccessList(listId, list)
       house:setOwnerGuid(guid[, updateDatabase = true])
       
    Item
       Item(uid)   
       item:clone()
       item:decay()
       item:getActionId()
       item:getArticle()
       item:getAttribute(key)
       item:getCharges()
       item:getCount()
       item:getDescription(distance)
       item:getFluidType()
       item:getId()
       item:getName()
       item:getParent()
       item:getPluralName()
       item:getPosition()
       item:getSubType()
       item:getTile()
       item:getTopParent()
       item:getUniqueId()
       item:getWeight()
       item:hasAttribute(key)
       item:hasProperty(property)
       item:moveTo(position or cylinder)
       item:remove([count = -1])
       item:removeAttribute(key)
       item:setActionId(actionId)
       item:setAttribute(key, value)
       item:split([count = 1])
       item:transform(itemId[, count/subType = -1])
       
    ItemType
       ItemType(id or name)   
       itemType:getArmor()
       itemType:getArticle()
       itemType:getAttack()
       itemType:getCapacity()
       itemType:getCharges()
       itemType:getClientId()
       itemType:getDecayId()
       itemType:getDefense()
       itemType:getDescription()
       itemType:getDestroyId()
       itemType:getElementDamage()
       itemType:getElementType()
       itemType:getExtraDefense()
       itemType:getFluidSource()
       itemType:getHitChance()
       itemType:getId()
       itemType:getName()
       itemType:getPluralName()
       itemType:getRequiredLevel()
       itemType:getShootRange()
       itemType:getSlotPosition()
       itemType:getTransformDeEquipId()
       itemType:getTransformEquipId()
       itemType:getType()
       itemType:getWeaponType()
       itemType:getWeight([count = 1])
       itemType:hasSubType()
       itemType:isContainer()
       itemType:isFluidContainer()
       itemType:isMovable()
       itemType:isReadable()
       itemType:isRune()
       itemType:isStackable()
       itemType:isWritable()
       
    ModalWindow
       ModalWindow(id, title, message)   
       modalWindow:addButton(id, text)
       modalWindow:addChoice(id, text)
       modalWindow:getButtonCount()
       modalWindow:getChoiceCount()
       modalWindow:getDefaultEnterButton()
       modalWindow:getDefaultEscapeButton()
       modalWindow:getId()
       modalWindow:getMessage()
       modalWindow:getTitle()
       modalWindow:hasPriority()
       modalWindow:sendToPlayer(player)   item:isItem()
       modalWindow:setDefaultEnterButton(buttonId)
       modalWindow:setDefaultEscapeButton(buttonId)
       modalWindow:setMessage(text)
       modalWindow:setPriority(priority)
       modalWindow:setTitle(text)
       
    Monster
       Monster(id or userdata)   
       monster:addFriend(creature)
       monster:addTarget(creature[, pushFront = false])
       monster:getFriendCount()
       monster:getFriendList()
       monster:getSpawnPosition()
       monster:getTargetCount()
       monster:getTargetList()
       monster:getType()
       monster:isFriend(creature)
       monster:isIdle()
       monster:isInSpawnRange([position])
       monster:isMonster()
       monster:isOpponent(creature)
       monster:isTarget(creature)
       monster:removeFriend(creature)
       monster:removeTarget(creature)
       monster:searchTarget([searchType = TARGETSEARCH_DEFAULT])
       monster:selectTarget(creature)
       monster:setIdle(idle)
       monsterType:canPushCreatures()
       monsterType:canPushItems()
       monsterType:getArmor()
       monsterType:getAttackList()
       monsterType:getBaseSpeed()
       monsterType:getChangeTargetChance()
       monsterType:getChangeTargetSpeed()
       monsterType:getCombatImmunities()
       monsterType:getConditionImmunities()
       monsterType:getCorpseId()
       monsterType:getCreatureEvents()
       monsterType:getDefense()
       monsterType:getDefenseList()
       monsterType:getElementList()
       monsterType:getExperience()
       monsterType:getHealth()
       monsterType:getLight()
       monsterType:getLoot()
       monsterType:getManaCost()
       monsterType:getMaxHealth()
       monsterType:getMaxSummons()
       monsterType:getName()
       monsterType:getNameDescription()
       monsterType:getOutfit()
       monsterType:getRace()
       monsterType:getRunHealth()
       monsterType:getStaticAttackChance()
       monsterType:getSummonList()
       monsterType:getTargetDistance()
       monsterType:getVoices()
       monsterType:getYellChance()
       monsterType:getYellSpeedTicks()
       monsterType:isAttackable()
       monsterType:isConvinceable()
       monsterType:isHealthShown()
       monsterType:isHostile()
       monsterType:isIllusionable()
       monsterType:isPushable()
       monsterType:isSummonable()
       
    NetworkMessage
       NetworkMessage()   
       networkMessage:addByte(number)
       networkMessage:addDouble(number)
       networkMessage:addItem(item)
       networkMessage:addItemId(itemId)
       networkMessage:addPosition(position)
       networkMessage:addString(string)
       networkMessage:addU16(number)
       networkMessage:addU32(number)
       networkMessage:addU64(number)
       networkMessage:getByte()
       networkMessage:getPosition()
       networkMessage:getString()
       networkMessage:getU16()
       networkMessage:getU32()
       networkMessage:getU64()
       networkMessage:reset()
       networkMessage:sendToPlayer(player)
       networkMessage:skipBytes(number)
       
    Npc
       Npc([id or name or userdata])   
       npc:getSpeechBubble()
       npc:isNpc()
       npc:setMasterPos(pos[, radius])
       npc:setSpeechBubble(speechBubble)
       
    Party   
       party:addInvite(player)
       party:addMember(player)
       party:disband()
       party:getInviteeCount()
       party:getInvitees()
       party:getLeader()
       party:getMemberCount()
       party:getMembers()
       party:isSharedExperienceActive()
       party:isSharedExperienceEnabled()
       party:removeInvite(player)
       party:removeMember(player)
       party:setLeader(player)
       party:setSharedExperience(active)
       party:shareExperience(experience)
       
    Player
       Player(id or name or userdata)   
       player:addBlessing(blessing)
       player:addExperience(experience[, sendText = false])
       player:addItem(itemId[, count = 1[, canDropOnMap = true[, subType = 1[, slot = CONST_SLOT_WHEREEVER]]]])
       player:addItemEx(item[, canDropOnMap = false[, index = INDEX_WHEREEVER[, flags = 0]]])
       player:addItemEx(item[, canDropOnMap = true[, slot = CONST_SLOT_WHEREEVER]])
       player:addManaSpent(amount)
       player:addMapMark(position, type, description)
       player:addMoney(money)
       player:addMount(mountId)
       player:addOfflineTrainingTime(time)
       player:addOfflineTrainingTries(skillType, tries)
       player:addOutfit(lookType)
       player:addOutfitAddon(lookType, addon)
       player:addPremiumDays(days)
       player:addSkillTries(skillType, tries)
       player:addSoul(soulChange)
       player:canLearnSpell(spellName)
       player:channelSay(speaker, type, text, channelId)
       player:forgetSpell(spellName)
       player:getAccountId()
       player:getAccountType()
       player:getBankBalance()
       player:getBaseMagicLevel()
       player:getCapacity()
       player:getClient()
       player:getContainerById(id)
       player:getContainerId(container)
       player:getContainerIndex(id)
       player:getDeathPenalty()
       player:getDepotChest(depotId[, autoCreate = false])
       player:getEffectiveSkillLevel(skillType)
       player:getExperience()
       player:getFreeCapacity()
       player:getGroup()
       player:getGuid()
       player:getGuild()
       player:getGuildLevel()
       player:getGuildNick()
       player:getHouse()
       player:getInbox()
       player:getIp()
       player:getItemById(itemId, deepSearch[, subType = -1])
       player:getItemCount(itemId[, subType = -1])
       player:getLastLoginSaved()
       player:getLastLogout()
       player:getLevel()
       player:getMagicLevel()
       player:getManaSpent()
       player:getMaxSoul()
       player:getMoney()
       player:getOfflineTrainingSkill()
       player:getOfflineTrainingTime()
       player:getParty()
       player:getPremiumDays()
       player:getSex()
       player:getSkillLevel(skillType)
       player:getSkillPercent(skillType)
       player:getSkillTries(skillType)
       player:getSkullTime()
       player:getSlotItem(slot)
       player:getSoul()
       player:getStamina()
       player:getStorageValue(key)
       player:getTown()
       player:getVocation()
       player:hasBlessing(blessing)
       player:hasLearnedSpell(spellName)
       player:hasMount(mountId)
       player:hasOutfit(lookType[, addon = 0])
       player:isPlayer()
       player:isPzLocked()
       player:learnSpell(spellName)
       player:openChannel(channelId)
       player:popupFYI(message)
       player:removeBlessing(blessing)
       player:removeExperience(experience[, sendText = false])
       player:removeItem(itemId, count[, subType = -1[, ignoreEquipped = false]])
       player:removeMoney(money)
       player:removeMount(mountId)
       player:removeOfflineTrainingTime(time)
       player:removeOutfit(lookType)
       player:removeOutfitAddon(lookType, addon)
       player:removePremiumDays(days)
       player:save()
       player:sendChannelMessage(author, text, type, channelId)
       player:sendOutfitWindow()
       player:sendPrivateMessage(speaker, text[, type])
       player:sendTextMessage(type, text[, position, primaryValue = 0, primaryColor = TEXTCOLOR_NONE[, secondaryValue = 0, secondaryColor = TEXTCOLOR_NONE]])
       player:sendTutorial(tutorialId)
       player:setAccountType(accountType)
       player:setBankBalance(bankBalance)
       player:setCapacity(capacity)
       player:setGhostMode(enabled)
       player:setGroup(group)
       player:setGuild(guild)
       player:setGuildLevel(level)
       player:setGuildNick(nick)
       player:setMaxMana(maxMana)
       player:setOfflineTrainingSkill(skillId)
       player:setSex(newSex)
       player:setSkullTime(skullTime)
       player:setStamina(stamina)
       player:setStorageValue(key, value)
       player:setTown(town)
       player:setVocation(id or name or userdata)
       player:showTextDialog(itemId[, text[, canWrite[, length]]])
       
    Position
       Position([x = 0[, y = 0[, z = 0[, stackpos = 0]]]])
       Position([position])
       positionValue = position + positionEx
       positionValue = position - positionEx
       position == positionEx   
       position:getDistance(positionEx)
       position:isSightClear(positionEx[, sameFloor = true])
       position:sendDistanceEffect(positionEx, distanceEffect[, player = nullptr])
       position:sendMagicEffect(magicEffect[, player = nullptr])
       
    Teleport
       Teleport(uid)   
       teleport:getDestination()
       teleport:setDestination(position)
       
    Tile
       Tile(x, y, z)
       Tile(position)   
       tile:getBottomCreature()
       tile:getBottomVisibleCreature(creature)
       tile:getCreatureCount()
       tile:getCreatures()
       tile:getDownItemCount()
       tile:getFieldItem()
       tile:getGround()
       tile:getHouse()   
       tile:getItemById(itemId[, subType = -1])
       tile:getItemByTopOrder(topOrder)
       tile:getItemByType(itemType)
       tile:getItemCount()
       tile:getItemCountById(itemId[, subType = -1])
       tile:getItems()
       tile:getPosition()
       tile:getThing(index)
       tile:getThingCount()
       tile:getThingIndex(thing)
       tile:getTopCreature()
       tile:getTopDownItem()
       tile:getTopItemCount()
       tile:getTopTopItem()
       tile:getTopVisibleCreature(creature)
       tile:getTopVisibleThing(creature)
       tile:hasFlag(flag)
       tile:hasProperty(property[, item])
       tile:queryAdd(thing[, flags])
       
    Town
       Town(id or name)   
       town:getId()
       town:getName()
       town:getTemplePosition()
       
    Variant
       Variant(number or string or position or thing)
       Variant:getNumber()
       Variant:getPosition()
       Variant:getString()
       
    Vocation
       Vocation(id or name)   
       vocation:getAttackSpeed()
       vocation:getBaseSpeed()
       vocation:getCapacityGain()
       vocation:getClientId()
       vocation:getDemotion()
       vocation:getDescription()
       vocation:getHealthGain()
       vocation:getHealthGainAmount()
       vocation:getHealthGainTicks()
       vocation:getId()
       vocation:getManaGain()
       vocation:getManaGainAmount()
       vocation:getManaGainTicks()
       vocation:getMaxSoul()
       vocation:getName()
       vocation:getPromotion()
       vocation:getRequiredManaSpent(magicLevel)
       vocation:getRequiredSkillTries(skillType, skillLevel)
       vocation:getSoulGainTicks()



    Tema Solucionado



    Ver perfil de usuario http://www.tibiaface.com

    Contenido patrocinado


    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).