Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Katzujari

Pages: [1]
1
Items / Simple Lotery
« on: March 01, 2011, 02:16:07 am »
Ok, Primero en español:
Este Item es básicamente un sistema de "billete premiado" en que los usuarios ingresan un numero entre 1 y X, si resulta el mismo que arroja el PHP, resultan ganadores de Y creditos

X y Y Se configuran abiertamente desde Admin panel, pudiendo crear algo sencillo o algo complejo.
Ej: numero entre 1 y 3 o numero entre 1 y 100.

En caso de que el usuario coloque un numero mayor a X (en el primer ejemplo, 4) habrá desperdiciado su dinero.



Now in english :P
This Item is basically a system of "winning ticket"in which users enter a number between 1 and X, if it is cast by the PHP, are winners of Y credits

X and Y are configured openly from Admin panel and can create simple or complex.
Eg number between 1 and 3 or number between 1 and 100.

If the user to place a number greater than X (in the first instance, 4) have wasted their money.

(google translate LOL)

Code: [Select]
<?php
/**********************************************************************************
* SMFShop item                                                                    *
***********************************************************************************
* SMFShop: Shop MOD for Simple Machines Forum                                     *
* =============================================================================== *
* Software Version:           SMFShop 3.0 (Build 12)                              *
* $Date:: 2007-01-18 19:26:55 +1100 (Thu, 18 Jan 2007)                          $ *
* $Id:: loteria.php 79 2007-01-18 08:26:55Z daniel15                          $ *
* Software by:                DanSoft Australia (http://www.dansoftaustralia.net/)*
* Copyright 2005-2007 by:     DanSoft Australia (http://www.dansoftaustralia.net/)*
* Support, News, Updates at:  http://www.dansoftaustralia.net/                    *
*                                                                                 *
* Forum software by:          Simple Machines (http://www.simplemachines.org)     *
* Copyright 2006-2007 by:     Simple Machines LLC (http://www.simplemachines.org) *
*           2001-2006 by:     Lewis Media (http://www.lewismedia.com)             *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under   *
* the terms of the provided license as published by Simple Machines LLC.          *
*                                                                                 *
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
*                                                                                 *
* See the "license.txt" file for details of the Simple Machines license.          *
* The latest version of the license can always be found at                        *
* http://www.simplemachines.org.                                                  *
**********************************************************************************/

if (!defined('SMF'))
die('Hacking attempt...');

class 
item_Loteria extends itemTemplate
{
function getItemDetails() {
$this->authorName 'Katzujari';
$this->authorWeb 'http://www.foro.rphentai.co.cc/';
$this->authorEmail '';

$this->name "Loteria";
$this->desc "Gana xxx Creditos!";
$this->price 10;

$this->require_input true;
$this->can_use_item true;
$this->addInput_editable true;
}

function getAddInput()
{
global $item_info$db_prefix;
if ($item_info[1] == 0$item_info[1] = '3';
if ($item_info[2] == 0$item_info[2] = '30';
return 'Numero Maximo para sorteo: <input type="text" name="info1" value="' $item_info[1]  . '" /><br />
    Premio (cantidad si se gana): <input type="text" name="info2" value="' 
$item_info[2]  . '" /> ';
}

function getUseInput()
{
global $item_info$db_prefix;
$num "<input type='text' name='numuser' value='1'>";
return "Escribe un numero entre 1 y {$item_info[1]}: " .$num;
}

function onUse()
{
global $item_info$db_prefix$context;
if ($_POST['numuser'] > $item_info[1])
{
return 'El numero debia ser entre 1 y '.$item_info[1].'. Solo has desperdiciado tu dinero.';
}
else {
$sorteo mt_rand(1$item_info[1]);
if ($_POST['numuser'] == $sorteo)
{
$result db_query("
UPDATE 
{$db_prefix}members
SET money = money + "
.$item_info[2]."
WHERE ID_MEMBER = 
{$context[user][id]}"__FILE____LINE__);

return 'Felicidades! Ganaste ' .$item_info[2];
}
else
{
return 'Mala suerte, el numero correcto era ' .$sorteo;
}
}
}
}

?>


(Review the file to translate texts)

2
Items / Re: SMF PETS -> Delete a Pet item
« on: March 01, 2011, 02:07:54 am »
These is because the name of PHP file must be the same of the name Class, id this example, must be "Demolition.php"

3
Coding / Change Language
« on: February 19, 2011, 03:55:34 pm »
Hello people, I need help for this, I don't have change the lenguage of the Shop's version 3.1  to Spanish and I need these lenguage...

Thnks.

Y pues, en mi lengua madre...
Necesito ayuda apra traducir la Shop en version 3.1 al español, lo intente pero termina en un tremendo caos porque parece ser que la tienda solo funciona en ingles y los demas idiomas se amuelan ._.

¿Alguien que me ayude o que me diga que puedo modificar?

4
Items / Re: Role Play stats Item (needs work)
« on: February 02, 2011, 01:02:09 pm »
No soy exactamente un experto en PHP, pero me parece que el problema es sencillo. $item_info no tiene un valor realmente fijado, es decir, lo mismo vale un HP que un SP (por ejemplo) y todos los item se incrementan porque $item_info[1] == 0

No estoy seguro, epro me parece el problema
_____________________________________________

I'm not exactly an expert in PHP, but I think the problem is simple. $ item_info really has no value set, ie, the same holds an HP that a SP (eg) and all item are increased because $ item_info [1] == 0

Not sure, but I think the problem

Sorry for the English, use the google translate

5
Modifications / Re: SMFPets Version 0.2
« on: August 08, 2010, 04:18:26 pm »
Instale el SMF Shop e intenté instalar este mod tambien, pero tras pedirme el acceso al FTP me tira un error yluego de es ya no me deja intalarlo (ni tratar de instalar)

Pages: [1]