.jpg.a7babd2e790d7149e4703c379b2602bf.jpg)
Solutions
-
Caronte's post in (Resolvido)[PEDIDO] Bau com Itens de cada Vocaçao was marked as the answerlocal vocQ = { [1] = {item = 2421 }, -- o item que você vai da.-- [2] = {item = 2421}, -- as vocations está configuradas até Elite Knight , 1=Sorc,2=druid,3=Paladin,4=Kina e assim em diante [3] = {item = 2421}, [4] = {item = 2421}, [5] = {item = 2421}, [6] = {item = 2421}, [7] = {item = 2421}, [8] = {item = 2421} } function onUse(cid, item, toPosition, itemEx, fromPosition) if getPlayerStorageValue(cid, 38493) ~= 1 then doPlayerAddItem(cid, vocQ[getPlayerVocation(cid)].item) doPlayerSendTextMessage(cid, 25, "You recieved "..getItemNameById(vocQ[getPlayerVocation(cid)].item)..".") doPlayerSetStorageValue(cid, 38493, 1) else doPlayerSendCancel(cid, "It's empty.") end return true end
-
Caronte's post in (Resolvido)script de mana rune was marked as the answerhttp://www.tibiaking.com/forum/topic/21730-tutorial-criando-mana-rune/
-
Caronte's post in (Resolvido)Spell com Item was marked as the answerlocal combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local condition = createConditionObject(CONDITION_HASTE) setConditionParam(condition, CONDITION_PARAM_TICKS, 22000) setConditionFormula(condition, 0.7, -56, 0.7, -56) setCombatCondition(combat, condition) function onCastSpell(cid, var) local itemid = 2160 local itemcount = 1 if getPlayerItemCount(cid, itemid) < itemcount then doPlayerSendCancel(cid, "You need ".. itemcount .." " .. getItemNameById(itemid) .." to use this spell.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) else return doCombat(cid, combat, var) end return true end Esse irá funcionar caso ele tenha mais ou uma crystal coin (2160), altere para o item de sua preferência...
essa spell é utani gran hur..., caso queira isso em outra spell, copie isso:
function onCastSpell(cid, var) local itemid = 2160 local itemcount = 1 if getPlayerItemCount(cid, itemid) < itemcount then doPlayerSendCancel(cid, "You need ".. itemcount .." " .. getItemNameById(itemid) .." to use this spell.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) else return doCombat(cid, combat, var) end return true end E cole em cima de:
function onCastSpell(cid, var) return doCombat(cid, combat, var) end nas spells...
-
Caronte's post in (Resolvido)Ajuda tile que remove parede was marked as the answerlocal pos = { x = 123, y = 456, z = 7 } local itemid = 2160 function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if not isPlayer(cid) then return true end doRemoveItem(getTileItemById(pos, itemid).uid) return true end function onStepOut(cid, item, position, fromPosition) if not isPlayer(cid) then return true end doCreateItem(itemid,1,pos) return true end <movevent type="StepIn" actionid="6353" event="script" value="arquivo.lua"/> <movevent type="StepOut" actionid="6353" event="script" value="arquivo.lua"/>
Coloca action 6353 no Tile que vai fazer isso...
em itemid, coloque o Id da parede
em pos, coloque a posição da parede
-
Caronte's post in (Resolvido)Invasao diferente was marked as the answerScript em funcionamento:
Em (globalevents/scripts), crie um arquivo com nome de diferentinvasion.lua
Dentro dele coloque:
[paste]6gnmy3jR[/paste]
e a tag é essa:
<globalevent name="invasion" interval="3600000" event="script" value="diferentinvasion.lua"/>
Agora, dentro do boss, que você criou, em cima de:
no XML do monstro:
<flags> (De preferência)
Coloque isso:
<script> <event name="invasion"/> </script> (OBS, não pode estar dentro de TAGs no arquivo XML, somente dentro da TAG <monster> </monster>)
Agora em creaturescripts/scripts adicione esse script, com nome de diferentinvasion.lua
function onDeath(cid, corpse, deathList) local createpos = { x = 144, y = 384, z = 7} if getCreatureName(cid) == "Rat" then doRemoveItem(getTileItemById(createpos, 1387).uid) doSendAnimatedText(createpos, "BOSS",130) addEvent(doSendAnimatedText,800,createpos, "MORTO",130) doSendMagicEffect(createpos, CONST_ME_POFF) doBroadcastMessage("O BOSS FOI MORTO !") end return true end
No creaturescripts.xml adicione essa tag:
<event type="death" name="invasion" event="script" value="diferentinvasion.lua"/>
Agora, para limitar aos leveis 100 para cima:
Script em movements/scripts crie invasiontp.lua
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition) local pos = {x = 145, y = 385, z = 7} local level_necessario = 100 if getPlayerLevel(cid) < level_necessario then doTeleportThing(cid, fromPosition) doPlayerSendCancel(cid, "Voce precisa ter level " .. level_necessario .. " para entrar.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) else doTeleportThing(cid, pos) doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,"Mate o boss") doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) end return true end TAG em movements.xml
<movevent type="StepIn" actionid="67777" event="script" value="invasiontp.lua"/> Qualquer dúvida ou erro , só falar.
-
Caronte's post in (Resolvido)[Ajuda] Exhausted da ManaPotion was marked as the answer(getConfigInfo('timeBetweenExActions') - 10)) Muda o número 10 para maior, ou você pode mudar no config.lua, em timeBetweenExAction, mas afetará todas as Ex actions, não só potions, como rods, runes e etc...
-
Caronte's post in (Resolvido)Porta was marked as the answerlocal t = { newpos = { x = 165, y = 387, z = 7 }, -- posição onde enviará o player itemid = 1484, -- ID do item que irá ser criado position = { x = 164, y = 387, z = 7 }, -- posição onde criará o item time = 6, -- tempo em segundos para remover item exitpos = { x = 162, y = 387, z = 7 }, } function onUse(cid, item) if getStorage(6757) == -1 then doTeleportThing(cid,t.newpos) doCreateItem(t.itemid,1,t.position) doCreatureSetStorage(cid, 6757, 1) doSetStorage(6757, 1) else doPlayerSendCancel(cid, "Please wait for a while") end addEvent(function() doSetStorage(6757, -1) doRemoveItem(getTileItemById(t.position, t.itemid).uid) doTeleportThing(cid,t.exitpos) doCreatureSetStorage(cid, 6757, -1) end,1000*t.time) return true end function onLogout(cid) if(not isCreature(cid)) then return end if getCreatureStorage(cid, 6757) == 1 and getStorage(6757) == 1 then doTeleportThing(cid,{ x = 162, y = 387, z = 7 }) -- Posição da saida da sala ou templo, qual você preferir. doCreatureSetStorage(cid, 6757, -1) doSetStorage(6757, -1) end return true end
-
Caronte's post in (Resolvido)[PEDIDO]Bless Free ate lvl 50 was marked as the answerEm baixo de:
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr) for i = 1, 5 do if player:getLevel(cid) < 50 then player:addBlessing(cid, i) end end -
Caronte's post in (Resolvido)Ajuda *Item de teleport was marked as the answerActions/scripts/arquivo.lua
local novapos = {x = 123, y = 456, z = 7} function onUse(cid, item) doTeleportThing(cid,novapos , TRUE) doRemoveItem(item.uid,1) return true end
Actions.xml
<action itemid="ITEMID" event="script" value="ARQUIVO.lua"/>
Caso queira algo a mais (como só poder usar na protection zone) só falar, fiz exatamente como pediu.
-
Caronte's post in (Resolvido)Script para o GOD logar apenas com certo nome was marked as the answerAcho que em vez de
name = {"Ryuu"}, name = {"Stupid"}, tem que ser
name = {"Ryuu,Stupid"}, -
Caronte's post in (Resolvido)Ajuda com Script para Runa was marked as the answerrunateleport.lua
function onUse(cid, item) local t = { topos = {x = 163, y = 456, z = 7}, createpos = {x = 163, y = 457, z = 7}, tpid = 1387, segundos = 120, } doCreateTeleport(t.tpid, t.topos, t.createpos) addEvent(function() doRemoveItem(getTileItemById(t.createpos, t.tpid).uid,1) end,1000*t.segundos) return true end
Em actions.xml
<action itemid="2348" event="script" value="runateleport.lua"/>
2348 é o ID da runa
-
Caronte's post in (Resolvido)Monster Damage was marked as the answerfunction onStatsChange(cid, attacker, type, combat, value) if isMonster(cid) and isMonster(attacker) then return false end return true end Tenta isso...
Tag
<event type="statschange" name="monsterattack" event="script" value="arquivo.lua"/>
em Creaturescripts
-
Caronte's post in (Resolvido)Teleport Temple was marked as the answerAbra seu login.lua, que fica na pasta creaturescripts e...
...em baixo de:
if(lastLogin > 0) then Coloque:
local templepos = {x = 123, y = 456, z = 7} local text = 'Teleported' local effect = CONST_ME_SOUND_YELLOW doTeleportThing(cid, templepos, TRUE) doSendAnimatedText(getThingPosition(cid), text, TEXTCOLOR_GOLD) doSendMagicEffect(getThingPosition(cid), effect) Configure as variáveis a gosto...
...qualquer dúvida, só falar !
-
Caronte's post in (Resolvido)[Pedido] Item "x" para abrir o bau was marked as the answerfunction onUse(cid, item, frompos, itemEx, topos) local config = { count = 1, item = 2160, award = 2161, countaward = 1, } if getPlayerItemCount(cid,config.item) >= config.count then doPlayerRemoveItem(cid,config.item,config.count) doPlayerAddItem(cid,config.award,config.countaward) else doPlayerSendCancel(cid,"you need "..config.count.." "..getItemNameById(config.item).." to pick your award." ) end return true end O do snwosz, vai retornar o ID
-
Caronte's post in (Resolvido)Mapa vazio was marked as the answerComo o Daniel falou, é isso mesmo que tem que fazer, mas esse new, você precisa salvar na pasta do otserver, com o nome do mapa padrão, ou se quiser mudar o nome vá no config.lua e mude map name...
Depois disso, tem que cancelar os scripts por positions, que com certeza darão erros...
Um ot interessante para fazer isso, seria o venorewar 10.35, mas se quiser um RPG, procure por um menor, para dar menos trabalho...
-
Caronte's post in (Resolvido)Matar X monstro e receber storage was marked as the answerfunction onKill(cid, target, lastHit) if not (isPlayer(cid) and isMonster(target)) then return true end local tab = { ["Dragon"] = 3940, ["Hydra"] = 3941, ["Demon"] = 3942, } setPlayerStorageValue(cid, tab[getCreatureName(target)], 1) return true end
-
Caronte's post in (Resolvido)AJUDA ! Potion não fica infinita. was marked as the answerJá viu se é esse script que ta rodando ?
enfim, adicione isso em potions.lua
local config = { removeOnUse = "no", usableOnTarget = "yes", -- can be used on target? (fe. healing friend) splashable = "no", realAnimation = "yes", -- make text effect visible only for players in range 1x1 healthMultiplier = 1.0, manaMultiplier = 1.0 } config.removeOnUse = getBooleanFromString(config.removeOnUse) config.usableOnTarget = getBooleanFromString(config.usableOnTarget) config.splashable = getBooleanFromString(config.splashable) config.realAnimation = getBooleanFromString(config.realAnimation) local POTIONS = { [8704] = {empty = 7636, splash = 2, health = {50, 100}}, -- small health potion [7618] = {empty = 7636, splash = 2, health = {100, 200}}, -- health potion [7588] = {empty = 7634, splash = 2, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion [7591] = {empty = 7635, splash = 2, health = {500, 700}, level = 80, vocations = {4, 8}, vocStr = "knights"}, -- great health potion [8473] = {empty = 7635, splash = 2, health = {800, 1100}, level = 130, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion [7620] = {empty = 7636, splash = 7, mana = {90, 170}}, -- mana potion [7589] = {empty = 7634, splash = 7, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion [7590] = {empty = 7635, splash = 7, mana = {500, 800}, level = 80, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion [8472] = {empty = 7635, splash = 3, health = {400, 600}, mana = {230, 380}, level = 80, vocations = {3, 7}, vocStr = "paladins"} -- great spirit potion } local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) local potion = POTIONS[item.itemid] if(not potion) then return false end if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then if(not config.splashable) then return false end if(toPosition.x == CONTAINER_POSITION) then toPosition = getThingPos(item.uid) end doDecayItem(doCreateItem(2016, potion.splash, toPosition)) doTransformItem(item.uid, potion.empty) return TRUE end if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return TRUE end if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) then doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1) return TRUE end local health = potion.health if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.healthMultiplier))) then return false end local mana = potion.mana if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.manaMultiplier))) then return false end doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE_1) if(not realAnimation) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) else for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do if(isPlayer(tid)) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid) end end end doAddCondition(cid, exhaust) if(not potion.empty or config.removeOnUse) then doRemoveItem(item.uid, 1) return TRUE end doRemoveItem(item.uid, 0) doPlayerAddItem(cid, potion.empty, 0) doPlayerRemoveItem(cid, potion.empty, getPlayerItemCount(cid, potion.empty)) doPlayerAddItem(cid, potion.empty, getPlayerItemCount(cid, potion.empty)) return TRUE end -
Caronte's post in (Resolvido)Talkaction Teleport was marked as the answerfunction onSay(cid, words, param) local pos = {x=32369, y=32241, z=7} local level = 8 if getTileInfo(getPlayerPosition(cid)).protection then if getPlayerLevel(cid) <= level then doSendMagicEffect(getPlayerPosition(cid),53) doPlayerSendTextMessage(cid, "Boa Sorte!") doTeleportThing(cid,pos) else doPlayerSendCancel(cid,"You dont have level.") end else doPlayerSendCancel(cid,"You need stay in a pz zone.") end return true end EDIT: Corrigi um erro.
-
Caronte's post in (Resolvido)[Ajuda] was marked as the answerhttp://www.tibiaking.com/forum/forum/190-tutoriais-spriting/
Só navegar, e vai parar onde você desejar "-" , boa sorte, quem sabe não é um começo de um novo spriter !
-
Caronte's post in (Resolvido)Como mudar efeito do tiro da arma was marked as the answerVocê colocou um atributo que exige outro para especificar.
<attribute key="shootType" value="" /> No seu caso, apareceu a spear porque ela é equivalente a 0, já que você não pôs nada, então foi interpretado como 0.
No tibia normal os efeitos de distância são:
CONST_ANI_SPEAR = 0 CONST_ANI_BOLT = 1 CONST_ANI_ARROW = 2 CONST_ANI_FIRE = 3 CONST_ANI_ENERGY = 4 CONST_ANI_POISONARROW = 5 CONST_ANI_BURSTARROW = 6 CONST_ANI_THROWINGSTAR = 7 CONST_ANI_THROWINGKNIFE = 8 CONST_ANI_SMALLSTONE = 9 CONST_ANI_DEATH = 10 CONST_ANI_LARGEROCK = 11 CONST_ANI_SNOWBALL = 12 CONST_ANI_POWERBOLT = 13 CONST_ANI_POISON = 14 CONST_ANI_INFERNALBOLT = 15 CONST_ANI_HUNTINGSPEAR = 16 CONST_ANI_ENCHANTEDSPEAR = 17 CONST_ANI_REDSTAR = 18 CONST_ANI_GREENSTAR = 19 CONST_ANI_ROYALSPEAR = 20 CONST_ANI_SNIPERARROW = 21 CONST_ANI_ONYXARROW = 22 CONST_ANI_PIERCINGBOLT = 23 CONST_ANI_WHIRLWINDSWORD = 24 CONST_ANI_WHIRLWINDAXE = 25 CONST_ANI_WHIRLWINDCLUB = 26 CONST_ANI_ETHEREALSPEAR = 27 CONST_ANI_ICE = 28 CONST_ANI_EARTH = 29 CONST_ANI_HOLY = 30 CONST_ANI_SUDDENDEATH = 31 CONST_ANI_FLASHARROW = 32 CONST_ANI_FLAMMINGARROW = 33 CONST_ANI_SHIVERARROW = 34 CONST_ANI_ENERGYBALL = 35 CONST_ANI_SMALLICE = 36 CONST_ANI_SMALLHOLY = 37 CONST_ANI_SMALLEARTH = 38 CONST_ANI_EARTHARROW = 39 CONST_ANI_EXPLOSION = 40 CONST_ANI_CAKE = 41 CONST_ANI_WEAPONTYPE = 254 CONST_ANI_NONE = 255 CONST_ANI_LAST = CONST_ANI_CAKE eu não sei de derivado, mas os efeitos, podem ser vistos por /x,/z ou /y, eu esqueci qual tem que usar
mas teste:
/x 1
/z 1
/y 1
Acho que o y é as cores equivalentes aos números
e os /z e /x são equivalentes à shootypes ou areaeffect.
Adicione a TAG:
<attribute key="shootType" value="" />
e um número, correspondente ao efeito que você quer.
você também pode usar assim, por exemplo:
<attribute key="shootType" value="WHIRLWINDAXE" />
-
Caronte's post in (Resolvido)Como ocultar o Mapa? was marked as the answerPesquise no seu computador por %appdata%
e lá, procure pela pasta Tibia.
chegando lá, é só apagar todos os arquivos .map
-
Caronte's post in (Resolvido)Erro com mapa was marked as the answerOpa, errei é assim:
/goto 650,1002,7
13:25 Cannot perform action.
se deu esse erro, é que não dá para ir na posição, pois tem um item ou não é andável.
quando o comando é errado é assim que sai:
13:26 Invalid param specified.
-
Caronte's post in (Resolvido)[PEDIDO] Death penalty was marked as the answer@Murilosky,
Tenta agora:
coloquei o mínimo e arrumei as porcentagens de cada vocação.., lembrando que a distro não atualiza a vida na hora, depois vejo com max sobre o script que faz atualizar...
function onDeath(cid, corpse, deathList) if not isPlayer(cid) then return true end local config = { mages = {1, 5, 2, 6}, pallys = {3, 7}, knights = {4, 8}, } local percents = { perdevida5 = 5, perdevida3 = 3, perdemana5 = 5, perdemana3 = 3, } if isInArray(config.mages, getPlayerVocation(cid)) and getPlayerMaxMana(cid) > 3695 then -- Mana mínima dos mages setCreatureMaxMana(cid, getPlayerMaxMana(cid) - (getPlayerMaxMana(cid)*percents.perdemana5/100)) elseif isInArray(config.pallys, getPlayerVocation(cid)) then if getCreatureMaxHealth(cid) > 1405 then -- Vida mínima do pala setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - (getCreatureMaxHealth(cid)*percents.perdevida3/100)) if getPlayerMaxMana(cid) > 1255 then -- Mana mínima do para setCreatureMaxMana(cid, getPlayerMaxMana(cid) - (getPlayerMaxMana(cid)*percents.perdemana3/100)) elseif isInArray(config.knights, getPlayerVocation(cid)) and getCreatureMaxHealth(cid) > 1405 then -- Vida mínima de kina setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - (getCreatureMaxHealth(cid)*percents.vida5/100)) end end end return true end Se você quiser re-configurar é só alterar os números da tabela percents...
-
Caronte's post in (Resolvido)[SOCORRO] Não consigo criar house ! was marked as the answerVocê simplesmente está esquecendo de colocar a house brush na porta
ela também precisa ser marcada com a house brush, e de preferência coloque a saída na frente à porta
-
Caronte's post in (Resolvido)[Ajuda] Modificar script de spell was marked as the answerfunction onCastSpell(cid, words) local wait = 0.5 -- Tempo de exhaustion em segundos local stor = 3711 local mana = -2800 -- Quanta mana vai gastar if exhaustion.check(cid, stor) then doPlayerSendCancel(cid, "") return false elseif getPlayerMana(cid) < mana then doPlayerSendCancel(cid, "") return false end doCreatureAddMana(cid, playermana) doPlayerAddSpentMana(cid, getPlayerMana(cid)) if getPlayerVocation(cid) == 1 then doCreatureAddMana(cid,-2850) -- SORC elseif getPlayerVocation(cid) == 2 then doCreatureAddMana(cid,-2850) -- DRUID elseif getPlayerVocation(cid) == 3 then doCreatureAddMana(cid,-2850) -- PALA elseif getPlayerVocation(cid) == 4 then doCreatureAddMana(cid,-2850) -- KINA end exhaustion.set(cid, stor, wait) doSendMagicEffect(getCreaturePos(cid), 11) return false end Tenta aí