Dark-Tibia
Dark-Tibia
Dark-Tibia
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.


En este foro encontras ayuda subre tu Otserver
 
ÍndicePortalÚltimas imágenesBuscarRegistrarseConectarse
Navegación
 Portal
 Índice
 Miembros
 Perfil
 FAQ
 Buscar
Conectarse
Nombre de Usuario:
Contraseña:
Entrar automáticamente en cada visita: 
:: Recuperar mi contraseña
Últimos temas
» johnnathann
[Mod] Football Script  Icon_minitimeSáb Sep 15, 2012 8:48 pm por johnnathannj

»  [8.70] Real Global Map 1.8 + Imagenes + Scans
[Mod] Football Script  Icon_minitimeLun Jun 11, 2012 4:53 am por Lazcano

» Speedy War [8.60]
[Mod] Football Script  Icon_minitimeVie Mar 30, 2012 2:12 pm por GOD ALE

»  [Rpg-Pvp][8.60]Kreuus Easy
[Mod] Football Script  Icon_minitimeJue Mar 29, 2012 11:42 pm por GOD ALE

» [Script] Royal Crossbow!
[Mod] Football Script  Icon_minitimeJue Mar 29, 2012 11:22 pm por GOD ALE

» Ayuda con el ot server
[Mod] Football Script  Icon_minitimeJue Mar 29, 2012 10:45 pm por GOD ALE

»  Tiko ot editado 8.60
[Mod] Football Script  Icon_minitimeJue Mar 29, 2012 10:34 pm por GOD ALE

»  VikiRanch.'[8.60] war v.1.0
[Mod] Football Script  Icon_minitimeJue Mar 29, 2012 9:54 pm por GOD ALE

» Abrir Puertos De Tibia En El Router Thomson tg585 de telmex
[Mod] Football Script  Icon_minitimeVie Oct 28, 2011 1:21 pm por panda

Mejores posteadores
Dj Pacos
[Mod] Football Script  I_vote_lcap[Mod] Football Script  I_voting_bar[Mod] Football Script  I_vote_rcap 
admin heber723
[Mod] Football Script  I_vote_lcap[Mod] Football Script  I_voting_bar[Mod] Football Script  I_vote_rcap 
God Maracula
[Mod] Football Script  I_vote_lcap[Mod] Football Script  I_voting_bar[Mod] Football Script  I_vote_rcap 
GoD Mexicansoul
[Mod] Football Script  I_vote_lcap[Mod] Football Script  I_voting_bar[Mod] Football Script  I_vote_rcap 
God Dunckan
[Mod] Football Script  I_vote_lcap[Mod] Football Script  I_voting_bar[Mod] Football Script  I_vote_rcap 
Admin Azteca
[Mod] Football Script  I_vote_lcap[Mod] Football Script  I_voting_bar[Mod] Football Script  I_vote_rcap 
Slayer
[Mod] Football Script  I_vote_lcap[Mod] Football Script  I_voting_bar[Mod] Football Script  I_vote_rcap 
God Damubu
[Mod] Football Script  I_vote_lcap[Mod] Football Script  I_voting_bar[Mod] Football Script  I_vote_rcap 
DJ Punk
[Mod] Football Script  I_vote_lcap[Mod] Football Script  I_voting_bar[Mod] Football Script  I_vote_rcap 
Glonlova
[Mod] Football Script  I_vote_lcap[Mod] Football Script  I_voting_bar[Mod] Football Script  I_vote_rcap 

 

 [Mod] Football Script

Ir abajo 
2 participantes
AutorMensaje
God Dunckan
Nivel 4
Nivel 4
God Dunckan


100

Mensajes : 67
Puntos : 192
Reputación : 22
Fecha de inscripción : 03/05/2011

[Mod] Football Script  Empty
MensajeTema: [Mod] Football Script    [Mod] Football Script  Icon_minitimeJue Mayo 12, 2011 12:14 am

Bien les traigo este mod modificado por collz y creado por gesior.

Ya sabran lo que es y de lo que trata.

Solo copian un mod nuevo y dentro pondremos-->

Código:


