[ABD] Slot machine | v1.6

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
tHe LiNk
Registered User
Posts: 158
Joined: Sat Jan 11, 2003 3:26 am
Contact:

Post by tHe LiNk »

I think i got it. Try downloading again. Otherwise, whats your board's default language?

deerdork
Registered User
Posts: 115
Joined: Thu Jan 30, 2003 7:44 pm
Location: Dayton OH
Contact:

Post by deerdork »

that did it... thanks...

its a very nifty mod by the way

RCTycooner
Registered User
Posts: 113
Joined: Sat Jul 19, 2003 6:13 pm
Location: A lot of Bytes away from u ...
Contact:

Post by RCTycooner »

I've found a lil' bug

here's how to fix it:

Code: Select all

#
#-----[ OPEN ]--------------------
#

slot_machine.php

#
#-----[ FIND ]---------------------
#
	if ($userdata['user_points'] < $board_config['slot_playprice']) {
		$layout = '<br>'.$lang['slot_minimum'].' '.$board_config['slot_playprice'].' '.$board_config['points_name'].''.$lang['slot_minimum'].'<br>';

#
#-----[ INLINE, FIND ]-----------
#

.$lang['slot_minimum'].'<br>'

#
#-----[ INLINE, REPLACE WITH ]-------
#

.$lang['slot_minimum2'].'<br>'

#
#-----[ SAVE & CLOSE ]-------
# EoM
#
ojay, my add-on is almost done, i'm publishing it now, i'll make a topic here and post the link here too !!!
GRTZ, RCTycooner

My Mods:

Image

qingshun
Registered User
Posts: 44
Joined: Tue Sep 02, 2003 7:34 am

Post by qingshun »

I have installed this mod and I must say it is cool.

Wat the go man ! :D

BTW, wat's that above code do ?
Wat's the bug anyway ?
Also known as Dash in phpbbhacks forum.

tHe LiNk
Registered User
Posts: 158
Joined: Sat Jan 11, 2003 3:26 am
Contact:

Post by tHe LiNk »

It was a simple problem where i forgot to add a 2 thats all ;).

0.99 released with the fix.

RCTycooner
Registered User
Posts: 113
Joined: Sat Jul 19, 2003 6:13 pm
Location: A lot of Bytes away from u ...
Contact:

Post by RCTycooner »

well, if you push the '>>TRY<<'-button and, you don't have enough money it'll show something like this:

Code: Select all

You need a minimum of 15 EurosYou need a minimum of 
but if you fix the bug, with the code up here then you'll get something like this:

Code: Select all

You need a minimum of 15 Euros's to play

if you use Zaraths shop/item-mod too, you'll be able to enter a 'ticket'-item and you can get 'items' as prizes !! (with my add-on, i'm posting it later today or tomorrow !!)
GRTZ, RCTycooner

My Mods:

Image

tHe LiNk
Registered User
Posts: 158
Joined: Sat Jan 11, 2003 3:26 am
Contact:

Post by tHe LiNk »

Absolutely normal for mine, you must of altered it :?

pokemaster
Registered User
Posts: 361
Joined: Fri Aug 22, 2003 8:10 am
Location: UK

Post by pokemaster »

i have installed this mod and the cash mod BUT it says i need 2 points to enter and play well i have £55 which is my currentcy please help me please

RCTycooner
Registered User
Posts: 113
Joined: Sat Jul 19, 2003 6:13 pm
Location: A lot of Bytes away from u ...
Contact:

Post by RCTycooner »

pokemaster wrote: i have installed this mod and the cash mod BUT it says i need 2 points to enter and play well i have £55 which is my currentcy please help me please


this means you're £-currency is not the 'points'-system's currency ....
GRTZ, RCTycooner

My Mods:

Image

RCTycooner
Registered User
Posts: 113
Joined: Sat Jul 19, 2003 6:13 pm
Location: A lot of Bytes away from u ...
Contact:

Post by RCTycooner »

http://phpbb.com/phpBB/viewtopic.php?p=750294
here you can find my add-on !!

ps: could you (after you've approven it) put a link in the first post here ??
GRTZ, RCTycooner

My Mods:

Image

Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

pokemaster wrote: i have installed this mod and the cash mod BUT it says i need 2 points to enter and play well i have £55 which is my currentcy please help me please


to be more specific than RCTycooner, you need to have a currency created with the database field user_points in order for this to work.

if your currency is user_pounds or something equivalent, Slot Machine mod won't read this.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod

RCTycooner
Registered User
Posts: 113
Joined: Sat Jul 19, 2003 6:13 pm
Location: A lot of Bytes away from u ...
Contact:

Post by RCTycooner »

Xore wrote:
pokemaster wrote:i have installed this mod and the cash mod BUT it says i need 2 points to enter and play well i have £55 which is my currentcy please help me please


to be more specific than RCTycooner, you need to have a currency created with the database field user_points in order for this to work.

if your currency is user_pounds or something equivalent, Slot Machine mod won't read this.


the link: maby you can add an extra field in the acp so that you can choose what currency is used by the slot machine!
GRTZ, RCTycooner

My Mods:

Image

tHe LiNk
Registered User
Posts: 158
Joined: Sat Jan 11, 2003 3:26 am
Contact:

Post by tHe LiNk »

Thats a good idea, would make it more compatible with the cash mod. I'm going to have to talk to xore about the best way of displaying all the currencies on the board though (so a user could choose it).

Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

currently, with cash mod 2.0.x, it's (admittedly) a bit of a pain to do this.

i'm rushing like a mofo to get cm2.1 out, however, and this will have an API to basically take all the work out of it and let you make things use multiple currencies with ease (i hope)

currently, you can (in your form)

Code: Select all

$sql = "SELECT cash_id, cash_name FROM " . CASH_TABLE;

if ( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, "Could not obtain cash information", '', __LINE__, __FILE__, $sql);
}

