| | #1 (permalink) | |||||||||||
| EduCanDo a La Competencia Ingreso: junio-2008 Ubicación: Con Tu Novia
Mensajes: 223
Poder: 56 ![]() ![]() ![]() | 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 Código: Public Const mapa_castillo1 = XX Public Const mapa_castillo2 = XX Public Const mapa_castillo3 = XX Public Const mapa_castillo4 = XX 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") Código: Sub MuereNpc 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
Código: Sub SendMOTD(ByVal UserIndex As Integer) 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" 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
__________________ "El año ya se va, porque no me aguanta más". | |||||||||||
| |
| Sponsored Links |
![]() |
| Marcadores |
| Herramientas | |
| Desplegado | |
|
|
Te recomendamos visitar estos sitios
|