Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Suggestions and Feature Requests

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 05-01-2014, 08:52 AM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 22,456
IntoRain is on a distinguished road
Default

That's an amazing idea Kyttias! I have no idea about how to use HTML5 but I have made some games and I can help out if needed. I did a maze game in java including a manually-made maze and randomly generated mazes of different sizes, I can provide the code (it's a mess though :D). I will also be making a platformer game, no idea how it will end up, and I can also share that.

I remember that a few years ago when those card collection games were somewhat famous, most of the games available were memory games, sliding puzzles and jigsaw puzzles and they gave you rewards at the end, their code is somewhere around, if you need ideas for those.


Quote:
Originally Posted by Kyttias View Post
From those more in the know on Mysidia, some advice for currency integration would be nice. (I don't want 'give users a promo code for an item they can sell' as an answer.) I know I can pass a number as a variable from Javascript to PHP, it's the PHP code required to add that to the current user's current currency balance that I'd like some help with. So once I already have an amount I want to add to a user's currency balance held in a variable, how would I go about doing that?
The php part, I implemented AJAX's post method for user registration. It's black magic, basically. I don't remember it well, but basically

PHP Code:
$.post('/register/checkusername', {username:input},function(result) {
                            if(
result[0] != '0'){
                                $(
'.divUsername').html('<i>Username is empty or is already being used:</i>' input)
                            }
                            else
                            {
                                $(
'.divUsername').html('<i>Username can be used:</i>' input)
                            }
                        }); 
This is the ajax I used in the registerview.php. I'm sending the input and receiving the result. My username checking function is in the register.php file in the checkusername function, that's why I link to /register/checkusername. The result is actually the full php page including the result echo'd that I want, I have no idea why. But that's why I use result[0]

This is the checkusername function:

PHP Code:
public function checkusername(){
    
$mysidia Registry::get("mysidia");
    if(
$mysidia->input->post("username") == NULL)
    {
        throw new 
NoPermissionException("You specified an invalid action that cannot be completed.");
    }
        
$document $mysidia->frame->getDocument();    
        
$document->setTitle("error");
        
$username $mysidia->input->post('username');
        
$count $mysidia->db->select("users",array("uid"),"username = '{$username}' LIMIT 1")->rowCount();
        echo 
$count;
    } 
I sent input as username.

What I *think* you need to do is create a function in a file that receives the money and adds it to user's cash (mysidia->user->changecash(moneyToAdd)).
__________________


asp.net stole my soul.

Last edited by IntoRain; 05-01-2014 at 09:02 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What games are you playing? Tequila Other Chat 13 05-22-2021 02:04 PM
So Many Games Kyttias Other Chat 2 03-10-2015 10:21 PM
Games? RoconzaArt Questions and Supports 3 02-20-2011 05:35 PM
[WIP]Reward System and Games Tequila Questions and Supports 23 01-30-2011 10:00 AM
Games With the Cash System redheadturkey Suggestions and Feature Requests 8 08-27-2010 03:37 AM


All times are GMT -5. The time now is 10:51 PM.

Currently Active Users: 1929 (0 members and 1929 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636