Retroceder   UASU Foros > Desarrollo (Guias, tutoriales y ayuda) > Programación

Respuesta
 
Herramientas Desplegado
Antiguo 18-nov-2008, 14:54   #1 (permalink)
Matute =)
 
Avatar de Matute_PM
 
Ingreso: mayo-2008
Edad: 17
Mensajes: 106
Puntos: 5.789, Nivel: 8 Puntos: 5.789, Nivel: 8 Puntos: 5.789, Nivel: 8
Nivel máximo: 36% Nivel máximo: 36% Nivel máximo: 36%
Actividad: 4% Actividad: 4% Actividad: 4%
Poder: 39 Matute_PM tiene un aura espectacular a su alrededorMatute_PM tiene un aura espectacular a su alrededorMatute_PM tiene un aura espectacular a su alrededor
Predeterminado [APORTE] Portal Luminoso, onda FuriusAO (FAO)

[APORTE]
Portal Luminoso, onda FuriusAO (FAO)



Portal luminoso:
Bueno, este código lo programé aquella vez para un server y me parece que está bueno compartirlo con gente que tal vez quiera aplicarlo a su servidor..
El modo que utiliza es igual al de Furius, para el que no sabe:
Al lanzar el hechizo se crea un FX sobre el piso target (1), luego de 3 segundos se crea el teleport (2).

1)


2)

...::: Comenzamos :::...

En el módulo Declaraciones, buscamos: Espiado(1 To 10) As Integer, arriva ingresamos:


Código:
'Matute
DondeTiroMap As Integer
DondeTiroX As Integer
DondeTiroY As Integer
TiroPortalL As Integer
'//
Buscamos: Sincroniza As Single y arriva ponemos:
Código:
'Matute
    CreoTeleport As Boolean
    TimeTeleport As Integer
    '//
Buscamos: Dim Andan As Boolean, UI As Integer, i As Integer y abajo agregamos:
Código:
Call PasarSegundo 'matute
Vamos a Extra(GameLogic.bas) y abajo de tooooooooodoo, ponemos:
Código:
'matute
Sub PasarSegundo()
Dim mapa As Integer
Dim X As Integer
Dim Y As Integer
Dim i As Integer
 
'listo, fijate si asi anda...
 
 
        
For i = 1 To LastUser
   mapa = UserList(i).flags.DondeTiroMap
X = UserList(i).flags.DondeTiroX
Y = UserList(i).flags.DondeTiroY
    If UserList(i).Counters.CreoTeleport = True Then  'si el usuario creo un teleport....
        UserList(i).Counters.TimeTeleport = UserList(i).Counters.TimeTeleport + 1 'sumamos 1 cont
 
        If UserList(i).Counters.TimeTeleport = 3 Then 'cuando llega a 3
            Call EraseObj(ToMap, 0, UserList(i).flags.DondeTiroMap, MapData(UserList(i).flags.DondeTiroMap, UserList(i).flags.DondeTiroX, UserList(i).flags.DondeTiroY).OBJInfo.Amount, UserList(i).flags.DondeTiroMap, UserList(i).flags.DondeTiroX, UserList(i).flags.DondeTiroY) 'verificamos que destruye el objeto anterior.
            Dim ET As Obj
            ET.Amount = 1
            ET.OBJIndex = Teleport 'Acá se puede cambiar por su telep personalizado XD
                        
            Call MakeObj(ToMap, 0, UserList(i).POS.Map, ET, UserList(i).flags.DondeTiroMap, UserList(i).flags.DondeTiroX, UserList(i).flags.DondeTiroY)
            MapData(UserList(i).POS.Map, UserList(i).flags.DondeTiroX, UserList(i).flags.DondeTiroY).TileExit.Map = 1 'llevams a ulla
            MapData(UserList(i).POS.Map, UserList(i).flags.DondeTiroX, UserList(i).flags.DondeTiroY).TileExit.X = 50
            MapData(UserList(i).POS.Map, UserList(i).flags.DondeTiroX, UserList(i).flags.DondeTiroY).TileExit.Y = 50
        ElseIf UserList(i).Counters.TimeTeleport >= 10 Then
            UserList(i).flags.TiroPortalL = 0
            UserList(i).Counters.TimeTeleport = 0
            UserList(i).Counters.CreoTeleport = False
            Call EraseObj(ToMap, 0, UserList(i).flags.DondeTiroMap, MapData(UserList(i).flags.DondeTiroMap, UserList(i).flags.DondeTiroX, UserList(i).flags.DondeTiroY).OBJInfo.Amount, UserList(i).flags.DondeTiroMap, UserList(i).flags.DondeTiroX, UserList(i).flags.DondeTiroY) 'verificamos que destruye el objeto anterior.
            MapData(mapa, X, Y).TileExit.Map = 0
            MapData(mapa, X, Y).TileExit.X = 0
            MapData(mapa, X, Y).TileExit.Y = 0
            UserList(i).flags.DondeTiroMap = ""
            UserList(i).flags.DondeTiroX = ""
            UserList(i).flags.DondeTiroY = ""
        End If
    End If
 
