OTServ
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.
Dirección Ip
[MoveEvent] Captura la bandera system [8.54-8.60] 3
Conectarse

Recuperar mi contraseña

Buscar
 
 

Resultados por:
 

 


Rechercher Búsqueda avanzada

Mejores posteadores
XxStroksxX (463)
[MoveEvent] Captura la bandera system [8.54-8.60] Vote1111[MoveEvent] Captura la bandera system [8.54-8.60] Vote2111[MoveEvent] Captura la bandera system [8.54-8.60] Vote3111 
~*~[:Đαяќ:]~[:тιβια:]~*~ (366)
[MoveEvent] Captura la bandera system [8.54-8.60] Vote1111[MoveEvent] Captura la bandera system [8.54-8.60] Vote2111[MoveEvent] Captura la bandera system [8.54-8.60] Vote3111 
spoor (83)
[MoveEvent] Captura la bandera system [8.54-8.60] Vote1111[MoveEvent] Captura la bandera system [8.54-8.60] Vote2111[MoveEvent] Captura la bandera system [8.54-8.60] Vote3111 
Dj Pacos (73)
[MoveEvent] Captura la bandera system [8.54-8.60] Vote1111[MoveEvent] Captura la bandera system [8.54-8.60] Vote2111[MoveEvent] Captura la bandera system [8.54-8.60] Vote3111 
God Skit (68)
[MoveEvent] Captura la bandera system [8.54-8.60] Vote1111[MoveEvent] Captura la bandera system [8.54-8.60] Vote2111[MoveEvent] Captura la bandera system [8.54-8.60] Vote3111 
GoD MexicanSoul (40)
[MoveEvent] Captura la bandera system [8.54-8.60] Vote1111[MoveEvent] Captura la bandera system [8.54-8.60] Vote2111[MoveEvent] Captura la bandera system [8.54-8.60] Vote3111 
fuzzy (35)
[MoveEvent] Captura la bandera system [8.54-8.60] Vote1111[MoveEvent] Captura la bandera system [8.54-8.60] Vote2111[MoveEvent] Captura la bandera system [8.54-8.60] Vote3111 
Eddie (31)
[MoveEvent] Captura la bandera system [8.54-8.60] Vote1111[MoveEvent] Captura la bandera system [8.54-8.60] Vote2111[MoveEvent] Captura la bandera system [8.54-8.60] Vote3111 
GOD Chimito (30)
[MoveEvent] Captura la bandera system [8.54-8.60] Vote1111[MoveEvent] Captura la bandera system [8.54-8.60] Vote2111[MoveEvent] Captura la bandera system [8.54-8.60] Vote3111 
conalep1996 (23)
[MoveEvent] Captura la bandera system [8.54-8.60] Vote1111[MoveEvent] Captura la bandera system [8.54-8.60] Vote2111[MoveEvent] Captura la bandera system [8.54-8.60] Vote3111 

Últimos temas
» [???] [Super Naruto OT]
[MoveEvent] Captura la bandera system [8.54-8.60] Icon_m10Lun Jun 08, 2015 12:08 pm por keishmer91

» [ACTION] God/GM da item a un player
[MoveEvent] Captura la bandera system [8.54-8.60] Icon_m10Mar Dic 02, 2014 12:53 pm por hecmanos

» [8.60] Nuevo War Thais By TheRobertxon
[MoveEvent] Captura la bandera system [8.54-8.60] Icon_m10Vie Jun 20, 2014 10:56 am por luismc

» [7.92]Naruto Final Story!
[MoveEvent] Captura la bandera system [8.54-8.60] Icon_m10Dom Mayo 26, 2013 2:40 am por ricardotuck

» [9.1] Fun Server
[MoveEvent] Captura la bandera system [8.54-8.60] Icon_m10Mar Mayo 14, 2013 5:32 pm por skifer

» [9.1] The Forgotten Server v0.2.11pl2 (Mystic Spirit)
[MoveEvent] Captura la bandera system [8.54-8.60] Icon_m10Mar Mayo 14, 2013 5:29 pm por skifer

