Antiguo 13-nov-2008, 12:12   #1 (permalink)
EduCanDo a La Competencia
 
Avatar de agush
 
Ingreso: junio-2008
Ubicación: Con Tu Novia
Mensajes: 223
Puntos: 7.169, Nivel: 9 Puntos: 7.169, Nivel: 9 Puntos: 7.169, Nivel: 9
Nivel máximo: 61% Nivel máximo: 61% Nivel máximo: 61%
Actividad: 7% Actividad: 7% Actividad: 7%
Poder: 56 agush es como un diamante en brutoagush es como un diamante en brutoagush es como un diamante en bruto
Predeterminado [APORTE] Sistema de Castillos AodraG

Sistema de Castillos Aodrag :


.SERVER.

En Declaraciones abajo de

Código:
Public CrcSubKey As String

Agregamos :

Código:
Public castillo1 As String
Public castillo2 As String
Public castillo3 As String
Public castillo4 As String
Public fortaleza As String
Public hora1 As String
Public hora2 As String
Public hora3 As String
Public hora4 As String
Public hora5 As String
Public date1 As String
Public date2 As String
Public date3 As String
Public date4 As String
Public date5 As String

Arriva de :

Código:
Public Const NUMSKILLS
ponemos:

Código:
Public Const mapa_castillo1 = XX
Public Const mapa_castillo2 = XX
Public Const mapa_castillo3 = XX
Public Const mapa_castillo4 = XX
(Donde XX es el número del mapa.)

En el módulo "ES" buscamos:

Código:
ServerSoloGMs = val(GetVar(IniPath & "Server.ini", "init", "ServerSoloGMs"))

Y debajo agregamos:

Código:
'castillos clanes
castillo1 = GetVar(IniPath & "castillos.txt", "INIT", "Castillo1")
castillo2 = GetVar(IniPath & "castillos.txt", "INIT", "Castillo2")
castillo3 = GetVar(IniPath & "castillos.txt", "INIT", "Castillo3")
castillo4 = GetVar(IniPath & "castillos.txt", "INIT", "Castillo4")
fortaleza = GetVar(IniPath & "castillos.txt", "INIT", "fortaleza")
hora1 = GetVar(IniPath & "castillos.txt", "INIT", "hora1")
hora2 = GetVar(IniPath & "castillos.txt", "INIT", "hora2")
hora3 = GetVar(IniPath & "castillos.txt", "INIT", "hora3")
hora4 = GetVar(IniPath & "castillos.txt", "INIT", "hora4")
hora5 = GetVar(IniPath & "castillos.txt", "INIT", "hora5")
date1 = GetVar(IniPath & "castillos.txt", "INIT", "date1")
date2 = GetVar(IniPath & "castillos.txt", "INIT", "date2")
date3 = GetVar(IniPath & "castillos.txt", "INIT", "date3")
date4 = GetVar(IniPath & "castillos.txt", "INIT", "date4")
date5 = GetVar(IniPath & "castillos.txt", "INIT", "date5")
Buscamos:

Código:
Sub MuereNpc
y localizamos las siguientes lineas:

Código:
 
'Quitamos el npc 
 
Call QuitarNPC(NpcIndex)

Esas dos lineas las borramos y agregamos esto:

Código:
If MiNPC.name = "Rey del Castillo" Or MiNPC.name = "Defensor Fortaleza" Then
       If MiNPC.Stats.MinHP < 1 Then MiNPC.Stats.MinHP = MiNPC.Stats.MaxHP
   Else
       Call QuitarNPC(NpcIndex)
   End If 
