• TibiaFace

    Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...

    .
    demo menumenu

    Afiliados



    Votar:

    Battlefield tfs 1.0

    Compartir:

    Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje (Página 1 de 1.)

    1Battlefield tfs 1.0 Empty Battlefield tfs 1.0 Dom Mayo 17, 2015 12:31 pm

    Invitado

    Anonymous
    Invitado
    Descripcion de mi problema:
    Saludos a todos los de tibiaface.com tengo un problema con el evento de battlefield para tfs 1.0 me gustaria saber si alguien tiene la solucion o podria ayudarte, gracias de antemano aqui dejo los scripts que me presentan error.!
    creaturescripts
    combat

    Código:
    function onLogin(cid)
    if getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage) == -1 then
    setGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage, 0)
    setGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage, 0)
    setGlobalStorageValue(_Lib_Battle_Info.storage_count, 0)
    end
    registerCreatureEvent(cid, "BattleTeam")
    registerCreatureEvent(cid, "BattleDeath")
    return true
    end


    function onCombat(cid, target)
    if isPlayer(cid) and isPlayer(target) then
    if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage) == 1 and getPlayerStorageValue(target, _Lib_Battle_Info.TeamOne.storage) == 1 then
    doPlayerSendCancel(cid, "You may not attack your team mates.") return false
    end
    if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage) == 1 and getPlayerStorageValue(target, _Lib_Battle_Info.TeamTwo.storage) == 1 then
    doPlayerSendCancel(cid, "You may not attack your team mates.") return false
    end
    return true
    end
    return true
    end

    function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller)
    if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage) >= 1 then
    setPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage, -1)
    setGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage, getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage)-1)
    doRemoveCondition(cid, CONDITION_OUTFIT)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Battle Field] You Are Dead!")
    if getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage) == 0 then
    getWinnersBattle(_Lib_Battle_Info.TeamTwo.storage)
    else
    doBroadCastBattle(23,"[BattleField Information] ".._Lib_Battle_Info.TeamOne.name.." "..getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage).." VS "..getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage).." " .._Lib_Battle_Info.TeamTwo.name)
    end
    elseif getPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage) >= 1 then
    setPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage, -1)
    setGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage, getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage)-1)
    doRemoveCondition(cid, CONDITION_OUTFIT)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Battle Field] You Are Dead!")
    if getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage) == 0 then
    getWinnersBattle(_Lib_Battle_Info.TeamOne.storage)
    else
    doBroadCastBattle(23,"[BattleField Information] ".._Lib_Battle_Info.TeamOne.name.." "..getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage).." VS "..getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage).." " .._Lib_Battle_Info.TeamTwo.name)
    end
    end
    return true
    end
    Ainda na mesma pasta crie outro arquivo com o nome de pdeath.lua com o seguinte conteúdo: (ATENÇÃO QUE NA MESMA PASTA SÃO 2 ARQUIVOS)
    function onPrepareDeath(cid, corpse, lastHitKiller, mostDamageKiller)

    if getPlayerStorageValue(cid, config_tvt.green_kills) > 0 then
       doTeleportThing(cid, config_tvt.green_pos)
       setGlobalStorageValue(red_kills, getGlobalStorageValue(red_kills) + 1)
    end

    if getPlayerStorageValue(cid, config_tvt.red_kills) > 0 then
       doTeleportThing(cid, config_tvt.red_pos)
       setGlobalStorageValue(red_kills, getGlobalStorageValue(green_kills) + 1)
    end

    doPlayerSendTextMessage(cid, 27, "You dead! by Absolute")

    return true
    end

    pdeath creaturescripts
    Código:
    function onPrepareDeath(cid, corpse, lastHitKiller, mostDamageKiller)

    if getPlayerStorageValue(cid, config_tvt.green_kills) > 0 then
       doTeleportThing(cid, config_tvt.green_pos)
       setGlobalStorageValue(red_kills, getGlobalStorageValue(red_kills) + 1)
    end

    if getPlayerStorageValue(cid, config_tvt.red_kills) > 0 then
       doTeleportThing(cid, config_tvt.red_pos)
       setGlobalStorageValue(red_kills, getGlobalStorageValue(green_kills) + 1)
    end

    doPlayerSendTextMessage(cid, 27, "You dead! by Absolute")

    return true
    end

    en movements
    Código:
    function onLogin(cid)
    if getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage) == -1 then
    setGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage, 0)
    setGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage, 0)
    setGlobalStorageValue(_Lib_Battle_Info.storage_count, 0)
    end
    registerCreatureEvent(cid, "BattleTeam")
    registerCreatureEvent(cid, "BattleDeath")
    return true
    end


    function onCombat(cid, target)
    if isPlayer(cid) and isPlayer(target) then
    if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage) == 1 and getPlayerStorageValue(target, _Lib_Battle_Info.TeamOne.storage) == 1 then
    doPlayerSendCancel(cid, "You may not attack your team mates.") return false
    end
    if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage) == 1 and getPlayerStorageValue(target, _Lib_Battle_Info.TeamTwo.storage) == 1 then
    doPlayerSendCancel(cid, "You may not attack your team mates.") return false
    end
    return true
    end
    return true
    end

    function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller)
    if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage) >= 1 then
    setPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage, -1)
    setGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage, getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage)-1)
    doRemoveCondition(cid, CONDITION_OUTFIT)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Battle Field] You Are Dead!")
    if getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage) == 0 then
    getWinnersBattle(_Lib_Battle_Info.TeamTwo.storage)
    else
    doBroadCastBattle(23,"[BattleField Information] ".._Lib_Battle_Info.TeamOne.name.." "..getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage).." VS "..getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage).." " .._Lib_Battle_Info.TeamTwo.name)
    end
    elseif getPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage) >= 1 then
    setPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage, -1)
    setGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage, getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage)-1)
    doRemoveCondition(cid, CONDITION_OUTFIT)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Battle Field] You Are Dead!")
    if getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage) == 0 then
    getWinnersBattle(_Lib_Battle_Info.TeamOne.storage)
    else
    doBroadCastBattle(23,"[BattleField Information] ".._Lib_Battle_Info.TeamOne.name.." "..getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage).." VS "..getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage).." " .._Lib_Battle_Info.TeamTwo.name)
    end
    end
    return true
    end


    Imagen de mi Error:
    Battlefield tfs 1.0 2lnegeb

    Mi problema esta en:
    MoveEvents

    2Battlefield tfs 1.0 Empty Re: Battlefield tfs 1.0 Lun Mayo 18, 2015 7:03 am

    Invitado

    Anonymous
    Invitado
    Cara este evento no es tfs 1.0 , los códigos , como ha doBroadcast en tfs 1.0 , u puede cambiar la función broadcastMensage , que su error está sucediendo porque las etiquetas , busque en movements.xml , publicar tu movents.xml y creaturescript .xml

    Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje (Página 1 de 1.)

    Permisos de este foro:
    No puedes responder a temas en este foro.

     

    BienvenidosTibiaFace es una comunidad de Open Tibia. Para participar debes estar registrado (click para Regístrate).