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



 
ÍndiceIndiceÚltimas imágenesBuscarRegistrarseConectarseReglamento
¿Quién está en línea?
En total hay 1 usuario en línea: 0 Registrados, 0 Ocultos y 1 Invitado

Ninguno

El record de usuarios en línea fue de 22 durante el Lun Jun 08, 2020 2:43 am
Mejores posteadores
Rango
Sistema de tormentas 13.0 Vote_lcapSistema de tormentas 13.0 Voting_barSistema de tormentas 13.0 Vote_rcap 
Habauc
Sistema de tormentas 13.0 Vote_lcapSistema de tormentas 13.0 Voting_barSistema de tormentas 13.0 Vote_rcap 
Trogclodita
Sistema de tormentas 13.0 Vote_lcapSistema de tormentas 13.0 Voting_barSistema de tormentas 13.0 Vote_rcap 
WhoTeR
Sistema de tormentas 13.0 Vote_lcapSistema de tormentas 13.0 Voting_barSistema de tormentas 13.0 Vote_rcap 
Tomm-
Sistema de tormentas 13.0 Vote_lcapSistema de tormentas 13.0 Voting_barSistema de tormentas 13.0 Vote_rcap 
ZankuR
Sistema de tormentas 13.0 Vote_lcapSistema de tormentas 13.0 Voting_barSistema de tormentas 13.0 Vote_rcap 
GM-PekeMixz
Sistema de tormentas 13.0 Vote_lcapSistema de tormentas 13.0 Voting_barSistema de tormentas 13.0 Vote_rcap 
LuciMoyo
Sistema de tormentas 13.0 Vote_lcapSistema de tormentas 13.0 Voting_barSistema de tormentas 13.0 Vote_rcap 
MwM
Sistema de tormentas 13.0 Vote_lcapSistema de tormentas 13.0 Voting_barSistema de tormentas 13.0 Vote_rcap 
Diclut s2 Lalaa♥
Sistema de tormentas 13.0 Vote_lcapSistema de tormentas 13.0 Voting_barSistema de tormentas 13.0 Vote_rcap 
Estadísticas
Tenemos 98 miembros registrados
El último usuario registrado es Stephelinmu

Nuestros miembros han publicado un total de 1289 mensajes en 264 argumentos.

 

 Sistema de tormentas 13.0

Ir abajo 
AutorMensaje
ZankuR
Director
Director
ZankuR


Cantidad de envíos : 107
Fecha de inscripción : 19/07/2013

Sistema de tormentas 13.0 Empty
MensajeTema: Sistema de tormentas 13.0   Sistema de tormentas 13.0 Icon_minitimeDom Ago 11, 2013 1:36 pm

por si no entendieron :

Cada el tiempo que quieran ustedes (en este ejemplo 1 hora) , una "Tormenta" , que se elige el tipo random, puede ser "Apocaliptica (?)", "Eléctrica" ó "De fuego" se eligirá unas cordenadas al azar, y en esas cordenadas caerá un FX, como bien vieron en las fotos, ha, y si hay un usuario "Call UserDie" , osea PUM , muerto.

cliente :

agregan al final del modulo tileengine

Código:
Public Sub SetFX(ByVal X As Integer, ByVal Y As Integer, ByVal Fx As Integer, ByVal LOOPS As Integer)
 
MapData(X, Y).FxI = Fx
 
InitGrh MapData(X, Y).Fx, FxData(Fx).Animacion
 
End Sub
agregan al type Mapblock

Código:
 FxI as integer
  Fx as grh
ahora buscan

Código:
'Char layer ************************************
                If .CharIndex <> 0 Then
                    Call CharRender(.CharIndex, PixelOffsetXTemp, PixelOffsetYTemp)
                End If
                '*************************************************
arriba ponen

Código:
If .FxI > 0 Then
                DDrawTransGrhtoSurface .Fx, PixelOffsetXTemp, PixelOffsetYTemp, 1, 1
                End If
agregan esto al final del protocol.bas

Código:
Private Sub HandleSendTorment()
With incomingData
 
Call .ReadByte
 
