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

Respuesta
 
Herramientas Desplegado
Antiguo 08-nov-2008, 17:18   #1 (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 [APORTE] Sistema de Casamiento y Divorcio

Bueno este sistema es algo que no esta en Fenix AO, y creo que todabia no esta, me acuerdo que en la Beta con mis amigos usabamos el comando /DESC como casamiento todo el mundo lo usaban jaja taba re de moda xD. Por eso decidi adaptar un codigo de casamiento de 0.11.5. Este sistema carga a traves del Charfile es por ello que necesitamos el sistema hecho por Matute, extraido por Agus Rlz. El codigo lo pueden encontrar por Google


El comando es muy sencillo y lo modifke un poco. Para casarse se necesitan 2 torneos ganados al igual que tu pareja, al poner /CASAR si no tienes los torneos te va a decir que no tienes suficientes torneos para realizar esta operacion, lo mismo con tu pareja, es por ello que los dos necesitan 2 torneos ganados, tambien puse el comando /DIVORCIO para divorciarse, esa operacion no tiene ningun requisito, este comando carga de los charfiles

Bueno Comenzemos

SERVIDOR

Buscamos:
Código:
Case "#/"
Debajo agregamos:

Código:
 
Case "#_"
If UserList(UserIndex).flags.TargetUser > 0 Then
Dim tempIndex As Integer
 
tempIndex = UserList(UserIndex).flags.TargetUser
 
If UserList(UserIndex).flags.Muerto = 1 Then Exit Sub
 
If UserList(tempIndex).flags.Muerto = 1 Then
Call SendData(ToIndex, UserIndex, 0, "|| !!No podes casarte con un muerto!!" & FONTTYPE_INFO)
Exit Sub
End If
 
If tempIndex = UserIndex Then
Call SendData(ToIndex, UserIndex, 0, "||No puedes casarte con vos mismo..." & FONTTYPE_INFO)
Exit Sub
End If
 
If UserList(UserIndex).Faccion.Torneos < 2 Then
Call SendData(ToIndex, UserIndex, 0, "||Necesitas tener dos torneos ganados para casarte!." & FONTTYPE_INFO)
Exit Sub
End If
 
If UserList(UserIndex).Genero = UserList(tempIndex).Genero Then
Call SendData(ToIndex, UserIndex, 0, "||Debes casarte con alguien del sexo opuesto." & FONTTYPE_INFO)
Exit Sub
End If
 
If UserList(tempIndex).Faccion.Torneos < 2 Then
Call SendData(ToIndex, UserIndex, 0, "||Tu pretendiente debe superar al menos dos torneos para casarse contigo." & FONTTYPE_INFO)
Exit Sub
End If
 
If Distancia(UserList(tempIndex).POS, UserList(UserIndex).POS) > 3 Then
Call SendData(ToIndex, UserIndex, 0, "||Tenes que estar junto a la persona con la cual queres casarte." & FONTTYPE_INFO)
Exit Sub
End If
 
If UserList(UserIndex).flags.Casado <> "" Then
Call SendData(ToIndex, UserIndex, 0, "||Ya tienes una pareja." & FONTTYPE_INFO)
Exit Sub
End If
 
If UserList(tempIndex).flags.Casado <> "" Then
Call SendData(ToIndex, UserIndex, 0, "||El usuario ya tiene una pareja." & FONTTYPE_INFO)
Exit Sub
End If
 
UserList(UserIndex).flags.Casandose = tempIndex
 
If UserList(tempIndex).flags.Casandose <> UserIndex And UserList(tempIndex).flags.Casandose <> 0 Then
Call SendData(Sentarget.ToIndex, UserIndex, 0, "||El usuario esta casandose con otra persona." & FONTTYPE_INFO)
Exit Sub
End If
 
If UserList(tempIndex).flags.Casandose = UserIndex Then
UserList(tempIndex).flags.Casado = UserList(UserIndex).Name
UserList(UserIndex).flags.Casado = UserList(tempIndex).Name
UserList(UserIndex).flags.Casandose = 0
UserList(tempIndex).flags.Casandose = 0
Call SendData(ToIndex, UserIndex, 0, "||Te has casado con " & UserList(tempIndex).Name & "!!" & FONNTYPE_CASADO)
Call SendData(ToIndex, tempIndex, 0, "||Te has casado con " & UserList(UserIndex).Name & "!!" & FONTTYPE_CASADO)
Else
SendData Sendatrget.ToIndex, tempIndex, 0, "||" & UserList(UserIndex).Name & " este ofreciendote matrimonio, escribe /CASAR luego de cliquear sobre el para aceptar su propuesta." & FONTTYPE_INFO
Exit Sub
End If
Exit Sub
End If

