Tudo que DukeeH postou
-
Movements ativar piso
local config = { wall = {id = 6973, pos = {x = 839, y = 868, z = 7}}, idpiso = 15295, transidpiso = 15296, time = 1, } function onStepIn(cid, item, position, fromPosition) if(getTileItemById(config.wall.pos, config.wall.id).uid > 0) then doSendMagicEffect(config.wall.pos, CONST_ME_MAGIC_RED) doRemoveItem(getTileItemById(config.wall.pos, config.wall.id).uid,1) doTransformItem(item.uid, config.transidpiso) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Wall is removed.") addEvent(doCreateItem, config.time * 60 * 1000, config.wall.id, 1, config.wall.pos) addEvent(doTransformItem, config.time * 60 * 1000, item.uid, idpiso) end return true end Tenta algo assim, só coloca a wall no map editor no lugar, e vê se os ids e posições estão certos. Qualquer coisa manda aqui que tento ajudar.
-
(Resolvido)Teleport que requer 2 items
Por isso você tem que ser claro no pedido. Você não falou a versão do server e nem como quer o uso. Você falou um item que usa no outro, foi o que eu fiz. Se for um item com actionid, é só alterar uma palavra.
-
(Resolvido)Inserir Anúncio
Topo em vermelho não é uma opção, só centro da tela em vermelho, pois são usados os tipos de broadcast do tibia, como eu falei no post acima, pra deixar em vermelho, tira o ,12 no final da linha. Mas infelizmente não é possível mudar a posição, apenas cor/estilo.
-
(Resolvido)Inserir Anúncio
Se quiser trocar pra vermelho no centro da tela, tira o ,22 no final da linha.
-
UNIQUE ID
O cara tem que ta pk ou pz pra funcionar, como pediu. Se não deu erro deve estar funcionando normalmente.
-
(Resolvido)Inserir Anúncio
@edustyle 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 doChangeWeapon(cid, message, keywords, parameters, node) -- by vodka if(not npcHandler:isFocused(cid)) then return false end if (isPlayerPremiumCallback == nil or isPlayerPremiumCallback(cid) == true or parameters.premium == false) then if(parameters.level ~= nil and getPlayerLevel(cid) < parameters.level) then npcHandler:say('Desculpe, voce precisa ter level ' .. parameters.level .. ' ou mais para forjar este item.', cid) elseif not doRemoveItemsFromList(cid,parameters.items) then npcHandler:say('Desculpe, mas voce nao tem '..getItemsFromList(parameters.items)..' para forjar este item!', cid) else local r = parameters.chance local v = math.random(1, 100) if r > v then npcHandler:say('Sucesso! Aqui esta seu item.', cid) local iname = getItemNameById(parameters.give) doBroadcastMessage("[Sistema de Forja]\nO jogador "..getCreatureName(cid).." acabou de forjar o item "..iname..".", 22) doPlayerAddItem(cid,parameters.give,1) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) else npcHandler:say('Desculpe, mas seu item falho na forja!', cid) doSendMagicEffect(getPlayerPosition(cid), 2) end npcHandler:resetNpc() end else npcHandler:say('Desculpe, mas apenas forjo esse item para jogadores premium account.', cid) end npcHandler:resetNpc() return true end local list = { {"broken sword", items = {{12766,100}}, item_give = 12756, chance = 100, level = 8, premium = false}, {"broken axe", items = {{12766,100}}, item_give = 12759, chance = 100, level = 8, premium = false}, {"broken club", items = {{12766,100}}, item_give = 12758, chance = 100, level = 8, premium = false}, {"broken staff", items = {{12766,100}}, item_give = 12757, chance = 100, level = 8, premium = false}, {"broken spear", items = {{12766,100}}, item_give = 12760, chance = 100, level = 8, premium = false}, {"noob sword", items = {{12756,1},{12761,100}}, item_give = 12733, chance = 100, level = 8, premium = false}, {"noob axe", items = {{12759,1},{12761,100}}, item_give = 12731, chance = 100, level = 8, premium = false}, {"noob club", items = {{12758,1},{12761,100}}, item_give = 12732, chance = 100, level = 8, premium = false}, {"noob staff", items = {{12757,1},{12761,100}}, item_give = 12734, chance = 100, level = 8, premium = false}, {"noob star", items = {{12760,1},{12761,100}}, item_give = 12735, chance = 100, level = 8, premium = false}, {"elite sword", items = {{12733,1},{12762,200}}, item_give = 12728, chance = 100, level = 8, premium = false}, {"elite axe", items = {{12731,1},{12762,200}}, item_give = 12726, chance = 100, level = 8, premium = false}, {"elite club", items = {{12732,1},{12762,200}}, item_give = 12727, chance = 100, level = 8, premium = false}, {"elite staff", items = {{12734,1},{12762,200}}, item_give = 12729, chance = 100, level = 8, premium = false}, {"elite star", items = {{12735,1},{12762,200}}, item_give = 12730, chance = 100, level = 8, premium = false}, {"epic sword", items = {{12728,1},{12763,300}}, item_give = 12723, chance = 100, level = 8, premium = false}, {"epic axe", items = {{12726,1},{12763,300}}, item_give = 12721, chance = 100, level = 8, premium = false}, {"epic club", items = {{12727,1},{12763,300}}, item_give = 12722, chance = 100, level = 8, premium = false}, {"epic staff", items = {{12729,1},{12763,300}}, item_give = 12724, chance = 100, level = 8, premium = false}, {"epic crossbow", items = {{12730,1},{12763,300}}, item_give = 12725, chance = 100, level = 8, premium = false}, {"legendary sword", items = {{12723,1},{12764,400}}, item_give = 12718, chance = 100, level = 8, premium = false}, {"legendary axe", items = {{12721,1},{12764,400}}, item_give = 12716, chance = 100, level = 8, premium = false}, {"legendary club", items = {{12722,1},{12764,400}}, item_give = 12717, chance = 100, level = 8, premium = false}, {"legendary staff", items = {{12724,1},{12764,400}}, item_give = 12719, chance = 100, level = 8, premium = false}, {"legendary crossbow", items = {{12725,1},{12764,400}}, item_give = 12720, chance = 100, level = 8, premium = false}, {"ultimate sword", items = {{12718,1},{12765,500}}, item_give = 12668, chance = 100, level = 8, premium = false}, {"ultimate axe", items = {{12716,1},{12765,500}}, item_give = 12666, chance = 100, level = 8, premium = false}, {"ultimate club", items = {{12717,1},{12765,500}}, item_give = 12667, chance = 100, level = 8, premium = false}, {"ultimate staff", items = {{12719,1},{12765,500}}, item_give = 12669, chance = 100, level = 8, premium = false}, {"ultimate crossbow", items = {{12720,1},{12765,500}}, item_give = 12670, chance = 100, level = 8, premium = false}, {"itens", text = "Eu posso forjar alguns itens como: {broken sword},{broken axe},{broken club},{broken staff},{broken spear},{noob sword},{noob axe},{noob club},{noob staff},{noob star},{elite sword},{elite axe},{elite club},{elite staff},{elite star},{epic sword},{epic axe},{epic club},{epic staff},{epic crossbow},{legendary sword},{legendary axe},{legendary club},{legendary staff},{legendary crossbow},{ultimate sword},{ultimate axe},{ultimate club},{ultimate staff} ou {ultimate crossbow}!"} } for i = 1, #list do local get = list if type(get.items) == "table" then local node = keywordHandler:addKeyword({get[1]}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Para forjar o item " .. get[1] .. " e necessario "..getItemsFromList(get.items)..". Voce tem tudo isso para me dar?"}) node:addChildKeyword({"yes"}, doChangeWeapon, {items = get.items, give = get.item_give, chance = get.chance, level = get.level, premium = get.premium}) node:addChildKeyword({"no"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "tudo bem entao.", reset = true}) else keywordHandler:addKeyword({get[1]}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = get.text}) end end mounts = nil npcHandler:addModule(FocusModule:new())
-
(Resolvido)Inserir Anúncio
O script como mandou estava funcionando? Teste assim, mas esta dando muito erro, se adicionei só uma linha. 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 doChangeWeapon(cid, message, keywords, parameters, node) -- by vodka if(not npcHandler:isFocused(cid)) then return false end if (isPlayerPremiumCallback == nil or isPlayerPremiumCallback(cid) == true or parameters.premium == false) then if(parameters.level ~= nil and getPlayerLevel(cid) < parameters.level) then npcHandler:say('Desculpe, voce precisa ter level ' .. parameters.level .. ' ou mais para forjar este item.', cid) elseif not doRemoveItemsFromList(cid,parameters.items) then npcHandler:say('Desculpe, mas voce nao tem '..getItemsFromList(parameters.items)..' para forjar este item!', cid) else local r = parameters.chance local v = math.random(1, 100) if r > v then npcHandler:say('Sucesso! Aqui esta seu item.', cid) doPlayerAddItem(cid,parameters.give,1) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) local iname = getItemNameById(itemid)(parameters.give) doBroadcastMessage("[Sistema de Forja]\nO jogador "..getCreatureName(cid).." acabou de forjar o item "..iname..".", 22) else npcHandler:say('Desculpe, mas seu item falho na forja!', cid) doSendMagicEffect(getPlayerPosition(cid), 2) end npcHandler:resetNpc() end else npcHandler:say('Desculpe, mas apenas forjo esse item para jogadores premium account.', cid) end npcHandler:resetNpc() return true end local list = { {"broken sword", items = {{12766,100}}, item_give = 12756, chance = 100, level = 8, premium = false}, {"broken axe", items = {{12766,100}}, item_give = 12759, chance = 100, level = 8, premium = false}, {"broken club", items = {{12766,100}}, item_give = 12758, chance = 100, level = 8, premium = false}, {"broken staff", items = {{12766,100}}, item_give = 12757, chance = 100, level = 8, premium = false}, {"broken spear", items = {{12766,100}}, item_give = 12760, chance = 100, level = 8, premium = false},
-
(AJUDA) vocação de cria items por certos items
Exatamente como o @ernaix69 falou, tem grupos de exhaust, sendo 1 ataque, 2 heal, 3 support. Então se você usar essa magia, você vai afetar o grupo 3 por 0,8s. Podendo por exemplo usar sd, cura enquanto isso. Não sei se seu servidor suporta os grupos, usei a tag padrão do meu aqui.
-
ITEM PROMOTION
Não falou qual distro e nem deu muitos detalhes, mas testa ai e qualquer coisa me avisa. function onUse(cid, item, frompos, item2, topos) if(getPlayerVocation(cid) > 4) then doPlayerSendCancel(cid, 'Você já tem promotion e não pode ser promovido.') doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) else doPlayerSetPromotionLevel(cid,1) doPlayerSetVocation(cid,(getPlayerVocation(cid)+4)) doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'Parabéns, você foi promovido !') doSendMagicEffect(getPlayerPosition(cid), 12) end return true end
-
UNIQUE ID
local velocidade = 0.9 local life = 0.30 local periodo = 1.5 -- tempo em segundos condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, periodo*1000) setConditionFormula(condition, -velocidade, 0, -velocidade, 0) function onStepIn(cid, item, pos, fromPos) if isPlayer (cid) then if item.itemid == 1050 then if isPlayerPzLocked(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você perdeu 25% de life e levou paralyze por utilizar a escada com pz.") doAddCondition(cid,condition) doCreatureAddHealth(cid,-(getCreatureHealth(cid)*life)) end end end return true end
-
Bug no meu Mapa
Exatamente porque o arquivo do npc não existe que está dando o erro. Vai em data/world/nome do map-spawn.xml Da um ctrl + f, procura por Morte E apaga a linha que tiver ele Exemplo: <monster name="Morte" x="XX" y="YY" z="ZZ" spawntime="60"/>
-
Erro PagSeguro
Você precisa ativar o cURL no xampp, provavelmente no linux havia habilitado. Vá nos arquivos: xampp\apache\bin\php.ini xampp\php\php.ini xampp\php\php4\php.ini procura por: ;extension=php_curl.dll e remova o ; deixando a linha ativa.
-
Item que dá Bonus de Xp por um tempo
Esse script deve ser o que mais é pedido e postado no forum. Seria bom procurar, caso você tenha algum problema com algum deles, traga o script e o problema.
-
(AJUDA) vocação de cria items por certos items
<instant name="Criar item" words="criaritem" lvl="50" mana="50" aggressive="0" selftarget="1" exhaustion="800" groups="3,800" needlearn="0" event="script" value="criaritem.lua"> <vocation id="1"/> <vocation id="5"/> </instant> function onCastSpell(cid, var) local itensqueprecisa = { [1] = {itemID = 111111, itemCount = 1111}, [2] = {itemID = 111111, itemCount = 1111}, [3] = {itemID = 111111, itemCount = 1111} } local itensquerecebe = { item_ID = 111111, item_count = 1111 } count = 0 for i = 1, #itensqueprecisa do if getPlayerItemCount(cid, itensqueprecisa[i].itemID) >= itensqueprecisa[i].itemCount then count = count + 1 else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You require more ".. getItemNameById(itensqueprecisa[i].itemID) .."'s to successfully convert items.") break end end table_count = 0 for k,v in pairs(itensqueprecisa) do table_count = table_count + 1 end if table_count ~= count then return true end for i = 1, #itensqueprecisa do doPlayerRemoveItem(cid, itensqueprecisa[i].itemID, itensqueprecisa[i].itemCount) end stack = 0 if isItemStackable(itensquerecebe.item_ID) == true then stack = stack + 1 end if stack == 1 then doPlayerAddItem(cid, itensquerecebe.item_ID, itensquerecebe.item_count, true) else repeat doPlayerAddItem(cid, itensquerecebe.item_ID, 1, true) stack = stack + 1 until stack == (itensquerecebe.item_count) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have received ".. itensquerecebe.item_count .." ".. getItemNameById(itensquerecebe.item_ID) ..".") doPlayerAddExp(cid, 20) doSendMagicEffect(getThingPosition(cid), CONST_ME_MAGIC_GREEN) return true end
-
(Resolvido)Inserir Anúncio
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 doChangeWeapon(cid, message, keywords, parameters, node) -- by vodka if(not npcHandler:isFocused(cid)) then return false end if (isPlayerPremiumCallback == nil or isPlayerPremiumCallback(cid) == true or parameters.premium == false) then if(parameters.level ~= nil and getPlayerLevel(cid) < parameters.level) then npcHandler:say('Desculpe, voce precisa ter level ' .. parameters.level .. ' ou mais para forjar este item.', cid) elseif not doRemoveItemsFromList(cid,parameters.items) then npcHandler:say('Desculpe, mas voce nao tem '..getItemsFromList(parameters.items)..' para forjar este item!', cid) else local r = parameters.chance local v = math.random(1, 100) if r > v then npcHandler:say('Sucesso! Aqui esta seu item.', cid) local iname = getItemName(parameters.give.uid) doBroadcastMessage("[Sistema de Forja]\nO jogador "..getCreatureName(cid).." acabou de forjar o item "..iname..".", 22) doPlayerAddItem(cid,parameters.give,1) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) else npcHandler:say('Desculpe, mas seu item falho na forja!', cid) doSendMagicEffect(getPlayerPosition(cid), 2) end npcHandler:resetNpc() end else npcHandler:say('Desculpe, mas apenas forjo esse item para jogadores premium account.', cid) end npcHandler:resetNpc() return true end local list = { {"broken sword", items = {{12766,100}}, item_give = 12756, chance = 100, level = 8, premium = false}, {"broken axe", items = {{12766,100}}, item_give = 12759, chance = 100, level = 8, premium = false}, {"broken club", items = {{12766,100}}, item_give = 12758, chance = 100, level = 8, premium = false}, {"broken staff", items = {{12766,100}}, item_give = 12757, chance = 100, level = 8, premium = false}, {"broken spear", items = {{12766,100}}, item_give = 12760, chance = 100, level = 8, premium = false},
-
(Resolvido)Teleport que requer 2 items
@Roy É seu primeiro post, mas seria bom postar qual distro você usa, os scripts podem ser diferentes entre as distros. Mas algo assim deve funcionar, ou pelo menos ser o caminho: <action itemid="XXXX" event="script" value="teleportitem.lua"/> function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.itemid == XXXX and itemEx.itemid == YYYY) then doRemoveItem(itemEx.uid, 1) doTeleportThing(cid, {x = POSX, y = POSY, z = POSZ}) else doPlayerSendCancel(cid, "You need to use it on XXX.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return true end
-
AJUDA COM CHÃO DO DEPOT
Tem que usar o piso de id 11063 (aquele vermelho) Ou mudar nas sources para o id que você quer fazer isso.
-
Systema de colocar vip com moeda coins, AJUDEM>..
Não ficou muito claro. Qual otserv você usa, e cliente? O que seria moeda coin? Um item? Qual seu sistema de vip, para alterar a forma como é comprada?
-
Dúvida sobre tfs 0.4 e tfs 1+
Não, terão de ser refeitos. A linguagem de script mudou bastante do 0.x para o 1,x, muita coisa passou a ser possivel em lua, que só era em c++ e outras opções. Mas respondendo, teriam que ser reescritos, dependendo a complexidade dos sistemas, é algo simples de se fazer.
-
(Resolvido)Bug Clonar Account Manager
Seria bom postar a solução caso outras pessoas tenham o problema e achem o tópico.
-
Ao relogar buga o movements
procura por: doRemoveConditions(cid, false) troca por: if getCreatureCondition(cid, CONDITION_OUTFIT) then doRemoveCondition(cid, CONDITION_OUTFIT) end
-
Ao relogar buga o movements
Isso
-
Ao relogar buga o movements
consegue postar o script aqui, ou se for muito grande, no https://pastebin.com/ Já resolvo pra ti rapidão, é que não tenho mais ele.
-
Ao relogar buga o movements
@osni12 Qual tipo de atributo seria? Você tem rush event? Ou ele com algum outro nome? Aquela war do deserto até x frags. Tenta comer food (ficar full) e relogar, e ao entrar tenta comer de novo e vê se perde o stats da food também. Eu já tive um problema parecido, se for isso consigo te ajudar.
-
Como adicionar um atributo de look nos players
@Gnius creaturescripts.xml <event type="look" name="MarryLook" event="script" value="marrylook.lua"/> creaturescripts/scripts/marrylook.lua function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and (getPlayerMarriage(thing) ~= 0) then doPlayerSetSpecialDescription(thing.uid,'.\n'..(getPlayerSex(thing.uid) == 0 and 'She' or 'He')..' is married to '..getPlayerNameByGUID(getOwnMarryStatus(cid))) end return true end creaturescripts/scripts/login.lua (no final) registerCreatureEvent(cid, "MarryLook")