<?xml version="1.0" encoding="UTF-8"?>
<mod name="Football" enabled="yes">
    <lib name="football-lib"><![CDATA[
-- 1 - exit pos , 2 - team 1 ball, 3 - team 2 ball, 4 - team1frompos, 5 -team2frompos, 6 - team1topos, 7 - team2topos, 8-team1gate aid, 9 - team2game aid, 10 - speed, 11 - match time, 12 - highest uid + 1, 13 - field size
football_positions_uids = {}
football_positions_uids[1] = {23301,23302,23303, {23304,23305,23306}, {23307,23308,23309}, {23310,23311,23312}, {23313,23314,23315}, 23311, 23312, 450, 3, 23315, {8,3}}
football_positions_uids[2] = {23320,23321,23322, {23323,23324}, {23325,23326}, {23327,23328}, {23329,23330}, 23321, 23322, 450, 3, 23330, {6,2}}
football_positions_uids[3] = {23340,23341,23342, {23343,23344}, {23345,23346}, {23347,23348}, {23349,23350}, 23341, 23342, 450, 3, 23350, {6,2}}
teleport_players_on_goal = true


function footballGoal(pos, ball, team1pos, team2pos, goalStorage, ballpos) -- add goal to team 1/2 score, show "GOAL", animations, teleport ball and players
    setGlobalStorageValue(goalStorage, getGlobalStorageValue(goalStorage)+1)
    if(teleport_players_on_goal) then
        for i = 1 , #team1pos do
            doTeleportThing(getGlobalStorageValue(team1pos[i]), getThingPos(team1pos[i]), TRUE)
        end
        for i = 1 , #team2pos do
            doTeleportThing(getGlobalStorageValue(team2pos[i]), getThingPos(team2pos[i]), TRUE)
        end
    end
    doSendMagicEffect(pos, CONST_ME_BATS)
    doTeleportThing(ball.uid, ballpos, TRUE)
    doSendMagicEffect(ballpos, CONST_ME_MAGIC_GREEN)
    doSendAnimatedText(ballpos, "GOAL!", TEXTCOLOR_TEAL)
end

function footballGetBall(startFromPos, fieldSize) -- get ball uid or create new and return uid, remove all balls from football field (if any exist)
    ball = 0
    for ix = startFromPos.x - fieldSize[1], startFromPos.x + fieldSize[1] do
        for iy = startFromPos.y - fieldSize[2], startFromPos.y + fieldSize[2] do
            tmpBall = getTileItemById({x=ix, y=iy, z=startFromPos.z}, 2109)
            if(tmpBall.uid > 0) then
                if(ball == 0) then
                    ball = tmpBall.uid
                else
                    doRemoveItem(tmpBall.uid)
                end
            end
        end
    end
    if(ball == 0) then
        return doCreateItem(2109, 1, startFromPos)
    else
        return ball
    end
end
    ]]></lib>

    <action fromaid="23301" toaid="23304" event="script"><![CDATA[
        domodlib('football-lib')
function onUse(cid, item, frompos, item2, topos)
    if(item.itemid == 1945 or item.itemid == 1946) then
        match = football_positions_uids[item.actionid-23300]
        if(getGlobalStorageValue(match[1]) < 1) then
            fromPoss = {match[4], match[5]}
            toPoss = {match[6], match[7]}
            players_number = 0
            for i = 1, 2 do
                teamPoss = fromPoss[i]
                for p = 1, #teamPoss do
                    if(isPlayer(getTopCreature(getThingPos(teamPoss[p])).uid) == TRUE) then
                        players_number = players_number + 1
                    end
                end
            end
            if(players_number ~= #fromPoss[1] + #fromPoss[2]) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, #fromPoss[1] + #fromPoss[2] .. " players needed. Only " .. players_number .. " on start positions.")
                return false
            end
            setGlobalStorageValue(match[1], os.time() + match[11] * 60)
            ballPos = getThingPos(match[2])
            doTeleportThing(footballGetBall(getThingPos(match[2]), match[13]), ballPos, TRUE)
            addEvent(doSendAnimatedText, 4000, ballPos, "0!", TEXTCOLOR_TEAL)
            addEvent(doSendAnimatedText, 3000, ballPos, "1", TEXTCOLOR_TEAL)
            addEvent(doSendAnimatedText, 2000, ballPos, "2", TEXTCOLOR_TEAL)
            addEvent(doSendAnimatedText, 1000, ballPos, "3", TEXTCOLOR_TEAL)
            teamOutfit = {}
            for i = 1, 2 do
                teamFromPoss = fromPoss[i]
                teamToPoss = toPoss[i]
                teamOutfit[i] = getCreatureOutfit(getTopCreature(getThingPos(teamFromPoss[1])).uid)
                for p = 1, #teamFromPoss do
                    player = getTopCreature(getThingPos(teamFromPoss[p])).uid
                    setGlobalStorageValue(teamToPoss[p], player)
                    doCreatureSetNoMove(player, 1)
                    addEvent(doCreatureSetNoMove, 4000, player, 0)
                    outfit = getCreatureOutfit(player)
                    outfit.lookHead = teamOutfit[i].lookHead
                    outfit.lookBody = teamOutfit[i].lookBody
                    outfit.lookLegs = teamOutfit[i].lookLegs
                    outfit.lookFeet = teamOutfit[i].lookFeet
                    doSetCreatureOutfit(player, outfit, match[11] * 60 * 1000 + 2500)
                    doTeleportThing(player, getThingPos(teamToPoss[p]), TRUE)
                    doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_ORANGE, "Match start. You are in Team " .. i .. " on field " .. item.actionid-23300 .. ". You have " .. match[11] .. " minutes.")
                end
            end
        else
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Football field in use. Please wait.")
            return false
        end
        return true
    end
    return false
end
    ]]></action>

    <movevent type="AddItem" tileitem="1" fromaid="23300" toaid="23400" event="script"><![CDATA[
            domodlib('football-lib')
function onAddItem(moveitem, tileitem, pos)
    if(moveitem.itemid ~= 2109 and tileitem.actionid <= 23310) then -- remove trash
        match = football_positions_uids[tileitem.actionid-23300]
        exitPos = getThingPos(match[1])
        doSendMagicEffect(exitPos, CONST_ME_BATS)
        doTeleportThing(moveitem.uid, exitPos, TRUE)
    else -- goal or trash (ignore) in gate
        if(moveitem.itemid == 2109 and tileitem.actionid > 23310) then
            for i = 1, #football_positions_uids do
                match = football_positions_uids[i]
                if(match[8] == tileitem.actionid) then
                    footballGoal(pos, moveitem, match[6], match[7], match[3], getThingPos(match[2]))
                    break
                elseif(match[9] == tileitem.actionid) then
                    footballGoal(pos, moveitem, match[6], match[7], match[2], getThingPos(match[3]))
                    break
                end
            end
        end
    end
    return TRUE
end
    ]]></movevent>

            <movevent type="StepIn" fromaid="23300" toaid="23400" event="script"><![CDATA[
                    domodlib('football-lib')
function onStepIn(cid, item, position, fromPosition)
    if(item.actionid <= 23304) then
        match = football_positions_uids[item.actionid-23300]
        if(getCreatureSpeed(cid) ~= match[10]) then
            doRemoveCondition(cid, CONDITION_HASTE)
            doChangeSpeed(cid, match[10] - getCreatureSpeed(cid))
        end
    end
    return TRUE
end
    ]]></movevent>

    <globalevent name="football" interval="5" event="script"><![CDATA[
            domodlib('football-lib')
function onThink(interval, lastExecution)
    for m = 1 , #football_positions_uids do
        match = football_positions_uids[m]
        if(getGlobalStorageValue(match[1]) == -1) then
            for t = match[1], match[12] do
                setGlobalStorageValue(t, 0)
            end
        end
        end_time = getGlobalStorageValue(match[1])
        if(end_time > 0 and end_time < os.time()) then
            toPoss = {match[6], match[7]}
            team_players = {"", ""}
            for i = 1, 2 do
                teamPoss = toPoss[i]
                for p = 1, #teamPoss do
                    team_players[i] = team_players[i] .. getCreatureName(getGlobalStorageValue(teamPoss[p]))
                    if p ~= #teamPoss then
                        team_players[i] = team_players[i] .. ", "
                    end
                end
            end
            score = "Team 1 (" .. team_players[1] .. ") - " .. getGlobalStorageValue(match[2]) .. " : " .. getGlobalStorageValue(match[3]) .. " - (" .. team_players[2] .. ") Team 2"
            doBroadcastMessage("Football field " .. m .. ". " .. score, MESSAGE_STATUS_CONSOLE_BLUE)
            for i = 1, 2 do
                teamPoss = toPoss[i]
                exitPos = getThingPos(match[1])
                for p = 1, #teamPoss do
                    doTeleportThing(getGlobalStorageValue(teamPoss[p]), exitPos, TRUE)
                    doPlayerSendTextMessage(getGlobalStorageValue(teamPoss[p]), MESSAGE_STATUS_CONSOLE_ORANGE, "You were in Team " .. i .. " on field " .. m .. ". " .. score)
                end
            end
            for i = match[1], match[12] do
                setGlobalStorageValue(i, 0)
            end
        end
    end
    return true
end
    ]]></globalevent>
</mod>

Descarga El Campo De Fut Bol : http://www.speedyshare.com/files/24068964/Map.rar

Le Doi Los Creditos A Elexonic 95% y Ami 5% Por Traerselos Al Foro Very Happy Espero Y Les Guste Very Happy


Última edición por God Dunckan el Sáb Mayo 21, 2011 5:37 pm, editado 1 vez
Volver arriba Ir abajo
Dj Pacos
Admin
Admin
Dj Pacos


100

Mensajes : 169
Puntos : 294
Reputación : 56
Fecha de inscripción : 01/05/2011
Edad : 31

[Mod] Football Script  Empty
MensajeTema: Re: [Mod] Football Script    [Mod] Football Script  Icon_minitimeJue Mayo 12, 2011 10:37 am

nunca me gusto este mod.. en fin.. gracias por traerlo Smile
Volver arriba Ir abajo
 
[Mod] Football Script
Volver arriba 
Página 1 de 1.

Permisos de este foro:No puedes responder a temas en este foro.
Dark-Tibia :: Scripts-
Cambiar a: