danny_dunks Posted May 13, 2009 Posted May 13, 2009 Is There A Quick Way To Change Crystals To Something Like Gold BArs Via SQL ? x Quote
shrek1609 Posted May 13, 2009 Posted May 13, 2009 Re: Crystals V2 Nope there is no quick way... i actually have to do this on my new game easiest way i think of doing this is to go through the database and change every database field that is crystals to (in my case) Tobacco (notice the capital letter on Tobacco) then use your file editing software and use the find and replace option... eg: find crystals replace with Tobacco (again notice the capital T) find crystals will find Crystals and crystals ie it will find crystals in sql queries and also find Crystals where you may have a capital letter on displaying the word in game... this saves you having to manually go through and change them... remember though Gold Bars will not work with this method as its two words, so either manually go through all script files or change to just Gold Quote
Haunted Dawg Posted May 13, 2009 Posted May 13, 2009 Re: Crystals V2 To those who say "no easy way." i say bull :) function buffer($content) { $content = preg_replace('~(crystals)~i','Tobacco', $content); return $content; } ob_start('buffer'); Add that to globals.php and see everything from: Crystals, crySTALS, crystals, CRYSTALS, crystAlS change to Tobacco. :) Enjoy ;) Quote
Dominion Posted May 13, 2009 Posted May 13, 2009 Re: Crystals V2 you could always take some time to look at this may take a while to do but means once you have its so much easyer to change when ever you want to http://criminalexistence.com/ceforums/i ... ic=27919.0 Quote
CrazyT Posted May 13, 2009 Posted May 13, 2009 Re: Crystals V2 To those who say "no easy way." i say bull :) function buffer($content) { $content = preg_replace('~(crystals)~i','Tobacco', $content); return $content; } ob_start('buffer'); Add that to globals.php and see everything from: Crystals, crySTALS, crystals, CRYSTALS, crystAlS change to Tobacco. :) Enjoy ;) Its quicker just simply returning it. function buffer($content) { return $content = preg_replace('~(crystals)~i','Tobacco', $content); } Quote
shrek1609 Posted May 13, 2009 Posted May 13, 2009 Re: Crystals V2 hmm i stand part corrected i have just tried this... however in globals.php it doesn't work in global_function.php it part works... it doesn't change all instances of it, it has left links in explore as crystal temple etc and a few other places... also i am assuming you still need to change the database fields from crystals to tobacco... Quote
CrazyT Posted May 14, 2009 Posted May 14, 2009 Re: Crystals V2 From what Haunted Dawg said you can just use the one below, same as his one but i just removed the (s) now it works fine. function buffer($content) { return preg_replace('~(crystal)~i','Tobacco', $content); } ob_start('buffer'); Add that in header right under the <?php Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.