
esnio12
Membro
-
Registro em
-
Última visita
Solutions
-
esnio12's post in (Resolvido)Adicionar função neste script :c > 8.60 < was marked as the answerSegue
-
esnio12's post in (Resolvido)Colocar Level Para Usar Essa Scroll was marked as the answerOlá, boa noite, tente assim.
function onUse(cid, item, frompos, item2, topos) if getPlayerLevel(cid) == 1 then else doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHLEVEL) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true end if getVocationInfo(getPlayerVocation(cid)).name == "Madara" then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja é um madara!") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true else doPlayerSetVocation(cid, 210) doCreatureSay(cid, "Madara Owns!!", 19) doSendMagicEffect(getCreaturePosition(cid), 224) doCreatureChangeOutfit(cid, {lookType = 368}) if getPlayerStorageValue(cid, 5) < 1 then setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+100) setCreatureMaxMana(cid, getCreatureMaxMana(cid)+100) setPlayerStorageValue(cid, 5, 1) end setPlayerStorageValue(cid, 16200, 1) setPlayerStorageValue(cid, 300, (getPlayerVocation(cid))) doRemoveItem(item.uid) end return true end
-
esnio12's post in (Resolvido)por storage neste script was marked as the answerfunction onUse(cid, item, frompos, item2, topos) local storage = 41234 if getPlayerStorageValue(cid, storage) == -1 then local small = {x=99, y=187, z=7} -- Posição para onde o player será teleportado. local bag = doPlayerAddItem(cid, 2002, 1) -- Configure a BAG que vc quer setPlayerStorageValue(cid,storage,1) doAddContainerItem(bag, 13484, 1) -- Configure o Item que vai pra dentro da bag doTeleportThing(cid, small) doPlayerSendTextMessage(cid,20,"VOCÊ PEGOU SEU PREMIO E FOI TELEPORTADO PARA CITY.") else doPlayerSendTextMessage(cid,20,"Voce Ja Fez A Quest De Algum Personagem.") end return true end
-
esnio12's post in (Resolvido)É possivel criar um script que faça o player soltar magia sempre que atacar? was marked as the answerSe você tiver essa função nas sourcers é possivel sim
-
esnio12's post in (Resolvido)Chibaku Tensei was marked as the answerFoi erro meu, haha, é fácil resolver isso.
Segue abaixo:
local function doPushCreature(target, cid) if target > 0 then if not isNpc(target) then local position = getThingPosition(cid) local fromPosition = getThingPosition(target) local x = ((fromPosition.x - position.x) < 0 and -1 or ((fromPosition.x - position.x) == 0 and 0 or 1)) local y = ((fromPosition.y - position.y) < 0 and -1 or ((fromPosition.y - position.y) == 0 and 0 or 1)) local toPosition = {x = fromPosition.x - x, y = fromPosition.y - y, z = fromPosition.z} if doTileQueryAdd(target, toPosition) == 1 and getTileInfo(toPosition).house == false then doTeleportThing(target, toPosition, true) end end end end local spell = {} spell.config = { [1] = { damageType = 1, areaEffect = 2, area = { {0, 1, 1, 1, 0}, {0, 1, 1, 1, 0}, {0, 1, 3, 1, 0}, {0, 0, 0, 0, 0}, } } } spell.combats = {} for _, config in ipairs(spell.config) do local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, config.damageType) setCombatParam(combat, COMBAT_PARAM_EFFECT, config.areaEffect) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -4, 0, -4.7, 0) function onTargetCreature(cid, target) doPushCreature(target, cid) end setCombatCallback(combat, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") setCombatArea(combat, createCombatArea(config.area)) table.insert(spell.combats, combat) end function onCastSpell(cid, var) for n = 1, #spell.combats do addEvent(doCombat, (n * 120), cid, spell.combats[n], var) end return true end
-
esnio12's post in (Resolvido)Scrip selamento de bijus Narutibia 7.8 was marked as the answerEm actions/script - Crie um script referente ao selamento 1, ou selar1.lua
Abra o arquivo selar1.lua e cole isso dentro.
function onUse(cid, item, frompos, item2, topos) chakrapos = {x=94, y=643, z=6, stackpos=1} -------- posição referente onde irá estar o chakra boss = {x=98, y=640, z=7, stackpos=1} ----- posição referente onde irá nascer a bijuu caso falhe efeito = {x=98, y=640, z=7, stackpos=1} ----- posição referente a o efeito e a mensagem de falha sortiado = math.random(1,10) --- Isso refere a sorte de selar ou não, é entre 1 a 10, não mexa a menos que saiba o que está fazendo. chakraselado = getPlayerStorageValue(cid,1111) ---- Referente ao id de storage que ficará salvo se selou ou não. if chakraselado == -1 then --- NÃO MEXA if item.uid == 17231 ---------- uniqueid - você coloca na alavanca and item.itemid == 1945 ------- id da alavanca and chakrapos.itemid == 2171 -------- id do chakra and sortiado == 1 then ---- refere a 10% da sorte, ou seja, entre a chance 1 a 10, isso refere ao 1, se cair 1, falha doRemoveItem(chakrapos.uid,1) doSummonCreature("Shukaku", boss) --- NOME DO BOSS ou monstro que nascerá, caso falhar doSendAnimatedText(efeito, "GROARR!!", 210) doSendAnimatedText(efeito, "Fail!!", 180) elseif item.uid == 17231 ---------- uniqueid - você coloca na alavanca and item.itemid == 1945 ------- id da alavanca and chakrapos.itemid == 2171 -------- id do chakra and sortiado >= 2 then ---- refere a 90% da sorte, ou seja, entre 2 a 10, isso refere ao 2 a 10, se cair entre 2 a 10, da sucesso. doRemoveItem(chakrapos.uid,1) --- removerá o chakra da posição doSendMagicEffect(topos,1) --- soltará um efeito na alavanca setPlayerStorageValue(cid,1111,1) --- gravará a storage que foi selada doSendAnimatedText(efeito, "GEDOU!!", 210) --- soltará uma fala ao selar doSendMagicEffect(efeito,145) --- Número do efeito, mude a seu gosto. else doSendAnimatedText(topos, "Chakra Empty!!", 20) --- refere se o ou chakra vazio. end else doSendAnimatedText(topos, "Seal!!", 210) --- mensagem após tentar selar novamente, caso tenha selado já. end end
Agora em actions.xml adicione essa seguinte linha
<action uniqueid="17231" script="selar1.lua" />
Esse script foi retirado e adaptado do servidor Extnl, lembrando que isso é somente a 1° cauda, caso queira fazer com as demais, é só seguir as instruções que coloquei no script, é fácil, só mudar alguns números, etc.
Em 7.81, se não me engano não tem como fazer uma global message para todos, ou seja, não é possivel fazer nas versões 7.81
Não testei, caso ocorra algum error, só postar aqui.