print('<select name="cash_id">');
while ( $row = $db->sql_fetchrow($result) )
{
	print('<option value="' . $row['cash_id'] . '">' . $row['cash_name'] . '</option>');
}
print('</select>');
(or use appropriate template functionality, etc)

this will give you a list of currencies installed on the board, in a drop down list

next, on the recieving end of your form...

Code: Select all

$sql = "SELECT cash_dbfield FROM " . CASH_TABLE . " WHERE cash_id = ' . $HTTP_POST_VARS['cash_id'];

if ( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, "Could not obtain cash information", '', __LINE__, __FILE__, $sql);
}
if ( !($row = $db->sql_fetchrow($result) )
{
	message_die(GENERAL_ERROR, "Currency does not exist", '', __LINE__, __FILE__, $sql);
}
$dbfield = $row['cash_dbfield'];
now you have the appropriate database entry stored in $dbfield. it may be that $dbfield == 'user_points' ... but it could be any other currency also, so instead of

Code: Select all

$sql = "UPDATE " . USERS_TABLE . " SET user_points = user_points + " . $whatever . " WHERE user_id = " . $whatever;
you would do

Code: Select all

$sql = "UPDATE " . USERS_TABLE . " SET $dbfield = $dbfield + " . $whatever . " WHERE user_id = " . $whatever;
does that make sense?

(in CM 2.1, i'm going to be adding a lot of stuff to make it about 10x simpler, with almost 0 work on your part to include)
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod

Dr DLP
Registered User
Posts: 527
Joined: Sat Mar 29, 2003 5:34 pm
Location: France
Contact:

Post by Dr DLP »

Thanks for this mod , it's really funny :)

Here's the french translation :

Code: Select all

<?php

// Slot machine: User page
//
$lang['slot_disabled'] = 'La machine à sous est actuellement fermée';
$lang['slot_title'] = 'Machine à sous';
$lang['slot_welcome'] = 'Bienvenue à la machine à sous , jouer coute';
$lang['slot_welcome2'] = ' à chaque fois.';
$lang['slot_youhave'] = 'Vous avez';
$lang['slot_afterpoints'] = '.';
$lang['slot_minimum'] = 'Vous devez posséder un minimum de';
$lang['slot_minimum2'] = '\'s pour jouer';
$lang['slot_winapple'] = 'Wow, félicitations ! 3 pommes alignées ! Ceci vous rapporte ';
$lang['slot_winbanana'] = 'Wow, félicitations ! 3 bananes alignées ! Ceci vous rapporte ';
$lang['slot_winorange'] = 'Wow, félicitations ! 3 oranges alignées ! Ceci vous rapporte ';
$lang['slot_winstar'] = 'Wow, félicitations ! 3 étoiles alignées ! Ceci vous rapporte ';
$lang['slot_win2'] = 'Et bien c\'est pas mal , vous avez aligné 2 fruits identiques , ce qui vous fait gagner';
$lang['slot_didntwin'] = 'Désolé , vous ne gagnez rien du tout';
$lang['slot_tryagain'] = 'Un autre essai?';


// Admininstration
//
$lang['admin_playprice'] = 'Mise pour jouer:';
$lang['admin_apple'] = 'Récompense pour les 3 pommes alignées :';
$lang['admin_banana'] = 'Récompense pour les 3 bananes alignées :';
$lang['admin_orange'] = 'Récompense pour les 3 oranges alignées :';
$lang['admin_starfruit'] = 'Récompense pour les 3 étoiles alignées :';
$lang['admin_2hit'] = 'Récompense pour deux fruits identiques (0 poru désactiver):';
$lang['admin_onoff'] = 'Activer | Désactiver:';
$lang['admin_slotconfig'] = 'Configuration de la machine à sous';
$lang['admin_updated'] = 'Configuration mise à jour';
$lang['admin_return'] = 'Retour ?';
$lang['admin_desc'] = 'Ici vous pouvez modifier les gains de la machine à sous , ou bien la désactiver.';


// Forms
//
$lang['slot_bet'] = '>>ESSAYER<<';
$lang['admin_submit'] = 'Valider';

?>

Locked

Return to “[2.0.x] MODs in Development”