
Tudo que MaXwEllDeN postou
-
Aulas de Scripting Lua
Não pois o foco aqui é Scriptwriting para Open Tibia.
-
Sistema de Auto-Facing: Vire Automaticamente para o Target ao Atacar (TFS 0.3.6)
Bem simples, mas muito muito bacana, And. Brigadão pelo script haha!
-
(Resolvido)[ACTION] Quest
Não. o canDropOnMap serve como um artifício de segurança para evitar que o item seja caia no chão, exemplo: Um player não tem cap para segurar um item, mas eu tento adicionar ele no player por esse comando, se o canDropOnMap for false, ele não vai criar o item, mas caso seja true o item vai cair no chão. Tenta remover a bag do player, só pra testes e vê se os itens caem nos slots, quaisquer que sejam.
-
(Resolvido)[ACTION] Quest
Vê se em items.xml o item tá configurado pro slot certo.
-
(Resolvido)[ACTION] Quest
doPlayerAddItem(uid, itemid[, count/subtype = 1[, canDropOnMap = true[, slot = 0]]]) Exemplo: doPlayerAddItem(cid, 2580, 1, false, CONST_SLOT_NECKLACE) -- Neck doPlayerAddItem(cid, 2120, 1, false, CONST_SLOT_HEAD) -- Head doPlayerAddItem(cid, 1987, 1, false, CONST_SLOT_BACKPACK) -- Backpack doPlayerAddItem(cid, 2376, 1, false, CONST_SLOT_RIGHT) -- Right Hand doPlayerAddItem(cid, 1988, 1, false, CONST_SLOT_LEFT) -- Left Hand doPlayerAddItem(cid, 2550, 1, false, CONST_SLOT_ARMOR) -- Armor doPlayerAddItem(cid, 526, 1, false, CONST_SLOT_RING) -- Ring doPlayerAddItem(cid, 2564, 1, false, CONST_SLOT_AMMO) -- Ammo CONST_SLOT_HEAD CONST_SLOT_NECKLACE CONST_SLOT_BACKPACK CONST_SLOT_ARMOR CONST_SLOT_RIGHT CONST_SLOT_LEFT CONST_SLOT_LEGS CONST_SLOT_FEET CONST_SLOT_RING CONST_SLOT_AMMO O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Scripting → Actions e TalkActions" Para: "OTServ → Suporte OTServ → Suporte de Scripts"
- (Resolvido)[SCRIPT] Necessito ajuda com script
- (Resolvido)[SCRIPT] Necessito ajuda com script
- (Resolvido)[SCRIPT] Necessito ajuda com script
- (Resolvido)[SCRIPT] Necessito ajuda com script
- (Resolvido)[SCRIPT] Necessito ajuda com script
-
(Resolvido)COMANDO PARA CRIAR TELEPORT
O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Scripting → Actions e TalkActions" Para: "OTServ → Suporte OTServ → Suporte de Scripts"
- (Resolvido)[SCRIPT] Necessito ajuda com script
-
(Resolvido)[AJUDA]COMO CRIO SCRIPTS?
Fico feliz em saber que te ajudei. Qualquer dúvida que tiver pode postar aqui no fórum, que se possível estarei respondendo!
-
Como funcionam os Scripts?
Função para remover caixa doRemoveItem(itemUID, quantidade) Função para adicionar um item: doPlayerAddItem(cid, itemID, QuantidadeItem)
-
por que alguns forgottenserver vem com v
O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → OTServ Geral" Para: "OTServ → Suporte OTServ → Suporte de OTServ Geral"
-
(Resolvido)[AJUDA]COMO CRIO SCRIPTS?
@Benny e @Ken Kaneki, vamos parar de brincadeira com o cara porque isso aqui não é Playground não. O post de ambos foi totalmente sem intenção de ajudar ou com alguma informação construtiva. @MestruGusXD Você pode dar uma olhada nesse tópico: Aulas de Scripting Lua
-
(Resolvido)[SCRIPT] Necessito ajuda com script
Você quer que mais itens sejam utilizados para fusão? Ou quer fazer outras fusões com receitas diferentes para gerar novos ítens? Caso só queira que mais itens sejam usados para criar um item: local function table_size(t) local counter = 0 for _, _ in pairs(t) do counter = counter + 1 end return counter end local config = { remover = { --[Item1ID] = PosItem1, [1945] = {x = 75, y = 102, z = 7}, -- Item 1 [8310] = {x = 75, y = 103, z = 7}, -- Item 2 [2523] = {x = 75, y = 104, z = 7}, -- Item 3 }, criar = {item = 6391, pos = {x = 75, y = 104, z = 7}}, } function onUse(cid, item, frompos, item2, topos) local items = {} for id, pos in pairs(config.remover) do local item = getTileItemById(pos, id) if item.itemid == id then table.insert(items, item) end end if #uids == table_size(config.remover) then for _, item in pairs(items) do doRemoveItem(item.uid, 1) doSendMagicEffect(config.remover[item.itemid], 13) end doCreateItem(config.criar.item, 1, config.criar.pos) doSendMagicEffect(config.criar.pos, 13) doPlayerSendTextMessage(cid, 22, "Tcharam!") else return false end return true end
-
Arrumar um problema script
local spells_t = { -- all ["light healing"] = {price = 170, vocations = {1,2,3,4,5,6,7,8}, level = 1}, ["find person"] = {price = 60, vocations = {1,2,3,4,5,6,7,8}, level = 1}, ["magic rope"] = {price = 200, vocations = {1,2,3,4,5,6,7,8}, level = 1}, ["cure poison"] = {price = 150, vocations = {1,2,3,4,5,6,7,8}, level = 1}, ["levitate"] = {price = 500, vocations = {1,2,3,4,5,6,7,8}, level = 1}, ["great light"] = {price = 500, vocations = {1,2,3,4,5,6,7,8}, level = 1}, ["haste"] = {price = 600, vocations = {1,2,3,4,5,6,7,8}, level = 1}, ["food"] = {price = 300, vocations = {1,2,3,4,5,6,7,8}, level = 1}, ["magic shield"] = {price = 450, vocations = {1,2,3,5,6,7}, level = 1}, ["light magic missile"] = {price = 500, vocations = {1,2,5,6}, level = 1}, ["poison field"] = {price = 300, vocations = {1,2,5,6}, level = 1}, ["fire field"] = {price = 500, vocations = {1,2,5,6}, level = 1}, ["destroy field"] = {price = 700, vocations = {1,2,5,6}, level = 1}, ["energy field"] = {price = 700, vocations = {1,2,5,6}, level = 1}, ["energy strike"] = {price =800, vocations = {1,2,5,6}, level = 1}, ["poison strike"] = {price =800, vocations = {1,2,5,6}, level = 1}, ["ice strike"] = {price =800, vocations = {1,2,5,6}, level = 1}, ["flame strike"] = {price =800, vocations = {1,2,5,6}, level = 1}, ["death strike"] = {price =800, vocations = {1,2,5,6}, level = 1}, ["fire wave"] = {price =850, vocations = {1,5}, level = 1}, ["ice wave"] = {price =850, vocations = {2,6}, level = 1}, ["strong haste"] = {price = 1300, vocations = {1,2,5,6}, level = 1}, ["creature illusion"] = {price = 1000, vocations = {1,2,5,6}, level = 1}, ["summon creature"] = {price = 2000, vocations = {1,2,5,6}, level = 1}, ["ultimate light"] = {price = 1600, vocations = {1,2,5,6}, level = 1}, ["fire bomb"] = {price = 1500, vocations = {1,2,5,6}, level = 1}, ["soul fire"] = {price = 1800, vocations = {1,2,5,6}, level = 1}, ["energy bomb"] = {price = 2300, vocations = {1,2,5,6}, level = 1}, ["poison wall"] = {price = 1600, vocations = {1,2,5,6}, level = 1}, ["fire wall"] = {price = 2000, vocations = {1,2,5,6}, level = 1}, ["energy wall"] = {price = 2500, vocations = {1,2,5,6}, level = 1}, ["great fireball"] = {price = 1200, vocations = {1,2,5,6}, level = 1}, ["ultimate healing"] = {price = 1000, vocations = {1,2,3,5,6,7}, level = 1}, ["invisible"] = {price = 2000, vocations = {1,2,3,5,6,7}, level = 1}, ["magic wall"] = {price = 2100, vocations = {1,5}, level = 1}, ["mort wave"] = {price = 2500, vocations = {1,5}, level = 1}, ["enchant staff"] = {price = 2000, vocations = {1,5}, level = 1}, ["sudden death"] = {price = 3000, vocations = {1,5}, level = 1}, ["rage of the skies"] = {price = 6000, vocations = {1,5}, level = 1}, ["explosion"] = {price = 1800, vocations = {1,5}, level = 1}, -- Pally ["conjure arrow"] = {price = 450, vocations = {3,7}, level = 1}, ["conjure poisoned arrow"] = {price =700, vocations = {3,7}, level = 1}, ["conjure bolt"] = {price =750, vocations = {3,7}, level = 1}, ["conjure explosive arrow"] = {price = 1000, vocations = {3,7}, level = 1}, ["conjure power bolt"] = {price = 2000, vocations = {3,7}, level = 1}, ["conjure infernal bolt"] = {price = 66666, vocations = {3,7}, level = 1}, -- Kina ["whirlwind throw"] = {price = 1500, vocations = {4,8}, level = 1}, ["challenge"] = {price = 2000, vocations = {4,8}, level = 1}, ["berserk"] = {price = 2000, vocations = {4,8}, level = 1}, -- Druid ["intense healing"] = {price = 600, vocations = {2,6}, level = 1}, ["heal friend"] = {price =800, vocations = {2,6}, level = 1}, ["ultimate healing"] = {price = 1500, vocations = {2,6}, level = 1}, ["mass healing"] = {price = 2200, vocations = {2,6}, level = 1}, ["paralyze"] = {price = 1900, vocations = {2,6}, level = 1}, ["wrath of nature"] = {price = 6000, vocations = {2,6}, level = 1}, ["heavy magic missile"] = {price = 1500, vocations = {1,2,5,6}, level = 1}, ["intense healing"] = {price = 350, vocations = {1,2,3,5,6,7}, level = 1}, ["magic wall"] = {price = 2100, vocations = {1,5}, level = 1}, ["wild growth"] = {price = 4200, vocations = {2,6}, level = 1}, ["avalanche"] = {price = 3000, vocations = {2,6}, level = 1}, } 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 if msgcontains(msg:lower(), "spells") then local str = "" local voc = getPlayerVocation(cid) for name, info in pairs(spells_t) do if isInArray(info.vocations, voc) and not getPlayerLearnedInstantSpell(cid, name) then str = str .." {".. name .."} por ".. info.price .." gold coins, " end end if str == "" then str = "Eu não tenho nenhuma magia para vender a você." end npcHandler:say(str, cid) elseif spells_t[msg:lower()] then if getPlayerLearnedInstantSpell(cid, msg) then npcHandler:say("Você já aprendeu essa magia.", cid) return true end if getPlayerLevel(cid) < spells_t[msg:lower()].level then npcHandler:say("Você precisa ter level ".. spells_t[msg:lower()].level.." ou mais para comprar essa magia.", cid) return true end if not isInArray(spells_t[msg:lower()].vocations, getPlayerVocation(cid)) then npcHandler:say("Você não tem a vocação para comprar está spell.", cid) return true end if doPlayerRemoveMoney(cid, t[msg].price) then doPlayerLearnInstantSpell(cid, msg) npcHandler:say("Você aprendeu ".. msg ..".", cid) else npcHandler:say("você não tem "..t[msg].price.." gold coins.", cid) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Não precisava criar um duas tabelas, um com o nome da spell em maiúsculo e em minúsculo. O que fiz foi usar um string.lower(string), para transformar a mensagem em minúsculo,
-
Ajuda nesse script que eu fiz
Você só precisa colocar 1 end para cada if, para um elseif não precisa de end. E você estava utilizando else if em vez de elseif function onUse(cid, item, fromPos, item2, toPos) if getPlayerStorageValue(cid, 7994) < 1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a Pack vocation Old Versions") doPlayerSetStorageValue(cid, 7994, 1) if (getPlayerVocation(cid) == 1) then doPlayerAddItem(cid, 2287, 100) -- adori doPlayerAddItem(cid, 2311, 80) -- hmm doPlayerAddItem(cid, 2304, 40) -- gfb doPlayerAddItem(cid, 2268, 20) -- sd elseif (getPlayerVocation(cid) == 2) then doPlayerAddItem(cid, 2287, 15) -- adori doPlayerAddItem(cid, 2271, 15) -- icicle doPlayerAddItem(cid, 2274, 15) -- avalanche doPlayerAddItem(cid, 2311, 30) -- hmm doPlayerAddItem(cid, 2268, 1) -- sd elseif (getPlayerVocation(cid) == 3) then doPlayerAddItem(cid, 2265, 15) -- ih doPlayerAddItem(cid, 2273, 5) -- uh doPlayerAddItem(cid, 2311, 20) -- hmm doPlayerAddItem(cid, 2268, 1) -- sd elseif (getPlayerVocation(cid) == 4) then doPlayerAddItem(cid, 2265, 30) -- ih doPlayerAddItem(cid, 2273, 10) -- uh end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.") end return true end
-
(Resolvido)"ROLETA" NÃO CONSIGO COLOCAR PRA FUNCIONAR 2 ACTION COM A MESMA SCRIPT
Opa, perdão. local config = { premios = {13980, 13945, 13952, 13973, 13966, 13959, 13987, 13994}, --- Coloque o id que sera sorteado money = {2145, "small diamond"}, -- ID do diamond count = 3, -- Quantidade dos diamonds } function onUse(cid, item, fromPosition, itemEx, toPosition) if not doPlayerRemoveItem(cid, config.money[1], config.count) then doPlayerSendCancel(cid, "Você precisa de ".. config.count .." ".. config.money[2] .." pra usar o sorteador de items.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return false end local roleta = math.random(1, #config.premios) if config.premios[roleta] then doPlayerAddItem(cid, config.premios[roleta], 1) doBroadcastMessage(string.format("[SORTEADOR DE ITEM]: %s usou o sorteador de items e ganhou 1 %s.", getCreatureName(cid), getItemNameById(config.premios[roleta])), 22) doSendMagicEffect(getThingPos(cid), 14) return true end return false end
-
(Resolvido)[AJUDA]Como adicionar nova outfit
Posta o arquivo completo..
-
(Resolvido)[AJUDA]Como adicionar nova outfit
Posta aqui como você deixou seu outfits.xml
-
ERRO WARSYSTEM
Tenta assim function onThink(interval) db.query("UPDATE `guild_wars` SET `status` = 4, `ended` = " .. os.time() .. " WHERE `status` = 1 AND (`started` + 3600 * 2) < " .. os.time()) return true end
-
(Resolvido)COMANDO PARA CRIAR TELEPORT
/addtp 160, 54, 7
- (Resolvido)"ROLETA" NÃO CONSIGO COLOCAR PRA FUNCIONAR 2 ACTION COM A MESMA SCRIPT