good evening, can anyone use this script to get an outfit when killing a boss
distro canary
distro canary
Lua:local config = { [{"centipede", "bug"}] = {mountReward = 1111, killGoal = 200, storage = 45001, monsterType = "bugs"}, -- check mounts.xml for the mountIds [{"ancient scarab", "giant spider"}] = {mountReward = 1111, killGoal = 500, storage = 45002, monsterType = "crawly things"}, [{"kollos", "spidris"}] = {mountReward = 1111, killGoal = 1500, storage = 45003, monsterType = "bosses"} } local killEvent = CreatureEvent("newOnKillEvent") killEvent:type("kill") function killEvent.onKill(creature, target) if not creature:isPlayer() then return true end if not target:isMonster() then return true end local monsterName = target:getName():lower() for v, k in pairs(config) do if table.contains(v, monsterName) then local currentStorage = creature:getStorageValue(k.storage) if currentStorage >= k.killGoal then return true end currentStorage = currentStorage < 1 and 1 or currentStorage + 1 creature:setStorageValue(k.storage, currentStorage) if currentStorage == k.killGoal then player:addMount(k.mountReward) end creature:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You have killed " .. currentStorage .. "/" .. k.killGoal .. " " .. k.monsterType .. ".") return true end end return true end killEvent:register() local loginEvent = CreatureEvent("registerOnKill") loginEvent:type("login") function loginEvent.onLogin(player) player:registerEvent("newOnKillEvent") return true end loginEvent:register()