
Solutions
-
xWhiteWolf's post in (Resolvido)Tirar Simbolo % do Script was marked as the answer
-
xWhiteWolf's post in (Resolvido)[Dúvida] Skills trocadas was marked as the answerhonestamente vai ser dificil pra vc achar o erro procurando de olho.
Começa por exclusão: exclui tudo daí que não tá relacionado com o problema e vc vai ter só a condition de adicionar club na spell.
Depois, verifica pra qual numero isso aqui tá apontando no constant.lua: CONDITION_PARAM_SKILL_CLUB
e verifica que o que esse numero representa na source (qual skill).
Se você quiser pouco trabalho, simplesmente muda no constant.lua os numeros que cada variavel corresponde.
-
xWhiteWolf's post in (Resolvido)Sorte, Sabedoria e Coragem was marked as the answerpro primeiro pesquisa sobre um ring que aumenta a chance de drop aqui no TK.
Pro segundo, na hora de invocar o monstro edite tudo que você conseguir dele pra deixar mais forte usando as funções. As spells e os ataques que são dificeis de modificar, vc teria que fazer spells próprias e dentro delas colocar algum check pra pegar o storage do caster e ver se for < que determinado valor só retornar false e não soltar a spell. Dessa forma você vai criar o efeito de que conforme o pet evolui ele vai "liberando" novas spells sendo que na vdd elas sempre estiveram lá, só não eram executadas por conta do check do storage.
pro terceiro você teria que modificar todas as weapons OU se fosse TFS 1.X+ daria pra fazer onCreatureChangeHealth multiplicando o primarydamage por algum coeficiente baseado no storage.
Outra opção é modificar a formula de dano na source, mas só recomendo fazer isso se realmente souber o que tá fazendo.
-
xWhiteWolf's post in (Resolvido)Erro (luaDoCombat) Creature not found was marked as the answerlocal function meteorCast(p) if isCreature(p.cid) then doCombat(p.cid, p.combat, positionToVariant(p.pos)) end end deixa a função meteorCast assim que os erros devem parar.
-
xWhiteWolf's post in (Resolvido)[GLOBALEVENTS] Cave Exclusivas was marked as the answerperceba que de 72 declarações de variáveis que vc tinha (72 local ____) agora você tem só um local positions e todo o resto do código funciona em função dessa tabela, sem precisar repetir código desnecessário.
-
xWhiteWolf's post in (Resolvido)Spell - Mina Terrestre was marked as the answerlib:
-- 4º function setItemAid(uid, value) return doItemSetAttribute(uid, 'aid', value) end -- 5º function removeBomba(pos, id) local item = getTileItemById(pos, id) if item.uid > 0 then doRemoveItem(item.uid) end return true end movements:
<movevent type="StepIn" actionid="13245" event="script" value="ativbomb.lua"/> local config = { effect1 = 4, -- efeito ao pisar effect2 = 5, -- efeito ao explodir msg = "Você foi acertado pela bomba.", -- msg que manda pra quem for acertado mindmg = 100, -- dmg minimo que tira (nao é necessariamente o dano que vai sair do cara pois precisa desconsiderar as defesas dele antes) maxdmg = 300, -- dmg maximo que tira (nao é o dano que vai sair do cara) self = true -- true/false pra ativar/desativar dano no cara que colocou a bomba caso ele mesmo passe na bomba. } local arr = { {0, 1, 0}, {1, 3, 1}, -- area que vai acertar ao explodir a bomba {0, 1, 0}, } local area = createCombatArea(arr) function onStepIn(cid, item, position) local player = getPlayerByNameWildcard(getItemAttribute(item.uid, 'ref')) doSendMagicEffect(position, config.effect1) if isCreature(player) then doAreaCombatHealth(player, COMBAT_FIREDAMAGE, position, area, -config.mindmg, -config.maxdmg, config.effect2) end if ((cid == player and config.self) or (not isPlayer(cid)) or (not isCreature(player))) then doCreatureAddHealth(cid, -1 * math.random(config.mindmg, config.maxdmg)) doSendMagicEffect(position, config.effect2) end if isPlayer(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msg) end doRemoveItem(item.uid) return true end
spell:
<instant name="testeTK" words="bomb1" lvl="16" mana="500" prem="1" aggressive="1" exhaustion="1000" needlearn="0" event="script" value="especiais/bombarob.lua"> </instant>
local config = { itemid = 2180, -- id da bomba duration = 10, -- duration antes de ser removida actionid = 13245, -- actionid que sera setado na bomba (pro movements) effect = 3, -- efeito que sai ao colocar a bomba msg = "Bomba ativada!" -- mensagem que sai ao ser colocado a bomba } function onCastSpell(cid, var) local position = getCreaturePosition(cid) local item = doCreateItem(config.itemid, 1, position) setItemAid(item, config.actionid) doItemSetAttribute(item, 'ref', getCreatureName(cid)) doCreatureSay(cid, config.msg, 20) doSendMagicEffect(position, config.effect) addEvent(removeBomba, config.duration * 1000, position, config.itemid) return true end
-
xWhiteWolf's post in (Resolvido)Ajuda em Script de Cortar Arvores was marked as the answerno items.xml vc precisa configurar um delay na raiz (id: 8786) pra em 10 minutos (600 segundos) ela dar "decayTo" id 0. (ou seja, sumir). Feito isso vai ficar perfeito, a hora que a arvore crescer vai ser a hr que a raiz vai sumir.
-
xWhiteWolf's post in (Resolvido)Sistema Jinchuuriki was marked as the answerfiz do jeito acima:
num dos storages ele salva o tempo e no outro ele salva o numero que a criatura representa. Só lembra de adicionar mais criaturas ;]
pra tag vc faz assim
<instant name="qlqer coisa" words="qlqer coisa" lvl="80" mana="400" prem="1" range="1" needtarget="1" blockwalls="1" exhaustion="1000" needlearn="0" event="script" value="attack/nome do arquivo.lua"> <vocation id="4"/> <vocation id="8"/> </instant>
-
xWhiteWolf's post in (Resolvido)como simplificar if em lua ? [DUVIDA] was marked as the answerif getPlayerStorageValue(cid, storage1) > 0 then if getPlayerStorageValue(cid, storage2) > 0 then end end if getPlayerStorageValue(cid storage1) > 0 and getPlayerStorageValue(cid, storage2) > 0 then
end
-
xWhiteWolf's post in (Resolvido)[AJUDA 8.6] Mudança de palavras in game was marked as the answerna source em tools.cpp
-
xWhiteWolf's post in (Resolvido)Sobre Atributos (preciso de dicas) was marked as the answerisso são todas as tags possíveis segundo a source 0.4 q eu tinha aqui (deve ser igual pra 0.36).
os nomes são os em verde. Pra dar atributo diferente de acordo com a vocação: OU modifica a source, OU dá o atributo via script.
-
xWhiteWolf's post in (Resolvido)[Pedido] Globalevents e storage Global was marked as the answer1- vc tá usando um valor muito grande pro storage.. tenta algo no máximo com 5 digitos.
2- faltou um return true antes do ultimo end
3- Por que fazer onLogout e não onLogin?
-
xWhiteWolf's post in (Resolvido)Globalevent com problemas was marked as the answerele disse q o evento onThink não foi encontrado.. vc tá usando function onTime()
troca por function onThink()
-
xWhiteWolf's post in (Resolvido)Spell Exori, que rouba vida.. was marked as the answerprecisa fazer um callback na spell pra quando acertar alguma coisa ela executar uma função.. Existe tutoriais muito bons de como usar os callbacks mas tão tudo em outro fórum (xt). Se vc olhar no meu perfil tem um tópico de spell de puxar e empurrar, elas usam callback, Dá pra editar a função pra roubar vida
-
xWhiteWolf's post in (Resolvido)[pedido]Como mudar o tempo pra sair o pk was marked as the answervc pode diminuir no config.lua, lá deve ter configurações acerca do whiteSkull e redSkull
-
xWhiteWolf's post in (Resolvido)Spell Continua was marked as the answerarrumado:
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) function skiaiho(cid, level, maglevel) local min = -(level * 4.3+ maglevel * 12 +50) local max = -(level * 5.6+ maglevel * 13 +150) return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "skiaiho") local manacost = 40 -- qnt de mana por segundo local storage = 42719 -- nao mexa (salva se a spell esta ativa ou nao) local function manadraw(uid, mana, combat, var) if isCreature(uid) then if getCreatureMana(uid) >= mana and getPlayerStorageValue(uid, storage) >= 1 then doPlayerAddMana(uid, -mana) doCombat(uid, combat, var) -- faz o combat addEvent(manadraw, 1000, uid, mana, combat, var) -- chama a função novamente else setPlayerStorageValue(uid, storage, 0) -- se usar dnv cancela doPlayerSendCancel(uid, "The spell was canceled.") end end end function onCastSpell(cid, var) if exhaustion.check(cid, 23056) == false then if getPlayerStorageValue(cid, storage) <= 0 then setPlayerStorageValue(cid, storage, 1) exhaustion.set(cid, 23056, 5) manadraw(cid, manacost, combat, var) else setPlayerStorageValue(cid, storage, 0) -- se usar dnv cancela doPlayerSendCancel(cid, "The spell was canceled.") end else doPlayerSendCancel(cid, "Cooldown for Death is " ..exhaustion.get(cid, 23056).." seconds") return false end return true end
-
xWhiteWolf's post in (Resolvido)Ajuda com comando !online was marked as the answer
-
xWhiteWolf's post in (Resolvido)doCombat infuncional was marked as the answervc tá usando 3 coisas que não existem na sua function
local function checker(uid, health) if isPlayer(uid) then if getCreatureHealth(uid) < health then doCombat(cid, combat, var) --
a primeira é o cid.. deveria ser uid, a segunda é combat e a terceira é var..
usa assim:
-
xWhiteWolf's post in (Resolvido)Scripter Passar por Porta some Item x y z was marked as the answer
-
xWhiteWolf's post in (Resolvido)Stunner Axe was marked as the answerEm weapons/scripts coloque mace.lua
-
xWhiteWolf's post in (Resolvido)[ Resolvido] Evolve Stone Perfect was marked as the answerAntes de tudo usa esse script aqui, o seu nao tá nem identado.. não dá pra entender merda nenhuma
Segundo:
essa é a parte que faz isso que vc quer, ela tá corretinha ao meu ver
if stnid2 > 1 and (getPlayerItemCount(cid, stnid2) < count or getPlayerItemCount(cid, stnid) < count) then doPlayerSendCancel(cid, "You need at least one "..getItemNameById(stnid).." and one "..getItemNameById(stnid2).." to evolve this pokemon!") return true end if getPlayerItemCount(cid, stnid) < count then local str = "" if count >= 2 then str = "s" end return doPlayerSendCancel(cid, "You need at least "..count.." "..getItemNameById(stnid)..""..str.." to evolve this pokemon!") end minlevel = pokes[evo].level if getPlayerLevel(cid) < minlevel then doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").") return true end if count >= 2 then stnid2 = stnid end doEvolvePokemon(cid, item2, evo, stnid, stnid2) só fiquei com duvida nessa parte aqui:
se a quantidade for maior ou igual a 2 ele bota o stoneid2 = stoneid1??
Acredito que o problema mesmo seja nessa função doEvolvePokemon, ela não leva count como paramêtro e é provavelmente nela que o jogo remove as stones do player.
Sugiro vc adicionar ali dps de stnid2 = stnid um doPlayerRemoveItem, ficando assim
if count >= 2 then stnid2 = stnid doPlayerRemoveItem(cid, stnid, count - 2) end
-
xWhiteWolf's post in (Resolvido)Skills não upam em certo ponto was marked as the answerse com 0.7 não sobe, bota 1.3
-
xWhiteWolf's post in (Resolvido)[Ajuda] Level Max Por Stages! was marked as the answer<stage minlevel="651" maxlevel="699" multiplier="300"/> <stage minlevel="700" maxlevel="1000" multiplier="0"/>
-
xWhiteWolf's post in (Resolvido)[Ajuda] Talk Transform was marked as the answertenta assim
local from,to = {x=1001, y=705, z=7},{x=1031, y=737, z=7} -- começo e final do mapa local from2,to2 = {x=1011, y=705, z=6},{x=1031, y=738, z=6} -- começo e final do mapa local from3,to3 = {x=1012, y=706, z=5},{x=1032, y=739, z=5} -- começo e final do mapa local from4,to4 = {x=985, y=598, z=7},{x=1044, y=652, z=7} -- começo e final do mapa local from5,to5 = {x=986, y=615, z=6},{x=1039, y=647, z=7} -- começo e final do mapa local from6,to6 = {x=990, y=616, z=5},{x=1040, y=647, z=5} -- começo e final do mapa local config = { --[vocation id] = { level, nova voc, looktype} [1] = { 1, 2, 398, 13, 30}, [2] = { 80, 3, 399, 13, 30} } local tempo = 60 * 1000 local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo) setConditionParam(condition, CONDITION_PARAM_STAT_MAXHEALTHPERCENT, 110) -- 110% da vida setConditionParam(condition, CONDITION_PARAM_BUFF, true) function onSay(cid, words, param, channel) if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) or isInRange(getCreaturePosition(cid), from3, to3) or isInRange(getCreaturePosition(cid), from4, to4) or isInRange(getCreaturePosition(cid), from5, to5) or isInRange(getCreaturePosition(cid), from6, to6) then doPlayerSendCancel(cid, "Você não pode se Transformar nesta área!") return true end doPlayerSay(cid, "transformar") local voc = config[getPlayerVocation(cid)] if voc then if getPlayerLevel(cid) >= voc[1] then registerCreatureEvent(cid, "stordeath") setPlayerStorageValue(cid, voc_stor, getPlayerVocation(cid)) doPlayerSetVocation(cid, voc[2]) addEvent(doPlayerSetVocation,tempo,cid,getPlayerStorageValue(cid, voc_stor)) addEvent(setPlayerStorageValue,tempo,cid,voc_stor,0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você Transformou!") local outfit = {lookType = voc[3]} doSetCreatureOutfit(cid, outfit, tempo) doSendMagicEffect(getCreaturePosition(cid), voc[4]) local efeito = voc[5] local function meffect(cid,t) if isPlayer(cid) and t ~= 0 then doSendMagicEffect(getThingPos(cid), efeito) addEvent(meffect, 1000, cid, (t - 1)) end end meffect(cid,(tempo/1000)) doAddCondition(cid, condition) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você precisa estar no level " .. voc[1] .. " para transformar.") end else doPlayerSendCancel(cid, "Você não pode se Transformar!") end return true end -
xWhiteWolf's post in (Resolvido)Combine com Mensagem no World was marked as the answerde acordo com oque eu pesquisei fica assim.. testa aí
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Awesome! Your " .. it:getName() .. " upgrade to +" .. nLevel .. " successfully!") if nLevel >= 7 then broadcastMessage("O jogador ".. getCreatureName(cid) .." combinou seu ".. it:getName() .." para +".. nLevel .." com sucesso", MESSAGE_STATUS_WARNING) end