Histórico de Curtidas
-
Carinhah recebeu reputação de Marcelo Sperb em Como mudar a moeda de compra do npc?no Script do NPC, Exemplo: Npc que renova a softboots, tem uma linha de código assim: "if(doPlayerRemoveMoney(cid, 10000)) then"
vc trocaria este "doPlayerRemoveMoney(cid, 10000)" por "doPlayerRemoveItem(cid, 2159, 1)" << no caso aqui ele irá remover apenas 1 scarab coin do player!!
se quiser fazer um NPC em especifico, me fale o Server que usa e como quer o NPC!
Se ajudei Rep+
-
Carinhah recebeu reputação de mascaradinho em [DÚVIDA] Como fazer um spell dar múltiplos hitsAproveitando td q o outro postou vou tentar lhe explicar...
este código do post q ele te indicou
agora documentarei o código dele e tentarei te ajudar!
bem em cima foi, um script de magia de apenas um elemento, no caso o physical, agora multi hist com elementos diferentes!
bem cara não sei se esta bem explicado; sou péssimo nisto, porém acho q dára para entender um pouco!!
qqr coisa retorne uma resposta q tento te explicar melhor!!
se ajudei, REP++
-
Carinhah recebeu reputação de Guilhermee Wallaueer em [DÚVIDA] Como fazer um spell dar múltiplos hitsAproveitando td q o outro postou vou tentar lhe explicar...
este código do post q ele te indicou
agora documentarei o código dele e tentarei te ajudar!
bem em cima foi, um script de magia de apenas um elemento, no caso o physical, agora multi hist com elementos diferentes!
bem cara não sei se esta bem explicado; sou péssimo nisto, porém acho q dára para entender um pouco!!
qqr coisa retorne uma resposta q tento te explicar melhor!!
se ajudei, REP++
-
Carinhah recebeu reputação de Marabo em [Pedido] Npc de promoçao.... precisar só mandar ae, se estiver ao meu alcance ajudarei sim
-
Carinhah recebeu reputação de Marabo em [Pedido] Npc de promoçao.Bem cara, Ae já é outro problema...
Vamos láá...
Em data/weapons/weapons.xml abra ele e todas as armas que está lá dentro vc acrescenta a tag com a epig vocation Ex:
<!-- Swords --> <!-- Broadsword --> <melee id="2413" unproperly="1" event="function" value="default"> <vocation id="4"/> <vocation id="8" showInDescription="0"/> <vocation id="12" showInDescription="0"/> //aqui vc acrescenta a epic vocation </melee>
Agora vamos tentar resolver os potions
se o seu for igual ao meu será assim:
Vá em data/actions/scripts/potions.lua e na linha q tem:
... fazendo isto em todas as potions...
se não for assim vc me retorna que ajudo vc!!
-
Carinhah recebeu reputação de Marabo em [Pedido] Npc de promoçao.tenta este aque, fiz no serviço, e aqui trabalho com linux e estou sem distro em linux para testar, então teste ve se funciona se não funcionar me retorne uma resposta que arrumarei o código!
vai em data/npc/script
no arquivo.lua do seu NPC, coloque isto dentro:
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 function onPlayerEndTrade(cid) npcHandler:onPlayerEndTrade(cid) end function onPlayerCloseChannel(cid) npcHandler:onPlayerCloseChannel(cid) end local node1 = keywordHandler:addKeyword({'promote'}, 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, cost = 200000, level = 200, 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())
Se ajudei, Rep+
-
Carinhah recebeu reputação de Guilhermee Wallaueer em [PEDIDO] Spell Com Multiplos HitsCara fiz correndo aqui no serviço, não tive como testar pq trabalho no linux e aqui to sem distro e tmbm testar no serviço é tenso
tenta ae, se não der avise para que eu possa corrigir!
Script Magia:
local combat1 = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1) local combat2 = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1) local combat3 = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, 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 function onCastSpell(cid, var) addEvent(onCastSpell1, 0, parameters) addEvent(onCastSpell2, 275, parameters) addEvent(onCastSpell3, 550, parameters) end
Ajudei?? Rep++
-
Carinhah recebeu reputação de Calvin em Duvida Firstitem e playerdeath +repcara to no notbook voltando pra casa da faculdade... tenta usar esses scripts ae!!
First Items
Playerdeath
por enquanto é oque posso fazer por vc... estou no onibus com notbook é muito ruim para poder mecher!!
-
Carinhah recebeu reputação de Brodisk em [HELP] Compilação DistroConselho de amigo... compile ele em linux... mais se vc nao tem experiencia com linux vai ser tenso... e no Windows vc vai ter que entender os erros que dão na hora da compilação para poder corrigi-los... mais o maior erro da compilação em windows é a questão de bibliotexa... muitas bibliotecas nao vem mais instaladas em windows ae vc tem que instala-las... melhor mesmo seria vc pegar um jah compilado e ir fazendo a migração de tudo!!
-
Carinhah recebeu reputação de Calvin em Death SkithBem vamos lá para o tutorial...
Primeiro só lembrando uma coisa... o video mostra o Player usando varias vezes a wand na runa para aumentar as charges, mais se prestarem atenção a charge nao passa de 2, bem se vcs quiserem o script identico o dele me mandem PM o script que postarei aqui eu fiz desta forma depois de ter conversado com o Calvin e ele aceitou e acharia legal se fosse desta forma!!
começaremos editando a arma para que ela vire wand e tenha cargas..
Vá em data/items/items.xml
procure por "2433" e substitua por:
agora vamos dar o script de wand a ele. PS: fiz a wand hitar conforme a ML do personagem
Vá em data/weapons/weapons.xml e cole isto lá dentro:
depois vá em data/weapons/scripts e copie qqr arquivo que esta lá e renomeie para death skith.lua
e cole isto dentro do arquivo death skith.lua
Agora vamos fazer com que ao usar a staff na runa ela transforme em enchanted staff
Vá em data/actions/actions.xml
e cole isto lá dentro:
agora vá em data/actions/scripts e copie qqr arquivo e renomeie ele para daeth skith.lua
dentro do arquivo death skith.lua cole isto:
em XXXX coloque o ID da runa que quando usarem a wand em cima ela transforme a staff em encantada!!
bem acho que é isso... qqr duvida perguntem!!
-
Carinhah recebeu reputação de Fausto32 em [Resolvido] Pqê nunca tem a energia nessesaria ?vc tem que substituir a linha inteira apenas por aquilo que te passei!!,
Tudo isso aqui :
if getPlayerStorageValue(cid,9951) == 2 and getPlayerStorageValue(cid,storageWrath) == 4 and getPlayerStorageValue(cid,9951) == 1 then
Voce substitui por isso aqui:
if getPlayerStorageValue(cid,9951) == 1 then
-
Carinhah recebeu reputação de heylike em NPC que vende runas atraves de falar!ta ae manolo... demorei um pouco para entregar por motivos pessoais
troquei algumas coisinhas que tu pediu apenas pq o sistema nao estava reconhecendo fazendo assim bugar o NPC...
mudanças:
Antes / Depois
Event I >> Event 1
Event II >> Event 2
Event III >> Event 3
-- script by Carinhah 'TibiaKing.com' -- 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 local player_gold = getPlayerItemCount(cid,2148) local player_plat = getPlayerItemCount(cid,2152)*100 local player_crys = getPlayerItemCount(cid,2160)*10000 local player_money = player_gold + player_plat + player_crys if(msgcontains(msg, 'Event 1')) then selfSay('gostaria de comprar ' .. getItemNameById(2270) .. '?}', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'Event 2')) then selfSay('gostaria de comprar ' .. getItemNameById(2296) .. '?}', cid) talkState[talkUser] = 2 elseif(msgcontains(msg, 'Event 3')) then selfSay('gostaria de comprar ' .. getItemNameById(2290) .. '?}', cid) talkState[talkUser] = 3 elseif(msgcontains(msg, 'Event Castle')) then selfSay('gostaria de comprar ' .. getItemNameById(2280) .. '?}', cid) talkState[talkUser] = 4 elseif(msgcontains(msg, 'yes')) then if(talkState[talkUser] == 1) then if doPlayerRemoveMoney(cid,1000) then doPlayerAddItem(cid, 2270, 1) else selfSay('You no have money', cid) end elseif(talkState[talkUser] == 2) then if doPlayerRemoveMoney(cid,2000) then doPlayerAddItem(cid, 2296, 1) else selfSay('You no have money', cid) end elseif(talkState[talkUser] == 3) then if doPlayerRemoveMoney(cid,3000) then doPlayerAddItem(cid, 2290, 1) else selfSay('You no have money', cid) end elseif(talkState[talkUser] == 4) then if doPlayerRemoveMoney(cid,4000) then doPlayerAddItem(cid, 2280, 1) else selfSay('You no have money', cid) end end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser]) == TRUE) then selfSay('Ok then.', cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Carinhah recebeu reputação de kakuzo12300 em NPC que vende runas atraves de falar!ta ae manolo... demorei um pouco para entregar por motivos pessoais
troquei algumas coisinhas que tu pediu apenas pq o sistema nao estava reconhecendo fazendo assim bugar o NPC...
mudanças:
Antes / Depois
Event I >> Event 1
Event II >> Event 2
Event III >> Event 3
-- script by Carinhah 'TibiaKing.com' -- 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 local player_gold = getPlayerItemCount(cid,2148) local player_plat = getPlayerItemCount(cid,2152)*100 local player_crys = getPlayerItemCount(cid,2160)*10000 local player_money = player_gold + player_plat + player_crys if(msgcontains(msg, 'Event 1')) then selfSay('gostaria de comprar ' .. getItemNameById(2270) .. '?}', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'Event 2')) then selfSay('gostaria de comprar ' .. getItemNameById(2296) .. '?}', cid) talkState[talkUser] = 2 elseif(msgcontains(msg, 'Event 3')) then selfSay('gostaria de comprar ' .. getItemNameById(2290) .. '?}', cid) talkState[talkUser] = 3 elseif(msgcontains(msg, 'Event Castle')) then selfSay('gostaria de comprar ' .. getItemNameById(2280) .. '?}', cid) talkState[talkUser] = 4 elseif(msgcontains(msg, 'yes')) then if(talkState[talkUser] == 1) then if doPlayerRemoveMoney(cid,1000) then doPlayerAddItem(cid, 2270, 1) else selfSay('You no have money', cid) end elseif(talkState[talkUser] == 2) then if doPlayerRemoveMoney(cid,2000) then doPlayerAddItem(cid, 2296, 1) else selfSay('You no have money', cid) end elseif(talkState[talkUser] == 3) then if doPlayerRemoveMoney(cid,3000) then doPlayerAddItem(cid, 2290, 1) else selfSay('You no have money', cid) end elseif(talkState[talkUser] == 4) then if doPlayerRemoveMoney(cid,4000) then doPlayerAddItem(cid, 2280, 1) else selfSay('You no have money', cid) end end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser]) == TRUE) then selfSay('Ok then.', cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Carinhah recebeu reputação de Calvin em utimate mana runeCara não sei se é bem oque vc queria... porem ta ae com o efeito quase identido.. apenas coloquei maior distancia entre da onde vem efeito doq o do video!!
pode colocar ele em uma runa normal mesmo!!
depois darei uma ajuda no outro post da staff "Death Skith" para ti!!
local combat = createCombatObject() local meteor = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) setCombatParam(combat, COMBAT_PARAM_EFFECT, 49) setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 10, 12) combat_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, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 3, 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, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} } local combat_area1 = createCombatArea(combat_1) setCombatArea(combat, combat_area1) 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) local newpos = {x = pos.x + 2, y = pos.y - 2, z = pos.z} doSendDistanceShoot(newpos, pos, 30) addEvent(meteorCast, 200, {cid = cid,pos = pos, combat = meteor}) local newpos = {x = pos.x - 2, y = pos.y - 2, z = pos.z} doSendDistanceShoot(newpos, pos, 30) addEvent(meteorCast, 200, {cid = cid,pos = pos, combat = meteor}) local newpos = {x = pos.x + 2, y = pos.y + 2, z = pos.z} doSendDistanceShoot(newpos, pos, 30) addEvent(meteorCast, 200, {cid = cid,pos = pos, combat = meteor}) local newpos = {x = pos.x - 2, y = pos.y + 2, z = pos.z} doSendDistanceShoot(newpos, pos, 30) addEvent(meteorCast, 200, {cid = cid,pos = pos, combat = meteor}) local newpos = {x = pos.x - 2, y = pos.y + 2, z = pos.z} doSendDistanceShoot(newpos, pos, 30) addEvent(meteorCast, 200, {cid = cid,pos = pos, combat = meteor}) end setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") function onCastSpell(cid, var) return doCombat(cid, combat, var) end
se ajudei da um REP++ ae ... e qualquer duvida sobre o script me avise!!
-
Carinhah recebeu reputação de Desnecessario em Pedido npc de missão [BASICO] Ajudem ai !Descobri o motivo do erro.. quando vc copiou aqui do forum ele copiou as sintax de código html do site, fazendo com que o distro nao entenda... então tem um modo de eu mandar private o script para vc??, aqui ele esta rodando na distro normalmente!!
-
Carinhah recebeu reputação de Desnecessario em Pedido npc de missão [BASICO] Ajudem ai !Ae cara, tipo arrumei alguns erros que encontrei no script e testei ele abrindo o distro do OT... bem ele nao apresentou mais nenhum erro e abriu a distro normalmente!!
agora teste ele dentro do jogo para ver como ele via se comportar perante a seus requisitos...
script corrigido:
focus = 0 talk_start = 0 target = 0 following = false attacking = false function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Good bye then.') focus = 0 talk_start = 0 end end[/b] [b]function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end[/b] [b]function onCreatureSay(cid, type, msg) msg = string.lower(msg) if ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Hello, ' .. creatureGetName(cid) .. 'Sou o husky hunter da academia gennin , há muito tempo tento cacar uma fera que esta no topo da montanha ao leste da academia e vive atacando todos.. preciso de "ajuda" !') focus = cid talk_start = os.clock() elseif string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.') elseif msgcontains(msg, 'ajuda') and focus == cid then queststatus = getPlayerStorageValue(cid,60000) if queststatus == -1 then setPlayerStorageValue(cid,60000,1) selfSay('Você quer me ajudar ? mate a fera e traga o seu item especial que lhe darei uma recompensa !!') else selfSay('Voce ja me ajudou!, nao preciso mais de sua ajuda!') end elseif msgcontains(msg, 'item') and focus == cid then valuestatus = getPlayerStorageValue(cid, 60001) if valuestatus == -1 then if getPlayerItem(cid, 2493) then doPlayerRemoveItem(cid, 2493, 1) selfSay('Muito Obrigado, Tome sua Recompensa!') doPlayerAddItem(cid,2494,1) setPlayerStorageValue(cid,60001,1) end else selfSay('Voce ja me ajudou!, nao preciso mais de sua ajuda!') end elseif string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then selfSay('Good bye, ' .. creatureGetName(cid) .. '!') focus = 0 talk_start = 0 end end[/b] [b]function onCreatureChangeOutfit(creature) end[/b] [b]function onThink() if (os.clock() - talk_start) > 30 then if focus > 0 then selfSay('Next Please...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Good bye then.') focus = 0 end end end
-
Carinhah recebeu reputação de xxaylon em Ajuda [Basico] Trocar Nivel para poder usar um itemta ae... quando ele te teleporta vc ele executa o efeito '49'
--Tptemplo.lua: function onUse(cid, item, frompos, item2, topos) local pos = {x=32240, y=32333, z=7} if item.itemid == 2176 then doPlayerSendCancel(cid,"Bem vindo denovo a Cidade dos Iniciantes") doTeleportThing(cid,pos) doSendMagicEffect(getPlayerPosition(cid),cid,49) doSendMagicEffect(getPlayerPosition(cid),49) end return true end
-
Carinhah recebeu reputação de xxaylon em Ajuda [Basico] Trocar Nivel para poder usar um itemVai em data/weapons/weapons.xml... ao abrir o arquivo WEAPONS.XML vc procura por '7417' ele estara mais ou menos assim:
<!-- Runed Sword --> <melee id="7417" level="65" unproperly="1" event="function" value="default"> <vocation id="4"/> <vocation id="8" showInDescription="0"/> </melee>
ae vc tem logo a frente do (id="7417") bem assim level="65" <<< aqui vc muda o level para usa-la!
p TP ali vc poderia postar ele certinho?? e se vc esta colocando ele em Action ou movements essas coisas e tals!!
Se ajudei da um REP+ ae!!
-
Carinhah recebeu reputação de Calvin em Spell que vem do altoAe cara... achei esse script em um server antigo meu... não m lembro de quem era o script para colocar os créditos
se te ajudar da um rep+ ae
local water = {490, 491, 492, 493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625} -- aqui quando a magia for cair em cima da agua ela tera outro efeito local combat = createCombatObject() local meteor = createCombatObject() setCombatParam(meteor, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -- tipo de damage setCombatParam(meteor, COMBAT_PARAM_EFFECT, 44) -- efeito de quando ele atingir a terra setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, -4.6, -200, -4.2, -200) -- calculo de dano por ml local stun = createConditionObject(CONDITION_PARALYZE) -- add paralize setConditionParam(stun, CONDITION_PARAM_TICKS, 5000) setConditionFormula(stun, -0.8, 0, -0.9, 0) -- condition do paralize setCombatCondition(meteor, stun) local meteor_water = createCombatObject() setCombatParam(meteor_water, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(meteor_water, COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY) -- efeito ao atingir a agua setCombatFormula(meteor_water, COMBAT_FORMULA_LEVELMAGIC, -4.6, -200, -4.2, -200) -- calculo de dano por ML combat_arr = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {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, 3, 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}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 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) -- eefeito dele caindo sobre a agua addEvent(meteorCast, 200, {cid = cid, pos = pos, combat = meteor_water}) else local newpos = {x = pos.x - 7, y = pos.y - 6, z = pos.z} doSendDistanceShoot(newpos, pos, 11) -- aqui efeito dele caindo do céu sobre a terra! addEvent(meteorCast, 200, {cid = cid,pos = pos, combat = meteor}) end end end setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") function onCastSpell(cid, var) return doCombat(cid, combat, var) end
-
Carinhah recebeu reputação de kakuzo12300 em [Resolvido] Vender ice rapier com charges!tae... acabei de testar ele aqui no meu server e deu certo... testa ele ae e ve se da certo!!
vc vai na pasta data/npc/scripts e copia qualquer arquivo que tem lá, e renomeie para icerapier.lua
ae vc abre ele e cola este script dentro dele:
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 local shopModule = ShopModule:new() npcHandler:addModule(shopModule) shopModule:addBuyableItem({'ice rapier'}, 2396, 200, 15, 'ice rapier') shopModule:addBuyableItem({'assassin star'}, 7368, 200, 1, 'ice rapier') npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Após feito isso vc vai no NPC Rashid e na linha: <npc name="Rashid" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0"> e substitua por: <npc name="Rashid" script="data/npc/scripts/icerapier.lua" walkinterval="2000" floorchange="0">
ou em qualquer outro NPC que vc queira q venda a Ice Rapier e as star's!
-
Carinhah recebeu reputação de xxaylon em Vocations!Ahh sim... tipo quanto maior é o skills ali, mais dificil fica de pegar skills... veja o exemplo do none vocation... no caso se o cara for "cavaleiro de elite" é bom vc diminuir para 1.0 as skills em vez de aumentar... quanto menor, mais rapido pega skills!!
-
Carinhah recebeu reputação de xxaylon em Vocations!Cara, apenas um chute... quando vc foi mudar as promotion para transforma-lo em vc deeveria ter deixado os valores igual oq estava antes!!
experimente a promotion assim:
<vocation id="8" name="Cavaleiro de elite" description="Cavaleiro de Elite" needpremium="1" speed="80" gaincap="50" gainhp="350" gainhpticks="10" gainhpamount="600" attackspeed="150" fromvoc="4" lessloss="10"> <formula meleeDamage="1.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.9" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation>
apenas tente... e ve se da o mesmo erro!!
-
Carinhah recebeu reputação de Desnecessario em Pedido npc de missão [BASICO] Ajudem ai !Ae cara, tava com um pouco de tempo aqui no serviço ae baixei um server 7.6 e vi as funções dele... fiz esse script em 7.6, provavelmente funcione em 7.81...
Tutorial do script, meio por cima:
quando vc falar ajuda ele verificara se vc tem o storagevalue '60000' se vc tiver ele agradecera falando q nao precisa mais de vc, se vc não tiver ele pedira a ajuda e vc começara a missão
quando vc retornar, vc falara 'item', ele verificara se vc tem o storagevalue '60001' se vc tiver ele falara q nao precisa mais de vc, se vc nao tiver ele removera o item rare da criatura que eu coloquei como '2493' e acrescentara o item '2494' como recompensa e falara 'Muito Obrigado, Tome sua Recompensa!' e acrescentara a storagevalue para vc nao trocar mais o item rare com ele!
focus = 0 talk_start = 0 target = 0 following = false attacking = false function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Good bye then.') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) if ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Hello, ' .. creatureGetName(cid) .. 'Sou o husky hunter da academia gennin , há muito tempo tento cacar uma fera que esta no topo da montanha ao leste da academia e vive atacando todos.. preciso de "ajuda" !') focus = cid talk_start = os.clock() elseif string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.') elseif msgcontains(msg, 'ajuda') and focus == cid then queststatus = getPlayerStorageValue(cid,60000) if queststatus == -1 then setPlayerStorageValue(cid,60000,1) selfSay('Você quer me ajudar ? mate a fera e traga o seu item especial que lhe darei uma recompensa !!') else selfSay('Voce ja me ajudou!, nao preciso mais de sua ajuda!') end elseif msgcontains(msg, 'item') and focus == cid then valuestatus = getPlayerStorageValue(cid, 60001) if valuestatus == -1 then if getPlayerItem(cid, 2493)then doPlayerRemoveItem(cid, 2493, 1) selfSay('Muito Obrigado, Tome sua Recompensa!') doPlayerAddItem(cid,2494,1) setPlayerStorageValue(cid,60001,1) end elseif selfSay('Voce ja me ajudou!, nao preciso mais de sua ajuda!') end elseif string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then selfSay('Good bye, ' .. creatureGetName(cid) .. '!') focus = 0 talk_start = 0 end end function onCreatureChangeOutfit(creature) end function onThink() if (os.clock() - talk_start) > 30 then if focus > 0 then selfSay('Next Please...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Good bye then.') focus = 0 end end end
fiz meio por cima e não tive a chance de testar pois estou no trabalho... teste ele e ve se funciona... quando eu chegar em minha residencia poderei aprimorar o script para vc... se ajudei pelo menos um pouco de um REP++ ae