Recommended Servers - Topics UP



Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: MuCore Modulo Casamiento  (Visto 1083 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline Azzlaer Posteado: July 01, 2017, 12:36:39 PM | Modificado: July 01, 2017, 04:22:06 PM by Azzlaer

  • MAESTRO

  • Colaborador
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 1.276
  • Gracias recibida: 16996
  • cl
Hola TuServerMu encontre un post en un reconocido foro de MUONLINE viejisisisisimo y veo que el modulo no esta terminado y la verdad que intente entenderlo pero no pude xD
Si alguien se da el tiempo para programarlo y hacerlo que lo publique :P
No debe ser mucho ya que esta todo armado solo que hay valores que no las entiendo xD

El Codigo es muy divertido porque tiene para todas las sexualidades: HETEROSEXUAL y HOMOSEXUAL y LESBIANA jajaja es gracioso porque si te pones a pensar en los viejos tiempos de MU ONLINE que habia casamientos se casaban mayormente los de igual genero jeje.




Tenia pensado subir los archivos ya puestos en php pero como no se como funciona los archivos es mejor ver el codigo para que vean como funciona y no tener que bajarlo.

Segun publicado en el foro que encontre esta puesto asi:



Here is new module for my web:
- Marry

How to install:
1. Open _inc/mfs.class and add this:


Code: [Select]
/* Marry */
function login() {
if(isset($_POST['login']))
{
$account = secure($_POST['account']);
$password = secure($_POST['password']);
$married = secure($_POST['married']);
check_inject();

$check_accq = mssql_query("Select * from MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$check_acc = mssql_num_rows($check_accq);

if($check_acc == 0) { echo"<meta http-equiv=\"refresh\" content=\"0\">"; }
else
{
$_SESSION['ip'] = $_SERVER['REMOTE_ADDR'];
$_SESSION['date'] = date("F j, Y, G:i A");
$_SESSION['user'] = $account;
$_SESSION['pass'] = $password;
echo "<meta http-equiv=\"refresh\" content=\"0\">";
}
}
if(isset($_POST['logout']))
{
unset($_SESSION['ip']);
unset($_SESSION['date']);
unset($_SESSION['user']);
unset($_SESSION['pass']);
 echo "<meta http-equiv=\"refresh\" content=\"0;url=index.php\">";
}
}

function married_users()
{
$char = secure($_POST['ycharacter']);
$char2 = secure($_POST['acharacter']);
$message = secure($_POST['message']);
$type = secure($_POST['type']);
$user = secure($_SESSION['user']);
check_inject();
$date = date('d/m/Y H:i');
$time = time();
$time12 = $time - 172800;

$check_chr = mssql_num_rows(mssql_query("Select * from Character where AccountID='$user' and Name='$char'"));
$check_chr2 = mssql_num_rows(mssql_query("Select * from Character where AccountID='$user' and Name='$char2'"));

$row = mssql_fetch_array(mssql_query("Select * from Character where Name='$char'"));
$row2 = mssql_fetch_array(mssql_query("Select * from Character where Name='$char2'"));
$row3 = mssql_fetch_array(mssql_query("Select * from married where senderacc='$user'"));

$already = mssql_num_rows(mssql_query("Select * from married where senderacc='$user'"));
$already2 = mssql_num_rows(mssql_query("Select * from marriedusers where priel='$char2'"));
$already3 = mssql_num_rows(mssql_query("Select * from marriedusers where predlojil='$char2'"));
$already4 = mssql_num_rows(mssql_query("Select * from marriedusers where predlojil='$char'"));
$already5 = mssql_num_rows(mssql_query("Select * from marriedusers where priel='$char'"));

if(empty($char) or empty($char2) or empty($user) or empty($message)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($row['Class'] == 0 or $row['Class'] == 16 or $row['Class'] == 32) { echo"<font color='red'>Your character must to have a 2nd quest !</font>"; $error=1; }
elseif($row2['Class'] == 0 or $row2['Class'] == 16 or $row2['Class'] == 32) { echo"<font color='red'>The another character must to have a 2nd quest !</font>"; $error=1; }
elseif($already != 0) { echo"<font color='red'>This character already waiting for Married !</font><br>"; $error=1; }
elseif($already != 0 and $row3['time'] < $time12) { mssql_query("DELETE from married where senderacc='$user'"); echo"<font color='red'>Please try again... Thank you !</font><br>"; $error=1; }

elseif($already2 != 0) { echo"<font color='red'>This character is Married !</font><br>"; $error=1; }
elseif($already3 != 0) { echo"<font color='red'>This character is Married !</font><br>"; $error=1; }
elseif($already4 != 0) { echo"<font color='red'>This character is Married !</font><br>"; $error=1; }
elseif($already5 != 0) { echo"<font color='red'>This character is Married !</font><br>"; $error=1; }
elseif($check_chr2 >= 1) { echo"<font color='red'>Second selected character is your, you cant married with your characters!</font><br>"; $error=1; }
elseif($char == $char2) { echo"<font color='red'>First selected character is the same like the second. Please go back and try again!</font><br>"; $error=1; }
elseif($row['Resets'] < 1) { echo"<font color='red'>Your character must have at least one Reset to send this invitation!</font><br>"; $error=1;}
elseif($row2['Resets'] < 1) { echo"<font color='red'>Another character must have at least one Reset to send this invitation!</font><br>"; $error=1;}
elseif($check_chr <= 0) { echo"<font color='red'>First selected character is not your. Please go back and try again!</font><br>"; $error=1; }

if($type == normal) {
if($row['Class'] == 33 and $row2['Class'] == 33) { echo"<font color='red'>If you want to married for woman (woman + woman) you must select Lesbian type. Please go back and try again!</font><br>"; $error=1; }
elseif($row['Class'] != 33 and $row2['Class'] != 33) { echo"<font color='red'>If you want to married for man (man + man) you must select Gay type. Please go back and try again!2</font><br>"; $error=1; }
}
if($type == gay) {
if($row['Class'] == 33 and $row2['Class'] == 33) { echo"<font color='red'>You are selected Gay couple and you cant married with Womans (Elf). Please go back and try again!</font><br>"; $error=1; }
}
if($type == lesbian) {
if($row['Class'] != 33 and $row2['Class'] != 33) { echo"<font color='red'>You are selected Lesbian couple and you cant married with Mans (BK,SM,MG). Please go back and try again!</font><br>"; $error=1; }
}

if($error != 1) {
$a = mssql_query("INSERT INTO married (senderacc,receiveracc,sender,receiver,message,status,type,time,date) VALUES ('$user','$row2[AccountID]','$char','$char2','$message','not','$type','$time','$date')");
echo"<font color='green'>You successful send this invitation to $char2! If she/he approved your invitation, you will be married ! But if she/he unapproved your invitation, you will not Married !</font><br>";
}
}
/* End Marry */

2. Insert this Quarety in MuOnline:

Code: [Select]
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[married]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[married]
GO

CREATE TABLE [dbo].[married] (
 [senderacc] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
 [receiveracc] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
 [sender] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
 [receiver] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
 [message] [varchar] (1800) COLLATE Chinese_PRC_CI_AS NULL ,
 [status] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
 [type] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
 [time] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
 [date] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]
GO



3. Crate 2 Files in folder _mods :
- First is Married.php

Code: [Select]
<?php if(isset($_POST['login']) or isset($_POST['logout'])) { login(); } ?>
<?php
if ($_SESSION['user'] == false) {
echo "
<br>You have to log in system to view this module !
<table border=0 cellspacing=5 cellpadding=0>
<td width='250'>
<form name=login method=post action=>
<table width=100% border=0 cellspacing=1 cellpadding=1>
<tr>
<td width=70><font color=#cccccc>Login ID :</td>
<td>
<input name=account type=text id=account maxlength=10>
</td>
</tr>
<tr>
<td width=70><font color=#cccccc>Password :</td>
<td>
<input name=password type=password id=password maxlength=10>
</td>
</tr>
<td width=70> </td>
</tr>
<tr>
<tr>
<td width=100 align=right><input type=submit class=button name=login value=Login></td>
<td><input type=reset class=button name=Submit2 value=Reset></td>
</tr>
</table>
</form>
</div>
</td>
</table>
";
}
else {
$accuser = secure($_SESSION['user']);
check_inject();

$check_accq = mssql_query("Select * from married where receiveracc='$accuser'");
$check = mssql_num_rows($check_accq);
if ($check > 0) {
echo "<meta http-equiv=\"refresh\" content=\"0;url=?page=marr_request\">";
}
else{
?>
<?php
if(isset($_POST['submit'])) { married_users(); }
?>
<br>With this module, you can married your character with another characters... :)
<table border=0 cellspacing=5 cellpadding=0>
<td width='250'>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td align="center" colspan="5">
<select style="width: 220;" onchange="window.location='?page=married&sex='+this.value">
<option value="0" selected>- Choose your sexual orientation -</option>
<option value="normal">- I am Normal (Woman + Man)</option>
<option value="gay">- I am gay (Man + Man)</option>
<option value="lesbian">- I am lesbian (Woman + Woman)</option>
</select>
</td>
<form name="" method="post" action="">
<td><input type='submit' name='logout' class='button' value='Logout' title='Log out from the module'></td>
</form>
</tr>

<? if ($_GET['sex'] == normal)
{ ?>
<form name="" method="post" action="">
<tr><td colspan="5" align="center">Your sexual orientation is <?=$_GET['sex']?>, [<?=$_SESSION['user']?>]</td></tr>
<tr>
<td width="70"><font color=#cccccc>Your Character :</td>
<td>
<select name="ycharacter" style="width: 121;"><optgroup label="Hero for Married">
<?php
$charq = mssql_query("SELECT [Name] FROM [Character] where AccountID='$_SESSION[user]'");

for($i=0;$i < mssql_num_rows($charq);++$i)
{
$row = mssql_fetch_row($charq);
echo"<option value='$row[0]'><b>$row[0]</b></option>";
}
?>
</select>
</td>
</tr>
<tr>
<td width="70"><font color=#cccccc>Your partner :</td>
<td>
<select name="acharacter" style="width: 121;"><optgroup label="Choose your partner">
<?php
$charq = mssql_query("SELECT [Name] FROM [Character] where AccountID != '$_SESSION[user]'");

for($i=0;$i < mssql_num_rows($charq);++$i)
{
$row = mssql_fetch_row($charq);
echo"<option value='$row[0]'><b>$row[0]</b></option>";
}
?>
</select>
<input type="hidden" name="type" value="<?=$_GET['sex']?>">
</td>
</tr>
<tr>
<td align="center" colspan="5"><input type="text" name="message" style="width: 220; height: 15; text-align: center;" maxlength="100" value="You message to your next wife/husband..."></td>
</tr>

<tr>
<td width="70"> </td>
</tr>
<tr>
<tr>
<td width="100" align="right"><input type="submit" class=button name="submit" value="Submit"></td>
<td><input type="reset" class=button name="Submit2" value="Reset"></td>
</tr>
</form>
<?}
elseif($_GET['sex'] == gay)
{?>
<form name="" method="post" action="">
<tr><td colspan="5" align="center">Your sexual orientation is <?=$_GET['sex']?></td></tr>
<tr>
<td width="70"><font color=#cccccc>Your Character :</td>
<td>
<select name="ycharacter" style="width: 121;"><optgroup label="Hero for Married">
<?php
$charq = mssql_query("SELECT [Name] FROM [Character] where class!='32' and class!='33' and AccountID = '$_SESSION[user]'");

for($i=0;$i < mssql_num_rows($charq);++$i)
{
$row = mssql_fetch_row($charq);
echo"<option value='$row[0]'><b>$row[0]</b></option>";
}
?>
</select>
</td>
</tr>
<tr>
<td width="70"><font color=#cccccc>Your partner :</td>
<td>
<select name="acharacter" style="width: 121;"><optgroup label="Choose your partner">
<?php
$charq = mssql_query("SELECT [Name] FROM [Character] where class!='32' and class!='33' and AccountID!='$_SESSION[user]'");

for($i=0;$i < mssql_num_rows($charq);++$i)
{
$row = mssql_fetch_row($charq);
echo"<option value='$row[0]'><b>$row[0]</b></option>";
}
?>
</select>
<input type="hidden" name="type" value="<?=$_GET['sex']?>">
</td>
</tr>
<tr>
<td align="center" colspan="5"><input type="text" name="message" style="width: 220; height: 15; text-align: center;" maxlength="100" value="You message to your next wife/husband..."></td>
</tr>

<tr>
<td width="70"> </td>
</tr>
<tr>
<tr>
<td width="100" align="right"><input type="submit" class=button name="submit" value="Submit"></td>
<td><input type="reset" class=button name="Submit2" value="Reset"></td>
</tr>
</form>
<?}
elseif($_GET['sex'] == lesbian) {?>
<form name="" method="post" action="">
<tr><td colspan="5" align="center">Your sexual orientation is <?=$_GET['sex']?></td></tr>
<tr>
<td width="70"><font color=#cccccc>Your Character :</td>
<td>
<select name="ycharacter" style="width: 121;"><optgroup label="Hero for Married">
<?php
$charq = mssql_query("SELECT [Name] FROM [Character] where class='32' or class='33' and AccountID = '$_SESSION[user]'");

for($i=0;$i < mssql_num_rows($charq);++$i)
{
$row = mssql_fetch_row($charq);
echo"<option value='$row[0]'><b>$row[0]</b></option>";
}
?>
</select>
</td>
</tr>
<tr>
<td width="70"><font color=#cccccc>Your partner :</td>
<td>
<select name="acharacter" style="width: 121;"><optgroup label="Choose your partner">
<?php
$charq = mssql_query("SELECT [Name] FROM [Character] where class='32' or class='33' and AccountID!='$_SESSION[user]'");

for($i=0;$i < mssql_num_rows($charq);++$i)
{
$row = mssql_fetch_row($charq);
echo"<option value='$row[0]'><b>$row[0]</b></option>";
}
?>
</select>
<input type="hidden" name="type" value="<?=$_GET['sex']?>">
</td>
</tr>
<tr>
<td align="center" colspan="5"><input type="text" name="message" style="width: 220; height: 15; text-align: center;" maxlength="100" value="You message to your next wife/husband..."></td>
</tr>

<tr>
<td width="70"> </td>
</tr>
<tr>
<tr>
<td width="100" align="right"><input type="submit" class=button name="submit" value="Submit"></td>
<td><input type="reset" class=button name="Submit2" value="Reset"></td>
</tr>
</form>
<?}}}?>
</table>
</div>
</td>
</table>

-Second is marr_request.php

Code: [Select]
<?php if(isset($_POST['login'])) { login(); } ?>
<?php
if ($_SESSION['user'] == false) {
echo "<meta http-equiv=\"refresh\" content=\"0;url=?page=married\">";
}
else {
$accuser = secure($_SESSION['user']);
check_inject();

$check_accq = mssql_query("Select * from married where receiveracc='$accuser' and status='not'");
$check = mssql_num_rows($check_accq);
$row = mssql_fetch_array($check_accq);
$date = date("F j, Y, G:i A");
$time = time();

if($row['type'] == normal) { $type = "Normal"; }
elseif($row['type'] == gay) { $type = "Gays"; }
elseif($row['type'] == lesbian) { $type = "Lesbians"; }

if($_GET['id'] == agree and $check > 0)
{
mssql_query("INSERT INTO marriedusers (predlojil,priel,message,type,date,time) VALUES ('$row[sender]','$row[receiver]','$row[message]','$type','$date','$time')");
mssql_query("delete from married where receiveracc='$accuser'");
echo "<script language=\"JavaScript\">alert (\"You successful accept this married !\");</script>";
echo "<meta http-equiv=\"refresh\" content=\"0;url=?page=married\">";
}
elseif($_GET['id'] == idont and $check > 0)
{
mssql_query("delete from married where receiveracc='$accuser'");
}

if ($check > 0) {
?>
<br>Here you can check your requestions for Married
<table border="0" cellspacing="5" cellpadding="0">
<td width='400'>
<table width="100%" border="0" cellspacing="1" cellpadding="1" class='tmem'>
<tr>
<td align="center">Request By</td>
<td align="center">Request To</td>
<td align="center">Yes or No</td>
</tr>
<tr>
<td align="center"><?=$row['sender']?></td>
<td align="center"><?=$row['receiver']?></td>
<td align="center"><a rel="nofollow" href="?page=marr_request&id=agree" style="border-bottom: 1px dashed;">I agree</a>  <a rel="nofollow" href="?page=marr_request&id=idont" style="border-bottom: 1px dashed;">I don't</a></td>
</tr>
<tr>
<td align="center" colspan="3"> </td>
</tr>
<tr>
<td align="center" colspan="3">Message sended from <?=$row['sender']?> to you:</td>
</tr>
<tr>
<td align="center" colspan="3"><?=$row['message']?></td>
</tr>
<?}
else{
echo "<meta http-equiv=\"refresh\" content=\"0;url=?page=married\">";
}}?>
</table>
</div>
</td>
</table>


Offline inax123 #1 Posteado: July 01, 2017, 07:06:39 PM

  • 0 puntos por ventas
  • *
  • Rank: Liga mayor
  • Posts: 196
  • Gracias recibida: 1472
  • ar
Ahora me hago un tiempo y lo reviso


Online unico #2 Posteado: July 01, 2017, 11:50:09 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 3
  • Gracias recibida: 2285
  • pe
no pos  esto se descontrolo con lo de el casamiento entre ambos de el mismo genero


Offline thejonyx #3 Posteado: July 02, 2017, 03:17:44 AM

  • Php Coder
  • 0 puntos por ventas
  • *
  • Rank: Experto
  • Posts: 155
  • Gracias recibida: 1779
  • ve
excelente @Azzlaer por favor si pudieras indicar la fuente de donde obtiviste ese codigo ya q segun lo q publicaste faltan algunas cositas para armar la estructura completa de ese modulo. y asi terminarlo y publicarlo.

La vida seria mucho mas facil si pudieramos ver el codigo fuente.

Offline Azzlaer #4 Posteado: July 02, 2017, 12:26:49 PM | Modificado: July 02, 2017, 01:47:04 PM by melo920

  • MAESTRO

  • Colaborador
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 1.276
  • Gracias recibida: 16996
  • cl
excelente @Azzlaer por favor si pudieras indicar la fuente de donde obtiviste ese codigo ya q segun lo q publicaste faltan algunas cositas para armar la estructura completa de ese modulo. y asi terminarlo y publicarlo.

faltan cosas porque estaba publicado asi  jaja bueno les publico el LINK pero despues no me vengan a decir que es SPAM y que tengo una INFRACCION porque se pudre todo  golpes

Creo que el modulo era de MuWeb pero lo estan pasando a MuCore ... no sabria decirte xD

SPAM


Offline inax123 #5 Posteado: July 02, 2017, 01:02:18 PM

  • 0 puntos por ventas
  • *
  • Rank: Liga mayor
  • Posts: 196
  • Gracias recibida: 1472
  • ar
En teoria este modulo no sirve. Porque si los cads, pero no en el juego es solo via web


Offline Azzlaer #6 Posteado: July 02, 2017, 01:06:19 PM

  • MAESTRO

  • Colaborador
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 1.276
  • Gracias recibida: 16996
  • cl
En teoria este modulo no sirve. Porque si los cads, pero no en el juego es solo via web

es lo que quiero hacer :P  solo via web .. no quiero un modulo que sea de juego :P


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Recommended Servers - Topics Bottom



 

Related Topics

  Subject / Started by Replies Last post
16 Replies
2383 Views
Last post May 31, 2020, 11:04:43 AM
by TMucore
17 Replies
2550 Views
Last post May 04, 2018, 07:04:52 PM
by darkjano
7 Replies
1580 Views
Last post June 07, 2018, 12:28:58 AM
by Cloud
4 Replies
1139 Views
Last post October 17, 2018, 09:14:44 AM
by dreams
8 Replies
1434 Views
Last post April 07, 2020, 11:01:59 PM
by comoxs