shaved92bravada Posted October 30, 2008 Posted October 30, 2008 This is a very simple and easy to make mod and I'm sure there is something that is not secure about it so if there is something wrong with it and you can fix it then please do so. I would like to thank War_Hero for the idea of using travellingglobals.php with his club mod. Hope ya don't mind me using that little bit in this. Anyway on to the mod. I use the travellingglobals.php for my jail, hospital, searchtime, as well as traveltime. It saves down on alot of if ($ir['blah'] so I will just post the whole thing. the SQL ( if you are already using War_Hero's club mod then you already have this in your DB and don't need to run it. ) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. save this as travellingglobals.php ( if you already have War_Hero's club mod you have this file already ) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I have to use the print " ": $h->endpage(); exit; for it to make everything look correctly on my game if someone else knows of a way to make it work better and still include the endpage as I have to have it due to my 3 column template I am working on them please let me know. replace your monorail.php with this one. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now to make it where you can't do anything while you are travelling then you need to place You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. at the top of which ever page/s you don't want them to access while they are travelling. And if you want it to display how much time they have left while they are travelling then open header.php find this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. and put this either above or below it doesn't matter You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Also add this into your cron_minute.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
HITMAN 17 Posted October 30, 2008 Posted October 30, 2008 Re: [mccode V2] Very simple travel time mod. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. No tested Quote
shaved92bravada Posted October 30, 2008 Author Posted October 30, 2008 Re: [mccode V2] Very simple travel time mod. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. No tested Huh?? Quote
War_Hero Posted October 30, 2008 Posted October 30, 2008 Re: [mccode V2] Very simple travel time mod. Nah, I don't mind. :) I use the travellingglobals in the travel mod I have as well. Nice mod mate. Keep it up. :) Quote
MrGi Posted October 30, 2008 Posted October 30, 2008 Re: [mccode V2] Very simple travel time mod. Very Nice Mod Seems to get the job done good also. I Tested and it works fine.! Keep it up my mate. Quote
HITMAN 17 Posted October 30, 2008 Posted October 30, 2008 Re: [mccode V2] Very simple travel time mod. did you try out my tavern Quote
josh-j-c Posted October 31, 2008 Posted October 31, 2008 Re: [mccode V2] Very simple travel time mod. Ive noticed that the time taken to travel is $random, is there any way in which you could do this for a dedicated time for each destination... ?? See i was thinking of making a new query in locations and add the time to travel in there and then place the query onto the page so that it picks it straight out... Would i be correct ? Also say you had more ways of transport eg driving a car what would you do, im under the impression you would just make another sql table within the locations again but call it something entirely different and add it in the for eg monorail page above, instead of my driving car traveling system.... could anyone actually tell me if im on the right track... Thanks, Jc Quote
03laceys Posted October 31, 2008 Posted October 31, 2008 Re: [mccode V2] Very simple travel time mod. Sorry just to point out, i havn't looked at this mod say it might be a quite good but it seems alot compared to the time travel mod i have which is alot easier to add (its a paid mod which i bought).... the paid mod has dedicated traveling times. Quote
shaved92bravada Posted October 31, 2008 Author Posted October 31, 2008 Re: [mccode V2] Very simple travel time mod. See thats my problem, like I have stated in a previous topic can't remember which one lol, I am just a beginner so I may not be doing things the most efficient way. I do know that yes you can have dedicated times but I'm not sure the query you would need to select the locations, I would say something like fetch array or something along those lines. and then it would be like if ($_GET['to'] ==1) { $rantime= the amount of time you want ; } etc, etc. But that could end up being alot of if's. So I do know there is a more efficient way to do it but I am not sure on how that part works. Believe me if I knew I would atleast try it, I just haven't gotten that far yet. I do know that if I am gonna be a good efficient respected game owner in the community then I atleast need to know programming in php some what thats why I am throwing little things out here in hopes that I can improve my skills with some constructive critisim. lol also josh-j-c I am not for certain on what exactly to do if you have different modes of travel in the game, but if I do find something out that works then I will for sure let you know. And thanks again for the comments or critisim. Quote
josh-j-c Posted October 31, 2008 Posted October 31, 2008 Re: [mccode V2] Very simple travel time mod. See i was in the direction of using, You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And i was running through what else i would need to use to get the actual query to run on the page of the say "transportcar.php" Also it would be a little job editing the global you made like you said alot of "IF's" and "elseif" Im not the most efficiant coder and im by far not the best but ill foccus all my concentration on this mod now, i hope other people can help me and shaved92bravada make a kool free modification thanks, Jc Quote
Guest Sniko` Posted November 1, 2008 Posted November 1, 2008 Re: [mccode V2] Very simple travel time mod. My bro made this aswell but didnt post this, he added something in admin panel so you can have different moving time for each location Quote
shaved92bravada Posted November 1, 2008 Author Posted November 1, 2008 Re: [mccode V2] Very simple travel time mod. ok well in that case then this should work perfectly if you want a dedicated traveltime for each city on the monorail.php And you will also need the travellingglobals, etc from my first post. I just like having random times and things like that. Alot of other things are random on my game, like the cost to travel is also random. Why not make it like the real world where things change ya know. SQL You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. replace your monorail.php with this one You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. replace your staff_cities.php with this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I haven't tested that but it should work properly. Someone can feel free to try it out. Quote
HITMAN 17 Posted November 2, 2008 Posted November 2, 2008 Re: [mccode V2] Very simple travel time mod. The Tavern I Made Shows The People Traveling Also if i was to convert the staff_cities what would i have to change the include sglobals.php to Quote
shaved92bravada Posted November 2, 2008 Author Posted November 2, 2008 Re: [mccode V2] Very simple travel time mod. your using V1 so you would need to add the information into your admin panel. I would do it for you but I really don't have the time as I am working on my itemuse.php so everything will work correctly with some of my new special items I made. lol. plus its really simple to add those things in there. Quote
HITMAN 17 Posted November 2, 2008 Posted November 2, 2008 Re: [mccode V2] Very simple travel time mod. ahh right ok cheers i will do this thank you Quote
josh-j-c Posted November 2, 2008 Posted November 2, 2008 Re: [mccode V2] Very simple travel time mod. Mod seems to be kool and ill be trying it out tomorrow after college nice mod mate all the coding looks legit... although are the prices easily negotiable ??? like taken from the database ??? Anyway nice mod and thanks for helping customise it to some of our specifications. Jc Quote
shaved92bravada Posted November 2, 2008 Author Posted November 2, 2008 Re: [mccode V2] Very simple travel time mod. yeah you can set the prices to whatever you want them to be. just by going through your staff panel. Quote
josh-j-c Posted November 3, 2008 Posted November 3, 2008 Re: [mccode V2] Very simple travel time mod. Just wandering say i wanted to make alternative ways of transport what would i do in that situation ? :S Anyone exactly catch on to what i mean ? Jc Quote
josh-j-c Posted November 3, 2008 Posted November 3, 2008 Re: [mccode V2] Very simple travel time mod. Put the coding through testing and seems it failed straight away I'm getting errors such as, You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Completely out of the blue... See I'm in confussion now because i edited the database etc and it seem like the mod completely contradicts itself, for example to two MySql additions you have given us don't work together so the code couldn't possible work, and the page coding isn't sufficient ether anyone else experienced any issues such as these ? Sorry to be the bearer of bad news :S Jc Quote
shaved92bravada Posted November 3, 2008 Author Posted November 3, 2008 Re: [mccode V2] Very simple travel time mod. hmmmm I figured it would work, I'm not sure what is causing that it looked like it would work lol. Not sure there, I will look into it some more and see if I can figure out what the problem is. Quote
HITMAN 17 Posted November 3, 2008 Posted November 3, 2008 Re: [mccode V2] Very simple travel time mod. so shaved you dont like my tavern to see who is travelling then Quote
shaved92bravada Posted November 3, 2008 Author Posted November 3, 2008 Re: [mccode V2] Very simple travel time mod. it was ok, its all a matter of opinion I just don't see the need in using it. lol Quote
HITMAN 17 Posted November 3, 2008 Posted November 3, 2008 Re: [mccode V2] Very simple travel time mod. i do as users will see who is travelling like hospital Quote
josh-j-c Posted November 4, 2008 Posted November 4, 2008 Re: [mccode V2] Very simple travel time mod. Sorry just wandering $$BULL$EYE$ .... But why the name "tavern", if there traveling why not "currently traveling to:" Seems a little weird to me... Quote
HITMAN 17 Posted November 4, 2008 Posted November 4, 2008 Re: [mccode V2] Very simple travel time mod. i dunno lol i just thought off it lol 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.