Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
#1
|
||||
|
||||
No more automatic EXP upon viewing pets, please?
Hey guys! Long time no see~! Good news - I quit my retail day job, so I have the summer to work on my site. I'm back to ask questions and seek out some help if anyone's interested in a bit of tinkering.
Is it possible to redesign how pets are viewed so that they do not automatically gain EXP when visited? Instead, I would like a button to be present. I'm aware it adds unnecessary tedium, but I think it would really help my server in the long run. Right now, a user can open twenty tabs of pets and then automatically close them with built in browser functions without even looking at them (ctrl-click a bunch of links to open up new tabs and then right click the tab nearest to the one you're on and you can "close all tabs to the right" - all of those pets opened would get EXP). If users had to click something on all those pages, it would help slow them down and save my server the strain of loading pages they won't even look at, you know? So, what I would like to implement is a link that says "Play with {$name}!" and only after clicking it would the pet get EXP. A page refresh would be acceptable. Other sites do similar but in a more advanced way -- for example, on Pokéfarm, each Pokémon has a favorite flavor of berry, and you need to click on the correct flavor to give the optimum amount of EXP and earn yourself the most currency. (I believe clicking wrong also either counts less towards their events or not at all, I can't recall, it's been years.) This is above and beyond my needs, but other people on Mysidia may be interested in such a feature. Anyone up to the task?
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it. |
#2
|
||||
|
||||
Which version of mysidia script are you using? 1.3.4 has this already (Where your pet only gets EXP after clicking a button.) or at least as far as I know unless it adds EXP for both visiting and clicking and I didn't notice. I don't think I've experienced this on my site.
__________________
|
#3
|
||||
|
||||
Well I will definitely consider this for next minor and major releases, it is not very difficult to achieve. All you have to do is to disable adding clicks/exp automatically, add a button 'Click Me' that does this trick.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#4
|
||||
|
||||
I can try turning off EXP gain for all pets. I just want that page to show a button that needs pressing rather than the function automatically running on page load. I believe I've found function in levelup.php.
I'm working on cleaning up the page a bit more (I'm using the pet profile mod, so, its cluttering up everything). I'll return with results, hopefully.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it. Last edited by Kyttias; 04-18-2017 at 08:28 AM. |
#5
|
||||
|
||||
Yeah, all you have to do is to edit levelup.php page, introduce a form with a 'Click Button', and only give EXP if the user clicks on this 'Click Me' button. It should be pretty easy for someone as skilled as you are.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#6
|
||||
|
||||
I know I have seen folks doing this using the mysidia code, but I cannot remember where exactly...it's doable though, for sure, haha.
__________________
My Mods Site (1.3.4, 2020 Mods) Last edited by Abronsyth; 04-18-2017 at 05:42 PM. |
#7
|
||||
|
||||
I decided it would be a little bit easier to just start a new page from scratch, that way I could have the file names match my site. On the inside, it's still basically the levelup file (which includes the daycare). I'm glad I figured it out, the profile is all working a lot smoother now.
I should have a gif preview of how the new pet profile is working up on my development thread in a few days once I've got my new pet art a little bit more done. For now, there's this: Off to make dinner now, whee~~ I've worked up quite an appetite!
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it. |
#8
|
||||
|
||||
Looks nice, glad you figured it out a way.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
|
|
What's New? |
What's Hot? |
What's Popular? |