corruptcity || skalman Posted June 9, 2023 Share Posted June 9, 2023 Hi, I have just created a mod for my site where you can enable double exp gain for all players and have decided to release it for free to the community. any other game engines i.e Dayo want to use this with the game or add it to their engines feel free. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. here is the function that needs to be added to staff main. I have made it that you can either add a time duration or set it to perma double XP. it will also send out an announcement to all player everytime double XP is activated and deactivated. Forgot to put in code block below you need to add case 'doublexp' doublexp(); break to the switch for action on main.php page You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. on either mainmenu where I have mine placed or you can place it on the header or whatever file you use for the template You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add this code to the hour cron You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 2 Quote Link to comment Share on other sites More sharing options...
ags_cs4 Posted June 10, 2023 Share Posted June 10, 2023 Nice work its a great addition to have, i made something like this on my game (GL) as "weekly bonus" 1 Quote Link to comment Share on other sites More sharing options...
corruptcity || skalman Posted June 10, 2023 Author Share Posted June 10, 2023 thanks appreciate dude Quote Link to comment Share on other sites More sharing options...
angel1992 Posted July 2, 2023 Share Posted July 2, 2023 quick question alltough it nice to see this added for free can we set the days when it goes live and when it dosnt go live Quote Link to comment Share on other sites More sharing options...
corruptcity || skalman Posted July 2, 2023 Author Share Posted July 2, 2023 as it is it couldn't but can edit the code so that it could do that. Easiest way would be to create a new table that has a timestamp of when it starts and end and change the code that within an if statement checks the date or current timestamp is greater than the start and less than end time. Prob could do this for you tomorrow and add that code to this to Quote Link to comment Share on other sites More sharing options...
Dayo Posted July 3, 2023 Share Posted July 3, 2023 There is a way that you can do this without altering any existing code. You can add a new field into the user table that holds a copy of the users exp. On each page load you can compare the two. If the users exp is greater then copy you subtract the two to calculate how much exp they gained then you can add it again (if x2 exp is active) and update the copy to the new exp value too. Quote Link to comment Share on other sites More sharing options...
angel1992 Posted July 4, 2023 Share Posted July 4, 2023 On 7/2/2023 at 9:58 PM, corruptcity || skalman said: as it is it couldn't but can edit the code so that it could do that. Easiest way would be to create a new table that has a timestamp of when it starts and end and change the code that within an if statement checks the date or current timestamp is greater than the start and less than end time. Prob could do this for you tomorrow and add that code to this to I mean it your Code you can add it if you want but I only asked the question now i have an answer I gonna try to implant it in my game Quote Link to comment Share on other sites More sharing options...
corruptcity || skalman Posted July 4, 2023 Author Share Posted July 4, 2023 sorry my mistake, I thought you was asking if I could add it then lol not just asking if it was possible to add it 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.