Dim PosX As Byte
Dim Posy As Byte
Dim Fx As Byte
Dim Loopx As Byte
Dim Destroy As Boolean
PosX = .ReadByte
Posy = .ReadByte
Fx = .ReadByte
Loopx = .ReadInteger
Destroy = .ReadBoolean
 
If Not Destroy Then
MapData(PosX, Posy).FxI = 0
Else
SetFX CInt(PosX), CInt(Posy), CInt(Fx), Loopx
End If
 
End With
 
End Sub
buscamos

Código:
Case ServerPacketID.RainToggle              ' LLU
            Call HandleRainToggle
abajo va:

Código:
Case ServerPacketID.SendTORMENT
            Call HandleSendTorment
buscamos:

Código:
RainToggle              ' LLU
Abajo

Código:
SendTORMENT            ' SND
servidor.

repetimos el anterior paso, osea.

buscamos

Código:
 RainToggle              ' LLU
Abajo

Código:
SendTORMENT            ' SND
ahora buscamos

Código:
Public Function PrepareMessagePauseToggle() As String
'***************************************************
'Author: Juan Martín Sotuyo Dodero (Maraxus)
'Last Modification: 05/17/06
'Prepares the "PauseToggle" message and returns it
'***************************************************
    With auxiliarBuffer
        Call .WriteByte(ServerPacketID.PauseToggle)
        PrepareMessagePauseToggle = .ReadASCIIStringFixed(.length)
    End With
End Function
abajo de su "End Function" ponemos

Código:
Public Function PrepareSendTorment(ByVal X As Byte, ByVal Y As Byte, ByVal FXZ As Byte, ByVal LOOPX As Integer) As String
With auxiliarBuffer
 
Call .WriteByte(ServerPacketID.SendTorment)
Call .WriteByte(X)
Call .WriteByte(Y)
Call .WriteByte(FXZ)
Call .WriteInteger(LOOPX)
Call .WriteBoolean(Tormenta)
 
PrepareSendTorment = .ReadASCIIStringFixed(.length)
 
End With
 
End Function
ahora buscaremos el

Código:
Sub PasarSegundo()
y abajo de eso, pondremos

Código:
If faltaTormenta > 0 then
faltatormenta = faltatormenta + 1
if faltatormenta >= 60 then
subtormenta
faltatormenta=0
end if
end if
en el módulo declaraciones, pondremos

Código:
Public Tormenta as boolean
Public FaltaTormenta as byte
agregan esto en algún módulo..

Código:
Sub SubTormenta()
 
Dim X As Byte
Dim Y As Byte
Dim TmpFX As Byte
Dim Loops As Integer
Dim RandC As Integer
Dim ArrayK(7 To 13) As String
ArrayK(7) = "La tormenta de fuego"
ArrayK(11) = "La tormenta eléctrica"
ArrayK(13) = "La tormenta apocalíptica"
RandC = Ciudades(RandomNumber(1, 5)).map
X = RandomNumber(35, 55)
Y = RandomNumber(35, 55)
 
If RandomNumber(1, 3) = 1 Then
'Tormenta eléctrica o.O
TmpFX = 11
ElseIf RandomNumber(1, 3) = 2 Then
'tormenta fuego xd
TmpFX = 7
Else
'tormenta apocaliptica :P
TmpFX = 13
End If
 
Loops = 100
 
Tormenta = Not Tormenta
 
SendData SendTarget.toMap, 1, PrepareSendTorment(X, Y, TmpFX, Loops)
 
If MapData(RandC, X, Y).UserIndex > 0 Then 'ups, lo shiento!
UserDie UserIndex
WriteConsoleMsg UserIndex, ArrayK(TmpFX) & " Te ha matado!!", FontTypeNames.FONTTYPE_GUILD
End If
 
End Sub
FUENTE GS-ZONE
Volver arriba Ir abajo
 
Sistema de tormentas 13.0
Volver arriba 
Página 1 de 1.
 Temas similares
-
» Sistema de votos
» Sistema de Suicidio
» ¡Nuevo sistema de party! (con porcentajes etc etc)
» Sistema de Gran poder (don ) para 0.11.5
» Sistema Global con anti Flodeo!

Permisos de este foro:No puedes responder a temas en este foro.
 :: Argentum Online :: Talleres Taller Argentum :: Programación-
Cambiar a: