
Tudo que Wise postou
-
Comando /attr não funciona
Você não precisa usar nenhum arquivo contendo códigos, a função thingProporties (que é usada nessa talkaction) já está inclusa na source do seu servidor. Apenas altere a tag para: <talkaction log="yes" words="/attr" access="5" event="function" value="thingProporties"/>
-
(Resolvido)[PEDIDO] Type Staffs 8.6
Hahah cheguei tarde demais. Que bom que há outros membros dispostos a ajudar ;]
-
(Resolvido)[PEDIDO] Type Staffs 8.6
@Caronte O que você citou são os magic effects e shoot types. Nesse caso ele teria que usar um script com callback onUseWeapon e adaptar as funções doAreaCombatHealth e doSendDistanceShoot, ou criar um combat próprio da wand/rod. @Maluketz Pra configurar diretamente na tag, são apenas esses que você citou. Agora, há como "personalizar". Se quiser, dê os detalhes (magic effect, shoot type, hit mínimo/máximo) que eu faço.
-
[Anti Guild Attacks] Você não pode atacar sua guild
Muito útil, amigo. Uma observação, vejo que utilizou uma storage pra definir uma certa "escolha" do membro da guild em relação ao pvp entre os outros membros da mesma (deve ter alguma função, particular do seu servidor).. Mas porquê fazer o uso dessas checagens sem apresentar esse outro sistema (que daria significado ao uso da storage), se aqui, os membros (possivelmente que todos) não fazem uso dela em seus servidores? E setando skull none ao cid quando atacar o target e o target for da mesma guild (contendo o valor da storage), se cid estiver PK, vai poder usar isso a seu favor, perdendo a skull quando quiser. Não é uma crítica, apenas uma observação. Só faltou registrar o creature event, e obrigado por compartilhar com os demais.
-
[PEDIDO] Jogadores da mesma cidade não podem se atacar e npc guard diferente.
Ah, ok. guard.lua (data/npc/lib): Guard = { config = { attackspeed = 1000, townid = 5, -- ID da town que o NPC protege }, combat = {type = COMBAT_PHYSICALDAMAGE, min = 100, max = 200} } function Guard:new() local ret = {} setmetatable({}, {__index = self.combat}) setmetatable(ret, {__index = self}) return ret end function Guard:reset() self.config = Guard.config self.target = 0 selfFollow(0) doTeleportThing(self.id, self.position) end function Guard:updateTarget() if self.target ~= 0 then return end local creatures = getSpectators(getThingPosition(self.id), self.range, self.range, false) for i = 1, #creatures do local target = creatures[i] if isCreature(target) and not isNpc(target) and getPlayerTown(target) ~= self.config.townid then if not getTilePzInfo(getThingPosition(target)) then if selfFollow(target) then selfSay("You're not welcome in this city! ".. getCreatureName(target) ..", get out of here!") self.target = target self:attack() break end end else self:reset() end end end function Guard:attack() if self.target == 0 then self:reset() return end self.time = self.time or os.clock() if self.time < os.clock() then if getDistanceBetween(getThingPosition(self.id), getThingPosition(self.target)) == 1 then doTargetCombatHealth(self.id, self.target, self.combat.type, -self.combat.min, -self.combat.max, CONST_ME_DRAWBLOOD) end self.time = self.time + (self.config.attackspeed/1000) end end guard.lua (data/npc/scripts): local guard = Guard:new() function onCreatureAppear(cid) if cid == getNpcId() then guard.id = getNpcId() guard.target = 0 guard.position = getNpcPos() end end function onCreatureDisappear(cid) if cid == guard.target then guard:reset() end end function onCreatureSay(cid, type, msg) return false end function onThink() guard:updateTarget() if guard.target ~= 0 then if isCreature(guard.target) then guard:attack() else guard:reset() end else guard:reset() end end Guard.xml (data/npc): <?xml version="1.0" encoding="UTF-8"?> <npc name="Guard" script="guard.lua" walkinterval="0" speed="200" floorchange="0"> <health now="100" max="100"/> <look type="134" head="57" body="59" legs="40" feet="76" addons="0"/> <parameters/> </npc> Em relação a não poderem se atingir com as spells, nunca vi um código desenvolvido pra isso. Disponha ;]
- [PEDIDO] Criando Vocation e o npc
-
[PEDIDO] Jogadores da mesma cidade não podem se atacar e npc guard diferente.
Eu não testei, mas enfim: guard.lua (data/npc/lib): Guard = { config = { attackspeed = 1000, townid = 5, -- ID da town que o NPC protege }, combat = {type = COMBAT_PHYSICALDAMAGE, min = 100, max = 200} } function Guard:new() local ret = {} setmetatable({}, {__index = self.combat}) setmetatable(ret, {__index = self}) return ret end function Guard:reset() self.config = Guard.config self.target = 0 selfFollow(0) doTeleportThing(self.id, self.position) end function Guard:updateTarget() if self.target ~= 0 then return end local creatures = getSpectators(getThingPosition(self.id), self.range, self.range, false) for i = 1, #creatures do local target = creatures[i] if isCreature(target) and not isNpc(target) and getPlayerTown(target) ~= self.config.townid then if not getTilePzInfo(getThingPosition(target)) then if selfFollow(target) then selfSay("You're not welcome in this city! ".. getCreatureName(target) ..", get out of here!") self.target = target self:attack() break end end else self:reset() end end end function Guard:attack() if self.target == 0 then self:reset() return end self.time = self.time or os.clock() if self.time < os.clock() then if getDistanceBetween(getThingPosition(self.id), getThingPosition(self.target)) == 1 then doTargetCombatHealth(self.id, self.target, self.combat.type, -self.combat.min, -self.combat.max, CONST_ME_DRAWBLOOD) end self.time = self.time + (self.config.attackspeed/1000) end end Os demais arquivos do NPC permanecem os mesmos, apenas substitua os códigos desse arquivo da lib dos npcs. Enquanto a não atacar players da mesma town: sametown.lua (data/creaturescripts/scripts): function onAttack(cid, target) if isPlayer(target) and getPlayerTown(target) == getPlayerTown(cid) then doPlayerSendCancel(cid, "You can't attack players of the same town.") return false end return true end Registre o creature event em login.lua (data/creaturescripts/scripts): registerCreatureEvent(cid, "SameTown") Tag - creaturescripts.xml (data/creaturescripts): <event type="attack" name="SameTown" script="sametown.lua"/> Créditos ao Oneshot pelo desenvolvimento dos códigos do NPC Guard original, eu apenas o alterei.
-
[PEDIDO] Quest Log.xml
O quest log armazena as informações sobre as missões do player, que são as storages e storage values das missões e quests. É uma boa ferramenta para orientar os players sobre elas (através das descrições das missões de uma quest), incluindo suas etapas, missões conclúidas e o que fazer pra receber a recompensa das mesmas.
-
(Resolvido)[Ajuda] magias de cura nao tiram paralyze
Na verdade eu só corrigi a estrutura do script do membro. Funcionou perfeitamente.. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 3, 3, 7, 9) function onCastSpell(cid, var) return doCombat(cid, combat, var) end
-
(Resolvido)Como fazer a bless n perder tão pouco level?
Você pode atribuir uma porcentagem de perca de experiência no creature event de blessings do seu servidor, através da função: doPlayerSetLossPercent(cid, lossType, newPercent) Valores do segundo parâmetro: -lossTypes: PLAYERLOSS_EXPERIENCE = 0 PLAYERLOSS_MANA = 1 PLAYERLOSS_SKILLS = 2 PLAYERLOSS_CONTAINERS = 3 PLAYERLOSS_ITEMS = 4 No terceiro parâmetro da função, determine a porcentagem em números inteiros ou decimais (como preferir) da perda do player. Exemplo do uso no tipo de perda de experiência: doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 5)
-
(Resolvido)[Ajuda] magias de cura nao tiram paralyze
Não entendi o porquê dos parâmetros "deslocados".. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 3, 3, 7, 9) function onCastSpell(cid, var) return doCombat(cid, combat, var) end
-
(Resolvido)Dúvida na função
doPlayerSendTextMessage(cid, 22, "Espere "..getPlayerStorageValue(cid, storage) - os.time().." segundos.")
-
Entrar no TP sem Battle
Se você usar um tile/teleport com o actionID e o teleport tiver (nele) a posição de destino configurada, vai teleportar mesmo estando em battle ou não. Por isso você precisaria configurar a posição de destino do teleport, no script. Eu testei, caso queira tirar suas próprias conclusões (com o destino no teleport): function onStepIn(cid, item, pos, fromPos) if isPlayer(cid) and getCreatureCondition(cid, CONDITION_INFIGHT) then doTeleportThing(cid, fromPos, true) doSendMagicEffect(fromPos, CONST_ME_POFF) doPlayerSendCancel(cid, "You can't enter in battle.") end return true end
-
Entrar no TP sem Battle
Falha minha. Use este script (configurando a posição do teleport no script e colocando o actionID no teleport sem posição de destino configurada): function onStepIn(cid, item, pos, fromPos) local pos = {x=123, y=456, z=7} if isPlayer(cid) and getCreatureCondition(cid, CONDITION_INFIGHT) then doTeleportThing(cid, fromPos) doSendMagicEffect(fromPos, CONST_ME_POFF) doPlayerSendCancel(cid, "You can't enter in battle.") else doTeleportThing(cid, pos) doSendMagicEffect(pos, CONST_ME_TELEPORT) end return true end
-
2 Pedidos (Help)
Só mais uma pergunta, um detalhe. Precisa haver necessariamente os 5 players nas posições (circuladas em azul) pra ir pra "quest"?
-
(Resolvido)[Creaturescript] DEBUGANDO
doPlayerPopupFYI(cid, "Parabéns, você atingiu o level "..newLevel.."! Agora você está prestes a iniciar sua jornada no Global Legalize!\nNavegue pelos Guias de Hunts através deste NPC. Mas primeiramente você terá que atingir o level necessário para isso.\nSe você se considera um jogador já experiente, você pode conhecer a biblioteca do nosso site, assim não precisará de ter o level recomendado pelos NPCs para ir a qualquer lugar.\nLembre-se! Os NPCs guias somente servem para lhe guiar a algumas hunts.\nMas você pode acessa-las a qualquer level, caso se considere um explorador competente.\nBoa sorte!")
- Entrar no TP sem Battle
-
Pedido Script apenas quem está em Warmode pode entrar.
Ainda precisa de ajuda? E se possível compartilhe a solução, amigo.
-
(Resolvido)Alavanca com storage - Usar apenas 1x
Disponha ;]
-
[Pedido] Torneio System
Ok, mas o que acontece depois? Como/quando esse "torneio" acaba?
-
efeito aura por vocação [pedido]
Siga o processo: aura.lua (data/creaturescripts/scripts): local tab = { [9] = 10, -- [vocationID] = número da cor do texto animado [10] = 30, [11] = 50, [12] = 70 } function ariseText(cid) local texts = {"´ . ,", ". ´ ,", "` . ,", ", ´ ."} doSendAnimatedText(getThingPos(cid), texts[math.random(1, #texts)], tab[getPlayerVocation(cid)]) if isPlayer(cid) then addEvent(ariseText, 600, cid) end return true end function onLogin(cid) if tab[getPlayerVocation(cid)] then ariseText(cid) end return true end Tags - creaturescripts.xml (data/creaturescripts): <event type="login" name="Aura" event="script" value="aura.lua"/> Isso você mesmo edita em seu vocations.xml, como preferir.
-
Dropa loot mesmo tando com Bless TFS 1.0
Em algumas versões do TFS: doSetCreatureDropLoot = doCreatureSetDropLoot E como fiz de imediato, foi por isso que eu disse: Basta substituir, então: doCreatureSetDropLoot(cid, false) Pela função: doSetCreatureDropLoot(cid, false) Não, a checagem que fiz é se o cid morto é um player, não o que matou-o.
-
efeito aura por vocação [pedido]
Testei e não tive nenhum problema: Você provavelmente deve ter modificado o arquivo com extensão PIC (Tibia.pic) do seu client ou usa algum client próprio (modificado), e agora ele exibe esse símbolo em vez do comum configurado na imagem do arquivo sem modificações. Tente adaptar..vai ficar diferente, mas é o que há pra fazer (a menos que você decida usar o arquivo PIC original da versão do seu client): Substitua: local texts = {"´ . ,", ". ´ ,", "` . ,", ", ´ ."} Por: local texts = {"' . ,", ". ' ,", "' . ,", ", ' ."}
-
(Resolvido)Sistema de look
Sem problemas, estou aqui para contribuir. Testei o script, sem bugs: function onLook(cid, thing, position, lookDistance) if thing.uid ~= cid and isPlayer(thing.uid) then string = 'You see '..getCreatureName(thing.uid)..'. '..(getPlayerSex(thing.uid) == 0 and 'She' or 'He')..' is a '..getPlayerVocationName(thing.uid)..'.\nInformação do jogador ('..getCreatureName(thing.uid)..')\nHealth: ['..getCreatureHealth(thing.uid)..'/'..getCreatureMaxHealth(thing.uid)..']\nMana: ['..getCreatureMana(thing.uid)..'/'..getCreatureMaxMana(thing.uid)..']' doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, string) elseif thing.uid == cid then string = 'You see yourself. You are '..getPlayerVocationName(cid)..'.\nInformação sua ('..getCreatureName(cid)..')\nHealth: ['..getCreatureHealth(cid)..'/'..getCreatureMaxHealth(cid)..']\nMana: ['..getCreatureMana(cid)..'/'..getCreatureMaxMana(cid)..']' doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, string) end return true end
-
efeito aura por vocação [pedido]
lol Como assim? Você modificou alguma coisa na tabela texts? Mostre-me o que acontece.