Solutions
-
GiovaniRodrigo's post in (Resolvido)NPC Informativo que marca no mapa. was marked as the answerTente isso:
.lua
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local markTable = { -- {markPos = Coordenadas da marcação, markType = Tipo de marcação, markDescription = Descrição da marcação} {markPos = {x = 150, y = 150, z = 7}, markType = MAPMARK_TICK, markDescription = "Tick"}, {markPos = {x = 155, y = 150, z = 7}, markType = MAPMARK_QUESTION, markDescription = "Question"}, {markPos = {x = 160, y = 150, z = 7}, markType = MAPMARK_EXCLAMATION, markDescription = "Exclamation"}, {markPos = {x = 165, y = 150, z = 7}, markType = MAPMARK_STAR, markDescription = "Star"}, {markPos = {x = 170, y = 150, z = 7}, markType = MAPMARK_CROSS, markDescription = "Cross"}, {markPos = {x = 175, y = 150, z = 7}, markType = MAPMARK_TEMPLE, markDescription = "Temple"}, {markPos = {x = 180, y = 150, z = 7}, markType = MAPMARK_KISS, markDescription = "Kiss"}, {markPos = {x = 185, y = 150, z = 7}, markType = MAPMARK_SHOVEL, markDescription = "Shovel"}, {markPos = {x = 190, y = 150, z = 7}, markType = MAPMARK_SWORD, markDescription = "Sword"}, {markPos = {x = 195, y = 150, z = 7}, markType = MAPMARK_FLAG, markDescription = "Flag"}, {markPos = {x = 200, y = 150, z = 7}, markType = MAPMARK_LOCK, markDescription = "Lock"}, {markPos = {x = 205, y = 150, z = 7}, markType = MAPMARK_BAG, markDescription = "Bag"}, {markPos = {x = 210, y = 150, z = 7}, markType = MAPMARK_SKULL, markDescription = "Skull"}, {markPos = {x = 215, y = 150, z = 7}, markType = MAPMARK_DOLLAR, markDescription = "Dollar"}, {markPos = {x = 220, y = 150, z = 7}, markType = MAPMARK_REDNORTH, markDescription = "Red North"}, {markPos = {x = 225, y = 150, z = 7}, markType = MAPMARK_REDSOUTH, markDescription = "Red South"}, {markPos = {x = 230, y = 150, z = 7}, markType = MAPMARK_REDEAST, markDescription = "Red East"}, {markPos = {x = 235, y = 150, z = 7}, markType = MAPMARK_REDWEST, markDescription = "Red West"}, {markPos = {x = 240, y = 150, z = 7}, markType = MAPMARK_GREENNORTH, markDescription = "Green North"}, {markPos = {x = 245, y = 150, z = 7}, markType = MAPMARK_GREENSOUTH, markDescription = "Green South"} } function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local func_addMark = doPlayerAddMapMark if(not func_addMark) then func_addMark = doAddMapMark end if(msgcontains(msg, "locais")) then for mark, x in pairs(markTable) do func_addMark(cid, x.markPos, x.markType, x.markDescription ~= nil and x.markDescription or "") end selfSay("Oh, the locals, right?! Well, I marked some on your minimap", cid) end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) TESTADO TFS 0.4 FUNCIONAL
-
GiovaniRodrigo's post in (Resolvido)da use em x item é receber a outfit was marked as the answerEle funciona da seguinte maneira, o jogador usa o item de ID X para ganhar a OUTFIT X. Esse item só pode ser usado uma vez por jogador.
Na pasta data/actions/scripts crie um arquivo itemOutfit.lua e coloque esse código:
local config = { tableItem = { -- [Id do item] = {storage = Não mexa, outfitFemale = lookType do outfit feminino, outfitMale = lookType do outfit masculino} [2018] = {storage = 200201, outfitFemale = 371, outfitMale = 370}, [2019] = {storage = 200202, outfitFemale = 373, outfitMale = 372}, [2020] = {storage = 200203, outfitFemale = 375, outfitMale = 374}, [2021] = {storage = 200204, outfitFemale = 377, outfitMale = 376}, [2022] = {storage = 200205, outfitFemale = 379, outfitMale = 378}, [2024] = {storage = 200206, outfitFemale = 381, outfitMale = 380}, [2025] = {storage = 200207, outfitFemale = 383, outfitMale = 382} }, addons = 3, -- 0 = Sem Addon / 1 = First Addon / 2 = Second Addon/ 3 = Full Addon needPZ = true, -- true = Precisa estar na protect zone / false = Não precisa estar na protect zone message = "You received a new outfit.", messagePZ = "You need to be in a protect zone.", -- Mensagem se o player não estiver na protect zone messageError = "You already have this outfit." -- Mensagem se o player já tem o addon } function onUse(cid, item, fromPosition, itemEx, toPosition) for id, x in pairs(config.tableItem) do if(item.itemid == id) then if(getPlayerStorageValue(cid, x.storage) > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, config.messageError) elseif(needPZ == true and not getTilePzInfo(getCreaturePosition(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, config.messagePZ) elseif(doRemoveItem(item.uid, 1)) then if(getPlayerSex(cid) == 0) then doSendMagicEffect(fromPosition , CONST_ME_POFF) -- Efeito quando o item for usado e desaparecer doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) doPlayerAddOutfit(cid, x.outfitFemale, config.addons) setPlayerStorageValue(cid, x.storage, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, config.message) else doSendMagicEffect(fromPosition , CONST_ME_POFF) -- Efeito quando o item for usado e desaparecer doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) doPlayerAddOutfit(cid, x.outfitMale, config.addons) setPlayerStorageValue(cid, x.storage, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, config.message) end end end end return true end No arquivo actions.xml coloque essa tag:
<action itemid="2018;2019;2020;2021;2022;2024;2025" event="script" value="itemOutfit.lua"/> Altere o itemid da tag que você colocou no actions.xml de acordo com os ID dos itens que você configurou no script itemOutfit.lua
TESTADO TFS 0.4 - SCRIPT FUNCIONAL
Log:
Acrescentado:
needPZ = true, -- true = Precisa estar na protect zone / false = Não precisa estar na protect zone message = "You received a new outfit.", -- Mensagem quando ganha o outfit -- Efeito doSendMagicEffect(fromPosition , CONST_ME_POFF) -- Efeito quando o item for usado e desaparecer Bug corrigido:
(LuaInterface::luaDoRemoveItem) Item not found
-
GiovaniRodrigo's post in (Resolvido)Outfit e Sitema VIP was marked as the answerTroque seu outfit Fisher por esse
<outfit id="3" premium="no"> <list gender="0" lookType="521" name="Fisher"/> <list gender="1" lookType="520" name="Fisher"/> </outfit> O teleport do Cacaiu tem algum script? Se sim, poste.
-
GiovaniRodrigo's post in (Resolvido)[Pedido]Catch was marked as the answerPelo que vi a dificuldade pode ser modificada no arquivo configuration.lua que se encontra na pasta data/lib e nesse script você mofica o "cr"
Na configuration.lua você modifica o "chance" da linha do pokemon
Exemplo:
["Charizard"] = {chance = 5000, corpse = 6005}, Quanto maior for o "chance" mais difícil irá ficar.
E nesse script você modifica o "cr"
[2394] = {cr = 6, on = 24, off = 23, ball = {11826, 11737}, send = 47, typeee = "normal"} Suponho que quanto maior for o "cr" mais difícil irá ficar.
Att.
Giovani Rodrigo