» New Map 8.60 (Darksystem) By: Turock & Gilio LIsto Arreglado El
[MoveEvent] Captura la bandera system [8.54-8.60] Icon_m10Mar Mayo 07, 2013 5:27 pm por tonyso

» Ocean Clasic Global Map 8.6
[MoveEvent] Captura la bandera system [8.54-8.60] Icon_m10Miér Mayo 01, 2013 11:19 pm por maganiua

» ayuda a abrir puertos
[MoveEvent] Captura la bandera system [8.54-8.60] Icon_m10Lun Abr 29, 2013 5:58 pm por XxStroksxX

» [8.60] Speedy War
[MoveEvent] Captura la bandera system [8.54-8.60] Icon_m10Dom Abr 28, 2013 5:51 pm por Sunnade'Audio

Upload Images
ImagesHack
Scanner
VirusTotal

[MoveEvent] Captura la bandera system [8.54-8.60]

2 participantes

Ir abajo

[MoveEvent] Captura la bandera system [8.54-8.60] Empty [MoveEvent] Captura la bandera system [8.54-8.60]

Mensaje por ~*~[:Đαяќ:]~[:тιβια:]~*~ Dom Ene 30, 2011 2:00 pm

Aqui les dejo el script empezemos

El script que modifique funciona sin equipos.

En MoveEvents/script crean flag.lua y agregan esto:

Código:
local t = {
  flag = 15000
}
local function repeatFlagOnPlayer(cid)
  local p = getThingPos(cid)
  local poss = {
      {pos = {x = p.x + 2, y = p.y - 2, z = p.z}, delay = 300},
      {pos = {x = p.x + 2, y = p.y + 2, z = p.z}, delay = 300},
      {pos = {x = p.x - 2, y = p.y + 2, z = p.z}, delay = 300},
      {pos = {x = p.x - 2, y = p.y, z = p.z}, delay = 300},
      {pos = {x = p.x - 2, y = p.y - 2, z = p.z}, delay = 300},
      {pos = {x = p.x, y = p.y - 2, z = p.z}, delay = 300}
  }
local effects = {27, 28, 29, 30}
if isPlayer(cid) then
if getPlayerStorageValue(cid, t.flag) == 1 and getGlobalStorageValue(t.flag) == 1 then
for i = 1, 6 do
addEvent(doSendDistanceShoot, poss[i].delay, poss[i].pos, p, CONST_ME_FIREWORK_YELLOW)
end
for i = 1, 4 do
addEvent(doSendMagicEffect, 1000, getThingPos(cid), effects[i])
end
return addEvent(repeatFlagOnPlayer, 1000, cid)
  else
      return false
  end 
end
end     
function onStepIn(cid, item, position, fromPosition, toPosition, lastPosition, actor)
  if isPlayer(cid) then
      if item.actionid == 6000 then
      if getPlayerStorageValue(cid, t.flag) == 1 and getGlobalStorageValue(t.flag) == 1 then
  doPlayerSendCancel(cid,'you have the flag.')
  doTeleportThing(cid, fromPosition, false)
  else
      setPlayerStorageValue(cid, t.flag, 1)
      setGlobalStorageValue(t.flag, 1)
      repeatFlagOnPlayer(cid)
      doBroadcastMessage(getCreatureName(cid) .. " has stolen the Flag!")
      end
else
doPlayerSendCancel(cid,'The flag is not at home.')
doTeleportThing(cid, fromPosition, false)
end
end
if item.actionid == 6002 then
if getPlayerStorageValue(cid, t.flag) == 1 then
setGlobalStorageValue(t.flag, -1)
setPlayerStorageValue(cid, t.flag, -1)
doBroadcastMessage(getCreatureName(cid) .. " is great put the flag in the base!")
else
doPlayerSendCancel(cid,'You dont have the flag.')
doTeleportThing(cid, fromPosition, false)
end
end
  return true
end

En movevent.xml agregan esto:

Código:
<!-- Flag -->
  <movevent type="StepIn" actionid="6000;6002" event="script" value="flag.lua"/>