Next i
 
End Sub
'matute
Buscamos: Call HechizoTerrenoEstado(UserIndex, B) y abajo ponemos:
Código:
Case uMaterializa 'matute
        Call HechizoMaterializar(UserIndex, B)
En ModHechizos, abajo de toooooodo, ponemos:
Código:
Sub HechizoMaterializar(UserIndex As Integer, B As Boolean)
 
Dim TU As Integer
Dim H As Integer
Dim i As Integer
 
Dim PosTIROTELEPORT As WorldPos 'matute
 
H = UserList(UserIndex).Stats.UserHechizos(UserList(UserIndex).flags.Hechizo)
 
If Hechizos(H).Nombre = "Portal Luminoso" Then
    If UserList(UserIndex).POS.Map = 191 Then Exit Sub 'zona espera
    If UserList(UserIndex).POS.Map = 190 Then Exit Sub 'zonas de "torneo"
    If UserList(UserIndex).POS.Map = 66 Then Exit Sub 'Carcel
    If UserList(UserIndex).flags.TiroPortalL = 1 Then
        Call SendData(ToIndex, UserIndex, 0, "||Tienes un portal invocado" & FONTTYPE_INFO)
        Exit Sub
    End If
    'If UserList(UserIndex).Counters.TimeTeleport <> 0 Then Exit Sub 'Ya invocó.
End If
 
If Hechizos(H).Materializa = 1 Then 'matute
    
    'If UserList(UserIndex).flags.TiroPortalL = True Then Exit Sub
    
    PosTIROTELEPORT.X = UserList(UserIndex).flags.TargetX
    PosTIROTELEPORT.Y = UserList(UserIndex).flags.TargetY
    PosTIROTELEPORT.Map = UserList(UserIndex).flags.TargetMap
    
    UserList(UserIndex).flags.DondeTiroMap = PosTIROTELEPORT.Map
    UserList(UserIndex).flags.DondeTiroX = PosTIROTELEPORT.X
    UserList(UserIndex).flags.DondeTiroY = PosTIROTELEPORT.Y
    
    If MapData(UserList(UserIndex).POS.Map, UserList(UserIndex).flags.TargetX, UserList(UserIndex).flags.TargetY).OBJInfo.OBJIndex Then 'si hay algo...
        Exit Sub
    End If
    
    If MapData(UserList(UserIndex).POS.Map, UserList(UserIndex).flags.TargetX, UserList(UserIndex).flags.TargetY).TileExit.Map Then
        Exit Sub
    End If
    
    If MapData(UserList(UserIndex).POS.Map, UserList(UserIndex).flags.TargetX, UserList(UserIndex).flags.TargetY).Blocked Then
        Exit Sub
    End If
    
    If Not MapaValido(UserList(UserIndex).POS.Map) Or Not InMapBounds(UserList(UserIndex).flags.TargetX, UserList(UserIndex).flags.TargetY) Then Exit Sub
    
    
    Dim ET As Obj
    ET.Amount = 1
    ET.OBJIndex = 778 'veamos asd - [Primer FX que se ve en la imagen 1] -VER OBJ.DAT
    
    
    Call MakeObj(ToMap, UserIndex, UserList(UserIndex).POS.Map, ET, UserList(UserIndex).flags.TargetMap, UserList(UserIndex).flags.TargetX, UserList(UserIndex).flags.TargetY)
    B = True
                        
     UserList(UserIndex).Counters.TimeTeleport = 0
    UserList(UserIndex).Counters.CreoTeleport = True
    UserList(UserIndex).flags.TiroPortalL = 1
