
MajikalJoker
Members-
Posts
43 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by MajikalJoker
-
mccode-v2 Daily bank interest event
MajikalJoker replied to MajikalJoker's topic in Modification Support
Yes it did, it was able to point us in the direction we needed to go, Thank you! -
mccode-v2 Daily bank interest event
MajikalJoker replied to MajikalJoker's topic in Modification Support
we managed to get this working and fixed! Topic can be closed -
mccode-v2 Daily bank interest event
MajikalJoker replied to MajikalJoker's topic in Modification Support
okay, thank you, ill give it a try -
mccode-v2 Daily bank interest event
MajikalJoker replied to MajikalJoker's topic in Modification Support
is this used in the daily cron? -
mccode-v2 Daily bank interest event
MajikalJoker replied to MajikalJoker's topic in Modification Support
thank you for the help, we are not 100% sure that works due to the fact that everytime we try to add something like $ints= $r['bankmoney']/100*3 ; $intsd= $r['bankmoney']/100*8 ; $ints=money_formatter($ints); $intsd=money_formatter($intsd); anywhere in the daily con it breaks the whole thing -
okay so.... ive been trying so many ways to do this but can not figure it out... im wanting o make it to where players get a daily event telling them how much interest they got in their bank for the day. ive tried about 8 different ways to do it but i can not get it to work, i cant get it to call the bank interest amount without breaking the script, and if i do it without i can make an event happen but it does not show how much they got and its blank on almost all info..... can anyone help?
-
i know this is a bit old but the page just wont load up. line for line copy, the page does not load
-
never mind lol... i got it fixed.... i had to change a few other things to get it to work.... here is my version that i got working so far, but now you can not edit any sites, even in phpadmin <?php require_once('globals.php'); ?> <style type="text/css" media="screen"> .red { color: #990000; } .green { color: #4CAF50; } .button { background-color: #787878; border-radius: 10px; border: none; color: white; padding: 8px 25px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin: 2px 1px; cursor: pointer; } input[type='text'] { width: 221px; background: transparent url('images/bg.jpg') no-repeat; color : #423232; height:20px; border:1; padding:4px 8px; margin-bottom:0px; border-radius: 10px; } .dropdown { width: 200px; background: transparent url('images/bg.jpg') no-repeat; color : #423232; height:30px; border:1; padding:4px 8px; margin-bottom:0px; border-radius: 10px; } table.darkTable { font-family: "Arial Black", Gadget, sans-serif; border: 2px solid #000000; background-color: #4A4A4A; width: 100%; height: 200px; text-align: center; border-collapse: collapse; } table.darkTable td, table.darkTable th { border: 1px solid #4A4A4A; padding: 3px 2px; } table.darkTable tbody td { font-size: 13px; color: #E6E6E6; } table.darkTable tr:nth-child(even) { background: #888888; } table.darkTable thead { background: #000000; border-bottom: 3px solid #000000; } table.darkTable thead th { font-size: 15px; font-weight: bold; color: #E6E6E6; text-align: center; border-left: 2px solid #4A4A4A; } table.darkTable thead th:first-child { border-left: none; } table.darkTable tfoot { font-size: 12px; font-weight: bold; color: #E6E6E6; background: #000000; background: -moz-linear-gradient(top, #404040 0%, #191919 66%, #000000 100%); background: -webkit-linear-gradient(top, #404040 0%, #191919 66%, #000000 100%); background: linear-gradient(to bottom, #404040 0%, #191919 66%, #000000 100%); border-top: 1px solid #4A4A4A; } table.darkTable tfoot td { font-size: 12px; } </style> <?php echo '<h2>Voting</h2>This is where you vote for ' . $set['game_name'] . '.<hr />'; if (!isset($_GET['a'])) { $_GET['a'] = ''; } $_GET['vote'] = array_key_exists('vote', $_GET) && is_numeric($_GET['vote']) ? (int)$_GET['vote'] : null; switch ($_GET['a']) { case 'staff': staff_panel(); break; case 'add': add(); break; case 'addvote': add_go(); break; case 'edit': edit(); break; case 'delete': delete(); break; case 'vote': go_vote(); break; default: index(); break; } function processPost() { $strs = ['tag', 'linktext', 'banner', 'reward1type']; foreach ($strs as $str) { $_POST[$str] = array_key_exists($str, $_POST) && is_string($_POST[$str]) && $_POST[$str] !== '' ? strip_tags(trim($_POST[$str])) : ''; } $_POST['link'] = array_key_exists('link', $_POST) && filter_var($_POST['link'], FILTER_VALIDATE_URL) ? $_POST['link'] : ''; } function index() { global $db, $ir, $userid, $h; if ($ir['user_level'] == 2) { $slink = '<a href="?a=staff" class="button">Staff Panel</a>'; } else { $slink = ''; } echo $slink . ' <table class="darkTable"> <thead> <tr> <th>Site</th> <th>Banner</th> <th>Rewards</th> <th>Voted?</th> <th>Rank</th> <th></th> </tr> </thead> <tbody> '; $myVotes = []; $selectMyVotes = $db->query('SELECT list FROM votes WHERE userid = ' . $userid); if ($db->num_rows($selectMyVotes)) { while ($row = $db->fetch_row($selectMyVotes)) { $myVotes[] = $row['list']; } } $v = $db->query("SELECT * FROM `vote` WHERE active=1"); while ($vote = $db->fetch_row($v)) { if (in_array($vote['tag'], $myVotes)) { $voted = '<span class="green"><b>Yes</b></span>'; } else { $voted = '<span class="red"><b>No</b></span>'; } echo ' <tr height="50"> <td>' . $vote['linktext'] . '</td> <td><img src="vote/' . $vote['banner'] . '" width="108" height="40" border="0"></td> <td>'; if ($vote['reward1active'] == 1) { if($vote['reward1type'] === 'money') { echo '$'.number_format($vote['reward1']); } elseif($vote['reward1type'] === 'donatordays') { echo number_format($vote['reward1']).' donator day'.((int)$vote['reward1'] === 1 ? '' : 's'); } else { echo $vote['reward1'].' '.$vote['reward1type']; } echo '<br />'; } if ($vote['reward2active'] == 1) { if($vote['reward2type'] === 'money') { echo '$'.number_format($vote['reward2']); } elseif($vote['reward2type'] === 'donatordays') { echo number_format($vote['reward2']).' donator day'.((int)$vote['reward2'] === 1 ? '' : 's'); } else { echo $vote['reward2'].' '.$vote['reward2type']; } echo '<br />'; } if ($vote['reward3active'] == 1) { if($vote['reward3type'] === 'money') { echo '$'.number_format($vote['reward3']); } elseif($vote['reward3type'] === 'donatordays') { echo number_format($vote['reward3']).' donator day'.((int)$vote['reward3'] === 1 ? '' : 's'); } else { echo $vote['reward3'].' '.$vote['reward3type']; } echo '<br />'; } echo '</td> <td>' . $voted . '</td> <td>' . $vote['rank'] . '</td> <td><a href="?a=vote&vote=' . $vote['id'] . '" target="_BLANK" class="button">Vote for '.$vote['tag'].'</a></td> </tr>'; } echo '</tbody></table>'; $h->endpage(); } function go_vote() { global $db, $userid, $h; $vo = $db->query("SELECT * FROM vote WHERE id=" . $_GET['vote']); $details = $db->fetch_row($vo); $list = $details['tag']; $q = $db->query("SELECT * FROM votes WHERE userid=$userid AND list='$list'"); if ($db->num_rows($q)) { echo "<script>window.close();</script>"; die('You have already voted at ' . $vote['linktext'] . ' today!<br /><a href=vote.php>Back</a>'); $h->endpage(); exit; } else { $vote = $details['tag']; $reward1active = $details['reward1active']; $reward1 = $details['reward1']; $reward1type = $details['reward1type']; $reward2active = $details['reward2active']; $reward2 = $details['reward2']; $reward2type = $details['reward2type']; $reward3active = $details['reward3active']; $reward3 = $details['reward3']; $reward3type = $details['reward3type']; $db->query("INSERT INTO `votes` (`userid`, `list`) VALUES ('$userid', '$vote')"); if ($reward1active == 1) { $db->query("UPDATE users SET $reward1type=$reward1type+$reward1 WHERE userid=$userid"); } if ($reward2active == 1) { $db->query("UPDATE users SET $reward2type=$reward2type+$reward2 WHERE userid=$userid"); } if ($reward3active == 1) { $db->query("UPDATE users SET $reward3type=$reward3type+$reward3 WHERE userid=$userid"); } header("Location: " . $details['link']); } $h->endpage(); exit; } function staff_panel() { global $h; $version='1.1.3'; echo '<h2>Staff Panel</h2><br /> <a href="?a=add" class="button">Add Vote Site</a><br /> <a href="?a=edit" class="button">Edit Vote Site</a><br /> <a href="?a=delete" class="button">Delete Vote Site</a><br /><br /> <a href="vote.php" class="button">Back</a><br /><br /> Update Status:<br /> <iframe src="https://www.arcadiagames.tk/update/update_check.php?v='.$version.'&mod=vote" width="250" height="60" scrolling="no" frameborder="1"></iframe> '; $h->endpage(); } function add() { global $h; echo '<h2>Add Voting Site</h2><hr /> <form action="?a=addvote" method="POST"> Tag: <input type="text" name="tag" placeholder="Voting Site Tag, keep it Short"><br /> Link: <input type="text" name="link" placeholder="Link to Voting site"><br /> Link Text: <input type="text" name="linktext" placeholder="Link Display text"><br /> Rank: <input type="text" name="rank" placeholder="Site Rank"><br /> Banner: <input type="text" name="banner" placeholder="Default is none.png"><br /> Active: <select name="active" type="dropdown" class="dropdown"> <option value="1">Active</option> <option value="0">Not Active</option> </select><hr /> Reward 1 Active: <select name="reward1active" type="dropdown" class="dropdown"> <option value="1">Active</option> <option value="0">Not Active</option> </select><br /> Reward 1: <input type="text" name="reward1" placeholder="1000"><br /> Reward 1 Type: <select name="reward1type" type="dropdown" class="dropdown"> <option value="money">Money</option> <option value="crystals">Crystals</option> <option value="donatordays">Donator Days</option> </select><hr /> Reward 2 Active: <select name="reward2active" type="dropdown" class="dropdown"> <option value="1">Active</option> <option value="0">Not Active</option> </select><br /> Reward 2: <input type="text" name="reward2" placeholder="1000"><br /> Reward 2 Type: <select name="reward2type" type="dropdown" class="dropdown"> <option value="money">Money</option> <option value="crystals">Crystals</option> <option value="donatordays">Donator Days</option> </select><hr /> Reward 3 Active: <select name="reward3active" type="dropdown" class="dropdown"> <option value="1">Active</option> <option value="0">Not Active</option> </select><br /> Reward 3: <input type="text" name="reward3" placeholder="1000"><br /> Reward 3 Type: <select name="reward3type" type="dropdown" class="dropdown"> <option value="money">Money</option> <option value="crystals">Crystals</option> <option value="donatordays">Donator Days</option> </select><br /> <input type="submit" class="button" value="Add Voting Site"></form><br /> <a href=vote.php>Back</a>'; $h->endpage(); exit; } function add_go() { global $db, $h; processPost(); $tag = $_POST['tag']; $link = $_POST['link']; $linktext = $_POST['linktext']; $rank = $_POST['rank']; $banner = $_POST['banner']; $active = $_POST['active']; $reward1active = $_POST['reward1active']; $reward1 = $_POST['reward1']; $reward1type = $_POST['reward1type']; $reward2 = $_POST['reward2']; $reward2type = $_POST['reward2type']; $reward3active = $_POST['reward3active']; $reward3 = $_POST['reward3']; $reward3type = $_POST['reward3type']; $db->query("INSERT INTO vote VALUES('','$tag', '$link', '$linktext', '$rank', '$banner', '$active', '$reward1active', '$reward1', '$reward1type', '$reward2active', '$reward2', '$reward2type', '$reward3active', '$reward3', '$reward3type')"); echo 'Voting site ' . $linktext . ' was added to the game. <br /><a href="?a=staff.php">Back</a>'; stafflog_add("Added voting site $linktext.<br /><a href=vote.php>Back</a>"); $h->endpage(); exit; } function edit() { global $db, $h; $_POST['step'] = array_key_exists('step', $_POST) && is_numeric($_POST['step']) ? (int)$_POST['step'] : null; switch ($_POST['step']) { case "2": processPost(); $tag = $_POST['tag']; $link = $_POST['link']; $linktext = $_POST['linktext']; $rank = $_POST['rank']; $banner = $_POST['banner']; $active = $_POST['active']; $reward1active = $_POST['reward1active']; $reward1 = $_POST['reward1']; $reward1type = $_POST['reward1type']; $reward2active = $_POST['reward2active']; $reward2 = $_POST['reward2']; $reward2type = $_POST['reward2type']; $reward3active = $_POST['reward3active']; $reward3 = $_POST['reward3']; $reward3type = $_POST['reward3type']; $db->query("UPDATE vote SET tag='$tag', link='$link', linktext='$linktext', rank='$rank', banner='$banner', active='$active', reward1active='$reward1active', reward1='$reward1', reward1type='$reward1type', reward2active='$reward2active', reward2='$reward2', reward2type='$reward2type', reward3active='$reward3active', reward3='$reward3', reward3type='$reward3type' WHERE tag='$tag'"); echo 'Voting site ' . $linktext . ' was edited successfully.<br /><a href=vote.php>Back</a>'; stafflog_add("Edited Voting Site $linktext. <br /><a href=vote.php>Back</a>"); $h->endpage(); break; case "1": if ($_POST['tag'] === '') { echo 'You didn\'t enter a valid tag.<br /><a href=vote.php>Back</a>'; $h->endpage(); exit; } $tag = $_POST['tag']; $dr = $db->query("SELECT * FROM vote WHERE tag='$tag'"); if (!$db->num_rows($dr)) { echo 'The vote site you selected doesn\'t exist.<br /><a href=vote.php>Back</a>'; $h->endpage(); exit; } $old = $db->fetch_row($dr); echo '<h2 class="fontface">Editing a voting site</h2><hr /> <form action="?a=edit" method="POST"> <input type="hidden" name="step" value="2"> Tag: <input type="text" name="tag" value="' . $old['tag'] . '"><br /> Link: <input type="text" name="link" value="' . $old['link'] . '"><br /> Link Text: <input type="text" name="linktext" value="' . $old['linktext'] . '"><br /> Rank: <input type="text" name="rank" value="' . $old['rank'] . '"><br /> Banner: <input type="text" name="banner" value="' . $old['banner'] . '"><br /> Active: <select name="active" type="dropdown" class="dropdown"> <option value="1">Active</option> <option value="0">Not Active</option> </select><hr /> Reward 1 Active: <select name="reward1active" type="dropdown" class="dropdown"> <option value="1">Active</option> <option value="0">Not Active</option> </select><br /> Reward 1: <input type="text" name="reward1" value="' . $old['reward1'] . '"><br /> Reward 1 Type: <select name="reward1type" type="dropdown" class="dropdown"> <option value="money">Money</option> <option value="crystals">Crystals</option> <option value="donatordays">Donator Days</option> </select><hr /> Reward 2 Active: <select name="reward2active" type="dropdown" class="dropdown"> <option value="1">Active</option> <option value="0">Not Active</option> </select><br /> Reward 2: <input type="text" name="reward2" value="' . $old['reward2'] . '"><br /> Reward 2 Type: <select name="reward2type" type="dropdown" class="dropdown"> <option value="money">Money</option> <option value="crystals">Crystals</option> <option value="donatordays">Donator Days</option> </select><hr /> Reward 3 Active: <select name="reward3active" type="dropdown" class="dropdown"> <option value="1">Active</option> <option value="0">Not Active</option> </select><br /> Reward 3: <input type="text" name="reward3" value="' . $old['reward3'] . '"><br /> Reward 3 Type: <select name="reward3type" type="dropdown" class="dropdown"> <option value="money">Money</option> <option value="crystals">Crystals</option> <option value="donatordays">Donator Days</option> </select><br /> <input type="submit" value="Edit Voting Site" class="button"></form><br /> <a href=vote.php>Back</a>'; $h->endpage(); break; default: echo '<h2 class="fontface">Editing a Voting Site</h2><hr /> <form action="?a=edit" method="POST"> <input type="hidden" name="step" value="1"> Select voting site: '; function tag_dropdown($connection, $ddname = "tag", $selected = -1) { global $db; $ret = "<select name='$ddname' type='dropdown' class='dropdown'>"; $q = $db->query("SELECT `tag`, `linktext` FROM `vote` ORDER BY `tag` ASC"); if ($selected == -1) { $first = 0; } else { $first = 1; } while ($r = $db->fetch_row($q)) { $ret .= "\n<option value='{$r['tag']}'"; if ($selected == $r['tag'] || $first == 0) { $ret .= " selected='selected'"; $first = 1; } $ret .= ">{$r['linktext']}</option>"; } $db->free_result($q); $ret .= "\n</select>"; return $ret; } echo ''.tag_dropdown(NULL, 'tag').'<br /> <input type="submit" value="Edit Voting Site" class="button"></form><br /> <a href=vote.php>Back</a>'; $h->endpage(); break; } } function delete() { global $db, $h; if ($_POST['tag']) { processPost(); if ($_POST['tag'] === '') { echo 'You didn\'t enter a valid tag.<br /><a href=vote.php>Back</a>'; $h->endpage(); exit; } $tag = $_POST['tag']; $db->query("DELETE FROM vote WHERE tag=$tag"); echo 'Voting Site ' . $tag . ' deleted.<br /><a href=vote.php>Back</a>'; stafflog_add("Deleted Voting Site $tag"); $h->endpage(); exit; } else { echo '<h2 class="fontface">Delete Voting Site</h2><hr /> Deleting a voting site. <form action="?a=delete" method="POST"> Tag: <input type="text" name="tag"><br /> <input type="submit" value="Delete Voting Site" class="button"></form><br /> <a href=vote.php>Back</a>'; $h->endpage(); exit; } } ?> Updated SQL to be able to edit sites and details in phpadmin CREATE TABLE `vote` ( `id` int(11) NOT NULL AUTO_INCREMENT , `tag` varchar(10) DEFAULT NULL, `link` varchar(255) DEFAULT NULL, `linktext` varchar(255) DEFAULT NULL, `rank` int(11) NOT NULL DEFAULT 0, `banner` varchar(255) DEFAULT 'none.png', `active` tinyint(1) NOT NULL DEFAULT 0, `reward1active` tinyint(1) NOT NULL DEFAULT 1, `reward1` int(11) NOT NULL DEFAULT 0, `reward1type` varchar(30) DEFAULT NULL, `reward2active` tinyint(1) DEFAULT 0, `reward2` int(11) DEFAULT 0, `reward2type` varchar(30) DEFAULT NULL, `reward3active` tinyint(1) NOT NULL DEFAULT 0, `reward3` int(11) DEFAULT 0, `reward3type` varchar(30) DEFAULT NULL, PRIMARY KEY(`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
-
mccode-v2 Honor Awards - Modified by HarryB
MajikalJoker replied to HarryB's topic in Free Modifications
very true and i gotta say they are on the right path... I seen things that are old on here and i want to use or add and sometimes something or many things are broke on the code and due to the site being down for so long ALOT of people forgot about it. -
jail bust.php gains labour experience .
MajikalJoker replied to athena26's topic in Free Modifications
i really really like this idea so far does it fully work and does it call the DB without issues? -
hate to dig this up but....... has anyone made one or found the code?
-
Thank you very very much!! and DAMN!!!... 20gbs of mods?... man id love to see what all you have lol... im wanting to build a game and i need some good mods, ive been busting my but doing a lot of try and error just by myself, and even if its selling the mod to me id love to see what you got
-
@Dave@sniko @Magictallguydoes anyone have the v1.1.5 or v2?
-
i will try to, im still learning a lot with that lol. thank you!
-
any recommendations? or what can I do?
-
so far all the ones i tried would not credit the user, i have not tired this one yet.... what im wanting to do with donator packs is have them be a item in the game so users can trade or sell them off... but for some reason a few of the ones i tried never credited the pack even after the user did pay. thats why i asked
-
is there a Donator system that does work out of the box or at least one thats like the first one posted that a beginner can work on?