[MoveEvent] Captura la bandera system [8.54-8.60] Ctfz

Aqui les dejo el script original:

Código:
local t =  {
        redStorage = 15000,
        blueStorage = 15001,
        redFlag = 18000,
        blueFlag = 18001,
        redGoal = 19000,
        blueGoal = 19001,
        fromPos = {x = 982, y = 1022, z = 7},
        toPos = {x = 993, y = 1033, z = 7}
}
local function getPlayers()
        local thisTable = {}
        for x = t.fromPos.x, t.toPos.x do
                for y = t.fromPos.y, t.toPos.y do
                        for z = t.fromPos.z, t.toPos.z do
                                local myPos = {x = x, y = y, z = z}
                                local player = getTopCreature(myPos).uid
                                if player > 0 then table.insert(thisTable, player) else table.remove(thisTable, player) end
                        end
                end
        end
        return {thisTable = thisTable}
end
local function repeatFlagOnPlayer(cid)
        local k = getThingPos(cid)
        local r = {
                {pos = {x = k.x + 2, y = k.y - 2, z = k.z}, delay = 300},
                {pos = {x = k.x + 2, y = k.y + 2, z = k.z}, delay = 300},
                {pos = {x = k.x - 2, y = k.y + 2, z = k.z}, delay = 300},
                {pos = {x = k.x - 2, y = k.y, z = k.z}, delay = 300},
                {pos = {x = k.x - 2, y = k.y - 2, z = k.z}, delay = 300},
                {pos = {x = k.x, y = k.y - 2, z = k.z}, delay = 300}
        }
        local effects = {27, 28, 29, 30}
        if isPlayer(cid) then
                if getPlayerStorageValue(cid, t.blueStorage) == 1 and getPlayerStorageValue(cid, t.redFlag) == 1 and getGlobalStorageValue(t.redFlag) == 1 then
                        for i = 1, 6 do
                                addEvent(doSendDistanceShoot, r[i].delay, r[i].pos, k, CONST_ME_FIREWORK_YELLOW)
                        end
                        for i = 1, 4 do
                                addEvent(doSendMagicEffect, 1000, getThingPos(cid), effects[i])
                        end
                        return addEvent(repeatFlagOnPlayer, 1000, cid)
                elseif getPlayerStorageValue(cid, t.redStorage) == 1 and getPlayerStorageValue(cid, t.blueFlag) == 1 and getGlobalStorageValue(t.blueFlag) == 1 then
                        for i = 1, 6 do
                                addEvent(doSendDistanceShoot, r[i].delay, r[i].pos, k, CONST_ME_FIREWORK_YELLOW)
                        end
                        for i = 1, 4 do
                                addEvent(doSendMagicEffect, 1000, getThingPos(cid), effects[i])
                        end
                        return addEvent(repeatFlagOnPlayer, 1000, cid)
                else
                        return false
                end
        else
                return false
        end