End If
 
Call InfoHechizo(UserIndex)
 
End Sub
Buscamos: If UserList(UserIndex).ConnID <> -1 Then Call ApiCloseSocket(UserList(UserIndex).ConnID) y arriva agregamos:
Código:
Call ControlarPortalLum(UserIndex) 'matute
UserList(UserIndex).flags.TiroPortalL = 0
UserList(UserIndex).Counters.TimeTeleport = 0
UserList(UserIndex).Counters.CreoTeleport = False
En ModNuevoTimer, abajo de tooooooooooooodo ponemos:
Código:
Sub ControlarPortalLum(ByVal UserIndex As Integer)
    
    If UserList(UserIndex).Counters.CreoTeleport = True Then
        Call EraseObj(ToMap, 0, UserList(UserIndex).flags.DondeTiroMap, MapData(UserList(UserIndex).flags.DondeTiroMap, UserList(UserIndex).flags.DondeTiroX, UserList(UserIndex).flags.DondeTiroY).OBJInfo.Amount, UserList(UserIndex).flags.DondeTiroMap, UserList(UserIndex).flags.DondeTiroX, UserList(UserIndex).flags.DondeTiroY) 'verificamos que destruye el objeto anterior.
        MapData(UserList(UserIndex).flags.DondeTiroMap, UserList(UserIndex).flags.DondeTiroX, UserList(UserIndex).flags.DondeTiroY).TileExit.Map = 0
        MapData(UserList(UserIndex).flags.DondeTiroMap, UserList(UserIndex).flags.DondeTiroX, UserList(UserIndex).flags.DondeTiroY).TileExit.X = 0
        MapData(UserList(UserIndex).flags.DondeTiroMap, UserList(UserIndex).flags.DondeTiroX, UserList(UserIndex).flags.DondeTiroY).TileExit.Y = 0
        UserList(UserIndex).flags.DondeTiroMap = ""
        UserList(UserIndex).flags.DondeTiroX = ""
        UserList(UserIndex).flags.DondeTiroY = ""
    End If
     
     
End Sub
_______________________________________
Code Terminado

Ahora, vamos a crear los dats.
OBJ.DAT
Código:
[OBJ777]
Name=Portal Luminoso
GrhIndex=609
Valor=1234567
Crucial=1
HechizoIndex=46
Objtype=24
 
[OBJ778]
Name=Iniciando Portal...
GrhIndex=123
Agarrable=1
ObjType=19
HECHIZOS.DAT
Código:
[HECHIZO46]
Nombre=Portal Luminoso
Desc=Invocar Portal Luminoso
PalabrasMagicas=M3
HechizeroMsg=Has invocado un Portal Luminoso
WAV=107
Tipo=3
Invoca=0
Cant=1
Materializa=1
MinSkill=100
ManaRequerido=1000
StaRequerido=130
Target=4
Baculo=2
NOTAS:
*Al cambiar el número de objeto, van a tener que modificar una pequeñísima parte del código.
*Modificar OBJXX y HECHIZOSXX por su valor XX correspondiente.
__________________
Matute - Programador
Matute_PM está desconectado  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Responder Citando
Estos 2 Usuarios han agradecido a Matute_PM Por este util Tema:
KoTox (18-nov-2008), Petin (18-nov-2008)
Sponsored Links
Antiguo 18-nov-2008, 15:01   #2 (permalink)
Calor para encender.
Moderador de Foro
 
Avatar de Lobby
 
Ingreso: julio-2008
Ubicación: Mi caja musical
Edad: 16
Mensajes: 1.789
Puntos: 32.770, Nivel: 27 Puntos: 32.770, Nivel: 27 Puntos: 32.770, Nivel: 27
Nivel máximo: 34% Nivel máximo: 34% Nivel máximo: 34%
Actividad: 74% Actividad: 74% Actividad: 74%
El usuario posee 1x Acceso Vip
Poder: 403 Lobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la fama
Predeterminado

Muy bueno matute=).

Ahí si está todo bien jaja.
__________________
"Si no te veo con una foto de Mussolini voy a tu casa y te pego hasta hacerte jabon." - Alric