If MiNPC.MaestroUser = 0 Then
'pluto:2.4.1 fortaleza
If MiNPC.pos.Map = 185 And MiNPC.name = "Defensor Fortaleza" And UserList(userindex).GuildInfo.GuildName <> "" Then
fortaleza = UserList(userindex).GuildInfo.GuildName
'pluto:2.4
UserList(userindex).Stats.PClan = UserList(userindex).Stats.PClan + 10
date5 = Date
hora5 = Time
Call SendData(ToAll, 0, 0, "|| El CLAN " & UCase$(UserList(userindex).GuildInfo.GuildName) & " HA CONQUISTADO LA FORTALEZA" & FONTTYPE_TALK & ENDC)
Call WriteVar(IniPath & "castillos.txt", "INIT", "fortaleza", UserList(userindex).GuildInfo.GuildName)
Call WriteVar(IniPath & "castillos.txt", "INIT", "date5", Date)
Call WriteVar(IniPath & "castillos.txt", "INIT", "hora5", Time)
Call SendData(ToAll, 0, 0, "TW" & SND_CREACIONCLAN)
End If 
If MiNPC.pos.Map = mapa_castillo1 And MiNPC.name = "Rey del Castillo" And UserList(userindex).GuildInfo.GuildName <> "" Then
castillo1 = UserList(userindex).GuildInfo.GuildName
'pluto:2.4
UserList(userindex).Stats.PClan = UserList(userindex).Stats.PClan + 5
date1 = Date
hora1 = Time
Call SendData(ToAll, 0, 0, "|| El CLAN " & UCase$(UserList(userindex).GuildInfo.GuildName) & " HA CONQUISTADO EL CASTILLO NORTE" & FONTTYPE_TALK & ENDC)
Call WriteVar(IniPath & "castillos.txt", "INIT", "castillo1", UserList(userindex).GuildInfo.GuildName)
Call WriteVar(IniPath & "castillos.txt", "INIT", "date1", Date)
Call WriteVar(IniPath & "castillos.txt", "INIT", "hora1", Time)
Call SendData(ToAll, 0, 0, "TW" & SND_CREACIONCLAN)
End If 
If MiNPC.pos.Map = mapa_castillo2 And MiNPC.name = "Rey del Castillo" And UserList(userindex).GuildInfo.GuildName <> "" Then
castillo2 = UserList(userindex).GuildInfo.GuildName
'pluto:2.4
UserList(userindex).Stats.PClan = UserList(userindex).Stats.PClan + 5
date2 = Date
hora2 = Time
Call SendData(ToAll, 0, 0, "|| El CLAN " & UCase$(UserList(userindex).GuildInfo.GuildName) & " HA CONQUISTADO EL CASTILLO SUR" & FONTTYPE_TALK & ENDC)
Call WriteVar(IniPath & "castillos.txt", "INIT", "castillo2", UserList(userindex).GuildInfo.GuildName)
Call WriteVar(IniPath & "castillos.txt", "INIT", "date2", Date)
Call WriteVar(IniPath & "castillos.txt", "INIT", "hora2", Time)
End If 
If MiNPC.pos.Map = mapa_castillo3 And MiNPC.name = "Rey del Castillo" And UserList(userindex).GuildInfo.GuildName <> "" Then
castillo3 = UserList(userindex).GuildInfo.GuildName
'pluto:2.4
UserList(userindex).Stats.PClan = UserList(userindex).Stats.PClan + 5
date3 = Date
hora3 = Time
Call SendData(ToAll, 0, 0, "|| El CLAN " & UCase$(UserList(userindex).GuildInfo.GuildName) & " HA CONQUISTADO EL CASTILLO ESTE" & FONTTYPE_TALK & ENDC)
Call WriteVar(IniPath & "castillos.txt", "INIT", "castillo3", UserList(userindex).GuildInfo.GuildName)
Call WriteVar(IniPath & "castillos.txt", "INIT", "date3", Date)
Call WriteVar(IniPath & "castillos.txt", "INIT", "hora3", Time)
Call SendData(ToAll, 0, 0, "TW" & SND_CREACIONCLAN)
End If 
If MiNPC.pos.Map = mapa_castillo4 And MiNPC.name = "Rey del Castillo" And UserList(userindex).GuildInfo.GuildName <> "" Then
castillo4 = UserList(userindex).GuildInfo.GuildName
'pluto:2.4
UserList(userindex).Stats.PClan = UserList(userindex).Stats.PClan + 5
date4 = Date
hora4 = Time
Call SendData(ToAll, 0, 0, "|| El CLAN " & UCase$(UserList(userindex).GuildInfo.GuildName) & " HA CONQUISTADO EL CASTILLO OESTE" & FONTTYPE_TALK & ENDC)
Call WriteVar(IniPath & "castillos.txt", "INIT", "castillo4", UserList(userindex).GuildInfo.GuildName)
Call WriteVar(IniPath & "castillos.txt", "INIT", "date4", Date)
Call WriteVar(IniPath & "castillos.txt", "INIT", "hora4", Time)
Call SendData(ToAll, 0, 0, "TW" & SND_CREACIONCLAN)
End If

En el Módulo USUARIOS buscamos:

Sub NpcAtacado Y debajo de la linea
Código:
Npclist(npcindex).Flags.AttackedBy = UserList(userindex).name

y abajo agregamos agregamos:

Código:
 
