
shrek1609
Members-
Posts
310 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by shrek1609
-
Re: Items in Items don't have time to make this but you could something along these lines... open inventory and find if($i['effect1_on'] || $i['effect2_on'] || $i['effect3_on']) { print " [[url='itemuse.php?ID={$i[']Use[/url]] "; } you can either add a new field to items ie $i['effect4_on']) or just use one of the 3 effect options just for your presents... this would be easier as less to change... so change above code to if($i['effect1_on'] || $i['effect2_on']){ print " [[url='itemuse.php?ID={$i[']Use[/url]] "; } else if ($i['effect3_on']) print " [[url='itemuse.php?ID={$i[']Unwrap Present[/url]] "; } so now create your item present and set effect 3 to on but leave rest of the effect 3 options alone (basically so it does nothing) then open up item use... find if($r['effect3_on']) { add under that... replace the item number 104 with the item id number of your present you created if($r['itmid']==104) { $db->query("INSERT INTO inventory VALUES('',999,$userid,1)"); } 999 being the item id number of the item you wish them to find inside the present...
-
Re: [V2] Friendslist/Blacklist ahhh i see :) why not go a bit further then and make it also that when you add a friend they have to accept before they are added... add an enemy and they get notified you have added them... if you are unsure of the coding i think the simple marriage mod would give you ideas for the coding needed...
-
Re: [V2] Friendslist/Blacklist isn't this standard in mccodes V2? (donators option only)
-
Re: a couple of mods just edited the attack code forgot to add the event function... any problems message me
-
Re: a couple of mods again add to cron of your choice... will make the NPC's appear online //fetchs the npc info and makes them appear online $db->query("UPDATE users SET laston=unix_timestamp() WHERE user_level = 0"); //fetch
-
Re: a couple of mods this code again added into a cron will make the npc's train their stats... // start training code $q=$db->query("SELECT * FROM users where user_level = 0 and hospital = 0 limit 20"); while($r=$db->fetch_row($q)) { $gain=0; for($i=0; $i<$r['energy']; $i++) { $stat+=rand(1,3)/rand(800,1000)*rand(800,1000)*(($r['will']+20)/150); } $statgain=rand(1,3); if ($statgain == 1) { $db->query("update userstats set strength=strength+$stat where userid = {$r['userid']}"); } else if ($statgain == 2) { $db->query("update userstats set guard=guard+$stat where userid = {$r['userid']}"); } else if ($statgain == 3) { $db->query("update userstats set agility=agility+$stat where userid = {$r['userid']}"); } }
-
Re: a couple of mods This will automate the NPC's and get them to attack random members, the NPC's will jump to the city of the random member then attack them.... you may need to change the exp given i have exp caps in my game so edit it to suit your game... add this to whichever cron you want mine is in a new cron which runs every 20 mins you could add it to 5min cron or hour cron etc // start attack code function eve_add($userid,$text,$connection=0) { global $db; $text=mysql_esca($text); $db->query("INSERT INTO events VALUES('',$userid,UNIX_TIMESTAMP(),0,'$text')"); $db->query("UPDATE users SET new_events=new_events+1 WHERE userid={$userid}"); return 1; } function mysql_esca($str) { return str_replace("'","''",$str); } $q=$db->query("SELECT * FROM users where user_level = 0 and hospital =0 limit 20"); while($r=$db->fetch_row($q)) { $s=$db->query("SELECT * FROM users where user_level > 0 and hospital =0 and jail =0 order by rand() limit 1"); $p=$db->fetch_row($s); $numb=$db->num_rows($s); if ($numb > 0) { $db->query("UPDATE users SET location={$p['location']} WHERE userid={$r['userid']}"); $t=$db->query("SELECT * FROM userstats where userid={$r['userid']}"); $v=$db->fetch_row($t); $bot=($v['strength'] + $v['guard'] + $v['agility']); $x=$db->query("SELECT * FROM userstats where userid={$p['userid']}"); $w=$db->fetch_row($x); $memb=($w['strength'] + $w['guard'] + $w['agility']); if ($bot > $memb) { $qe=abs((($p['level']-$r['level'])*100) + 100); if ($qe > 10000) { $qe = 10000; } if ($qe < 0) { $qe = 1; } if ($p['level'] < $r['level']) { $qe = 1; } $db->query("UPDATE users SET exp=exp+$qe WHERE userid={$r['userid']}"); $hosptime=20; $db->query("UPDATE users SET hp=1,hospital=$hosptime,hospreason='Hospitalized by <a href=\'viewuser.php?u={$r['userid']}\'>{$r['username']}</a>' WHERE userid={$p['userid']}"); eve_add($p['userid'],"[url='viewuser.php?u={$r[']{$r['username']}[/url] beat you up. They gained $qe",$c); } else { $qe=abs((($p['level']-$r['level'])*100) + 100); if ($qe > 10000) { $qe = 10000; } if ($qe < 0) { $qe = 1; } if ($p['level'] < $r['level']) { $qe = 1; } $db->query("UPDATE users SET exp=exp+$qe WHERE userid={$p['userid']}"); $db->query("UPDATE users SET exp=0 WHERE exp < 0"); eve_add($p['userid'],"[url='viewuser.php?u={$r[']{$r['username']}[/url] attacked you and lost. You gained $qe",$c); } } }
-
Re: [McCodes v2] ($3) Database driven voting script with incentive and security Now installed this script and i have to say this is a ridiculous price for this mod... The coding is top notch, his support is fantastic... this script is a BARGAIN at this price... i love the idea of the vote shop where they can spend their tokens earnt from voting properly... what might be a nice addition for this would be to add a log of what people are buying with the tokens ;) i'm coding a log in so if you want i will send it you when i have done it so you can parcel it up with the mod ;)
-
Re: [McCodes v2] ($3) Database driven voting script with incentive and security i've purchased this and not had chance to install yet as going to use it on a new game i am creating... read through the coding and so far looks very impressive and well coded... will update more later when i get chance to install and test out :)
-
Re: [mccode v2] Bodyguard Mod I dunno why people have to be hard when someone posts something for free and are prepared to share it... Notorious while i haven't actually used this mod i will be totally honest and tell you its solved a problem of a new addition i am doing for my game... I was looking at a much more complex way and your above code has given me a much simpler idea of doing it ;) so thank you for that :)
-
Re: [v2]Html text converter[v2] LMAO this is my mod but you have just changed one line of code ? print"<font color='#".$key."'>".$value."</font>"; link to original http://criminalexistence.com/ceforums/index.php?topic=22246.0
-
Re: Simple Marriage [V2] Very nice mate ;) Just an idea for you instead of making the item one rose, why not make the item a bouquet of roses... that way you are only adding one item rather than multiple ones ;)
-
Re: Simple Marriage [V2] Nice mod mate one little problem i can see where members will abuse this... For $10,000 they can get someone to keep sending roses and keep increasing their will... This means their will could end up over their max will... Doing this multiple times could drastically increase their training of stats... quick fix would be to stick this in the header.php... $db->query("UPDATE users SET will=maxwill where will > maxwill"); Better fix would be to do a check in the marriage mod checking that their will + $rand is less than their maxwill if it is update will by $rand if not update their will=maxwill... Other thing is i would not recommend house sharing as i tried this on my game and took it out, buying of houses is one of the biggest ways of money being taken out of the game... When two share one house thats a lot of money that isnt being taken out the game ;)
-
Re: Gallery System I have purchased this modification and had a few issues and spudinski totally went out of his way to help... The support he offered on this was fantastic and did so at no extra cost to the price i paid for the modification... I am so impressed with both this mod and the support and help offered by spudinski i have sent him a bonus through paypal to thank him for his help... If you like the sounds of this mod don't hesitate to buy, the mod and the support is fantastic... Thanks Spudinski
-
Re: [Free] Log Suspicious Users Thank you so much for this, i added this yesterday and had a report on a player attempting to scam... So i ran the log user on him and uncovered the fact he was using four accounts using various proxies to cover his tracks... He was transferring items, cash and crystals using the markets... Via using this mod i was able to track everything he had done and refund all members he scammed... again many thanks...
-
[mccode v2] BBCode Gradient Text Generator
shrek1609 replied to shrek1609's topic in Free Modifications
Re: BBCode Gradient Text Generator --- FREE Mod Thanks for that and i will do, to be honest i wasn't expecting to get it working properly and was quite pleased with myself when i did manage to get it working correctly hence posting it on here... -
[mccode v2] BBCode Gradient Text Generator
shrek1609 replied to shrek1609's topic in Free Modifications
Re: BBCode Gradient Text Generator --- FREE Mod I have not aimed to take credit for someone elses work... I was looking for the ability for gradient names throughout the whole script for quite a while... the first part of the code i found on the net (i dont think it was from the link you have posted, but may be wrong) I saved the code as it didn't work properly --- READ THE POSTERS ADMISSION to quote "Sometimes the end color will f%&k up and the last character won't be colored right." I have fixed this problem and also altered the code to fit this modification... As it was weeks later that i have gone back to have a play with this code i couldn't even remember where i originally got the starter idea/code for it from... Anyway my apologies to the original poster of the starter code if i have caused offence in anyway... I'm new to php coding and the best way of learning is to use google and get examples of scripts and i have numerous examples saved on my pc that i have used to learn from... -
[mccode v2] BBCode Gradient Text Generator
shrek1609 replied to shrek1609's topic in Free Modifications
Re: BBCode Gradient Text Generator --- FREE Mod I've added this just below where you reply to a topic in the forum, they can then enter the text they want to convert, then copy and paste the bbcode into a forum post, you could use it for member signatures etc... -
[mccode v2] BBCode Gradient Text Generator
shrek1609 replied to shrek1609's topic in Free Modifications
Re: BBCode Gradient Text Generator --- FREE Mod I've actually done that on my site... I've coded the gradient colored names throughout the whole site, its not something i can really post how to do it as each file required different coding to get it to work... You will need to declare the function in global_functions.php then create two fields in the users table, one for start color one for end color. A simple file to ask the member for a start color and an end color would be needed with a sql query to update the database... Then just use if statements whereever you want the gradient name displayed... -
A little mod i have put together for members to be able to create Gradient text in BBCode format... Looks Like This Screen Shot Create a file called gradient.php <?php include "globals.php"; print"<h3>BBCode Gradient Text Generator</h3>"; function prepareGradien($hexstart, $hexend, $sentence) { $steps = strlen($sentence); $start['r'] = hexdec(substr($hexstart, 0, 2)); $start['g'] = hexdec(substr($hexstart, 2, 2)); $start['b'] = hexdec(substr($hexstart, 4, 2)); $end['r'] = hexdec(substr($hexend, 0, 2)); $end['g'] = hexdec(substr($hexend, 2, 2)); $end['b'] = hexdec(substr($hexend, 4, 2)); $step['r'] = ($start['r'] - $end['r']) / ($steps); $step['g'] = ($start['g'] - $end['g']) / ($steps); $step['b'] = ($start['b'] - $end['b']) / ($steps); $gradien = array(); for($i = 0; $i < $steps; $i++) { $rgb['r'] = floor($start['r'] - ($step['r'] * $i)); $rgb['g'] = floor($start['g'] - ($step['g'] * $i)); $rgb['b'] = floor($start['b'] - ($step['b'] * $i)); $hex['r'] = sprintf('%02x', ($rgb['r'])); $hex['g'] = sprintf('%02x', ($rgb['g'])); $hex['b'] = sprintf('%02x', ($rgb['b'])); $gradien[] = implode(NULL, $hex); } $letters = array(); for($i = 0; $i < $steps; $i++) { $letters[] = $sentence{$i}; } $grad = array(); for($j = 0; $j < $steps; $j++) { $grad[$gradien[$j]] = $letters[$j]; } return $grad; } function gradien($hexstart, $hexend, $sentence) { $gradien = prepareGradien($hexstart, $hexend, $sentence); foreach($gradien as $key => $value) { $value = str_replace('&','&',$value); $value = str_replace('<','<',$value); $value = str_replace('>','>',$value); print"[color=#".$key."]".$value."[/color]"; } } function prepareGradie($hexstart, $hexend, $sentence) { $steps = strlen($sentence); $start['r'] = hexdec(substr($hexstart, 0, 2)); $start['g'] = hexdec(substr($hexstart, 2, 2)); $start['b'] = hexdec(substr($hexstart, 4, 2)); $end['r'] = hexdec(substr($hexend, 0, 2)); $end['g'] = hexdec(substr($hexend, 2, 2)); $end['b'] = hexdec(substr($hexend, 4, 2)); $step['r'] = ($start['r'] - $end['r']) / ($steps); $step['g'] = ($start['g'] - $end['g']) / ($steps); $step['b'] = ($start['b'] - $end['b']) / ($steps); $gradie = array(); for($i = 0; $i < $steps; $i++) { $rgb['r'] = floor($start['r'] - ($step['r'] * $i)); $rgb['g'] = floor($start['g'] - ($step['g'] * $i)); $rgb['b'] = floor($start['b'] - ($step['b'] * $i)); $hex['r'] = sprintf('%02x', ($rgb['r'])); $hex['g'] = sprintf('%02x', ($rgb['g'])); $hex['b'] = sprintf('%02x', ($rgb['b'])); $gradie[] = implode(NULL, $hex); } $letters = array(); for($i = 0; $i < $steps; $i++) { $letters[] = $sentence{$i}; } $grad = array(); for($j = 0; $j < $steps; $j++) { $grad[$gradie[$j]] = $letters[$j]; } return $grad; } function gradie($hexstart, $hexend, $sentence) { $gradie = prepareGradie($hexstart, $hexend, $sentence); foreach($gradie as $key => $value) { $value = str_replace('&','&',$value); $value = str_replace('<','<',$value); $value = str_replace('>','>',$value); print"[b]<font color='#".$key."'>".$value."</font>[/b]"; } } print "<form action='gradient.php' method='post'> <input type=hidden name=submit value=1> <select class=textbox name='start'> <option value='0'>Select Start Color</option> <option value='ff0000'>Red</option> <option value='ffffff'>White</option> <option value='ffff00'>Yellow</option> <option value='0000ff'>Blue</option> <option value='FF1493'>Pink</option> <option value='696969'>Grey</option> <option value='00ff00'>Lime</option> <option value='E9967A'>Salmon</option> <option value='9932CC'>Purple</option> <option value='FFA500'>Orange</option> <option value='40E0D0'>Turquoise</option> </select> <select class=textbox name='stop'> <option value='0'>Select End Color</option> <option value='ff0000'>Red</option> <option value='ffffff'>White</option> <option value='ffff00'>Yellow</option> <option value='0000ff'>Blue</option> <option value='FF1493'>Pink</option> <option value='696969'>Grey</option> <option value='00ff00'>Lime</option> <option value='E9967A'>Salmon</option> <option value='9932CC'>Purple</option> <option value='FFA500'>Orange</option> <option value='40E0D0'>Turquoise</option> </select> <font color='red'>[b]Enter the Text you wish to Convert[/b]</font> <input type='text' name='text' maxlength='20' length='20' /> <font color='red'>Maximum of 20 Characters</font> <input type='submit' value='Convert to BBCode' /> </form> "; if($_POST['submit']) { if ($_POST['start'] == $_POST['stop']) { print "The Start color and End color cannot be the same"; $h->endpage(); exit; } if (strlen($_POST['text']) > 20) { print "Stop trying to abuse the game!!!"; $h->endpage(); exit; } if($_POST['text'] == "") { print "You did not enter any text stupid."; } else { print"<textarea rows=5 cols=100>"; gradien($_POST['start'], $_POST['stop'], $_POST['text']); print"</textarea> "; print" <table class='table' width='75%'><tr><th>Your Text will look like this</th></tr><tr><td>"; gradie($_POST['start'], $_POST['stop'], $_POST['text']); print"</td></tr></table>"; } } $h->endpage(); ?>
-
Re: The Drug Deal --- Free V2 Mod with thanks to topmorpg i have just modified the drugsell.php and drugbuy.php to fix the security problem... So if you have already installed please replace the drugsell.php and drugbuy.php code with the modified version in first post... Thanks for your advice topmorpg :)
-
Re: The Drug Deal --- Free V2 Mod How is it complicated??? 5 files to upload 1 sql file to import one edit followed by running a file once???
-
Re: Itempedia FREE V2 Mod... Thanks Halo... I don't have time to do a conversion to V1 but should be pretty simple... Also i dont have access to a V1 script for testing a conversion...
-
Re: Itempedia FREE V2 Mod... Open global_func.php find function money_formatter($muny,$symb='$') change to function money_formatter($muny,$symb='£') then just use the {$fm}