[Solo Miembros registrados ven los enlaces. ]
Estamos reclutando maestros! =)

[Solo Miembros registrados ven los enlaces. ]
Lobby está desconectado  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Responder Citando
Antiguo 18-nov-2008, 18:48   #3 (permalink)
Matute =)
 
Avatar de Matute_PM
 
Ingreso: mayo-2008
Edad: 17
Mensajes: 106
Puntos: 5.789, Nivel: 8 Puntos: 5.789, Nivel: 8 Puntos: 5.789, Nivel: 8
Nivel máximo: 36% Nivel máximo: 36% Nivel máximo: 36%
Actividad: 4% Actividad: 4% Actividad: 4%
Poder: 39 Matute_PM tiene un aura espectacular a su alrededorMatute_PM tiene un aura espectacular a su alrededorMatute_PM tiene un aura espectacular a su alrededor
Predeterminado

jaja, gracias
__________________
Matute - Programador
Matute_PM está desconectado  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Responder Citando
Antiguo 18-nov-2008, 19:17   #4 (permalink)
$0µL |-|µñTêr
 
Avatar de Tidius
 
Ingreso: octubre-2007
Ubicación: Bs. As. Hurlingham
Mensajes: 900
Puntos: 30.476, Nivel: 25 Puntos: 30.476, Nivel: 25 Puntos: 30.476, Nivel: 25
Nivel máximo: 99% Nivel máximo: 99% Nivel máximo: 99%
Actividad: 23% Actividad: 23% Actividad: 23%
El usuario posee 1x Acceso Vip
Poder: 293 Tidius tiene un brillante futuroTidius tiene un brillante futuroTidius tiene un brillante futuroTidius tiene un brillante futuroTidius tiene un brillante futuroTidius tiene un brillante futuroTidius tiene un brillante futuroTidius tiene un brillante futuroTidius tiene un brillante futuroTidius tiene un brillante futuroTidius tiene un brillante futuro
Predeterminado

MATUTE Rlz Ya lo pruebo
__________________

Haceme un click, mandame un pm y te clickeo
Dejen de editarme la firma T.T
Tidius esta en línea ahora  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Responder Citando
Antiguo 18-nov-2008, 21:19   #5 (permalink)
100% Negro Cumbiero
Administrador
 
Avatar de KoTox
 
Ingreso: octubre-2007
Ubicación: Villa Madero
Edad: 18
Mensajes: 1.689
Puntos: 18.994, Nivel: 18 Puntos: 18.994, Nivel: 18 Puntos: 18.994, Nivel: 18
Nivel máximo: 80% Nivel máximo: 80% Nivel máximo: 80%
Actividad: 59% Actividad: 59% Actividad: 59%
El usuario posee 1x Acceso Vip El usuario posee 1x Acceso a la Zona VIP
Poder: 236 KoTox es un glorioso faro de luzKoTox es un glorioso faro de luzKoTox es un glorioso faro de luzKoTox es un glorioso faro de luzKoTox es un glorioso faro de luzKoTox es un glorioso faro de luz
Predeterminado

Este codigo Creo que lo vi en el viejo CodigosAO, CREO.

Igual Matute Aportazo, mejoraste mucho desde que te conocí. =D
KoTox está desconectado  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Responder Citando
Sponsored links
Respuesta

Marcadores

Herramientas
Desplegado

Normas de Publicación
No puedes crear nuevos temas
No puedes responder temas
No puedes subir archivos adjuntos
No puedes editar tus mensajes

BB code is Activado
caritas están Activado
[IMG] está Activado
Código HTML está Desactivado
Trackbacks are Desactivado
Pingbacks are Desactivado
Refbacks are Desactivado
Ir al Foro

Te recomendamos visitar estos sitios

PasionChat  Blogs  UASU lite  El Foro Latino  Argentum Online  Host Gratis  Bazar de dominios


La franja horaria es GMT -5. Ahora son las 18:00.



Desarrollado por: vBulletin® Versión 3.7.5
Derechos de Autor ©2000 - 2009, Jelsoft Enterprises Ltd.
Traducido por mcloud
Copyright UASU Group - Azmum Multimedios 2002-2008Ad Management by RedTyger
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.