Tudo que gabrielzika postou
-
Matar monstro e queimar o corpo
@rizen testei aqui antes, e funcionou 100% veja se você não está errando alguma pos. Abraço!
-
(Resolvido)NPC Que troca storage por itens
Post Corrigido!
-
Matar monstro e queimar o corpo
@rizen coloca pra só poderem ir lá só quando ele estiver Vivo
-
[AJUDA] Como que muda o nomes do clientes ex: otclient 6.6.0, que fica na parte de baixo
@FireBlue modules/client_background background.lua Créditos: @DeeadPool
-
Matar monstro e queimar o corpo
@rizen veja se é isso que você quer ... actions/scripts aomatar.lua function onUse(cid, item, fromPos, itemEx, toPos) local corpseID = 1740 -- id do corpse local tpId = 1387 -- id do magic forcefield local pos2 = {x=2534, y=790, z=6} -- posição onde o tp vai aparecer local toPos2 = {x=2530, y=794, z=6} -- posição para onde vai quem entrar no tp local time = 15 -- tempo que o teleport fica aberto local effFire = 35 -- Efeito de Fogo function removeTp(tp) local t = getTileItemById(pos2, tpId) if t then doRemoveItem(t.uid, 1) doSendMagicEffect(pos2, CONST_ME_POFF) end end if(isInArray(corpseID, itemEx.itemid)) then doCreateTeleport(tpId, toPos2, pos2) addEvent(removeTp, time*1000, tp) doSendMagicEffect(toPos, effFire) doRemoveItem(getTileItemById(toPos, corpseID).uid) return true end return true end actions.xml <action itemid="2341" event="script" value="aomatar.lua" allowfaruse="1" blockwalls="1"/> Coloca para o Monstro Renascer a cada 30 Segundos quando for Morto... ( Pelo Remeres... ) Em items.xml no Corpse do Monstro deixa o duration assim: <attribute key="duration" value="30" />
-
(Resolvido)NPC Que troca storage por itens
@amoxicilina local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local config = { item1 = 12400, item2 = 12400, item3 = 12400, item4 = 12400, count1 = 5, count2 = 5, count3 = 5, count4 = 10, level = 300, -- Level que precisara para viajar sto = 99952, -- Storage não mecher tempo = 172800, -- tempo que vai durar a storage quest = 444454, -- quest necessaria... } if msgcontains(msg, 'mission') then if (getPlayerStorageValue(cid, config.sto) <= os.time()) then if getPlayerStorageValue(cid, config.quest) >= 1 then if getPlayerItemCount(cid, config.item1) >= config.count1 and getPlayerItemCount(cid, config.item2) >= config.count2 and getPlayerItemCount(cid, config.item3) >= config.count3 and getPlayerItemCount(cid, config.item4) >= config.count4 then selfSay('Claro, você foi para a próxima missão. Boa sorte.', cid) setPlayerStorageValue(cid, config.sto, os.time()+config.tempo) doPlayerRemoveItem(cid, config.item1, config.count1) doPlayerRemoveItem(cid, config.item2, config.count2) doPlayerRemoveItem(cid, config.item3, config.count3) doPlayerRemoveItem(cid, config.item4, config.count4) else selfSay('Traga-me os 25 protective charm para poder treinar comigo por dois dias.', cid) end else selfSay("voce nao completou a quest do vilarejo dos orc ao south da cidade, complete-a e e mostre-me que voce e realmente um guerreiro promissor.", cid) end else selfSay('Você Ja fez essa missão!' , cid) return true end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) xml <?xml version="1.0" encoding="UTF-8"?> <npc name="NomeDoNpc" script="NomeDoArquivo.lua" walkinterval="0" floorchange="0"> <health now="150" max="150"/> <look type="589" head="20" body="100" legs="50" feet="99" corpse="2212"/>] <parameters> <parameter key="message_greet" value="Parabens, voce provou-me que e um guerreiro promissor. Se quiser continuar diga {mission}."/> </parameters> </npc>
-
(Resolvido)[PEDIDO] Efeito no player ao morrer
@Christinacsa Bom, eu não conheço muito o sistema de bless mas ve se tá certo oque eu entendi... data/globalevents efeitobless.lua function onThink(interval, lastExecution, thinkInterval) local list = {} for i, tid in ipairs(getPlayersOnline()) do list[i] = tid end for i = 1, #list do if not getPlayerBlessing(list[i], 1) and not getPlayerBlessing(list[i], 2) and not getPlayerBlessing(list[i], 3) and not getPlayerBlessing(list[i], 4) and not getPlayerBlessing(list[i], 5) then doSendMagicEffect(getThingPos(list[i]), 165) end end return true end globalevents.xml <globalevent name="bless" interval="2" event="script" value="efeitobless.lua"/>
-
(Resolvido)[PEDIDO] Npc de Viajem
@bismarkzika local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local config = { level = 300, -- Level que precisara para viajar sto = 44444, -- Storage não mecher pos = {x = 1037, y = 1036, z = 7}, -- Position para onde o player sera teleportado } if msgcontains(msg, 'yes') then if getPlayerStorageValue(cid, config.sto) < 1 then if getPlayerLevel(cid) >= config.level then selfSay('Parábens', cid) setPlayerStorageValue(cid, config.sto, 1) doTeleportThing(cid, config.pos) else selfSay('Você não tem o level necessário.', cid) end else selfSay('você já viajou comigo!' , cid) return true end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Remover runas infinitas
@Bohr Tenta Assim: Troca a UH por esta e testa.... local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 10, 12) function onCastSpell(cid, var) if item.type > 1 then doChangeTypeItem(item.uid,item.type-1) else doRemoveItem(item.uid,1) end return doCombat(cid, combat, var) end
-
Remover runas infinitas
@Bohr tenta por 'true' no lugar de 'yes"
-
Remover runas infinitas
Suas runas é só ´por Spell?
-
(Resolvido)Mudar Elemento dá Wand por Item
function onUse(cid, item, fromPos, itemEx, toPos) ItemFire = 13743 -- ID dos Itens que precisa pra cada efeito... by: garden ItemIce = 13744 ItemPoison = 13745 ItemDeath = 13746 ItemEnergy = 13747 ItemPhysical = 13748 ItemHoly = 13749 local types = { [ItemFire] = {effect = 1, name = "fire"}, -- [ItemID] = {effect = Numero do Efeito, name = Nome do Efeito} [ItemIce] = {effect = 2, name = "ice"}, [ItemPoison] = {effect = 3, name = "poison"}, [ItemDeath] = {effect = 4, name = "death"}, [ItemEnergy] = {effect = 5, name = "energy"}, [ItemPhysical] = {effect = 6, name = "energy"}, [ItemHoly] = {effect = 7, name = "holy"} } local wandid1 = 7735 -- ID da Wand 1 local wandid2 = 7736 -- ID da Wand 2 local wandid3 = 7737 -- ID da Wand 3 local wandid4 = 7738 -- ID da Wand 4 local wandid5 = 7739 -- ID da Wand 5 local wand_left = getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid local wand_right = getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid local wands1 = wand_left ~= wandid1 and wand_right ~= wandid1 local wands2 = wand_left ~= wandid2 and wand_right ~= wandid2 local wands3 = wand_left ~= wandid3 and wand_right ~= wandid3 local wands4 = wand_left ~= wandid4 and wand_right ~= wandid4 local wands5 = wand_left ~= wandid5 and wand_right ~= wandid5 if wands1 or wands2 or wands3 or wands4 or wands5 then doPlayerSendCancel(cid, "Voce deve estar com a wand equipada para usar este efeito.") return true end status = getPlayerStorageValue(cid, 4561) if status == types[item.itemid].effect then doPlayerSendTextMessage(cid, 27, "Desculpe, mais você já está usando o efeito ".. types[item.itemid].name .. ".") return true end setPlayerStorageValue(cid, 4561, types[item.itemid].effect) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. types[item.itemid].name .. ".") doRemoveItem(item.uid, 1) return true end @Gabrielk
-
(Resolvido)Mudar Elemento dá Wand por Item
@Gabrielk ai Mano function onUse(cid, item, fromPos, itemEx, toPos) ItemFire = 13743 -- ID dos Itens que precisa pra cada efeito... by: garden ItemIce = 13744 ItemPoison = 13745 ItemDeath = 13746 ItemEnergy = 13747 ItemPhysical = 13748 ItemHoly = 13749 id = 7735 --- aqui vai o id da wand types = { [ItemFire] = {effect = 1, name = "fire"}, -- [ItemID] = {effect = Numero do Efeito, name = Nome do Efeito} [ItemIce] = {effect = 2, name = "ice"}, [ItemPoison] = {effect = 3, name = "poison"}, [ItemDeath] = {effect = 4, name = "death"}, [ItemEnergy] = {effect = 5, name = "energy"}, [ItemPhysical] = {effect = 6, name = "energy"}, [ItemHoly] = {effect = 7, name = "holy"} } local wand_left = getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid local wand_right = getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid if wand_left ~= id and wand_right ~= id then doPlayerSendCancel(cid, "Voce deve estar equipado com uma ".. getItemNameById(id) .." para usar este efeito.") return true end status = getPlayerStorageValue(cid, 4561) if status == types[item.itemid].effect then doPlayerSendTextMessage(cid, 27, "Desculpe, mais você já está usando o efeito ".. types[item.itemid].name .. ".") return true end setPlayerStorageValue(cid, 4561, types[item.itemid].effect) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. types[item.itemid].name .. ".") doRemoveItem(item.uid, 1) return true end xml <action itemid="13743;13744;13745;13746;13747;13748;13749" event="script" value="NomeDoArquivo.lua" blockwalls="1"/>
-
Remover runas infinitas
@Bohr vai no seu config.lua e procura por: removeRuneCharges se tiver "no" coloca "yes"
-
(Resolvido)Adicionar level para falar com NPC
local PRESENT_STORAGE = 29885 -- Storage ID local gifts = { {10, 6531, 1}, -- 1% to get Santa Hat [10] {30, 6512, 1}, -- 3% to get Santa Doll [30] {40, 2112, 1}, -- 4% to get Teddy Bear [40] {100, 2160, 10}, -- 10% to get 10 Crystal Coins [100] {150, 2688, 10}, -- 15% to get 10 Candy Canes [150] {150, 2152, 100}, -- 15% to get 100 Platinum Coins [150] {200, 2111, 5}, -- 20% to get 10 Snowballs [200] {250, 2675, 10}, -- 25% to get 10 Orange [250] {350, 2674, 15}, -- 35% to get 10 Red Apples [350] {500, 2687, 10} -- 50% to get 10 Cookies [500] } local level = 300 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 function SantaNPC(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if getPlayerLevel(cid) < level then selfSay("you do not have the level you need...", cid) return true end if (parameters.present == true) then if (getPlayerStorageValue(cid, PRESENT_STORAGE) == 1) then selfSay("Do not try to trick me! You have already recieved your present...", cid) return true end local item = {} local reward = 0 local count = "" for i = 1, #gifts do item = gifts[i] if (math.random(0,999) < item[1]) then reward = item[2] subType = item[3] if subType > 1 then count = subType .. " " end break end end doPlayerAddItem(cid, reward, subType) setPlayerStorageValue(cid, PRESENT_STORAGE, 1) npcHandler:say('HO-HO-HO! I have ' .. count .. getItemNameById(reward) .. ' for you.', cid) else npcHandler:say('Come back when you start behaving.', cid) end npcHandler:resetNpc() return true end npcHandler:setMessage(MESSAGE_GREET, "HO-HO-HO, Merry Christmas |PLAYERNAME|. I have presents for the good children.") local noNode = KeywordNode:new({'no'}, SantaNPC, {present = false}) local yesNode = KeywordNode:new({'yes'}, SantaNPC, {present = true}) local node = keywordHandler:addKeyword({'present'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Have you been well behaved and good this year?...'}) node:addChildKeywordNode(yesNode) node:addChildKeywordNode(noNode) npcHandler:addModule(FocusModule:new()) @Andreeyyy ve se funciona não testei
-
Remover runas infinitas
Manda o Script das Runas , como o amigo ai encima disse
-
(Resolvido)[PEDIDO] Npc de Viajem
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local config = { level = 300, -- Level que precisara para viajar sto = 44444, -- Storage não mecher pos = {x = 2592, y = 1152, z = 7}, -- Position para onde o player sera teleportado } if(msgcontains(msg, 'yes' )) then if getPlayerStorageValue(cid, config.sto) == -1 then if getPlayerLevel(cid) >= config.level then selfSay('Parábens', cid) setPlayerStorageValue(cid, config.sto, 1) doTeleportThing(cid, config.pos) else selfSay('Você não tem o level necessário.', cid) end else selfSay('você já viajou comigo!' , cid) return true end end end xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Luis" script="NomeDoArquivo.lua" walkinterval="0" floorchange="0"> <health now="150" max="150"/> <look type="826" head="20" body="100" legs="50" feet="99" corpse="2212"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|. Deseja viajar comigo?."/> </parameters> </npc> @bismarkzika
-
(Resolvido)[NPC] vende storage por item
@Christinacsa relaxa, aos poucos você vai aprendendo! ninguém nasce sabendo e ninguém aprende Sozinho.
-
(Resolvido)[NPC] vende storage por item
@Christinacsa esse selfSay(' voce ja fez' , cid) só vai aparecer quando ele tiver a storage, quando passar os 2 dias ele vai perder a storage kkk ou seja da pra comprar dnv plis
-
(Resolvido)[NPC] vende storage por item
@Christinacsa no caso se estiver do jeito que falei é para ele poder comprar só quando acabar os dias
-
(Resolvido)[NPC] vende storage por item
@Ckfox troca ali em: local config = { item1 = 13507, -- ID DO Item que precisara para trocar qt1 = 1000, -- Quantidade do item1 que precisa sto = 166666, -- Storage não mecher } por: local config = { item1 = 13507, -- ID DO Item que precisara para trocar qt1 = 1000, -- Quantidade do item1 que precisa sto = 166666, -- Storage não mecher tempo = 172800, -- tempo que vai durar a storage } e if getPlayerStorageValue(cid, config.sto) == -1 then por: if (getPlayerStorageValue(cid, config.sto) <= os.time()) then e tambem setPlayerStorageValue(cid, config.sto, 1) por: setPlayerStorageValue(cid, config.sto, os.time()+config.tempo) é que ele pediu pra storage só durar dois dias
-
(Resolvido)Mudar Elemento dá Wand por Item
@Gabrielk function onUse(cid, item, fromPos, itemEx, toPos) ItemFire = 13743 -- ID dos Itens que precisa pra cada efeito... by: garden ItemIce = 13744 ItemEarth = 13745 ItemDeath = 13746 ItemEnergy = 13747 ItemHoly = 13748 local wandEffect = { [ItemFire] = {effect = 12031, name = "fire"}, -- [ItemID] = {effect = Numero do Efeito, name = Nome do Efeito} [ItemIce] = {effect = 12032, name = "ice"}, [ItemEarth] = {effect = 12033, name = "earth"}, [ItemDeath] = {effect = 12034, name = "death"}, [ItemEnergy] = {effect = 12035, name = "energy"}, [ItemHoly] = {effect = 12036, name = "holy"} } local id = 7735 --- aqui vai o id da wand if getPlayerItemCount(cid, id) == 0 then doPlayerSendTextMessage(cid, 27, "Desculpe, mais você precisa ter a "..getItemNameById(id).." para trocar o elemento.") return true end status = getPlayerStorageValue(cid, wandEffect[item.itemid].effect) if status == 1 then doPlayerSendTextMessage(cid, 27, "Desculpe, mais você já está usando o efeito ".. wandEffect[item.itemid].name .. ".") return true end setPlayerStorageValue(cid, 12031, 0) setPlayerStorageValue(cid, 12032, 0) setPlayerStorageValue(cid, 12033, 0) setPlayerStorageValue(cid, 12034, 0) setPlayerStorageValue(cid, 12035, 0) setPlayerStorageValue(cid, 12036, 0) setPlayerStorageValue(cid, wandEffect[item.itemid].effect, 1) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. wandEffect[item.itemid].name .. ".") doRemoveItem(item.uid, 1) return true end <action itemid="13743;13744;13745;13746;13747;13748" event="script" value="NomeDoArquivo.lua" blockwalls="1"/>
-
Error onPrepareDeath Poketibia
No caso se é o summon que mata, não teria que ter um getCreatureMaster(lastHitKiller) ali pra setar a Storage? "Talvez" seja isso q está causando o (creature not found.) kk
-
Erro no theforgottenserver.exe
@matheuswalker sim a distro é o tfs... ela está fechando pois está dando erro em muitas magias e está fazendo com que CRASH, qual servidor você está usando?
-
Erro no theforgottenserver.exe
A Distro e as Dlls estão na mesma pasta?