'aodrag extraido por agush
If Npclist(npcindex).pos.Map = 185 And Npclist(npcindex).name = "Defensor Fortaleza" And Npclist(npcindex).Stats.MinHP > 29000 And Npclist(npcindex).Stats.MinHP <> 30000 Then Call SendData(ToAll, 0, 0, "V8")
If Npclist(npcindex).pos.Map = 185 And Npclist(npcindex).name = "Defensor Fortaleza" And Npclist(npcindex).Stats.MinHP > 5000 And Npclist(npcindex).Stats.MinHP < 6000 Then Call SendData(ToAll, 0, 0, "V9")
If Npclist(npcindex).pos.Map = mapa_castillo1 And Npclist(npcindex).name = "Rey del Castillo" And Npclist(npcindex).Stats.MinHP > 17000 And Npclist(npcindex).Stats.MinHP <> 18000 Then Call SendData(ToAll, 0, 0, "C1")
If Npclist(npcindex).pos.Map = mapa_castillo1 And Npclist(npcindex).name = "Rey del Castillo" And Npclist(npcindex).Stats.MinHP > 5000 And Npclist(npcindex).Stats.MinHP < 6000 Then Call SendData(ToAll, 0, 0, "C5")
If Npclist(npcindex).pos.Map = mapa_castillo2 And Npclist(npcindex).name = "Rey del Castillo" And Npclist(npcindex).Stats.MinHP > 17000 And Npclist(npcindex).Stats.MinHP <> 18000 Then Call SendData(ToAll, 0, 0, "C2")
If Npclist(npcindex).pos.Map = mapa_castillo2 And Npclist(npcindex).name = "Rey del Castillo" And Npclist(npcindex).Stats.MinHP > 5000 And Npclist(npcindex).Stats.MinHP < 6000 Then Call SendData(ToAll, 0, 0, "C6")
If Npclist(npcindex).pos.Map = mapa_castillo3 And Npclist(npcindex).name = "Rey del Castillo" And Npclist(npcindex).Stats.MinHP > 17000 And Npclist(npcindex).Stats.MinHP <> 18000 Then Call SendData(ToAll, 0, 0, "C3")
If Npclist(npcindex).pos.Map = mapa_castillo3 And Npclist(npcindex).name = "Rey del Castillo" And Npclist(npcindex).Stats.MinHP > 5000 And Npclist(npcindex).Stats.MinHP < 6000 Then Call SendData(ToAll, 0, 0, "C7")
If Npclist(npcindex).pos.Map = mapa_castillo4 And Npclist(npcindex).name = "Rey del Castillo" And Npclist(npcindex).Stats.MinHP > 17000 And Npclist(npcindex).Stats.MinHP <> 18000 Then Call SendData(ToAll, 0, 0, "C4")
If Npclist(npcindex).pos.Map = mapa_castillo4 And Npclist(npcindex).name = "Rey del Castillo" And Npclist(npcindex).Stats.MinHP > 5000 And Npclist(npcindex).Stats.MinHP < 6000 Then Call SendData(ToAll, 0, 0, "C8")
              'extraido por agush
En el módulo TCP buscamos:

Código:
Sub SendMOTD(ByVal UserIndex As Integer)
y antes de que termine el sub (despues de next j) ponemos:

Código:
Call SendData(ToIndex, userindex, 0, "||Castillo Norte:" & castillo1 & " Fecha:" & date1 & " Hora:" & hora1 & FONTTYPE_INFO)
Call SendData(ToIndex, userindex, 0, "||Castillo Sur:" & castillo2 & " Fecha:" & date2 & " Hora:" & hora2 & FONTTYPE_INFO)
Call SendData(ToIndex, userindex, 0, "||Castillo Este:" & castillo3 & " Fecha:" & date3 & " Hora:" & hora3 & FONTTYPE_INFO)
Call SendData(ToIndex, userindex, 0, "||Castillo Oeste:" & castillo4 & " Fecha:" & date4 & " Hora:" & hora4 & FONTTYPE_INFO)
Call SendData(ToIndex, userindex, 0, "||Fortaleza:" & fortaleza & " Fecha:" & date5 & " Hora:" & hora5 & FONTTYPE_INFO)

.CLIENTE.
Buscamos:

Código:
Case "N1"
Y arriva ingresamos:

Código:
Case "C1"
            Call AddtoRichTextBox(frmMain.RecTxt, "El Rey del Castillo Norte está siendo atacado!!!", 250, 150, 0, True, False, False)
           Exit Sub
       Case "C2"
            Call AddtoRichTextBox(frmMain.RecTxt, "El Rey del Castillo Sur está siendo atacado!!!", 250, 150, 0, True, False, False)
           Exit Sub
       Case "C3"
            Call AddtoRichTextBox(frmMain.RecTxt, "El Rey del Castillo Este está siendo atacado!!!", 250, 150, 0, True, False, False)
           Exit Sub
       Case "C4"
            Call AddtoRichTextBox(frmMain.RecTxt, "El Rey del Castillo Oeste está siendo atacado!!!", 250, 150, 0, True, False, False)
           Exit Sub
        Case "C5"
            Call AddtoRichTextBox(frmMain.RecTxt, "El Rey del Castillo Norte está apunto de morir!!!", 250, 150, 0, True, False, False)
           Exit Sub
       Case "C6"
            Call AddtoRichTextBox(frmMain.RecTxt, "El Rey del Castillo Sur está apunto de morir!!!", 250, 150, 0, True, False, False)
           Exit Sub
       Case "C7"
            Call AddtoRichTextBox(frmMain.RecTxt, "El Rey del Castillo Este está apunto de morir!!!", 250, 150, 0, True, False, False)
           Exit Sub
       Case "C8"
            Call AddtoRichTextBox(frmMain.RecTxt, "El Rey del Castillo Oeste está apunto de morir!!!", 250, 150, 0, True, False, False)
           Exit Sub
