Postado Junho 2, 2020 4 anos Estou usando um global tfs1.3x e queria saber se alguém conseguiria achar o erro dessa script ou criar alguma adaptação a ela. Funcionamento: Ao matar o monstro (the percht queen) o player ganhará a outfit correspondente. (não é necessários essas mensagens) Estou tentando faz muito tempo arrumar isso, porém sem êxito. (não é necessários essas mensagens no script, era mais para eu ver se estava dando ou não a outfit) local cfg = { addon_name = "Percht Raider", addon_male = 1162, addon_female = 1161, storage = 9787184 } function onKill(cid, creature, target) local player = creature:getPlayer() if not player then return true end if targetMonster or targetMonster:getName():lower() ~= 'the percht queen' then for uid in pairs(target:getDamageMap()) do if getPlayerStorageValue(cid, cfg.storage) < 1 then doPlayerAddOutfit(cid, cfg.addon_male, 3) doPlayerAddOutfit(cid, cfg.addon_female, 3) doSendMagicEffect(getThingPos(cid), 29) doPlayerSendTextMessage(cid, 19, "Addon " .. cfg.addon_name .. "full adicionado!!") setPlayerStorageValue(cid, cfg.storage, 1) else doPlayerSendTextMessage(cid, 19, "You already got your outfit.") end end end return true end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
Postado Junho 2, 2020 4 anos local killQueen = CreatureEvent("Kill Queen") function killQueen.onKill(player, target) if target:isPlayer() or target:getMaster() then return true end local outfit = { name = "Percht Raider", male = 1162, female = 1161, storage = 97184 } if target:getName():lower() == "the percht queen" then if player:getStorageValue(outfit.storage) < 1 then player:setStorageValue(outfit.storage, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Addon " .. outfit.name .. " full adicionado!") player:addOutfitAddon(outfit.male, 3) player:addOutfitAddon(outfit.female, 3) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) else doPlayerSendTextMessage(cid, 19, "You already got your outfit.") end end return true end killQueen:register() STYLLER OT 2022
Postado Junho 2, 2020 4 anos Autor Não funcionou, tentei colocar tanto no data/creaturescripts quanto na data/scripts e não funcionou (ele não aponta nenhum erro no console)
Postado Junho 2, 2020 4 anos local config = { addon_name = "Percht Raider", addon_male = 1162, addon_female = 1161 } function onKill(creature, target) local player = creature:getPlayer() if not player then return true end local targetMonster = target:getMonster() if not targetMonster then return true end if targetMonster:getName():lower() == 'the percht queen' then for pid, _ in pairs(targetMonster:getDamageMap()) do local attackerPlayer = Player(pid) if attackerPlayer:hasOutfit(config.addon_male) or attackerPlayer:hasOutfit(config.addon_female) then attackerPlayer:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You already got this oufit.") else attackerPlayer:addOutfitAddon(config.addon_male, 3) attackerPlayer:addOutfitAddon(config.addon_female, 3) attackerPlayer:getPosition():sendMagicEffect(29) attackerPlayer:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Addon " .. config.addon_name .. " adicionado!!") end end end return true end Editado Junho 2, 2020 4 anos por worthdavi (veja o histórico de edições)
Postado Junho 2, 2020 4 anos Autor Nada =/ Não da erro no console ou qualquer mensagem ao matar Editado Junho 2, 2020 4 anos por Enforc att (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.