Ir para conteúdo

Wise

Membro
  • Registro em

  • Última visita

Tudo que Wise postou

  1. Em um monstro específico ou qualquer monstro? Efeito finito ou infinito? Delay? Cara.. Se você quer que alguém faça um script pra você, então dê o máximo de detalhes possíveis, senão fica foda. Fiz uma talkaction de um efeito finito: spineffect.lua (data/talkactions/scripts): function onSay(cid, words, param, channel) local p, dirpos = tonumber(param), getPositionsByDirection(cid) if not p or p < 0 or p > CONST_ANI_LAST then return doPlayerSendCancel(cid, 'Enter a shoot type effect number that may not be lower than 0 and higher than '..CONST_ANI_LAST) end doSendDistanceShoot(dirpos[math.random(#dirpos)], dirpos[math.random(#dirpos)], tonumber(param)) -- function of xWhiteWolfs library return true end Tag - talkactions.xml (data/talkactions): <talkaction log="yes" words="!spineff;/spineff" access="4" event="script" value="spineffect.lua"/> O shoot type da red star (assasin star) é o de número 18, então basta digitar !spineff 18 ou /spineff 18.
  2. Relaxa. Se o valueID de todas as storages for maior ou igual a 1 quando "ativas" no sistema, então deve funcionar sim.
  3. Não jogo servidores derivados, então..obrigado pela definição.
  4. Desconheço o sistema, mas enfim, só uma observação @Adriano SwaTT. Callback onLogout não registra creature event.
  5. E o que seria estar em "ride, fly e surf"? Algum sistema próprio do seu servidor, eu suponho. Poste os scripts, não posso te ajudar sem saber do que eles se tratam.
  6. Wise postou uma resposta no tópico em Suporte Tibia OTServer
    Isso retornaria ao player uma mensagem: config.msgDenied config.msgWelcome Tente: function onStepIn(cid, item, pos, fromPos) local msg = {"Você não é VIP. Para comprar VIP, diga !buyvip.", "Seja bem-vindo a área VIP."} if getPlayerStorageValue(cid, 13540) - os.time() < 1 then doTeleportThing(cid, fromPos, true) doSendMagicEffect(fromPos, CONST_ME_POFF) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, msg[1]) end doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, msg[2]) return true end
  7. Wise postou uma resposta no tópico em Suporte Tibia OTServer
    No groups.xml você determinaria a customFlag PLAYERCUSTOMFLAG_HIDELEVEL (Hide level from description), o que faria com que o level daquele que a possui não seja exibido. Isso é simples, basta usar o Flags Calculator. Já aí, ele quer isso no ranking e dependendo do uso do mesmo (se é talkaction ou website), uma checagem ou configuração de group IDs pode ser feita para que não os exiba.
  8. Ah não? Então o "baiak" veio a partir de que outro servidor desse modo de jogabilidade?
  9. outfits.xml (data/XML): Altere os parâmetros do outfit assassin (geralmente sendo o outfit ID 13) para como sendo: <outfit id="13" quest="31013"> <list gender="0" lookType="156" name="Assassin"/> <list gender="1" lookType="152" name="Assassin"/> </outfit> ou <outfit id="13" storageId="31013" storageValue="1"> <list gender="0" lookType="156" name="Assassin"/> <list gender="1" lookType="152" name="Assassin"/> </outfit> assassinquest.lua (data/actions/scripts): function onUse(cid, item, fromPos, item2, toPos) local stor = 31013 -- storage if getPlayerStorageValue(cid, stor) < 1 then setPlayerStorageValue(cid, stor, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations! Now you can wear your new outfit.") else doPlayerSendCancel(cid, "You already have picked up your outfit, it's empty.") end return true end Tag - actions.xml (data/actions): <action actionid="ACTIONID" script="assassinquest.lua"/> Basta fazer o mesmo processo com os outros outfits.
  10. Wise postou uma resposta no tópico em Suporte Tibia OTServer
    O seu ranking, é por talkaction ou website? Poste os códigos contidos no arquivo.
  11. Wise postou uma resposta no tópico em Suporte Tibia OTServer
    Como "nada"? Algum erro..ou simplesmente não executou no seu servidor? Qual a versão dele?
  12. Isso aqui virou playground? Olha, amigo, dê uma olhada nos tutoriais do fórum e o conteúdo do manual de referência da linguagem Lua disponível no site da mesma. Qualquer dúvida que tiver, crie um tópico nessa área (suporte de scripts) e com certeza membros vão te ajudar.
  13. E como o player adquirirá o efeito? Especifique.
  14. pzlocked.lua (data/movements/scripts): function onStepIn(cid, item, pos, fromPos) if isPlayer(cid) and isPlayerPzLocked(cid) then doPlayerSetPzLocked(cid, false) end return true end Tag - movements.xml (data/movements): <movevent type="StepIn" actionid="ACTIONID" event="script" value="pzlocked.lua"/>
  15. Relaxa, não houve transtorno algum. Disponha ;]
  16. Bom, nesse caso nem precisaria usar storages.. local tab = { voc = {5}, -- newVocationID dctime = 5, -- segundos para desconectar o player stats = {1, 150, 5} -- {newLevel, newHealth, newMana} novo level/hp/mana ao trocar a voc } 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 function changeVoc(cid) local playerid, mh, mm = getPlayerGUID(cid), getCreatureMaxHealth(cid), getCreatureMaxMana(cid) if(npcHandler:isFocused(cid)) then npcHandler:releaseFocus(cid) end setCreatureMaxHealth(cid, tab.stats[2]) doCreatureAddHealth(cid, -(tab.stats[2] - mh)) setCreatureMaxMana(cid, tab.stats[3]) doCreatureAddMana(cid, -(tab.stats[3] - mm)) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level`="..tab.stats[1]..",`experience`= 0 WHERE `players`.`id`= "..playerid.."") return true end if (msgcontains(msg, 'change')) then if not (tab.voc[getPlayerVocation(cid)]) then talkState[talkUser] = 1 selfSay('If you choose to change your vocation, your level, health and mana will return as a level '..tab.stats[1]..'..', cid) selfSay('Are you sure you want this?', cid) else talkState[talkUser] = 0 npcHandler:releaseFocus(cid) selfSay('I can not change your vocation.', cid) end elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 1) then doPlayerSetVocation(cid, tab.voc[1]) doSendMagicEffect(getThingPos(cid), CONST_ME_STUN) addEvent(function() if isPlayer(cid) then changeVoc(cid) end end, tab.dctime * 1000) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) selfSay('Okay, now you will pass out and I will send you to the temple of your town in '..tab.dctime..' seconds.', cid) elseif (msgcontains(msg, 'no') and talkState[talkUser] == 1) then talkState[talkUser] = 0 npcHandler:releaseFocus(cid) selfSay('Sure, goodbye!', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  17. Wise postou uma resposta no tópico em Suporte Tibia OTServer
    local tab = { time = 8, -- tempo de duração/exhausted em horas stor = 12345 -- storage } function setNormalRate(cid) doPlayerSetRate(cid, SKILL__LEVEL, 1) setPlayerStorageValue(cid, tab.stor, -1) doCreatureSay(cid, "Normal Experience..", TALKTYPE_ORANGE_1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "The effect of double experience over..") return true end function onUse(cid, item, fromPos, item2, toPos) if getPlayerStorageValue(cid, tab.stor) < 1 then setPlayerStorageValue(cid, tab.stor, 1) doPlayerSetRate(cid, SKILL__LEVEL, 2.0) doSendMagicEffect(getThingPos(cid), CONST_ME_STUN) doCreatureSay(cid, "Double Experience!!", TALKTYPE_ORANGE_1) addEvent(function() if isPlayer(cid) then setNormalRate(cid) end end, tab.time * 3600000) doRemoveItem(item.uid, 1) else doPlayerSendCancel(cid, "You're already with double experience! Wait "..tab.time.." hours to drink it again.") end return true end
  18. Cara, você fez merda. Eu testei esse NPC e todas as funções estão executando perfeitamente. Na tabela, coloque um valor no parâmetro da storage necessária como sendo maior ou diferente de -1. Pois esse será o novo valor aplicado da storage, ao player, assim que ele aceitar a proposta do NPC.
  19. Pronto, aqui está: local tab = { voc = 5, -- newVocationID dctime = 5, -- segundos para desconectar o player stats = {1, 150, 5}, -- {newLevel, newHealth, newMana} novo level/hp/mana ao trocar a voc oldstor = {5432, 1}, -- {storage, value) <- necessários newstor = {6543, 2} -- {storage, value) <- que o player receberá } 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 function changeVoc(cid) local playerid, mh, mm = getPlayerGUID(cid), getCreatureMaxHealth(cid), getCreatureMaxMana(cid) if(npcHandler:isFocused(cid)) then npcHandler:releaseFocus(cid) end setCreatureMaxHealth(cid, tab.stats[2]) doCreatureAddHealth(cid, -(tab.stats[2] - mh)) setCreatureMaxMana(cid, tab.stats[3]) doCreatureAddMana(cid, -(tab.stats[3] - mm)) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level`="..tab.stats[1]..",`experience`= 0 WHERE `players`.`id`= "..playerid.."") return true end if (msgcontains(msg, 'change')) then if (getPlayerStorageValue(cid, tab.oldstor[1]) == tab.oldstor[2]) then talkState[talkUser] = 1 selfSay('If you choose to change your vocation, your level, health and mana will return as a level '..tab.stats[1]..'..', cid) selfSay('Are you sure you want this?', cid) else talkState[talkUser] = 0 npcHandler:releaseFocus(cid) selfSay('I can not change your vocation.', cid) end elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 1) then doPlayerSetVocation(cid, tab.voc) setPlayerStorageValue(cid, tab.oldstor[1], -1) setPlayerStorageValue(cid, tab.newstor[1], tab.newstor[2]) doSendMagicEffect(getThingPos(cid), CONST_ME_STUN) addEvent(function() if isPlayer(cid) then changeVoc(cid) end end, tab.dctime * 1000) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) selfSay('Okay, now you will pass out and I will send you to the temple of your town in '..tab.dctime..' seconds.', cid) elseif (msgcontains(msg, 'no') and talkState[talkUser] == 1) then talkState[talkUser] = 0 npcHandler:releaseFocus(cid) selfSay('Sure, goodbye!', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  20. Wise postou uma resposta no tópico em Suporte Tibia OTServer
    Recomendo o Magnus Challenger, um completíssimo NPC de tasks.
  21. Alterei algumas funções do script e resolvi esse erro de atenção, post atualizado.
  22. Disponha ;] Faça como o membro, adicione uma checagem de condição paralyze dentro do callback e remova-a (caso cid esteja com ela): function onCastSpell(cid, var) if getCreatureCondition(cid, CONDITION_PARALYZE) then doRemoveCondition(cid, CONDITION_PARALYZE) end return doCombat(cid, combat, var) end
  23. vchanger.lua (data/npc/scripts): local tab = { voc = 5, -- newVocationID dctime = 5, -- segundos para desconectar o player stats = {1, 150, 5}, -- {newLevel, newHealth, newMana} novo level/hp/mana ao trocar a voc oldstor = {5432, 1}, -- {storage, value) <- necessários newstor = {6543, 2} -- {storage, value) <- que o player receberá } 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 function changeVoc(cid) local playerid, mh, mm = getPlayerGUID(cid), getCreatureMaxHealth(cid), getCreatureMaxMana(cid) if(npcHandler:isFocused(cid)) then npcHandler:releaseFocus(cid) end setCreatureMaxHealth(cid, tab.stats[2]) doCreatureAddHealth(cid, -(tab.stats[2] - mh)) setCreatureMaxMana(cid, tab.stats[3]) doCreatureAddMana(cid, -(tab.stats[3] - mm)) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level`="..tab.stats[1]..",`experience`= 0 WHERE `players`.`id`= "..playerid.."") return true end if (msgcontains(msg, 'change')) then if (getPlayerStorageValue(cid, tab.oldstor[1]) == tab.oldstor[2]) then talkState[talkUser] = 1 selfSay('If you choose to change your vocation, your level, health and mana will return as a level '..tab.stats[1]..'..', cid) selfSay('Are you sure you want this?', cid) else talkState[talkUser] = 0 npcHandler:releaseFocus(cid) selfSay('I can not change your vocation. You are already a '..getPlayerVocationName(cid)..'!', cid) end elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 1) then doPlayerSetVocation(cid, tab.voc) setPlayerStorageValue(cid, tab.oldstor[1], -1) setPlayerStorageValue(cid, tab.newstor[1], tab.newstor[2]) doSendMagicEffect(getThingPos(cid), CONST_ME_STUN) addEvent(function() if isPlayer(cid) then changeVoc(cid) end end, tab.dctime * 1000) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) selfSay('Okay, now you will pass out and I will send you to the temple of your town in '..tab.dctime..' seconds.', cid) elseif (msgcontains(msg, 'no') and talkState[talkUser] == 1) then talkState[talkUser] = 0 npcHandler:releaseFocus(cid) selfSay('Sure, goodbye!', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Vocation Changer.xml (data/npc): <npc name="Vocation Changer" script="data/npc/scripts/vchanger.lua" access="5" lookdir="1"> <health now="1000" max="1000"/> <look type="154" head="114" body="114" legs="113" feet="113" addons="3"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. I {change} the vocation of some mortals in special." /> </parameters> </npc>
  24. Você tem de calcular as flags junto a de valor 1073741824 (Cannot be added to VIP), alterando-o em seu groups.xml (data/XML). Como você disse que quer pra GOD's, fiz o calculo com os privilégios e limitações comuns: groups.xml Procure pelo groupID do GOD em seu servidor (geralmente 6), e na tag dele, mude o valor do parâmetro flags="" para 232544561766394. Ficando então como (exemplo): <group id="6" name="God" flags="232544561766394" customFlags="134217727" access="5" violationReasons="23" nameViolationFlags="170" statementViolationFlags="213" depotLimit="5000" maxVips="500" outfit="302"/> Aqui estão as flags que eu selecionei pelo Flags Calculator: --Privileges Can not be attacked Can convince all monsters Can summon all monsters Can illusion all monsters Can sense invisibility Ignored by monsters Do not gain infight Has unlimited mana Has unlimited soul Do no gain exhaustion Can always login Can broadcast Can edit all house rights Can not be banned Can not be pushed Has unlimited capacity Can push all creatures Talk red in private Talk red in channel Talk orange in help-channel Skip spell usage checks Skip equip usage checks Gain max speed Cannot be added to VIP Talk red anonymously Ignore protection-zone Can not be muted Permanent premium account Can answer rule violations(Not work in 8.7) Show group description instead of vocation Has infinite stamina Can report bugs Total invisibility Hide health --Limitations Can not attack players Do not gain experience Do not gain mana Do not gain health Do not gain skill
  25. Script do Printer. Amigo, callback onLogin não registra creature event. Você quer dizer não dropar loot se for morto por players durante os níveis 20~50, certo? lootp.lua (data/creaturescripts/scripts): function onPrepareDeath(cid, killer) local level = {20, 50} local player = Player(cid) if player ~= nil and killer:isPlayer() and player:getLevel() >= level[1] and player:getLevel() < level[2] + 1 then player:setDropLoot(false) end return true end Registre o creature event em login.lua: registerCreatureEvent(cid, "LootProtection") Tag - creaturescripts.xml (data/creaturescripts): <event type="preparedeath" name="LootProtection" script="lootp.lua"/>

Informação Importante

Confirmação de Termo