Ir para conteúdo

guustavoal

Membro
  • Registro em

  • Última visita

  1. Estou usando o script normal de Exercise Training que vem com o Canary ou qualquer outro ot. Entretanto, estou tentando fazer para treinar Fist e Shield junto com o normal training, entretanto, nenhuma das minhas tentativas está dando certo. Como editar o seguinte script para treinar esses outros skills? Qual servidor ou website você utiliza como base? Canary Qual o motivo deste tópico? Script treinar fist e shield no mesmo exercise weapon. Você tem o código disponível? Se tiver publique-o aqui: ExerciseWeaponsTable = { -- MELE [28540] = { skill = SKILL_SWORD }, [28552] = { skill = SKILL_SWORD }, [35279] = { skill = SKILL_SWORD }, [35285] = { skill = SKILL_SWORD }, [28553] = { skill = SKILL_AXE }, [28541] = { skill = SKILL_AXE }, [35280] = { skill = SKILL_AXE }, [35286] = { skill = SKILL_AXE }, [28554] = { skill = SKILL_CLUB }, [28542] = { skill = SKILL_CLUB }, [35281] = { skill = SKILL_CLUB }, [35287] = { skill = SKILL_CLUB }, -- ROD [28544] = { skill = SKILL_MAGLEVEL, effect = CONST_ANI_SMALLICE, allowFarUse = true }, [28556] = { skill = SKILL_MAGLEVEL, effect = CONST_ANI_SMALLICE, allowFarUse = true }, [35283] = { skill = SKILL_MAGLEVEL, effect = CONST_ANI_SMALLICE, allowFarUse = true }, [35289] = { skill = SKILL_MAGLEVEL, effect = CONST_ANI_SMALLICE, allowFarUse = true }, -- RANGE [28543] = { skill = SKILL_DISTANCE, effect = CONST_ANI_SIMPLEARROW, allowFarUse = true }, [28555] = { skill = SKILL_DISTANCE, effect = CONST_ANI_SIMPLEARROW, allowFarUse = true }, [35282] = { skill = SKILL_DISTANCE, effect = CONST_ANI_SIMPLEARROW, allowFarUse = true }, [35288] = { skill = SKILL_DISTANCE, effect = CONST_ANI_SIMPLEARROW, allowFarUse = true }, -- WAND [28545] = { skill = SKILL_MAGLEVEL, effect = CONST_ANI_FIRE, allowFarUse = true }, [28557] = { skill = SKILL_MAGLEVEL, effect = CONST_ANI_FIRE, allowFarUse = true }, [35284] = { skill = SKILL_MAGLEVEL, effect = CONST_ANI_FIRE, allowFarUse = true }, [35290] = { skill = SKILL_MAGLEVEL, effect = CONST_ANI_FIRE, allowFarUse = true }, } local dummies = Game.getDummies() function LeaveTraining(playerId) if onExerciseTraining[playerId] then stopEvent(onExerciseTraining[playerId].event) onExerciseTraining[playerId] = nil end local player = Player(playerId) if player then player:setTraining(false) end return end function ExerciseEvent(playerId, tilePosition, weaponId, dummyId) local player = Player(playerId) if not player then return LeaveTraining(playerId) end if player:isTraining() == 0 then return LeaveTraining(playerId) end if not Tile(tilePosition):getItemById(dummyId) then player:sendTextMessage(MESSAGE_FAILURE, "Someone has moved the dummy, the training has stopped.") LeaveTraining(playerId) return false end local playerPosition = player:getPosition() if not playerPosition:isProtectionZoneTile() then player:sendTextMessage(MESSAGE_FAILURE, "You are no longer in a protection zone, the training has stopped.") LeaveTraining(playerId) return false end if player:getItemCount(weaponId) <= 0 then player:sendTextMessage(MESSAGE_FAILURE, "You need the training weapon in the backpack, the training has stopped.") LeaveTraining(playerId) return false end local weapon = player:getItemById(weaponId, true) if not weapon:isItem() or not weapon:hasAttribute(ITEM_ATTRIBUTE_CHARGES) then player:sendTextMessage(MESSAGE_FAILURE, "The selected item is not a training weapon, the training has stopped.") LeaveTraining(playerId) return false end local weaponCharges = weapon:getAttribute(ITEM_ATTRIBUTE_CHARGES) if not weaponCharges or weaponCharges <= 0 then weapon:remove(1) -- ?? player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your training weapon has disappeared.") LeaveTraining(playerId) return false end local isMagic = ExerciseWeaponsTable[weaponId].skill == SKILL_MAGLEVEL if not dummies[dummyId] then return false end local rate = dummies[dummyId] / 100 if isMagic then player:addManaSpent(500 * rate) else player:addSkillTries(ExerciseWeaponsTable[weaponId].skill, 7 * rate) end weapon:setAttribute(ITEM_ATTRIBUTE_CHARGES, (weaponCharges - 1)) tilePosition:sendMagicEffect(CONST_ME_HITAREA) if ExerciseWeaponsTable[weaponId].effect then playerPosition:sendDistanceEffect(tilePosition, ExerciseWeaponsTable[weaponId].effect) end if weapon:getAttribute(ITEM_ATTRIBUTE_CHARGES) <= 0 then weapon:remove(1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your training weapon has disappeared.") LeaveTraining(playerId) return false end local vocation = player:getVocation() onExerciseTraining[playerId].event = addEvent(ExerciseEvent, vocation:getBaseAttackSpeed() / configManager.getFloat(configKeys.RATE_EXERCISE_TRAINING_SPEED), playerId, tilePosition, weaponId, dummyId) return true end
  2. Estou usando a base do Canary 13.20. Sei C++, mas sou novo em lua e outras linguagens, tenho q fazer pra percorrer todos os addons que o char tem? como fazer um "loop" pra ver isso? Obrigado
  3. Boa tarde, Estou procurando por um script para dar ao player um bonus de 0.1% de exp para cada Addon full e montaria que o player tem. Encontrei na net vários scripts para dar bonus ao addon que o player esta usando, mas gostaria de dar bonus dependendo do numero total de addons e montarias. Alguém tem um script ou sabe uma forma de implementar isso? Obrigado

Informação Importante

Confirmação de Termo