-
Total de itens
101 -
Registro em
-
Última visita
Tudo que lucasjockey postou
-
[script] Npc Vendedno Promotion Para Free
tópico respondeu ao leonardopaiz de lucasjockey em Lixeira Pública
O Marcryzius quis dizer isso: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'}) node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true}) --[[ local node2 = keywordHandler:addKeyword({'epic'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can epicize you for 200000 gold coins. Do you want me to epicize you?'}) node2:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, premium = 1, cost = 200000, level = 120, promotion = 2, text = 'Congratulations! You are now epicized.'}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true}) ]]-- npcHandler:addModule(FocusModule:new()) -
Acho que é por causa do espaço presente na variável: Para encontrar o script tenta esse comando no CMD (prompt): findstr "play er_id" *.lua Ou simplesmente crie um arquivo .BAT na pasta do seu OT e coloque essas linhas nele: @echo off cls findstr "play er_id" *.lua cd data findstr "play er_id" *.lua cd actions\scripts findstr "play er_id" *.lua cd ..\..\creaturescripts\scripts findstr "play er_id" *.lua cd ..\..\globalevents\scripts findstr "play er_id" *.lua cd ..\..\movements\scripts findstr "play er_id" *.lua cd ..\..\weapons\scripts findstr "play er_id" *.lua pause
-
Como Fazer Uma Magia Que Ataque Spear Ou Star?
tópico respondeu ao gustavofw de lucasjockey em Lixeira Pública
Provavelmente é essa Array: local arr = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0}, {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0}, {0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 0}, {0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0}, {0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } Mude para: local arr = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0}, {0, 0, 0, 2, 0, 2, 0, 2, 0, 0, 0}, {0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0}, {0, 0, 2, 2, 0, 3, 0, 2, 2, 0, 0}, {0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0}, {0, 0, 0, 2, 0, 2, 0, 2, 0, 0, 0}, {0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } -
Posta o script doors.lua aqui. http://www.xtibia.com/forum/action-Novas-Doors-t118588.html
-
addEvent(wait1,1000,parametro) addEvent(wait2,2000,parametro) addEvent(wait3,3000,parametro) Seria isso? Mude para: addEvent(wait1,1000,parametro) addEvent(wait2,1000,parametro) addEvent(wait3,1000,parametro) Procure sempre comentar o código ao estar sendo construído, permitindo melhor correção de erros. -- Comentário
-
Arrumei alguns END's que estavam fora do lugar.
-
function onCastSpell(cid, var) voc = getPlayerVocation(cid) if voc == 1 then return doCombat(cid, combat, var) end return TRUE end
-
luaDoShowTextWindows(). Deprecated function É Window, não Windows. Na verdade esse erro é causado pela letter e pelas labels.
-
function onStepIn(cid, item, position, fromPosition) local monster = "Treiner" local lkdir = getPlayerLookDir(cid) if lkdir = 0 then monsterpos1 = {x = position.x - 1, y = position.y - 1, z = position.z} monsterpos2 = {x = position.x + 1, y = position.y - 1, z = position.z} elseif lkdir = 1 then monsterpos1 = {x = position.x + 1, y = position.y - 1, z = position.z} monsterpos2 = {x = position.x + 1, y = position.y + 1, z = position.z} elseif lkdir = 2 then monsterpos1 = {x = position.x - 1, y = position.y + 1, z = position.z} monsterpos2 = {x = position.x + 1, y = position.y + 1, z = position.z} else monsterpos1 = {x = position.x - 1, y = position.y -1, z = position.z} monsterpos2 = {x = position.x - 1, y = position.y +1, z = position.z} end doSummonCreature(monster,monsterpos1) doSummonCreature(monster,monsterpos2) end Monsterpos 1 e 2 são as posições dos monstros.
-
Baixe o programa, inicie ele, va em Database>New Database. De qualquer nome, clique no botão com o icone da pasta com a flexa verde, selecione o banco de dados do servidor (.s3db) e clique em "Abrir" e depois em "OK". Agora na lista TreeView do lado esquerdo do programa, selecione o banco de dados adicionado, clique com o botão direito nele e depois em "Connect". Case ele abra o banco de dados ou se já estivesse aberto, entre na sub-pasta "Tables", vá em "Players", no menu da janela que acabou de abrir selecione "Data". Na linha do Account Manager, modifique os valores de "posx", "posy" e "posz".
-
Dark Path Crystal Caves Blood Halls Vats Arcanum Hive Shadow Nexus Fonte: tibiawikia Você pode pegar a tradução da inquisition quest no portaltibia, não vo posta o link porque acho que não pode postar spoiler aqui.
-
Exemplo de um pedaço da Annih. quest modificada: function onUse(cid, item, frompos, item2, topos) if item.uid == 5006 then queststatus = getPlayerStorageValue(cid,5010) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found a crown legs refined +1") local item1 = doPlayerAddItem(cid,2494,1) setItemExtraAttack(item1, 1) doSetItemSpecialDescription(item1, "You see crown legs (Arm:10).\nRefinado(arm): +1.\nIt can only be wielded properly by knights and paladins.\nIt weighs 65.00 oz.\nEste Item foi obtido por " .. getPlayerName(cid) .. ".") setPlayerStorageValue(cid,5010,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end end end
-
Criar Uma Magia Q Crie Uma Blank Rune
tópico respondeu ao cauecauecaue de lucasjockey em Lixeira Pública
spells.xml <conjure name="Blank Rune" words="adori blank" lvl="8" mana="0" soul="10" conjureId="2260" conjureCount="20" exhaustion="1000" needlearn="0" function="conjureRune"> <vocation name="Sorcerer" /> <vocation name="Master Sorcerer" /> <vocation name="Druid" /> <vocation name="Elder Druid" /> </conjure> -
Coloca uma função assim no script: if doPlayerRemoveItem(cid,IDdoItem,quantidade) then doPlayerAddItem(cid,IDdoItem,quantidade) else selfSay('Voce nao tem o item necessario para efetuar a compra.') end As variáveis sublinhadas são as que você tem que modificar.
-
if (msgcontains(msg, 'hi')) then Falto um parêntesis na linha 18.
-
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 if (msgcontains(msg, 'hi') then selfSay('Ola, eu compro medal of honor, para vender uma, fale MOH ou MEDAL OF HONOR.', cid) talkState[talkUser] = 1 elseif (msgcontains(msg, 'medal of honor') or msgcontains(msg, 'moh')) and (talkState[talkUser] == 1) then selfSay('Voce deseja me dar sua medal of honor por 20 dias premium?', cid) talkState[talkUser] = 2 elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 2) then if doPlayerRemoveItem(cid,5785,1) then doPlayerAddPremiumDays(cid, 20) selfSay('Here you are.', cid) else selfSay('Sorry, you don\'t have 20 or more premium days!', cid) end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no') and isInArray({2}, talkState[talkUser]) == TRUE) then talkState[talkUser] = 0 selfSay('Ok then.', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
[dúvida Sanada Por _ferrari_ E Lucasjockey
tópico respondeu ao Khost de lucasjockey em Lixeira Pública
Seguinte, use esse script para bloquear ou desbloquear: function onSay(cid,words) if getPlayerAccess(cid) >= 3 then if getGlobalStorageValue(1234) == 0 then setGlobalStorageValue(1234,1) else setGlobalStorageValue(1234,0) end end end Caso você fexe o server com a magia desabilitada, ele vai voltar desabilitado, caso fexe com ele habilitado, ele voltará habilitado. Use esse exemplo para fazer a talkaction da sua outra dúvida. -
Claro que é possível, mas tem que usar script, salve como moh.lua: 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 if (msgcontains(msg, 'hi') then selfSay('Ola, eu vendo medal of honor, para comprar uma, fale MOH ou MEDAL OF HONOR.', cid) talkState[talkUser] = 1 elseif (msgcontains(msg, 'medal of honor') or msgcontains(msg, 'moh')) and (talkState[talkUser] == 1) then selfSay('Do you want to pay 20 premium days for a medal of honor?', cid) talkState[talkUser] = 2 elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 2) then if (getPlayerPremiumDays(cid) >= 20) then doPlayerAddPremiumDays(cid, -20) doPlayerAddItem(cid, 5785, 1) selfSay('Here you are.', cid) else selfSay('Sorry, you don\'t have 20 or more premium days!', cid) end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no') and isInArray({2}, talkState[talkUser]) == TRUE) then talkState[talkUser] = 0 selfSay('Ok then.', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Agora no arquivo do NPC, exemplo: moh.xml, adicione: <?xml version="1.0" encoding="UTF-8"?> <npc name="MOH Seller" script="data/npc/scripts/moh.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="143" head="0" body="126" legs="87" feet="87" addons="3"/> </npc>
-
No movements.xml, verifique se existe alguma linha relacionada ao Ring of Healing (id: 2214), se tiver, adicione os vocations name e se não tiver adicione a função inteira: <movevent type="Equip" itemid="2214" slot="ring" function="onEquipItem"> <vocation name="Sorcerer"/> <vocation name="Master Sorcerer"/> <vocation name="Druid"/> <vocation name="Elder Druid" showInDescription="0"/> </movevent>
-
[dúvida Sanada Por _ferrari_ E Lucasjockey
tópico respondeu ao Khost de lucasjockey em Lixeira Pública
function onSay(cid,words) local lvl = getPlayerLevel(cid) if getGlobalStorageValue(1234) == 1 then if getTilePzInfo(getPlayerPosition(cid)) == 1 then if lvl <= 200 then doTeleportThing(cid,{x=123,y=123,z=7}) elseif lvl > 200 and lvl <= 500 then doTeleportThing(cid,{x=321,y=321,z=7}) elseif lvl > 500 and lvl <= 800 then doTeleportThing(cid,{x=231,y=231,z=7}) else doTeleportThing(cid,{x=432,y=432,z=7}) end else return doPlayerSendCancel(cid,"Voce nao esta em uma Protection Zone.") end else return doPlayerSendCancel(cid,"The event is closed.") end return 1 end Créditos: _ferrari_ ~~ Explique um pouco melhor sobre o Storage Value, para colocar é só usar esse comando: setPlayerStorageValue(uid, valueid, newvalue) -
[dúvida Sanada Por _ferrari_ E Lucasjockey
tópico respondeu ao Khost de lucasjockey em Lixeira Pública
function onSay(cid,words) local lvl = getPlayerLevel(cid) if getGlobalStorageValue(1234) == 1 then if lvl <= 200 then doTeleportThing(cid,{x=123,y=123,z=7}) elseif lvl > 200 and lvl <= 500 then doTeleportThing(cid,{x=321,y=321,z=7}) elseif lvl > 500 and lvl <= 800 then doTeleportThing(cid,{x=231,y=231,z=7}) else doTeleportThing(cid,{x=432,y=432,z=7}) end else return doPlayerSendCancel(cid,"The event is closed.") end return 1 end EDIT~~ Créditos para _ferrari_ pelo script. Eu só modifiquei. ;D -
Devo ter escorregado em alguma parte, mude essa parte: charge = {x=pp.x,y=pp.y,z=pp.z} doSendMagicEffect(charge,65) Para essa: local meposition = {x=pp.x,y=pp.y,z=pp.z} doSendMagicEffect(meposition,65) Acho que não vai mais dar erro. EDIT~~ PS: No seu script, não no meu.
-
Acho que o único problema era do da veriável charge que você seto ela como uma função, mas depois definiu ela novamente como uma variável: function charge(parametro) charge = {x=pp.x,y=pp.y,z=pp.z} Além disso, eu retirei algumas coisas que não causavam erro, mas eram inúteis, como a varável playerpos. function onSay(cid, words, param) doCreatureSay(cid, "Charge", TALKTYPE_ORANGE_1) local cont = getPlayerStorageValue(cid,78451) local pp = getPlayerPosition(cid) parametro = {cid=cid} charge = addEvent(charge, 300, parametro) rd = 12 xeff1 = {x=pp.x-2,y=pp.y-2,z=pp.z} xeff2 = {x=pp.x-1,y=pp.y-2,z=pp.z} xeff3 = {x=pp.x,y=pp.y-2,z=pp.z} xeff4 = {x=pp.x+1,y=pp.y-2,z=pp.z} xeff5 = {x=pp.x+2,y=pp.y-2,z=pp.z} xeff6 = {x=pp.x-2,y=pp.y-1,z=pp.z} xeff7 = {x=pp.x-2,y=pp.y,z=pp.z} xeff8 = {x=pp.x-2,y=pp.y+1,z=pp.z} xeff9 = {x=pp.x+2,y=pp.y-1,z=pp.z} xeff10 = {x=pp.x+2,y=pp.y,z=pp.z} xeff11 = {x=pp.x+2,y=pp.y+1,z=pp.z} xeff12 = {x=pp.x-2,y=pp.y+2,z=pp.z} xeff13 = {x=pp.x-1,y=pp.y+2,z=pp.z} xeff14 = {x=pp.x,y=pp.y+2,z=pp.z} xeff15 = {x=pp.x+1,y=pp.y+2,z=pp.z} xeff16 = {x=pp.x+2,y=pp.y+2,z=pp.z} doSendMagicEffect(xeff1,rd) doSendMagicEffect(xeff2,rd) doSendMagicEffect(xeff3,rd) doSendMagicEffect(xeff4,rd) doSendMagicEffect(xeff5,rd) doSendMagicEffect(xeff6,rd) doSendMagicEffect(xeff7,rd) doSendMagicEffect(xeff8,rd) doSendMagicEffect(xeff9,rd) doSendMagicEffect(xeff10,rd) doSendMagicEffect(xeff11,rd) doSendMagicEffect(xeff12,rd) doSendMagicEffect(xeff13,rd) doSendMagicEffect(xeff14,rd) doSendMagicEffect(xeff15,rd) doSendMagicEffect(xeff16,rd) if cont == -1 then setPlayerStorageValue(cid,78451,0) end return TRUE end function charge(parametro) local cid = parametro.cid parametro = {cid=cid} store = addEvent(store, 300, parametro) local cont = getPlayerStorageValue(cid,78451) local pp = getPlayerPosition(cid) eff1 = {x=pp.x-1,y=pp.y-1,z=pp.z} eff2 = {x=pp.x,y=pp.y-1,z=pp.z} eff3 = {x=pp.x+1,y=pp.y-1,z=pp.z} eff4 = {x=pp.x-1,y=pp.y,z=pp.z} eff5 = {x=pp.x+1,y=pp.y,z=pp.z} eff6 = {x=pp.x-1,y=pp.y+1,z=pp.z} eff7 = {x=pp.x,y=pp.y+1,z=pp.z} eff8 = {x=pp.x+1,y=pp.y+1,z=pp.z} doSendMagicEffect(eff1,rd) doSendMagicEffect(eff2,rd) doSendMagicEffect(eff3,rd) doSendMagicEffect(eff4,rd) doSendMagicEffect(eff5,rd) doSendMagicEffect(eff6,rd) doSendMagicEffect(eff7,rd) doSendMagicEffect(eff8,rd) return TRUE end function store(parametro) local cid = parametro.cid local cont = getPlayerStorageValue(cid,78451) local pp = getPlayerPosition(cid) if cont == 0 then vezes = 0 elseif cont == 1 then vezes = 1 elseif cont == 2 then vezes = 2 elseif cont == 3 then vezes = 4 elseif cont == 4 then vezes = 8 elseif cont == 5 then vezes = 16 elseif cont == 6 then vezes = 32 elseif cont == 7 then vezes = 64 elseif cont == 8 then vezes = 128 elseif cont == 9 then vezes = 256 elseif cont == 10 then vezes = 512 end local life = (500*cont) if cont >= 11 then setPlayerStorageValue(cid,78451,0) doSendAnimatedText(pp, "Error",TEXTCOLOR_RED) else doSendAnimatedText(pp, "" .. vezes .. "x",TEXTCOLOR_RED) setPlayerStorageValue(cid,78451,cont+1) doCreatureAddHealth(cid,-1 * life) local meposition = {x=pp.x,y=pp.y,z=pp.z} doSendMagicEffect(meposition,65) end stopEvent(store) stopEvent(charge) return TRUE end
-
[dúvida Sanada! ] Por Marcryzius E Lucasjockey
tópico respondeu ao Khost de lucasjockey em Lixeira Pública
function onUse(cid, item, frompos, item2, topos) piece1pos = {x=364, y=43, z=7, stackpos=1} rockpos = {x=364, y=43, z=7, stackpos=1} getpiece1 = getThingfromPos(piece1pos) if item.uid == 9221 and item.itemid == 9825 and getpiece1.itemid == 1543 and doPlayerRemoveMoney(cid, 50000) == TRUE then doRemoveItem(getpiece1.uid,1) doTransformItem(item.uid,item.itemid+1) doPlayerSendTextMessage(cid,22,"Voce tem um minuto para passar.") parameters = {cid = cid, itemid = item.itemid, itemuid = item.uid, rockpos = rockpos} evento = addEvent(pedranormal, 60000, parameters) evento else doPlayerSendTextMessage(cid,22,"Sorry, not possible.") end return 1 end function pedranormal(parameters) doCreateItem(1543,1,parameters.rockpos) doTransformItem(parameters.itemuid,parameters.itemid-1) stopEvent(evento) end -
O segundo não tem efeito porque ele não aplica as áreas nas variaveis AREA_CROSS1X1, AREA_CROSS2X2, AREA_CROSS3X3 e AREA_CROSS4X5. Além disso, você cria as Spells sempre com a mesma variavel AREA, assim ele vai sobreescrever a área sempre que executar esse comando: setCombatArea(combat, area). Também esqueceu de setar os valores de retorno do "GetFormulaValues" na magia. Arrumando ele com as áreas do primeiro script: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 6) function getCombatFormulas(cid, lv, maglv) local formula_min = -((lv*0.25 + maglv*3) * 5.6) local formula_max = -((lv*0.25 + maglv*3) * 6.0) if(formula_max < formula_min) then local tmp = formula_max formula_max = formula_min formula_min = tmp end return formula_min, formula_max end AREA_CROSS1X1 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} } local area = createCombatArea(AREA_CROSS1X1) setCombatArea(combat, area) setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas") local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 6) function getCombatFormulas(cid, lv, maglv) local formula_min = -((lv*0.25 + maglv*3) * 5.6) local formula_max = -((lv*0.25 + maglv*3) * 6.0) if(formula_max < formula_min) then local tmp = formula_max formula_max = formula_min formula_min = tmp end return formula_min, formula_max end AREA_CROSS2X2 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 0, 3, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} } area = createCombatArea(AREA_CROSS2X2) setCombatArea(combat2, area) setCombatCallback(combat2, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas") local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatParam(combat3, COMBAT_PARAM_EFFECT, 6) function getCombatFormulas(cid, lv, maglv) local formula_min = -((lv*0.25 + maglv*3) * 5.6) local formula_max = -((lv*0.25 + maglv*3) * 6.0) if(formula_max < formula_min) then local tmp = formula_max formula_max = formula_min formula_min = tmp end return formula_min, formula_max end AREA_CROSS3X3 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} } area = createCombatArea(AREA_CROSS3X3) setCombatArea(combat3, area) setCombatCallback(combat3, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas") local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatParam(combat4, COMBAT_PARAM_EFFECT, 6) function getCombatFormulas(cid, lv, maglv) local formula_min = -((lv*0.25 + maglv*3) * 5.6) local formula_max = -((lv*0.25 + maglv*3) * 6.0) if(formula_max < formula_min) then local tmp = formula_max formula_max = formula_min formula_min = tmp end return formula_min, formula_max end AREA_CROSS4X5 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0}, {0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} } area = createCombatArea(AREA_CROSS4X5) setCombatArea(combat4, area) setCombatCallback(combat4, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas") local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, parameters.combat2, parameters.var) end local function onCastSpell3(parameters) doCombat(parameters.cid, parameters.combat3, parameters.var) end local function onCastSpell4(parameters) doCombat(parameters.cid, parameters.combat4, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var, combat = combat, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4 } addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 200, parameters) addEvent(onCastSpell3, 300, parameters) addEvent(onCastSpell4, 400, parameters) addEvent(onCastSpell5, 500, parameters) return 0 end
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.