end
function onStepIn(cid, item, position, fromPosition, toPosition, lastPosition, actor)
        if isPlayer(cid) then
                if item.actionid == 6000 then
                        if getPlayerStorageValue(cid, t.redStorage) == 1 then
                                if getPlayerStorageValue(cid, t.blueFlag) == -1 and getGlobalStorageValue(t.blueFlag) == -1 then
                                        setPlayerStorageValue(cid, t.blueFlag, 1)
                                        setGlobalStorageValue(t.blueFlag, 1)
                                        repeatFlagOnPlayer(cid)
                                        doBroadcastMessage(getCreatureName(cid) .. " has stolen the Blue Flag!")
                                else
                                        doCreatureSay(cid, "The flag is not at home.", 19)
                                        doTeleportThing(cid, fromPosition, false)
                                end
                        else
                                doCreatureSay(cid, "You may only pick up the opposite team flag.", 19)
                                doTeleportThing(cid, fromPosition, false)
                        end
                elseif item.actionid == 6001 then
                        if getPlayerStorageValue(cid, t.blueStorage) == 1 then
                                if getPlayerStorageValue(cid, t.redFlag) == -1 and getGlobalStorageValue(t.redFlag) == -1 then
                                        setPlayerStorageValue(cid, t.redFlag, 1)
                                        setGlobalStorageValue(t.redFlag, 1)
                                        repeatFlagOnPlayer(cid)
                                        doBroadcastMessage(getCreatureName(cid) .. " has stolen the Red flag!")
                                else
                                        doCreatureSay(cid, "The flag is not at home.", 19)
                                        doTeleportThing(cid, fromPosition, false)
                                end
                        else
                                doCreatureSay(cid, "The flag is not at home.", 19)
                                doTeleportThing(cid, fromPosition, false)
                        end
                end
                if item.actionid == 6002 then
                        if getPlayerStorageValue(cid, t.redStorage) == 1 then
                                if getPlayerStorageValue(cid, t.blueFlag) == 1 and getGlobalStorageValue(t.blueFlag) == 1 then
                                        setGlobalStorageValue(t.blueFlag, -1)
                                        setPlayerStorageValue(cid, t.blueFlag, -1)
                                        setGlobalStorageValue(t.redGoal, getGlobalStorageValue(t.redGoal)+1)
                                        doBroadcastMessage("Current CTF Game Score:\nRed Team: " .. getGlobalStorageValue(t.redGoal) .. "\nBlue Team: " .. getGlobalStorageValue(t.blueGoal) .. "\nTen Scores to win!", 20)
                                        doBroadcastMessage(getCreatureName(cid) .. " has scored 1 point for the Red Team!")
                                else
                                        doCreatureSay(cid, "You dont have the flag.", 19)
                                        doTeleportThing(cid, fromPosition, false)
                                end
                        elseif getPlayerStorageValue(cid, t.blueStorage) == 1 then
                                if getPlayerStorageValue(cid, t.redFlag) == 1 and getGlobalStorageValue(t.redFlag) == 1 then
                                        setGlobalStorageValue(t.redFlag, -1)
                                        setPlayerStorageValue(cid, t.redFlag, -1)
                                        setGlobalStorageValue(t.blueGoal, getGlobalStorageValue(t.blueGoal)+1)
                                        doBroadcastMessage("Current CTF Game Score:\nRed Team: " .. getGlobalStorageValue(t.redGoal) .. "\nBlue Team: " .. getGlobalStorageValue(t.blueGoal) .. "\nTen Scores to win!", 20)
                                        doBroadcastMessage(getCreatureName(cid) .. " has scored 1 point for the Blue Team!")
                                else
                                        doCreatureSay(cid, "You dont have the flag.", 19)
                                        doTeleportThing(cid, fromPosition, false)
                                end
                        end
                        if getGlobalStorageValue(t.blueGoal) == 10 and getGlobalStorageValue(t.redGoal) < 10 then
                                for _, cid in ipairs(getPlayersOnline()) do
                                        if getPlayerStorageValue(cid, t.blueStorage) == 1 then
                                                setPlayerStorageValue(cid, t.blueStorage, -1)
                                                doPlayerAddItem(cid, 9020, math.random(1, 6))
                                        elseif getPlayerStorageValue(cid, t.redStorage) == 1 then
                                                setPlayerStorageValue(cid, t.redStorage, -1)
                                        end
                                        doRemoveCondition(cid, CONDITION_OUTFIT)
                                        setGlobalStorageValue(t.redGoal, 0)
                                        setGlobalStorageValue(t.blueGoal, 0)
                                end
                                local FF = getPlayers().thisTable
                                if #FF > 1 then
                                        for _, hh in ipairs(FF) do
                                                doTeleportThing(hh, getTownTemplePosition(getPlayerTown(hh)), true)
                                        end
                                end
                        elseif getGlobalStorageValue(t.redGoal) == 10 and getGlobalStorageValue(t.blueGoal) < 10 then
                                for _, cid in ipairs(getPlayersOnline()) do
                                        if getPlayerStorageValue(cid, t.redStorage) == 1 then
                                                setPlayerStorageValue(cid, t.redStorage, -1)
                                                doPlayerAddItem(cid, 9020, math.random(1, 6))
                                        elseif getPlayerStorageValue(cid, t.blueStorage) == 1 then
                                                setPlayerStorageValue(cid, t.blueStorage, -1)
                                        end
                                        doRemoveCondition(cid, CONDITION_OUTFIT)
                                        setGlobalStorageValue(t.redGoal, 0)
                                        setGlobalStorageValue(t.blueGoal, 0)
                                end
                                local F = getPlayers().thisTable
                                if #F > 1 then
                                        for _, h in ipairs(F) do
                                                doTeleportThing(h, getTownTemplePosition(getPlayerTown(h)), true)
                                        end
                                end
                        end
                end
        else
                doRemoveCreature(cid)
        end
        return true