salu2, cualquier cosa me avisan..
__________________
http://img146.imageshack.us/my.php?image=dibujazola5.jpg

"El año ya se va, porque no me aguanta más".
agush está desconectado  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Estos 2 Usuarios han agradecido a agush Por este util Tema:
curun (17-nov-2008), Cusenier (16-nov-2008)
Sponsored Links
Antiguo 16-nov-2008, 13:26   #2 (permalink)
Comunidad AO
 
Avatar de Tenacious
 
Ingreso: noviembre-2007
Edad: 17
Mensajes: 155
Puntos: 12.107, Nivel: 13 Puntos: 12.107, Nivel: 13 Puntos: 12.107, Nivel: 13
Nivel máximo: 86% Nivel máximo: 86% Nivel máximo: 86%
Actividad: 5% Actividad: 5% Actividad: 5%
El usuario posee 1x Acceso Vip
Poder: 100 Tenacious is a splendid one to beholdTenacious is a splendid one to beholdTenacious is a splendid one to beholdTenacious is a splendid one to beholdTenacious is a splendid one to beholdTenacious is a splendid one to beholdTenacious is a splendid one to behold
Predeterminado

como lo adapto a fenix? yo soy re ignorante en programacion.
__________________




[Solo Miembros registrados ven los enlaces. ]
Tenacious está desconectado  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Antiguo 16-nov-2008, 16:27   #3 (permalink)
70% Programed
 
Avatar de Petin
 
Ingreso: junio-2008
Mensajes: 204
Puntos: 2.686, Nivel: 4 Puntos: 2.686, Nivel: 4 Puntos: 2.686, Nivel: 4
Nivel máximo: 84% Nivel máximo: 84% Nivel máximo: 84%
Actividad: 8% Actividad: 8% Actividad: 8%
Poder: 29 Petin está en el buen camino
Predeterminado

Si no me eqiboco, por lo que lei asi nomas el code, ya es para fenix
Petin está desconectado  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Antiguo 16-nov-2008, 23:19   #4 (permalink)
EduCanDo a La Competencia
 
Avatar de agush
 
Ingreso: junio-2008
Ubicación: Con Tu Novia
Mensajes: 223
Puntos: 7.169, Nivel: 9 Puntos: 7.169, Nivel: 9 Puntos: 7.169, Nivel: 9
Nivel máximo: 61% Nivel máximo: 61% Nivel máximo: 61%
Actividad: 7% Actividad: 7% Actividad: 7%
Poder: 56 agush es como un diamante en brutoagush es como un diamante en brutoagush es como un diamante en bruto
Predeterminado

El codigo ya es funcional para Fénix AO.-
__________________
http://img146.imageshack.us/my.php?image=dibujazola5.jpg

"El año ya se va, porque no me aguanta más".
agush está desconectado  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Antiguo 16-nov-2008, 23:50   #5 (permalink)
70% Programed
 
Avatar de Petin
 
Ingreso: junio-2008
Mensajes: 204
Puntos: 2.686, Nivel: 4 Puntos: 2.686, Nivel: 4 Puntos: 2.686, Nivel: 4
Nivel máximo: 84% Nivel máximo: 84% Nivel máximo: 84%
Actividad: 8% Actividad: 8% Actividad: 8%
Poder: 29 Petin está en el buen camino
Predeterminado

y yo q puse arriba xD
Petin está desconectado  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Sponsored links
Antiguo 06-dic-2008, 15:18   #6 (permalink)
FORERO UASU
 
Avatar de [KenJiN]
 
Ingreso: mayo-2008
Edad: 15
Mensajes: 98
Puntos: 5.752, Nivel: 8 Puntos: 5.752, Nivel: 8 Puntos: 5.752, Nivel: 8
Nivel máximo: 32% Nivel máximo: 32% Nivel máximo: 32%
Actividad: 4% Actividad: 4% Actividad: 4%
Poder: 45 [KenJiN] es como un diamante en bruto[KenJiN] es como un diamante en bruto[KenJiN] es como un diamante en bruto
Predeterminado

Perfecto pero explica,que hay que crear en el Init Castillos.INIT xq ai gente qe no lo sabe
__________________
[KenJiN] está desconectado  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Tema Cerrado

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 19:50.



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.