-
Posts
727 -
Joined
-
Last visited
-
Days Won
40
Content Type
Profiles
Forums
Events
Everything posted by peterisgb
-
not bad, i used one like this long time ago, nice one for the add
-
ii dont know, i've decided not to use it but just make my own lol.
-
this dont seem to work for me.
-
hello i am looking for a referral system which the person who referred a person would only receive there referral prize once the player they referred hit a certain level. I believe there use to be one in the free modification area but i am unable to find it either by looking through the forums and using the search Could someone put me in the right direction please Thanks in advance
-
is there a way to stop users from refreshing on pages like crimes and gyms etc.
-
its done now, i managed to get it sorted, thanks for the helps peps
-
erm :s i kinda get you, i'm still learning,
-
$de = $db->query("SELECT question, correct, prize, prizeamount FROM qotd WHERE id ORDER BY `id` DESC"); $qotd = $db->fetch_row($de); this works :) ty for the help, just need to sort the forms out now.
-
$qotd=$db->query("SELECT * FROM `qotd` ORDER BY `id` ASC"); ??? and the where, well if i read this right $qotd=$db->query("SELECT * FROM `qotd` WHERE `id` AND `question` AND `correct` ORDER BY `id` ASC"); ok databse query, select stuff from qotd and the where is asking which tables it needs info and order by the id ASC which erm... displays last question only? :s
-
i added the auto id, as to the echo, i tried that but failed, not good at echos lol, but the question still aint displaying lol. $q=$db->query("SELECT * FROM qotd WHERE question AND correct"); if (!$q) { die(mysql_error()); } mysql_close($q); like that? This is what i have now, i've not put the die thingy as it didnt change anything lol <?php session_start(); include "globals.php"; global $db,$ir,$c,$h,$userid; $q=$db->query("SELECT * FROM `qotd` WHERE id AND `question` AND `correct` ORDER BY `id` ASC"); print " <br /> <form name='form1' method='post' action=''> Todays Question: <font color='green'>{$q['question']}</font> <br /> Your Answer.<input name='answer' type='text' id='answer'><br /> <input type='submit' name='Submit' value='Submit'> </form> "; $dis = ""; if (isset($_POST['Submit'])) { $answer = $_POST['answer']; if($answer == "{$q['correct']}") { print"Correct, You have been awarded 1,000 Gold, <META HTTP-EQUIV=Refresh CONTENT='10; URL=questions.php'>"; $db->query("UPDATE users SET crystals=crystals+5000 WHERE userid=$userid"); $db->query("UPDATE users SET question=1 WHERE userid=$userid"); event_add("Well done, you got todays Question Correct, you Received 5,000 Gold"); } else { $db->query("UPDATE users SET question=1 WHERE userid=$userid"); event_add("Unlucky, you got today's question wrong"); $dis = "Unlucky, Try again tomorrow <META HTTP-EQUIV=Refresh CONTENT='10; URL=questions.php'>"; } } print ""; $h->endpage(); ?>
-
i'm having some problems getting this script to work, not sure if its anything i am doing wrong but could someone point out my error. the database is set up correctly, table name is Question tables inside are question, correct which are varchar 255 My Prbblem seems to be its not selecting the info from the database and showing it. Well heres the code <?php session_start(); include "globals.php"; global $db,$ir,$c,$h,$userid; $q=$db->query("SELECT * FROM Question WHERE question AND correct",$c); print "<br /> <form name='form1' method='post' action=''> Todays Question: {$q['question']} <br /><br /> Your Answer.<input name='answer' type='text' id='answer'><br /> <input type='submit' name='Submit' value='Submit'> </form>"; $dis = ""; if (isset($_POST['Submit'])) { $password = $_POST['answer']; if($answer == "{$q['correct']}") { print"Correct, You have been awarded 1,000 Gold, <META HTTP-EQUIV=Refresh CONTENT='10; URL=questions.php'>"; $db->query("UPDATE users SET crystals=crystals+1000 WHERE userid=$userid"); $db->query("UPDATE users SET question=1 WHERE userid=$userid"); event_add("Well done, you got todays Question Correct, you Received 1,000 Gold"); } else { $db->query("UPDATE users SET question=1 WHERE userid=$userid"); event_add("Unlucky, you got today's question wrong"); $dis = "Unlucky, Try again tomorrow <META HTTP-EQUIV=Refresh CONTENT='10; URL=questions.php'>"; } } print ""; print ""; $h->endpage(); ?>
-
[mccode v2] BBCode Gradient Text Generator
peterisgb replied to shrek1609's topic in Free Modifications
i use this. you do no need no quieres. -
i dont know knowthing about javascript lol
-
2 = Iframes. Custom Criminal is in Iframe1. In Iframe 1 is, crime Name, Crime Brave and Crime Do Crime Do is then sent to Iframe2. But iframe 2 just says "You do not have enough Brave to perform this crime." In this case its not collecting the GET c from Iframe1 for Iframe2. How do i get the GET from Iframe2 to find the GET c from Iframe1. Help would be alot of help. thanks
-
its working now but i kinda got a little problem. $_GET['c']=abs((int) $_GET['c']); if(!$_GET['c']) These Lines grabs the Number from the Address bar, as its in the inteactive menu how do i get the GET to collect the link from an iframe?
-
any help on this. once this is done i can release this mod, (free)
-
still didnt work, maybe i am blind and cant see the problems lol would someone do a patch up so it will work and i will read it and learn my errors.
-
ok thanks, i'll give it a go, ty.
-
yeah, i cannot use the globals and its in the interactive menu, I have managed to get several other pages working fine within the interactive menu which are, Armoury, Shortcuts, - Basic Bank - Credit Card - Cyber Bank - Point Bank - Point Trader - Gym - Crimes (this is the one in question. Player Stats, Player Bars, Energy Refill in tab 2, Its Just this page is the one getting me lol, i just dont get why all these pages work and the crimes does not. One this is compeleted and finnished totall i might release it.
-
ok, so what would i need to do to solve this issue, and line 23 was given to my in another post i made a while back,
-
i have an interactivem menu in my game, most of it works, i have recently been trying to add in a Crimes page into the menu Below is what i have so far and need a pointer in the right direction its the docrime.php for the menu. the problem that is occuring is it keeps saying "You do not have enough Brave to perform this crime." Thanks <?php $macropage="criminaldocrime.php?c={$_GET['c']}"; session_start(); if (!isset ($_SESSION['userid']) ) { echo '<p>Not logged in.</p>'; exit; } include "config.php"; global $_CONFIG,$set; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $userid = $db->query('SELECT `userid` FROM `users` WHERE (`userid` = '.$_SESSION['userid'].')'); $ir = $db->query('SELECT `userid`, `hospital`, `jail`, `level`, `energy`, `maxenergy`, `will`, `maxwill`, `brave`, `maxbrave`, `exp`, `hp`, `maxhp`, `gymxp`, `gexp_needed` FROM `users` WHERE (`userid` = '.$_SESSION['userid'].')'); $r = $db->query('SELECT `crimeNAME`, `crimeBRAVE`, `crimeID`, `crimePERCFORM`, `crimeITEXT`, `crimeSUCCESSMUNY`, `crimeSTEXT`, `crimeSUCCESSCRYS`, `crimeXP`, `crimeSUCCESSITEM` , `crimeFTEXT`, `crimeJAILTIME`, `crimeJREASON`, `crimeJTEXT` FROM crimes'); if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } $_GET['c']=abs((int) $_GET['c']); if(!$_GET['c']) { print "Invalid crime"; } else { $q=mysql_query("SELECT * FROM crimes WHERE crimeID={$_GET['c']}",$c); $r=mysql_fetch_array($q); if($ir['brave'] < $r['crimeBRAVE']) { print "You do not have enough Brave to perform this crime."; } else { $ec="\$sucrate=".str_replace(array("LEVEL","CRIMEXP","EXP","WILL","IQ"), array($ir['level'], $ir['crimexp'], $ir['exp'], $ir['will'], $ir['IQ']),$r['crimePERCFORM']).";"; eval($ec); print $r['crimeITEXT']; $ir['brave']-=$r['crimeBRAVE']; mysql_query("UPDATE users SET brave={$ir['brave']} WHERE userid=$userid",$c); if(rand(1,100) <= $sucrate) { print str_replace("{money}",$r['crimeSUCCESSMUNY'],$r['crimeSTEXT']); $ir['money']+=$r['crimeSUCCESSMUNY']; $ir['crystals']+=$r['crimeSUCCESSCRYS']; $ir['exp']+=(int) ($r['crimeSUCCESSMUNY']/6); mysql_query("UPDATE users SET money={$ir['money']}, crystals={$ir['crystals']}, exp={$ir['exp']},crimexp=crimexp+{$r['crimeXP']},crimesdone=crimesdone+1 WHERE userid=$userid",$c); if($r['crimeSUCCESSITEM']) { item_add($userid, $r['crimeSUCCESSITEM'], 1); } } else { if(rand(1, 2) == 1) { print $r['crimeFTEXT']; } else { print $r['crimeJTEXT']; $db->query("UPDATE `users` SET `jail` = '$r[crimeJAILTIME]', `jail_reason` = '$r[crimeJREASON]' WHERE `userid` = '$userid'"); } } print "<br /><a href='criminaldocrime.php?c={$_GET['c']}'>Try Again</a><br /> <a href='playerbars.php'>close</a>"; } } $h->endpage(); ?>
-
Seacrhing Area Script Final Mod for MCCV2
peterisgb replied to Uridium's topic in Free Modifications
i've had a problem, the page was blank to me, displayed the header info but nothing on the actuall page worked :( -
to be honest the whole script needs to be reworked.
-
this looks good, nice work, shame to see you go
-
and check line 106 aswell