Isomerizer Posted June 25, 2007 Share Posted June 25, 2007 I had to make a php based calculator for a quest i made on my game so people can work out questions, seeing as some normal calculators couldnt multiply IP address's. So i made this calculator mod for your game, Its simple, but can be handy if you have riddles / missions requiring maths :P Create new file called "calculator.php" with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Open "explore.php" and find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Just before the add: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. There your calculator will be located under City, now just under Users Online. Quote Link to comment Share on other sites More sharing options...
YoungGold Posted June 27, 2007 Share Posted June 27, 2007 Re: [Free] [v1] Calculator Mod anyone got this in v2 Quote Link to comment Share on other sites More sharing options...
03laceys Posted June 27, 2007 Share Posted June 27, 2007 Re: [Free] [v1] Calculator Mod v2 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
UCC Posted June 27, 2007 Share Posted June 27, 2007 Re: [Free] [v1] Calculator Mod You should really learn how to convert from 1.0 to 2.2. In the case of this mod, it only takes like 5 seconds to do. Quote Link to comment Share on other sites More sharing options...
03laceys Posted June 27, 2007 Share Posted June 27, 2007 Re: [Free] [v1] Calculator Mod working v2 ^^^^ Quote Link to comment Share on other sites More sharing options...
Z?v?? Posted June 28, 2007 Share Posted June 28, 2007 Re: [Free] [v1] Calculator Mod Ummmmmmm, that's v1. Quote Link to comment Share on other sites More sharing options...
iseeyou94056 Posted June 28, 2007 Share Posted June 28, 2007 Re: [Free] [v1] Calculator Mod i think this is v2 but im not sure my first time converting v1 to v2 correct me if i am wrong <?php include "globals.php"; $numbera=$_POST['numbera']; $numberb=$_POST['numberb']; $do=$_POST['do']; print "<h1>Calculation Wizard</h1>"; if ($numbera=="" || $numberb=="" || $calculation="") { print "You approach the wise old wizard, he tells you he can work out any sort of sum... Work this out then smart ass: "; print "<form action=calculator.php method=POST> <input type=number name=numbera style='width:50px;'> <select name=do> <option value=times>x</option> <option value=plus>+</option> <option value=minus>-</option> <option value=divide>/</option> </select> <input type=number name=numberb style='width:50px;'> <input type=submit value=Calculate></form> (Dont try typing in letters i'll just give you the answer 0)"; } else { if ($do=="times") { $answertimes=$numbera*$numberb; print "Oh..Thats an easy one, the answer is: "; print "$numbera x $numberb = $answertimes"; print " <a href=calculator.php>Back</a>"; } if ($do=="plus") { $answerplus=$numbera+$numberb; print "Oh..Thats an easy one, the answer is: "; print "$numbera + $numberb = $answerplus"; print " <a href=calculator.php>Back</a>"; } if ($do=="minus") { $answerminus=$numbera-$numberb; print "Oh..Thats an easy one, the answer is: "; print "$numbera - $numberb = $answerminus"; print " <a href=calculator.php>Back</a>"; } if ($do=="divide") { $answerdivide=$numbera/$numberb; print "Oh..Thats an easy one, the answer is: "; print "$numbera / $numberb = $answerdivide"; print " <a href=calculator.php>Back</a>"; } } ?> <? $h->endpage(); ?> Quote Link to comment Share on other sites More sharing options...
radio_active Posted July 10, 2007 Share Posted July 10, 2007 Re: [Free] [v1] Calculator Mod When i used iseeyou94056's version translation, it works but i get this error: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/downt12/public_html/calculator.php:2) in /home/downt12/public_html/globals.php on line 6 Which is kind of annoying, when i use 03laceys 2nd version, it doesnt work, comes up with some error on line 11 but someone pointed out that- that was V1 again soooo, then i tried 03laceys first translation, and it works perfectly, nice work man :-D Quote Link to comment Share on other sites More sharing options...
Danny Posted July 15, 2007 Share Posted July 15, 2007 Re: [Free] [v1] Calculator Mod good mod +1 Quote Link to comment Share on other sites More sharing options...
YoungGold Posted July 18, 2007 Share Posted July 18, 2007 Re: [Free] [v1] Calculator Mod UCC you would be glad to know now know how to convert inever new it was so easy Quote Link to comment Share on other sites More sharing options...
H4L101 Posted June 11, 2008 Share Posted June 11, 2008 Re: [Free] [v1] Calculator Mod Working V2 Conversion You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
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.