Solutions
-
Nogard's post in [PEDIDO] Banner para servidor. was marked as the answerBom, fiz em 690x250, espero que goste.
-
Nogard's post in (Resolvido)[AJUDA] Npc do Barco para Premium was marked as the answerNo início do script, há uma tabela com as coordenadas das cidades.
local position = { tiquanda = {x= 161, y=191, z=6}, libertybay = {x= 304, y=135, z=6}, hydralair = {x= 887, y=1004, z=7}, gloria = {x= 776, y=792, z=7}, azeroth = {x= 712, y=1001, z=6}, sandtrap = {x= 283, y=409, z=6}, zatur = {x= 1203, y=1085, z=5} } Explicando..
Por exemplo, você gostaria de adicionar uma nova cidade no script, chamada Londres, com as coordenadas x=0, y=1, z=2 :
londres = {x= 0, 1, z=2}, viu? bastaria criar uma nova linha, e adiciona-la no meio das outras da tabela (acima da última), colocando o nome da cidade, pra ficar mais fácil de ser reconhecida, e suas coordenadas.
Após tê-la adicionada na tabela, procure por:
local msgerror = 'Necessário premium account.' E adicione isso, logo abaixo:
elseif (msgcontains(msg, 'londres')) then if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.londres) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end Colocando o nome da cidade, aqui:
elseif (msgcontains(msg, 'londres')) then e aqui:
doTeleportThing(cid, position.londres)
Ah, e disponha. É um prazer ajudar.
-
Nogard's post in (Resolvido)[PEDIDO] was marked as the answerPrimeiro, vá em data/creaturescripts/scripts, crie um novo arquivo .lua chamado killzabolick, e adicione isso dentro:
function onKill(cid, target, lastHit) if (isCreature(cid)) and getCreatureName(target) == 'Zabolic' then setPlayerStorageValue(cid, 7449, 1) doPlayerLearnInstantSpell(cid, 'Extreme Paralyze') doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você acaba de receber a magia Extreme Paralyze! Pode usá-la 3 vezes') end return true end salve, feche.
Vá em data/creaturescripts, e abra creaturescripts.xml, adicione essa tag:
<event type="kill" name="Kill Zabolick" event="script" value="killzabolick.lua"/> Salve, feche.
Novamente, vá em data/creaturescripts/scripts, abra o arquivo login.lua, de ctrl+f e procure por registerCreatureEvent, assim que achar, adicione essa linha abaixo dos demais:
registerCreatureEvent(cid, "Kill Zabolick") Salve, feche.
Agora, substitua o arquivo da sua spell, por esse:
local water = {490, 491, 492, 493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625} local combat = createCombatObject() local meteor = createCombatObject() setCombatParam(meteor, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(meteor, COMBAT_PARAM_EFFECT, 52) local stun = createConditionObject(CONDITION_PARALYZE) setConditionParam(stun, CONDITION_PARAM_TICKS, 5000) setConditionFormula(stun, -0.8, 0, -0.9, 0) setCombatCondition(meteor, stun) local meteor_water = createCombatObject() setCombatParam(meteor_water, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(meteor_water, COMBAT_PARAM_EFFECT, 52) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.8, 0, -1.3, 0) combat_arr = { {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0} } local combat_area = createCombatArea(combat_arr) setCombatArea(combat, combat_area) local function meteorCast(p) doCombat(p.cid, p.combat, positionToVariant(p.pos)) end local function stunEffect(cid) doSendMagicEffect(getThingPos(cid), CONST_ME_STUN) end function onTargetTile(cid, pos) if (math.random(0, 1) == 1) then local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}) if (isInArray(water, ground.itemid) == TRUE) then local newpos = {x = pos.x - 7, y = pos.y - 6, z = pos.z} doSendDistanceShoot(newpos, pos, CONST_ANI_FIRE) addEvent(meteorCast, 300, {cid = cid, pos = pos, combat = meteor_water}) else local newpos = {x = pos.x - 7, y = pos.y - 6, z = pos.z} doSendDistanceShoot(newpos, pos, CONST_ANI_ICE) addEvent(meteorCast, 300, {cid = cid,pos = pos, combat = meteor}) end end end setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") function onCastSpell(cid, var) if getPlayerStorageValue(cid, 7449) == 1 then setPlayerStorageValue(cid, 7450, 1) setPlayerStorageValue(cid, 7449, 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você acaba de usar a magia uma vez') return doCombat(cid, combat, var) elseif getPlayerStorageValue(cid, 7450) == 1 then setPlayerStorageValue(cid, 7451, 1) setPlayerStorageValue(cid, 7450, 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você acaba de usar a magia duas vezes') return doCombat(cid, combat, var) elseif getPlayerStorageValue(cid, 7451) == 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Você acaba de usar a magia pela terceira e última vez') doPlayerUnlearnInstantSpell(cid, 'Extreme Paralyze') setPlayerStorageValue(cid, 7451, 0) end return true end Salve.
-
Nogard's post in (Resolvido)Talkactions erro no distro was marked as the answer
-
Nogard's post in (Resolvido)Problema ao editar o mapa was marked as the answerAbra seu config.lua, de ctrl+f e procure por mapName, veja o nome que consta em mapName = " ". Coloque entre aspas o nome do seu mapa. Lembrando que o mapa deve ficar em data/world.
-
Nogard's post in (Resolvido)2 pedidos em um tópico was marked as the answerPrimeiro, deve adicionar um Action ID na 'estátua'.
function onUse (cid, item, fromPosition, itemEx, toPosition) local town = 1 --- ID da cidade local nametown = 'Example' --- Nome da cidade if item.actionid == 0000 then --- Action ID da estátua if getPlayerTown(cid) == town then doPlayerSendCancel(cid, 'Voce já é morador dessa cidade') else doPlayerSetTown(cid, town) doPlayerSendTextMessage(cid, MESSAGE_SATUS_CONSOLE_BLUE, 'Agora você é morador de '.. nametown .. '.') end end return true end 'Estátua ou Árvore' :
function onUse (cid, item, fromPosition, itemEx, toPosition) local position = {x= 0, y=0, z=0} --- Coordenadas do local pra onde o player será teleportado if item.actionid == 0000 then --- Action ID da 'estátua, ou árvore' doTeleportThing(cid, position) doSendMagicEffect(getPlayerPosition(cid), 3) end return true end -
Nogard's post in (Resolvido)Script de ganha dinheiro HELP was marked as the answerViitinG você esqueceu de tirar 1 end.
function onKill(cid, target, lastHit) if isPlayer(cid) and isPlayer(target) then doPlayerAddItem(cid, 2160, 1) end return true end -
Nogard's post in (Resolvido)[PEDIDO] Baú de clan was marked as the answer
-
Nogard's post in (Resolvido)Group 7 ot server was marked as the answerVocê poderia tentar ir no groups.xml, e colar uma tag já existente, editando algumas coisas, como o Nome que deseja, ID, Outfit, e Acess (de 1 a 5)
Exemplo:
<group id="7" name="Exemplo" flags="3845069447162" customFlags="2097151" access="5" violationReasons="23" nameViolationFlags="426" statementViolationFlags="469" depotLimit="5000" maxVips="500" outfit="302"/> -
Nogard's post in (Resolvido)[ Pedido ] Comando !buybox4 was marked as the answerVá em Data/Talkactions/Scripts, crie um novo arquivo .lua chamado buybox4, e cole isso dentro:
Salve, feche. Agora vá em Data/Talkactions, abra talkactions.xml, e adicione essa tag:
Salve, feche. Teste.