
Tudo que Sun postou
-
db.getResult TFS 1.2
Este tópico foi movido para a seção de Suporte Otserv.
-
Account Manager
@iTzBrHue3 scan dos arquivos porfavor.
-
PUSH PERFEITO
Este tópico foi movido para a seção de Suporte Otserv.
-
(POKETIBIA) Item - Reward Quest
@Denker Parabéns pelo script, mas existem pontos que dá pra melhorar nele, segue abaixo! function OnUse(cid,item,fromPosition,item2,toPosition) local cfg = { -- crie uma tabela para configurar, assim fica mais "limpo" storageQuest = 12, -- nome de variavel não começa com maiúscula earnedItem = 12, count = 11, levelMin = 20, colorMsg = "Orange" } if ( getPlayerStorageValue(cid, cfg.storageQuest) > 0 ) then doPlayerSendTextMessage(cid, MESSAGE_TYPES[cfg.colorMsg], "You have already completed this quest!.") return true end if ( getPlayerLevel(cid) < cfg.levelMin ) then -- validação caso o player não tenha level minimo doPlayerSendTextMessage(cid, MESSAGE_TYPES[cfg.colorMsg], "You don't have required level(".. cfg.levelMin ..") to pass!.") return true end doPlayerSendTextMessage(cid, MESSAGE_TYPES[cfg.colorMsg], "You found "..getItemNameById(cfg.earnedItem).. " ".. cfg.count .."x!") doPlayerAddItem(cid, cfg.earnedItem, cfg.count) setPlayerStorageValue (cid, cfg.storageQuest, 1) return true end dessa forma você tem um código mais legível, espero que entenda isso, e parabéns pela iniciativa de ajudar o fórum! Aquele abraço, REP+
-
Elera-Global | Global 12.64, Ping BR 24h Online! Inaugurado 10/04/2021 as 10h
Este tópico foi arquivado para que possamos fazer a manutenção dos conteúdos na seção onde ele ficava. Ele ficará disponível para consulta à aqueles que precisarem, no entanto permanecerá fechado. Se você precisar comentar sobre ou tirar alguma dúvida busque a seção coerente com o assunto desde tópico ou a de suporte.
-
Mostrar os segundos que faltam pro boss nascer
não é acumulativo meu caro, só nasce um mob depois que o player mata 1 @poko360
-
[AJUDA] Erro ao compilar TFS 0.4
@underpunk Dev-cpp baixa esse dev ai, provavelmente está faltando as libs.
-
Mostrar os segundos que faltam pro boss nascer
local colorMsg = "orange" local tableBoss = { ["Amazon"] = {seconds = 10, newBoss = "Demon"} } local function timer(position, duration, color) for i = 0, (duration - 1) do addEvent(function() doSendAnimatedText(position, tostring(duration - i), color) end, i * 1000) end end function onKill(cid, target, damage, flags) if isPlayer(target) then return true end local boss = tableBoss[getCreatureName(target)] if not boss then return true end local position = getThingPos(target) doPlayerSendTextMessage(cid, MESSAGE_TYPES[colorMsg], "The boss will be born in " .. boss.seconds .. " seconds.") timer(position, boss.seconds, COLOR_RED) addEvent(doCreateMonster, boss.seconds * 1000, boss.newBoss, position) return true end creaturescript.xml <event type="kill" name="event nome" event="script" value="script name.lua"/> login.lua registerCreatureEvent(cid, "nome do evento") @poko360 pelo que entendi foi isso, não entendi a necessidade de colocar verificação para não criar dois boss se você matou o anterior.
-
(Resolvido)estou com um problema com npc interface
@ashweseposte seu script e me fale oque você quer que ele faça!.
-
Task System TFS 1.3x
Este tópico foi movido para a seção de Suporte Otserv.
-
Help Source, extended + client
Este tópico foi movido para a seção de Suporte Otserv Alternativo
-
como fazer um teleporte aparecer em um determinado lugar
@russo000esse tfs é revscript?
-
Adicionar Level ao outfit.xml
@D i M i T r E s C u <outfit id="1"> <list gender="0" lookType="136" acessLevel="100" name="Citizen"/> <list gender="1" lookType="128" acessLevel="100" name="Citizen"/> </outfit> provavel que você não esteja usando a função corretamente!
-
Adicionar Level ao outfit.xml
@D i M i T r E s C u agora só testar a função!
-
Adicionar Level ao outfit.xml
@D i M i T r E s C u você fez essa troca que te falei? se sim, é só apagar essa função uint16_t Outfits::getOutfitLevel() no outfit.h
-
Adicionar Level ao outfit.xml
@D i M i T r E s C uvai lá no outfit.h e apaga essa função getOutfitLevel
-
Adicionar Level ao outfit.xml
@D i M i T r E s C umanda o erro ai
-
Adicionar Level ao outfit.xml
@D i M i T r E s C u deu certo ai?
-
Adicionar Level ao outfit.xml
altera isso if (Outfits::getInstance()->getOutfit(lookType, outfit) && player->getLevel() >= Outfits::getInstance()->getOutfitLevel()) { lua_pushboolean(L, player->addOutfit(outfit.outfitId, addon)); return 1; } por isso: Outfit outfit; if (Outfits::getInstance()->getOutfit(lookType, outfit) && player->getLevel() >= outfit.level) { lua_pushboolean(L, player->addOutfit(outfit.outfitId, addon)); return 1; } sugiro que troque para uma src mais atual, como você tem projeto de nto, dá pra usar a base 1.3 do nekiro que é 860. @D i M i T r E s C u
-
Adicionar Level ao outfit.xml
@D i M i T r E s C u qual base você está utilizando?
-
Adicionar Level ao outfit.xml
adiciona isso ( outfit.h ) acima de bool getOutfit(uint32_t outfitId, uint16_t sex, Outfit& outfit); uint16_t getOutfitLevel() { return Outfit.level; } em luascript.cpp int32_t LuaInterface::luaDoPlayerAddNewOutfit(lua_State* L) { //doPlayerAddNewOutfit(cid, looktype, addon) uint32_t addon = popNumber(L), lookType = popNumber(L); ScriptEnviroment* env = getEnv(); Player* player = env->getPlayerByUID((uint32_t)popNumber(L)); if (!player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); return 1; } Outfit outfit; if (Outfits::getInstance()->getOutfit(lookType, outfit) && player->getLevel() >= Outfits::getInstance()->getOutfitLevel()) { lua_pushboolean(L, player->addOutfit(outfit.outfitId, addon)); return 1; } lua_pushboolean(L, false); return 1; } e em luascript.h static int32_t luaDoPlayerAddNewOutfit(lua_State* L); não fiz o teste aqui, isso vai ficar por conta de você, essa função tem retorno booleano, então você consegue printar o resultado. @D i M i T r E s C u
-
Adicionar Level ao outfit.xml
@D i M i T r E s C ume manda seu luascript.cpp
-
Adicionar Level ao outfit.xml
@D i M i T r E s C u o certo seria <outfit id="1"> <list gender="0" lookType="136" acessLevel="100" name="Citizen"/> <list gender="1" lookType="128" acessLevel="100" name="Citizen"/> </outfit> pra vc verificar, vc precisar criar uma função get
-
Adicionar Level ao outfit.xml
if(readXMLInteger(p, "levelAcess", intValue)) newOutfit.level = intValue; esse que você colocou é da minha src que estou utilizando, tem diferença na forma que o programador fez, testa com esse aqui que te enviei, se der erro me envia o erro. @D i M i T r E s C u
-
Adicionar Level ao outfit.xml
if(readXMLInteger(p, "access", intValue)) newOutfit.accessLevel = intValue; accessLevel é igual acima que te falei sobre uint16_t level certo? ambas as variáveis tem que ter o mesmo nome! @D i M i T r E s C u