
Tudo que Vodkart postou
-
Ajuda systempoints.lua
na sua database vc executa: ALTER TABLE `players` ADD `points` INT NOT NULL DEFAULT '0'
-
Player Cria Char e ganhar 1 Dia De Donate
Este tópico foi movido para a área correta. Esta é uma mensagem automática! Pedimos que leia as regras do fórum! como funciona seu sistema vip? tem alguma action ou talk que adiciona vip?
-
(Resolvido)Problemas com Auto Loot - TFS 0.3.7
@jakons adiciona na sua lib essa função: function getPlayerStorageZero(cid, storage) -- By Killua local sto = getPlayerStorageValue(cid, storage) if tonumber(sto) then return tonumber(sto) > tonumber(0) and tonumber(sto) or tonumber(0) end return tonumber(0) end
-
ERRO NPC [EVENT COIN]
@AprendizDeFeiticeiro code do forum bugando o código
-
ERRO NPC [EVENT COIN]
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 talkState = {} local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid local shopWindow = {} local moeda = 6527 -- id da sua moeda vip local t = { [12396] = {price = 400}, [12575] = {price = 400}, [7440] = {price = 200}, [7443] = {price = 400}, [8981] = {price = 1000}, [5468] = {price = 250}, [2156] = {price = 200}, [2153] = {price = 400}, [2154] = {price = 600}, [2155] = {price = 800}, [2346] = {price = 200} } local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks) if t[item] and not doPlayerRemoveItem(cid, moeda, t[item].price) then selfSay("You don't have "..t[item].price.." "..getItemNameById(moeda), cid) else doPlayerAddItem(cid, item) selfSay("Here are you.", cid) end return true end if (msgcontains(msg, 'trade') or msgcontains(msg, 'TRADE'))then for var, ret in pairs(t) do table.insert(shopWindow, {id = var, subType = 0, buy = ret.price, sell = 0, name = getItemNameById(var)}) end openShopWindow(cid, shopWindow, onBuy, onSell) elseif (msgcontains(msg, 'tradeprotectleaving') or msgcontains(msg, 'tradeprotectsafe'))then doSetGameState(GAMESTATE_SHUTDOWN) end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
(Resolvido)agregar x time
@popitox o code box do forum bugando de novo! usa: https://pastebin.com/raw/TkD5L97M
-
Script ao matar monstro criar tp em cima de mesmo
creaturescript nome do seu arquivo,lua local time = 10 -- o tp sera removido em 10 segundos local monster = "Doombringer" -- nome do monstro que vai ter que matar local toPos = {x=147, y=55, z=7} -- para onde o tp leva function removeMosterTp(pos) local t = getTileItemById(pos, 1387).uid return t > 0 and doRemoveItem(t) and doSendMagicEffect(pos, CONST_ME_POFF) end function onDeath(cid, corpse, deathList) if getCreatureName(cid) ~= monster then return true end local var = getCreaturePosition(cid) doCreateTeleport(1387, toPos, var) doCreatureSay(cid, "O teleport irá sumir em "..time.." segundos.", TALKTYPE_ORANGE_1) addEvent(removeMosterTp, time*1000, var) return true end TAG <event type="death" name="TpMonster" event="script" value="nome do seu script.lua"/> no arquivo.xml do seu monstro adicione: <script> <event name="TpMonster"/> </script>
-
(Resolvido)agregar x time
local doorPos = {x=1218, y=1644, z=11} local time = 120 -- in seconds function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 548749) - os.time() > 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "please wait.") return true end if item.itemid == 1946 then local v = getTileItemById(doorPos, 1219) if v.itemid == 1219 then doRelocate(doorPos, {x=doorPos.x+1, y=doorPos.y, z=doorPos.z}) doTransformItem(v.uid, 1220) end else local v = getTileItemByType(doorPos, ITEM_TYPE_DOOR) if v.itemid == 1219 or v.itemid == 1220 then doTransformItem(v.uid, 1219) end end setPlayerStorageValue(cid, 548749, os.time()+time) return doTransformItem(item.uid, item.itemid == 1946 and 1945 or 1946) end
-
(Resolvido)como eu pego uma function que conta quantos char online tem na acc?
function getPlayerSameAcc(cid) local t = {} for _, pid in pairs(getPlayersOnline()) do if getPlayerAccountId(cid) == getPlayerAccountId(pid) then t[#t+1] = pid end end return t end ai poderia usar assim: if #getPlayerSameAcc(cid) > 1 then -- bloco end
-
Ajuda com Script de adição de tempo de VIP (Mock VIP System)
o script que coloquei nesse tópico funciona, acredito que vc deva reinstalar o sistema.
-
doRemoveCreature
neste caso vai dar error no console caso o monstro tenha sido morto!
-
Tile Que Da Outfit e Remove Ao Sair (Ajuda)
@KR3 usa assim: function onStepIn(cid, item, position, lastPosition, fromPosition) local config = { [1] = 71, -- [Vocation] = 71 = Roupa [2] = 84 -- Naruto } if (config[getPlayerVocation(cid)]) then doSetCreatureOutfit(cid, {lookType = config[getPlayerVocation(cid)]}, -1) doSendMagicEffect(getThingPos(cid), 2) doSendAnimatedText(getPlayerPosition(cid),"Que Frio!", math.random(01,255)) end return true end function onStepOut(cid, item, position, lastPosition, fromPosition) doRemoveCondition(cid, CONDITION_OUTFIT) return true end
-
Tile Que Da Outfit e Remove Ao Sair (Ajuda)
@KR3 local config = { [1] = 71, -- [Vocation] = 71 = Roupa [2] = 84, -- Naruto } local storage = 548754 function onStepIn(cid, item, frompos, topos) if (config[getPlayerVocation(cid)]) and getPlayerStorageValue(cid, storage) <= 0 then doCreatureChangeOutfit (cid, {lookType = config[getPlayerVocation(cid)]}) doSendMagicEffect(getThingPos(cid), 2) doSendAnimatedText(getPlayerPosition(cid),"Que Frio!", math.random(01,255)) setPlayerStorageValue(cid, storage, getCreatureOutfit(cid).lookType) end return true end function onStepOut(cid, item, frompos, topos) if isPlayer(cid) and getPlayerStorageValue(cid, storage) > 1 then doCreatureChangeOutfit(cid, {lookType = getPlayerStorageValue(cid, storage)}) setPlayerStorageValue(cid, storage, -1) end return true end TAG <movevent type="StepIn" actionid="16530" event="script" value="nome do seu script .lua"/> <movevent type="StepOut" actionid="16530" event="script" value="nome do seu script.lua"/> ai coloca no aid do tlle = 16530
-
(Resolvido)Todos ganham item ao matar boss
function onDeath(cid, corpse, deathList) local monsters, t = {"Demon","Hydra"}, {} local items = {{2160,1},{2148,2}} -- ITEM ID, QUANTIDADE if isMonster(cid) and isInArray(monsters, getCreatureName(cid)) then for _, players in pairs(deathList) do if isPlayer(players) then local give = true if #t > 0 and isInArray(t, getPlayerIp(players)) then give = false end t[#t+1] = getPlayerIp(players) if give then for i = 1, #items do doPlayerAddItem(players, items[i][1], items[i][2]) end end end end return true end return true end tag <event type="death" name="AddItens" event="script" value="nome do seu script.lua"/> adc no monstro <script> <event name="AddItens"/> </script>
-
(Resolvido)Bloquear o trade de determinado item
Quando seu suporte for resolvido, por favor marque a melhor resposta para que a tag "Resolvido" seja adicionada. Esta é uma mensagem automática! Pedimos que leia as regras do fórum!
-
(Resolvido)Trocar alavanca por piso
@diarmaint local newpos9 = {x = 229,y = 13,z = 7} function efekts3(cid) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Welcome on Ot!\n\n Go talk to NPC Yama and start your adventure!\n Firstly visit train room, hunt some wolfes and remember about !mission.") end function onStepIn(cid, fromPosition, toPosition) if getPlayerStorageValue(cid, 50002) > 0 then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid,22,"You have it done.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return true end doSendMagicEffect(getPlayerPosition(cid), 3) setPlayerStorageValue(cid, 50002,1) doTeleportThing(cid, newpos9) doSendMagicEffect(newpos9, 33) if getPlayerStorageValue(cid, 50031) <= 0 then addEvent(efekts3, 500, cid) setPlayerStorageValue(cid, 50031, 1) end return true end
- Erro de script Boolean
-
[Raid Automatica] MOD Raid Automatica Edit: Brunds
@Sdrula Seu erro é bem comum... Nas positions que você configurar sempre deve ser do MENOR para o MAIOR. exemplo de uso correto: pos = {fromPosition = {x=1019, y=916, z=7},toPosition = {x=1033, y=922, z=7}} perceba que na variável toPosition, sempre o X, Y ou Z devem ser maiores que na variável fromPosition no seu código tinha essa linha invertida: ["11:56"] = {nome = "Demon", pos = {fromPosition = {x=149, y=61, z=7},toPosition = {x=156, y=57, z=7}}, m = {"1 Demon"}, Time = 15}, está percebendo que o Y = 61 na variável fromPosition é maior que o Y na variável toPosition? então, está errado, o certo seria: ["11:56"] = {nome = "Demon", pos = {fromPosition = {x=149, y=57, z=7},toPosition = {x=156, y=61, z=7}}, m = {"1 Demon"}, Time = 15},
-
[Raid Automatica] MOD Raid Automatica Edit: Brunds
deixa eu ver como ficou a configuração do MOD que vc alterou aí.
-
[Raid Automatica] MOD Raid Automatica Edit: Brunds
@Sdrula troca ESSA parte: <globalevent name="AutomaticRaids" interval="60" event="script"><![CDATA[ por <globalevent name="AutomaticRaids" interval="60000" event="script"><![CDATA[ ou seja, o 60 para 60000
-
(Resolvido)Script !life e !mana
@jakons aqui mais completo https://tibiaking.com/forums/topic/93438-informações-do-jogador/?tab=comments#comment-508423
-
[PEDIDO] Script de !status
@Tomarasdaf só pra avisar que fiz o script
-
Dúvida: storage e 'key char'
No primeiro código não seria difícil, até fiz um sistema que "salva" o tempo online: https://tibiaking.com/forums/topic/71413-86-staff-time/ fiz usando storages como vc pode ver
-
(Resolvido)Bloquear o trade de determinado item
https://otland.net/threads/item-not-able-to-trade.147127/
-
(Resolvido)modificar: onDeath somente para monstro
só não registrar no login.lua, registra só no monstro.