-
Total de itens
1347 -
Registro em
-
Última visita
-
Dias Ganhos
36
Tudo que Oneshot postou
-
Troque essa linha: if monster == nil or (monster.summonable == false and getPlayerFlagValue(cid, PLAYERFLAG_CANSUMMONALL) == false)then Por essa: if monster == false or (monster.summonable == false and getPlayerFlagValue(cid, PLAYERFLAG_CANSUMMONALL) == false)then
-
data/actions/scripts/nome_do_arquivo.lua function onUse(cid, item, fromPosition, itemEx, toPosition) doCreateMonster("Magebomb", fromPosition) doRemoveItem(item.uid, 1) doSendMagicEffect(fromPosition, CONST_ME_MAGIC_GREEN) return true end data/actions/actions.xml <action itemid="5957" event="script" value="nome_do_arquivo.lua"/>
-
Faça um favor, veja se a opção ingameGuildManagement no config.lua está como false. E em servidores 8.6, os comandos para editar a guild são feitos no canal da guild.
-
Existem dois modos de fazer isso, um é com uma função que deve ser compilada nas sources, acho que o nome é doCreateCustomMonster. E a segunda é com uma ligeira gambiarra que é criar um novo arquivo.xml para cada jogador do seu servidor, sem contar que toda vez que o jogador usasse a magia iria ter que dar reload nas criaturas para atualizar o looktype, enfim, uma gambiarra mesmo.
- 3 respostas
-
- naruto tibia summon player
- otserv
- (e 1 mais)
-
É, de fato, não pensei nisso. function onSay(cid, words, param, channel) param = param:match('%"(%a+)') or param:lower() or "" local vocations = {"Druid", "Elder Druid"} local monster if param == "" then doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) return true end monster = getMonsterInfo(param) if monster == nil or (monster.summonable == false and getPlayerFlagValue(cid, PLAYERFLAG_CANSUMMONALL) == false)then doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) return true end if not isInArray(vocations, getPlayerVocationName(cid)) and getPlayerFlagValue(cid, PLAYERFLAG_IGNORESPELLCHECK) == false then doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) doPlayerSendDefaultCancel(cid, RETURNVALUE_YOURVOCATIONCANNOTUSETHISSPELL) return true end if (#getCreatureSummons(cid) >= getConfigValue("maxPlayerSummons") and getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) == false) or getCreatureStorage(cid, 4132) == 1 then doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) return true end if getCreatureMana(cid) < monster.manaCost and getPlayerFlagValue(cid, PLAYERFLAG_HASINFINITEMANA) == false then doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHMANA) return true end doSummonMonster(cid, param) if getPlayerFlagValue(cid, PLAYERFLAG_HASINFINITEMANA) == false then doCreatureAddMana(cid, -monster.manaCost) end doSendMagicEffect(getThingPosition(cid), CONST_ME_MAGIC_BLUE) doCreatureSay(cid, "utevo res \"".. param .."\"") return true end
-
Os GODs, CMs e outros possuem uma propriedade que permite a eles serem ignorados por monstros, quando jogadores entrarem no seu servidor, os monstros irão andar e atacar normalmente.
-
Opa, claro. function onSay(cid, words, param, channel) param = param or "" if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local pid = getPlayerByNameWildcard(param) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player ".. param .." not found.") return true end doShowTextDialog(cid, 2175, "Informações Pessoais\n" .. "\nNome: " .. getCreatureName(pid) .. "\nSexo: " .. (getPlayerSex(pid) == 0 and "Feminino" or "Masculino") .. "\nLevel: " .. getPlayerLevel(pid) .. "\nChakra: " .. getPlayerMagLevel(pid) .. "\nVIP: " .. (getCreatureStorage(pid, 13540) > os.time() and "Sim" or "Não") .. "\nSaldo Bancário: " .. getPlayerBalance(pid) .. "\nReputação: " .. getCreatureStorage(pid, 6001) .. "\n\nAtributos\n" .. "\nTaijutsu - " .. getPlayerSkillLevel(pid, 0) .. "\nNinjutsu - " .. getPlayerSkillLevel(pid, 1) .. "\nGenjutsu - " .. getPlayerSkillLevel(pid, 2) .. "\nKenjutsu - " .. getPlayerSkillLevel(pid, 3) .. "\nDistance - " .. getPlayerSkillLevel(pid, 4) .. "\nDefense - " .. getPlayerSkillLevel(pid, 5) .. "\nFishing - " .. getPlayerSkillLevel(pid, 6) .. "\n\nInformações da Tribo\n" .. "\nNome: " .. getPlayerGuildName(pid) .. "\nPosto: " .. getPlayerGuildRank(pid) .. "\nNível: " .. getPlayerGuildLevel(pid)) return true end
-
function onSay(cid, words, param, channel) param = param or "" if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local pid = getPlayerByNameWildcard(param) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player ".. param .." not found.") return true end doPlayerPopupFYI(cid, "Informações Pessoais\n" .. "\nNome: " .. getCreatureName(pid) .. "\nLevel: " .. getPlayerLevel(pid) .. "\nChakra: " .. getPlayerMagLevel(pid) .. "\nVIP: " .. (isPremium(pid) and "Sim" or "Não") .. "\nSaldo Bancário: " .. getPlayerBalance(pid) .. "\nReputação: " .. getCreatureStorage(pid, 6001) .. "\n\nAtributos\n" .. "\nTaijutsu - " .. getPlayerSkillLevel(pid, 0) .. "\nNinjutsu - " .. getPlayerSkillLevel(pid, 1) .. "\nGenjutsu - " .. getPlayerSkillLevel(pid, 2) .. "\nKenjutsu - " .. getPlayerSkillLevel(pid, 3) .. "\nDistance - " .. getPlayerSkillLevel(pid, 4) .. "\nDefense - " .. getPlayerSkillLevel(pid, 5) .. "\nFishing - " .. getPlayerSkillLevel(pid, 6) .. "\n\nInformações da Tribo\n" .. "\nNome: " .. getPlayerGuildName(pid) .. "\nPosto: " .. getPlayerGuildRank(pid) .. "\nNível: " .. getPlayerGuildLevel(pid)) return true end
-
function onSay(cid, words, param, channel) param = param:lower() or "" local monster if param == "" then doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) return true end monster = getMonsterInfo(param) if monster == nil or (monster.summonable == false and getPlayerFlagValue(cid, PLAYERFLAG_CANSUMMONALL) == false) then doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) return true end if (#getCreatureSummons(cid) >= getConfigValue("maxPlayerSummons") and getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) == false) or getCreatureStorage(cid, 4132) == 1 then doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) return true end if getCreatureMana(cid) < monster.manaCost and getPlayerFlagValue(cid, PLAYERFLAG_HASINFINITEMANA) == false then doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHMANA) return true end doSummonMonster(cid, param) if getPlayerFlagValue(cid, PLAYERFLAG_HASINFINITEMANA) == false then doCreatureAddMana(cid, -monster.manaCost) end doSendMagicEffect(getThingPosition(cid), CONST_ME_MAGIC_BLUE) doCreatureSay(cid, "utevo res \"".. param .."\"") return true end <talkaction words="utevo res" filter="word-spaced" event="script" value="summon creature.lua"/> Acho que está funcionando bem. Um grande abraço.
-
Se seu servidor possuir a função getMonsterInfo(name), acho bem possível fazer um utevo res por talkaction e customizável a gosto.
-
Por favor, né, meu amigo? Tem muita gente que cria tópico no suporte, não é atendido e nem por isso fica fazendo isso e criando indiretinhas. Enfim, reportado como Resolvido.
-
Otserver Remoto E Automatizado
tópico respondeu ao DiogoTemporario de Oneshot em Tutoriais para Iniciantes
Olá, DiogoTemporario Gostei muito do tutorial, dá variadas dicas de gerenciamento de servidores e está muito bem detalhado com imagens. Eu nem sabia da possibilidade de fazer o computador ligar sozinho, se ainda tivesse um servidor, essa seria uma dica de ouro. Estarei reportando para aprovação em Começando seu Servidor Um grande abraço. -
function onSay(cid, words, param, channel) if words == "!vida" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sua vida é ".. getCreatureHealth(cid) .."/".. getCreatureMaxHealth(cid) .." ") elseif words == "!mana" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sua mana é ".. getCreatureMana(cid) .."/".. getCreatureMaxMana(cid) .." ") end return true end <talkaction words="!vida;!mana" event="script" value="nome_do_arquivo.lua"/>
-
Opção "manager" No Vocations.xml
tópico respondeu ao Oneshot de Oneshot em Linguagens de Programação
Certo, vou editar isso e na verdade eu esqueci de um passo no vocations.cpp que faz com que não seja preciso colocar manager="1" em todas as vocações inicias. -
[Encerrado] Dúvida Shield E Helmeth Precisam De Lvl Para Usar
tópico respondeu ao roriscrave de Oneshot em Tópicos Sem Resposta
movements.xml Procure pelo ID do item, edite vocações e level lá. Um grande abraço -
Não seja por isso, http://www.xtibia.com/forum/topic/190356-opcao-manager-no-vocationsxml/
-
Nome: bool manager Tipo: C++ Autor: Oneshot Oioioi, como vai? Vi um pedido interessante no seção de suporte, que consistia em fazer um jeito de vocações que não são promotions de outras não aparecerem nas opções do Account Manager. Ou seja são vocações iniciais mas você pode ter a livre opção de bloquear a escolha da vocação no Account Manager pelo jogador. Em vocations.h, procure por: bool attackable, needPremium; Substitua: bool attackable, needPremium, manager; Procure por: bool isPremiumNeeded() const {return needPremium;} void setNeedPremium(bool v) {needPremium = v;} Adicione logo abaixo: bool isManagerOption() const {return manager;} void setAsManagerOption(bool v) {manager = v;} Agora em vocations.cpp, procure por: if(readXMLString(p, "needpremium", strValue)) voc->setNeedPremium(booleanString(strValue)); Logo abaixo adicione: if(readXMLString(p, "accountmanager", strValue) || readXMLString(p, "manager", strValue)) voc->setAsManagerOption(booleanString(strValue)); Procure por: needPremium = false; Adicione logo abaixo: manager = true; E finalmente em player.cpp, procure por: if(it->first == it->second->getFromVocation() && it->first != 0) Substitua por: if(it->first == it->second->getFromVocation() && it->first != 0 && it->second->isManagerOption() == true) Logo abaixo, procure por: if(checkText(text, tmp) && it != Vocations::getInstance()->getLastVocation() && it->first == it->second->getFromVocation() && it->first != 0) Substitua por: if(checkText(text, tmp) && it != Vocations::getInstance()->getLastVocation() && it->first == it->second->getFromVocation() && it->first != 0 && it->second->isManagerOption() == true) Compile e teste. O modo de uso é bem simples, no seu vocations.xml, escolha a vocação que você quer ou não quer que apareça no Account Manager: <vocation id="9" name="Fighter" description="a fighter" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="3.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="9"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> E adicione a opção manager com valor 0 ou 1, para não aparecer e aparecer, respectivamente: <vocation id="9" name="Fighter" description="a fighter" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="3.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="9" manager="0"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> Assim a vocação não poderá ser selecionada pelo Account Manager. Um grande abraço.
-
Olá, s0me0ne. Desculpe pela demora, se você tiver acesso ao código-fonte (sources) do seu servidor, abra o arquivo player.cpp e procure por: if(it->first == it->second->getFromVocation() && it->first != 0) Troque por: if(it->first == it->second->getFromVocation() && it->first != 0 && it->second->getId() != 13) Agora procure por: if(checkText(text, tmp) && it != Vocations::getInstance()->getLastVocation() && it->first == it->second->getFromVocation() && it->first != 0) Troque por: if(checkText(text, tmp) && it != Vocations::getInstance()->getLastVocation() && it->first == it->second->getFromVocation() && it->first != 0 && it->second->getId() != 13) Essa é uma pequena "gambiarra" que impedirá o jogador de escolher a vocação de ID igual a 13, ou seja, Falcon Assassin no seu caso. Só compilar. Estarei desenvolvendo um add-on mais elaborado para vocations.xml baseado nesse seu pedido . Um grande abraço.
-
Indiretamente o War System é um sistema feito apenas de talkactions e querys no banco de dados, mas essas tais talkactions usam funções LUA que só são declaradas no código-fonte do servidor se você usar o parâmetro -D__WAR_SYSTEM__ na hora da compilação. Ou seja, você iria precisar de programação para usar o sistema. Um grande abraço.
-
Criando Dois Items Com A Mesma Sprite
tópico respondeu ao Spraypaint de Oneshot em Tutoriais para Iniciantes
Olá, Spraypaint Seu tutorial está muito bem detalhado com imagens e extremamente conciso e de fato venho notando a crescente demanda por tutoriais que ensinem a criar dois itens com a mesma sprite na área de suporte. Estarei reportando para aprovação em Outros Tutoriais. Um grande abraço. -
Olá, tudo bem? Há muitos tutoriais abordando este tema na comunidade e muitos possuem mais detalhamento e abordam muito mais a teoria e criatividade do que simplesmente o modelo "Coloque o script no servidor e configure", como, por exemplo, este: Criando Quests Bacanas Para que seu tutorial seja aprovado, você precisa fugir do padrão dos muitos tutoriais com esse tema existentes que anteriormente foram aprovados. Um grande abraço.
-
Se é por storage, então acho que podemos fazer dessa maneira. function onSay(cid, words, param, channel) local result = db.getResult("SELECT `player_id`, `value` FROM `player_storage` WHERE `key` = 2310 ORDER BY `value` DESC LIMIT 10") local msg = "Highscore for Resets\n\n" .. "Rank Resets - Player Name\n\n" if result:getID() ~= -1 then local n = 1 while true do local player_id = result:getDataInt("player_id") local resets = result:getDataInt("value") msg = msg .."".. n ..". ".. resets .." ".. getPlayerNameByGUID(player_id) .."\n" n = n + 1 if not result:next() then break end end end doPlayerPopupFYI(cid, msg) return true end <talkaction words="/topreset" event="script" value="nome_do_arquivo.lua"/>
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.