| | #1 (permalink) | |||||||||||
| Matute =) Ingreso: mayo-2008 Edad: 17
Mensajes: 106
Poder: 39 ![]() ![]() ![]() | 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 '// Código: Call PasarSegundo 'matute 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
Código: Case uMaterializa 'matute
Call HechizoMaterializar(UserIndex, B)
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
Código: Call ControlarPortalLum(UserIndex) 'matute UserList(UserIndex).flags.TiroPortalL = 0 UserList(UserIndex).Counters.TimeTeleport = 0 UserList(UserIndex).Counters.CreoTeleport = False 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 Código: [HECHIZO46] Nombre=Portal Luminoso Desc=Invocar Portal Luminoso PalabrasMagicas=M3$KapÉ 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 *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 | |||||||||||
| |
| Sponsored Links |
![]() |
| Marcadores |
| Herramientas | |
| Desplegado | |
|
|
Te recomendamos visitar estos sitios
|