Buscamos:

Código:
Case "#S"
Debajo agregamos:

Código:
 
Case "#="
Dim nombredivor2 As String
If UserList(UserIndex).flags.Casado = "" Then
Call SendData(ToIndex, UserIndex, 0, "||??No estas casado.!!." & FONTTYPE_INFO)
Exit Sub
End If
nombredivor2 = UserList(UserIndex).flags.Casado
If NameIndex(UserList(UserIndex).flags.Casado) < 1 Then
WriteVar App.Path & "Charfile" & UserList(UserIndex).flags.Casado & ".chr", "FLAGS", "Casado", "0"
UserList(UserIndex).flags.Casado = ""
Else
UserList(NameIndex(UserList(UserIndex).flags.Casado)).flags.Casado = ""
UserList(UserIndex).flags.Casado = ""
Exit Sub
End If
Call SendData(ToAll, 0, 0, "TW" & 27)
Call SendData(ToAll, 0, 0, "||" & UserList(UserIndex).Name & " y " & nombredivor2 & " se divorciaron!!!" & "fonttype_guild")
Debug.Print "Buen divorcio"
Exit Sub
Buscamos:

Código:
flags.Envenenado = RS!Envenenado
Debajo agregamos:

.
Código:
flags.Casado = RS!Casado
Buscamos:

Código:
Call WriteVar(UserFile, "FLAGS", "Muerto", val(UserList(UserIndex).flags.Muerto))
Debajo agregamos:

Código:
Call WriteVar(UserFile, "FLAGS", "CASADO", val(UserList(UserIndex).flags.Casado))
Buscamos.

Código:
Public Const FONTTYPE_TALK = "~255~255~255~0~0"
Debajo agregamos:

Código:
Public Const FONNTYPE_CASADO = "~255~150~50~1~0"
Buscamos:

Código:
Type UserFlags
Abajo ingresamos:

Código:
 
Casado As String
Casandose As Integer
Buscamos:
UserList(UserIndex).flags.Envenenado = 0

Abajo agregamos:

Código:
UserList(UserIndex).flags.Casado = 0
Buscamos:

Código:
UserList(UserIndex).flags.Escondido = 0
Abajo agregamos:

Código:
 
UserList(UserIndex).flags.Casado = 0
UserList(UserIndex).flags.Casado = ""
UserList(UserIndex).flags.Casandose = 0

Cita:
NOTA: Yo puse que para casarse necesitas torneos ganados, porque mi servidor es 100% Agite. Para los servidores de entrenamientos/roleros y quieren que para casarse sea determinado nivel

Remplazen esto:
Código:
 
If UserList(UserIndex).Faccion.Torneos < 2 Then
Call SendData(ToIndex, UserIndex, 0, "||Necesitas tener dos torneos ganados para casarte!." & FONTTYPE_INFO)
Exit Sub
End If
Por esto:

Código:
 
If UserList(UserIndex).Faccion.ELV< 20 Then
Call SendData(ToIndex, UserIndex, 0, "||Necesitas ser superior a nivel 20para casarte!." & FONTTYPE_INFO)
Exit Sub
End If
Tambien esto:

Código:
 
If UserList(tempIndex).Faccion.Torneos < 2 Then
Call SendData(ToIndex, UserIndex, 0, "||Tu pretendiente debe superar al menos dos torneos para casarse contigo." & FONTTYPE_INFO)
Exit Sub
End If
Por esto:

Código:
 
If UserList(tempIndex).Faccion.ELV < 20 Then
Call SendData(ToIndex, UserIndex, 0, "||Tu pretendiente debe superar al menos el nivel 20 para casarse contigo." & FONTTYPE_INFO)
Exit Sub
End If
CLIENTE
Buscamos:

Código:
 
Case "/INFORMACION
ReplaceData = "#Z"
Debajo agregamos:

Código:
 
Case "/CASAR"
ReplaceData = "#_"
Case "/DIVORCIO"
ReplaceData = "#="
__________________

Última edición por [KenJiN]; 08-nov-2008 a las 17:24.
[KenJiN] 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 19:46.



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.