Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=117)
-   -   [TSSE 5.1] Casino (http://www.bvlist.com/showthread.php?t=842)

Krypto 15th August 2008 18:52

[TSSE 5.1] Casino
 
1 Attachment(s)
Code:

CREATE TABLE `blackjack` (
`userid` int(11) NOT NULL default '0',
`points` int(11) NOT NULL default '0',
`status` enum('playing','waiting') NOT NULL default 'playing',
`cards` text NOT NULL,
`date` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`userid`)
) ENGINE=MyISAM;

CREATE TABLE `cards` (
`id` int(11) NOT NULL auto_increment,
`points` int(11) NOT NULL default '0',
`pic` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM;

--
-- Dumping data for table `cards`
--

INSERT INTO `cards` (`id`, `points`, `pic`) VALUES
(1, 2, '2p.bmp'),
(2, 3, '3p.bmp'),
(3, 4, '4p.bmp'),
(4, 5, '5p.bmp'),
(5, 6, '6p.bmp'),
(6, 7, '7p.bmp'),
(7, 8, '8p.bmp'),
(8, 9, '9p.bmp'),
(9, 10, '10p.bmp'),
(10, 10, 'vp.bmp'),
(11, 10, 'dp.bmp'),
(12, 10, 'kp.bmp'),
(13, 1, 'tp.bmp'),
(14, 2, '2b.bmp'),
(15, 3, '3b.bmp'),
(16, 4, '4b.bmp'),
(17, 5, '5b.bmp'),
(18, 6, '6b.bmp'),
(19, 7, '7b.bmp'),
(20, 8, '8b.bmp'),
(21, 9, '9b.bmp'),
(22, 10, '10b.bmp'),
(23, 10, 'vb.bmp'),
(24, 10, 'db.bmp'),
(25, 10, 'kb.bmp'),
(26, 1, 'tb.bmp'),
(27, 2, '2k.bmp'),
(28, 3, '3k.bmp'),
(29, 4, '4k.bmp'),
(30, 5, '5k.bmp'),
(31, 6, '6k.bmp'),
(32, 7, '7k.bmp'),
(33, 8, '8k.bmp'),
(34, 9, '9k.bmp'),
(35, 10, '10k.bmp'),
(36, 10, 'vk.bmp'),
(37, 10, 'dk.bmp'),
(38, 10, 'kk.bmp'),
(39, 1, 'tk.bmp'),
(40, 2, '2c.bmp'),
(41, 3, '3c.bmp'),
(42, 4, '4c.bmp'),
(43, 5, '5c.bmp'),
(44, 6, '6c.bmp'),
(45, 7, '7c.bmp'),
(46, 8, '8c.bmp'),
(47, 9, '9c.bmp'),
(48, 10, '10c.bmp'),
(49, 10, 'vc.bmp'),
(50, 10, 'dc.bmp'),
(51, 10, 'kc.bmp'),
(52, 1, 'tc.bmp');

CREATE TABLE `casino` (
`userid` int(10) NOT NULL default '0',
`win` bigint(20) default NULL,
`lost` bigint(20) default NULL,
`trys` int(11) NOT NULL default '0',
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`enableplay` enum('yes','no') NOT NULL default 'yes',
`deposit` bigint(20) NOT NULL default '0',
PRIMARY KEY (`userid`)
) ENGINE=MyISAM;

CREATE TABLE `casino_bets` (
`id` int(10) unsigned NOT NULL auto_increment,
`userid` int(10) NOT NULL default '0',
`proposed` varchar(40) NOT NULL default '',
`challenged` varchar(40) NOT NULL default '',
`amount` bigint(20) NOT NULL default '0',
`time` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
KEY `userid` (`userid`,`proposed`,`challenged`,`amount`)
) ENGINE=MyISAM;

And if you want it as a plugin, Create a plugin with this code inside.

Code:

require_once('./global.php');
gzip();
dbconn();
loggedinorreturn();
maxsysop();
parked();

?>



Games......Casino......BlackJack


Fix for TS 5.6:
create user casinobot make it whatever group you like and around line 352 of casino.php

Find:
Code:

VALUES (".sqlesc('casinobOT').", ".sqlesc('999999999').", ".sqlesc('{username}').", '".TIMENOW."', ".sqlesc($casinobOT).")" or sqlerr(__FILE__, __LINE__);
edit the 999999999 and put id of casinobot and it should work.



zenja7777 16th August 2008 04:27

Many thanks Krypto :ok::friend:

Omen 16th August 2008 10:18

Thx
 
I say thank you for it nicely perfectly works.

DAKz 28th December 2009 10:05

Code:

1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE `cards` ( `id` int(11) NOT NULL auto_increment, `points` int(11) ' at line 10
This in TS SE 5.4.1

edit: nvm my bad, found the issue and fixed.

Marco 15th January 2010 13:09

on ts 5.6 can't edit users ...i think it's something on sql... i think i have to modify something on casino_player_edit.php but i really don't know what..

i make the changes on a player but not changing...

xDev 15th January 2010 13:15

Quote:

Originally Posted by Marco (Post 19570)
on ts 5.6 can't edit users ...i think it's something on sql... i think i have to modify something on casino_player_edit.php but i really don't know what..

i make the changes on a player but not changing...

the php not in your site need putting the in the main :drink:

wMan 6th April 2010 01:20

Quote:

Originally Posted by Krypto (Post 3460)

ok put this on a site not working on taking upload off and not giving upload to users play:sos:ing it and only get a pm when a user pm a user or staff then the games pm come on a pm lol

fireman 13th April 2010 05:34

Reply
 
Your best to use files in first post as there are errors in http://bvlist.com/tsse/1308-%5Btsse-...t-edition.html

Use This http://bvlist.com/3460-post1.html

wMan 15th April 2010 23:59

Quote:

Originally Posted by Krypto (Post 3460)
edit the 999999999 and put id of casinobot and it should work.


yes this is the mod that will not pm anyone about win or loose put it on ts 5,6 sorry not working at all on the ts 5.6 its not like i do not know what to do on instaling cos i do

Marco 31st October 2010 21:18

i believe i didn't explain the problem

on casino_player i take the option to edit user when i clicking to edit
i use
casino_player_edit.php
so when i modifying his stats didn't really change nothing... so can anyone explain what's wrong?

or how could this changed.... how i write before..is something an sql request what didn't work well...:)


All times are GMT +2. The time now is 10:31.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.