Ir para conteúdo

Flaah

Barão
  • Total de itens

    201
  • Registro em

  • Última visita

Posts postados por Flaah

  1. OK' vou montar aqui.

     

    ---------- @EDIT ----------

     

    Po cara so consegui esse mesmo, tipo ele empura mais só se estiver perto...

     

    Desculpe não pode te ajudar. sad.png

     

    Boa Tarde.

  2. Tipo eu fiz esse:

     

    local combat = createCombatObject()

    setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)

    setCombatParam(combat, COMBAT_PARAM_EFFECT, 71)

    setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 4, 7)

     

    function onCastSpell(cid, var)

    local max_sqm = 3 -- maximo de sqm que vai empurrar o player

    local pos = getPosByDir(getCreaturePosition(cid), getCreatureLookDirection(cid), 1)

    pos.stackpos = 253

    if (isPlayer(getThingFromPos(pos).uid)) then

    doTeleportThing(getThingFromPos(pos).uid, getClosestFreeTile(getThingFromPos(pos).uid, (getPosByDir(getCreaturePosition(cid), getCreatureLookDirection(cid), max_sqm))))

    end

    return doCombat(cid, combat, var)

    end

     

    Tang:

    <instant name="invocate" words="invocate" lvl="1" mana="20" prem="0" range="5" needtarget="1" exhaustion="1" blockwalls="1" needlearn="0" script="magia.lua">
    

     

    O de empurra a cada vez que o inimigo resebe o dano ainda n fiz, vou tenta fazer aqui.

  3. Tenta esse:

     

    local combat = createCombatObject()
    setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.3, -2500, -1.7, -0)
    
    function onCastSpell(cid, var)
    local max_sqm = 3 -- maximo de sqm que vai empurrar o player
    local pos = getPosByDir(getCreaturePosition(cid), getCreatureLookDirection(cid), 1)
    pos.stackpos = 253
    if (isPlayer(getThingFromPos(pos).uid)) then
    doTeleportThing(getThingFromPos(pos).uid, getClosestFreeTile(getThingFromPos(pos).uid, (getPosByDir(getCreaturePosition(cid), getCreatureLookDirection(cid), max_sqm))))
    doSendMagicEffect(pos,10)
    end
    return FALSE
    end

     

    AJUDEI?! +REP happy.png

  4. Yan18, vc deveria ler primeiro o tópico dos outros antes de responder.

     

    Se vc lesse primeiro, saberia que a ta talkaction que eu postei é praticamente a mesma coisa que vc me respondeu e o que eu queria que essa talkaction virasse uma spell.

     

    Primeiro leia o tópico dos outros e preste mais atenção, aaai, depois vc responda, não perca seu tempo respondendo uma coisa inútil como esta, só pra ganha Posts, esse tópico é sério e a ajuda que to pedindo é mais séria ainda, OK's?!

     

    ALGUEM AJUDA PORFAVOR, VALENDO +REP

  5. Ola amigos do XTIBIA, hoje eu vim aqui pra pedi uma ajudinha para vcs, que seria:

     

    Vcs conseguiriam colocar as funçoes:

     

    doCreateCustomMonster e getCreatureName(cid)

     

    Na SPELL que eu editei:

     

    function onCastSpell(cid, var)
    
    local playerpos = getPlayerPosition(cid)
    local cloth = getCreatureOutfit(cid)
    local health = getCreatureHealth(cid)
    local maxhealth = getCreatureMaxHealth(cid)
    local nome = getCreatureName(cid)
    local MaximoSummon = 10 --- Maximo de Monstros Sumonados!! No Caso So Posso Sumonar 5 Clones
    
    local summons = doCreateCustomMonster(cid)
    if(table.maxn(summons) < MaximoSummon) then -- no summons
    local clone = doCreateCustomMonster(nome, playerpos)
    setCreatureMaxHealth(clone, maxhealth)
    doCreatureAddHealth(clone, health)
    doSetCreatureOutfit(clone, cloth, -1)
    doSendMagicEffect(playerpos, 2)
    return TRUE
    end
    end

     

    SPELL original:

     

     

    function onCastSpell(cid, var)
    
    local playerpos = getPlayerPosition(cid)
    local cloth = getCreatureOutfit(cid)
    local health = getCreatureHealth(cid)
    local maxhealth = getCreatureMaxHealth(cid)
    local MaximoSummon = 10 --- Maximo de Monstros Sumonados!! No Caso So Posso Sumonar 5 Clones
    
    local summons = getCreatureSummons(cid)
    if(table.maxn(summons) < MaximoSummon) then -- no summons
    local clone = doCreateMonster("orc", playerpos)
    doConvinceCreature(cid, clone)
    setCreatureMaxHealth(clone, maxhealth)
    doCreatureAddHealth(clone, health)
    doSetCreatureOutfit(clone, cloth, -1)
    doSendMagicEffect(playerpos, 2)
    return TRUE
    end
    end

     

     

    Em?!

     

    Sobre a função: http://www.xtibia.co...ommonster-no-c/

     

    PS: EU TENHO A FUNÇÃO doCreateCustomMonster NO MEU SERVER.

     

    ERRO QUE ESTA DANDO: Quando eu uso a spell que eu editei com esse comando, ele derruba o server.

     

    ALGUEM AJUDA PORFAVOR, VALENDO +REP

  6. Boa Tarde amigos do XTIBIA, tenho um probleminha, eu queria fazer uma spell que summona um monstro, mais com o mesmo nome do player...

     

    Maaaaiis.. não consegui porq esta faltando essa função no meu source: doCreateCustomMonster

     

    Alguem saberia como eu coloca essa função no source do meu server?

     

    PORFAVOR ALGUEM AJUDA, VALENDO +REP

  7. Boa Tarde amigos do XTIBIA, tenho um probleminha, eu queria fazer uma spell que summona um monstro, mais com o mesmo nome do player...

     

    Maaaaiis.. não consegui porq esta faltando essa função no meu source: doCreateCustomMonster

     

    Alguem saberia como eu coloca essa função no source do meu server?

     

    PORFAVOR AJDUA, VALENDO +REP

  8. DESCULPA A DEMORA. ;)

     

    Ai CoyoteStark o script que vc me mando até funciona, reborna direitinho, mais n troca a vocation, vou coloca abaixo o script que vc me mando com as modificações, pra ver se eu fiz algo de errado.

     

    -- SCRIPT FEITO POR YUNIE

    -- config

    minlevel = 200 -- level para resetar

    price = 5000

    newlevel = 8 -- level após reset

    newexp = 4200 -- nova experiencia após reset

    newnaruto = 317 -- outfit apos reborn

     

    minlevel = 200 -- level para resetar

    price = 5000

    newlevel = 8 -- level após reset

    newexp = 4200 -- nova experiencia após reset

    newsasuke = 19 -- outfit apos reborn

     

    -- end config

    function addReset(cid)

    resets = getResets(cid)

    setPlayerStorageValue(cid,1020,resets+1)

    return true

    end

    function getResets(cid)

    resets = getPlayerStorageValue(cid,1020)

    if resets < 0 then

    resets = 0

    end

    return resets

    end

    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, 'reborn') and getPlayerStorageValue(cid,30025) == 4 then

    selfSay('Voçe Não Pode Mais Rebornar.')

    focus = 0

    talk_start = 0

    elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) < 200 and getPlayerStorageValue(cid,30025) ~= 4 then

    selfSay('So Pode Rebornar Lv 200 Desculpe...kkk que otario')

    elseif msgcontains(msg, 'reborn') then

    selfSay('Entao o grande aventureiro gostaria de renascer? {yes}')

    talk_state = 2

    elseif msgcontains(msg, 'yes') and talk_state ==2 and getPlayerLevel(cid) >= 200 and getPlayerVocation(cid) == 50 then

    doPlayerSetVocation(cid, 95)

    addReset(cid)

    playerid = getPlayerGUID(cid)

    setPlayerStorageValue(cid,30025,4)

    doRemoveCreature(cid)

    db.executeQuery("UPDATE `players` SET `level`="..newlevel..",`experience`="..newexp.." WHERE `players`.`id`= ".. playerid .."")

    db.executeQuery("UPDATE `players` SET `looktype`="..newnaruto.." WHERE `players`.`id`= ".. playerid .."")

    talk_state = 0

     

     

    elseif msgcontains(msg, 'yes') and talk_state ==2 and getPlayerLevel(cid) >= 200 and getPlayerVocation(cid) == 1 then

    doPlayerSetVocation(cid, 16)

    addReset(cid)

    playerid = getPlayerGUID(cid)

    setPlayerStorageValue(cid,30025,4)

    doRemoveCreature(cid)

    db.executeQuery("UPDATE `players` SET `level`="..newlevel..",`experience`="..newexp.." WHERE `players`.`id`= ".. playerid .."")

    db.executeQuery("UPDATE `players` SET `looktype`="..newsasuke.." WHERE `players`.`id`= ".. playerid .."")

    talk_state = 0

    elseif msgcontains(msg, 'yes') and talk_state == 2 then

    selfSay('Sorry, ' .. getCreatureName(cid) .. '! You must revert or transform, Voce deve transformar ou reverter.')

    elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then

    selfSay('Good bye. Deslogue e logue Por Favor!!!!')

    focus = 0

    talk_start = 0

    end

    return true

    end

    npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

    npcHandler:addModule(FocusModule:new())

     

    PS: Vc poderia manda o XML dele, é q to uzando de outro NPC ;P

     

    ALGUEM PODERIA AJUDAR PORFAVOR, VALENDO +REP

  9. Meu Login.lua ta assim:

     

    E não deu certo, ele continua voltando pra vocation anterior quando o player sai e volta, mesmo eu tendo falado com o NPC Reborn.

     

    Login.lua

     

    local message = [[Welcome To The Pollo Server

    ParA Tener El Bless di

    !Bless ---- blessing

    !aol ------ amulet of lost

    !prision -- Magic Wall Prision

    !]]

     

     

    function onLogin(cid)

     

    registerCreatureEvent(cid, "PlayerKill")

    if (InitArenaScript ~= 0) then

    InitArenaScript = 1

    -- make arena rooms free

    for i = 42300, 42309 do

    setGlobalStorageValue(i, 0)

    setGlobalStorageValue(i+100, 0)

    end

    end

    -- if he did not make full arena 1 he must start from zero

    if getPlayerStorageValue(cid, 42309) < 1 then

    for i = 42300, 42309 do

    setPlayerStorageValue(cid, i, 0)

    end

    end

    -- if he did not make full arena 2 he must start from zero

    if getPlayerStorageValue(cid, 42319) < 1 then

    for i = 42310, 42319 do

    setPlayerStorageValue(cid, i, 0)

    end

    end

    -- if he did not make full arena 3 he must start from zero

    if getPlayerStorageValue(cid, 42329) < 1 then

    for i = 42320, 42329 do

    setPlayerStorageValue(cid, i, 0)

    end

    end

    if getPlayerStorageValue(cid, 42355) == -1 then

    setPlayerStorageValue(cid, 42355, 0) -- did not arena level

    end

    setPlayerStorageValue(cid, 42350, 0) -- time to kick 0

    setPlayerStorageValue(cid, 42352, 0) -- is not in arena

     

    doPlayerPopupFYI(cid, message)

    registerCreatureEvent(cid, "PlayerDeath")

    --registerCreatureEvent(cid, "MEDALS") This is Nahruto's Metal System for killing someone, Dont add this unless you use it.--

    registerCreatureEvent(cid, "KilledMonstersCounter")

    registerCreatureEvent(cid, "playeradvance")

     

     

    registerCreatureEvent(cid, "RepSystem")

     

    registerCreatureEvent(cid, "showRep")

     

    registerCreatureEvent(cid, "RepLogin")

     

    registerCreatureEvent(cid, "task_count")

     

    if (getPlayerStorageValue(cid, 30025) ~= 1) then

    setPlayerStorageValue(cid, 30025, 1)

    setPlayerStorageValue(cid, 30025, 0)

    end

     

    return TRUE

     

    end

     

    ALGUEM AJUDA PORFAVOR, VALENDO +REP

  10. Quando eu criei a conta deu esse ERRO no console:

     

     

    [27/07/2012 15:08:09] Account Manager has logged in.

    [27/07/2012 15:08:09] [Warning - Vocations::getVocation] Vocation 4294967295 not found.

    [27/07/2012 15:08:20] Account Manager has logged out.

    [27/07/2012 15:08:34] Account Manager has logged in.

    [27/07/2012 15:08:34] [Warning - Vocations::getVocation] Vocation 4294967295 not found.

    [27/07/2012 15:08:53] Account Manager has logged out.

    [27/07/2012 15:08:59] Golo has logged in.

    [27/07/2012 15:08:59] [Warning - Vocations::getVocation] Vocation 4294967295 not found.

     

    Ai quando eu fiz o Reborn deu esse ERRO:

    [27/07/2012 15:09:06] [Error - Npc interface]

    [27/07/2012 15:09:06] data/npc/scripts/reborn.lua:onCreatureSay

    [27/07/2012 15:09:06] Description:

    [27/07/2012 15:09:06] data/npc/scripts/reborn.lua:60: attempt to index local 'voc' (a nil value)

    [27/07/2012 15:09:06] stack traceback:

    [27/07/2012 15:09:06] data/npc/scripts/reborn.lua:60: in function 'callback'

    [27/07/2012 15:09:06] data/npc/lib/npcsystem/npchandler.lua:383: in function 'onCreatureSay'

    [27/07/2012 15:09:06] data/npc/scripts/reborn.lua:8: in function <data/npc/scripts/reborn.lua:8>

     

    ALGUEM AJUDA PORFAVOR, VALENDO +REP

  11. Deu esse ERRO no console:

     

    [27/07/2012 15:02:14] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/login.lua:59: unexpected symbol near '+'

    [27/07/2012 15:02:14] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/login.lua)

    [27/07/2012 15:02:14] data/creaturescripts/scripts/login.lua:59: unexpected symbol near '+'

     

    ALGUEM AJUDA PORFAVOR, VALENDO +REP

  12. vai em data/creaturescript/script abra o login.lua e antes do end return true end. cole isso.

    
    if getPlayerStorageValue(cid, 650230) ~= -1 then
    doPlayerSetVocation(cid, getPlayerStorageValue(cid, 650230))
    

     

    Coloquei o que vc mando, mais quando sai e voltei, n fico com a vocation, volto pra anterior.

     

    Ai coloquei a STORAGE: 30025 que é a do Reborn, mais quando sai e voltei, fico com outra vocation que n tinha nada a ver com a que eu escoli.

     

    ALGUEM AJUDA PORFAVOR, VALENDO +REP

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...