end


Última edición por ~*~[Dark]~[Tibia]~*~ el Dom Ene 30, 2011 2:12 pm, editado 2 veces
~*~[:Đαяќ:]~[:тιβια:]~*~
~*~[:Đαяќ:]~[:тιβια:]~*~

+ Moderador +
+ Moderador +

*~Elder Wolf~*
Masculino Mexico Virgo Cerdo
Chrome
Edad Edad : 28
Mensajes Mensajes : 366
Localización Localización : :O ala versh XD
Fecha de inscripción Fecha de inscripción : 29/01/2011

http://www.chaosserv.no-ip.info

Volver arriba Ir abajo

[MoveEvent] Captura la bandera system [8.54-8.60] Empty Re: [MoveEvent] Captura la bandera system [8.54-8.60]

Mensaje por XxStroksxX Dom Ene 30, 2011 2:02 pm

Diossssssss te has lucido y las imagenes?
XxStroksxX
XxStroksxX

+ Administrador +
+ Administrador +

¡Sorcerer Rapero!
Masculino España Géminis Cerdo
Chrome
Edad Edad : 28
Mensajes Mensajes : 463
Localización Localización : Barcelona
Fecha de inscripción Fecha de inscripción : 01/08/2010

Hoja de personaje
Personaje: Khail Phount
Vocation: Knight
Mundo: Infernia

http://www.otserv.biz/

Volver arriba Ir abajo

[MoveEvent] Captura la bandera system [8.54-8.60] Empty Re: [MoveEvent] Captura la bandera system [8.54-8.60]

Mensaje por ~*~[:Đαяќ:]~[:тιβια:]~*~ Dom Ene 30, 2011 2:08 pm

madre santa! xD x] orita la arreglo
~*~[:Đαяќ:]~[:тιβια:]~*~
~*~[:Đαяќ:]~[:тιβια:]~*~

+ Moderador +
+ Moderador +

*~Elder Wolf~*
Masculino Mexico Virgo Cerdo
Chrome
Edad Edad : 28
Mensajes Mensajes : 366
Localización Localización : :O ala versh XD
Fecha de inscripción Fecha de inscripción : 29/01/2011

http://www.chaosserv.no-ip.info

Volver arriba Ir abajo

[MoveEvent] Captura la bandera system [8.54-8.60] Empty Re: [MoveEvent] Captura la bandera system [8.54-8.60]

Mensaje por ~*~[:Đαяќ:]~[:тιβια:]~*~ Dom Ene 30, 2011 2:12 pm

ya we xD
~*~[:Đαяќ:]~[:тιβια:]~*~
~*~[:Đαяќ:]~[:тιβια:]~*~

+ Moderador +
+ Moderador +

*~Elder Wolf~*
Masculino Mexico Virgo Cerdo
Chrome
Edad Edad : 28
Mensajes Mensajes : 366
Localización Localización : :O ala versh XD
Fecha de inscripción Fecha de inscripción : 29/01/2011

http://www.chaosserv.no-ip.info

Volver arriba Ir abajo

[MoveEvent] Captura la bandera system [8.54-8.60] Empty Re: [MoveEvent] Captura la bandera system [8.54-8.60]

Mensaje por Contenido patrocinado


Contenido patrocinado


Volver arriba Ir abajo

Volver arriba

- Temas similares

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