Welcome Guest [Log In] [Register]
Welcome to Thunder Services. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
  • Pages:
  • 1
New Conversion Code; [Tutorial]
Topic Started: December 29, 2007, 3:30 am (1,705 Views)
Eric
Member Avatar
Administrator

This new method of converting games will allow for better security from cheat attempts.

Quote:
 
function verifyscore()
{
    verify = new LoadVars();
    verify.from = "yes";
    verify.sendAndLoad("scoreverify.php", verify, "POST");   
    verify.onLoad = function (success)
    {
     if(success)
     {
      submit = new LoadVars();
         submit.gname = "Gname";
         submit.gscore = Score;
         submit.escore = submit.gscore * verify["random1"] * verify["random2"];
         submit.send("index.php", "_self", "POST");
     }
    };
};
verifyscore();


This is the new code. Simply paste this at the end of the game and modify what is in red.

If you want to have a button to submit, remove:
verifyscore();

And paste this on the button's action code:

Quote:
 
on (release)
{
    verifyscore();
}
Posted ImagePosted ImagePosted ImagePosted ImagePosted Image
Offline Profile Quote Post Goto Top
 
Chris
Member Avatar


Actually its flawless. I can't get around it with Tamper Data :P

And actually it would be better if the verify came right after you reach the submit button - so people couldn't be ready for it.
Posted Image
Offline Profile Quote Post Goto Top
 
Mike


Whats This Part Mean

"submit.gscore = Score;"
Posted Image
It is back, and better than ever!
Offline Profile Quote Post Goto Top
 
Chris
Member Avatar


That is the variable containing the score.

Its kind of obvious, isn't it?

Ex:

submit.gscore = _root.score;
Posted Image
Offline Profile Quote Post Goto Top
 
Mike


oo yea that part but how do you know what to change it to? still trying to figure that one out.
Posted Image
It is back, and better than ever!
Offline Profile Quote Post Goto Top
 
Chris
Member Avatar


On your index.php you look for the number that is your score.

Look to the left of it, past the = sign, and you have the variable that should go where Score is.

Ex my score is 125

_root.name = My Game
_root.something = blah
_root.gname = mygame_TA
_root.points = 125
_root.time = 600

and alot of other stuff.

As you can see, _root.points would hold my score, so the line should be:

submit.gscore = _root.points;
Posted Image
Offline Profile Quote Post Goto Top
 
Mike


wow sorry to bring an old topic back but in the gname do you need the quotes?
Posted Image
It is back, and better than ever!
Offline Profile Quote Post Goto Top
 
Chris
Member Avatar


Yes; for any script (Flash, PHP, Javascript, etc.) any non-number values need quotation marks around them. :)
Posted Image
Offline Profile Quote Post Goto Top
 
Mike


ok thanks yea this is the first time converting for me again in a year im trying to get back on my feet with this lol
Posted Image
It is back, and better than ever!
Offline Profile Quote Post Goto Top
 
Christian
Member Avatar


The thing about converting games are that most of it is just copying & pasting...
Kicking Trolls in the face since 2005
Posted Image
Offline Profile Quote Post Goto Top
 
Springer
Member Avatar


There is a little more to it than that Goku, if only all games were that simple.
Please visit Lightning Games for over 3,900 more converted games for your arcade! :D
Offline Profile Quote Post Goto Top
 
Christian
Member Avatar


Springer
June 20, 2009, 3:36 am
There is a little more to it than that Goku, if only all games were that simple.
No, I'm a seasoned converter... I know what I'm saying, most of it IS just copying and pasting.

The only other steps are:

Finding the gscore variable and were to paste the submit score function... That's it!

And if you're adding a bunch of unnecessary steps just to submit a score, then you're just making things hard on yourself.
Kicking Trolls in the face since 2005
Posted Image
Offline Profile Quote Post Goto Top
 
Eric
Member Avatar
Administrator

Some games are harder than others to work with. Springer has experience also, you know. She has converted about 1,400 games.
Posted ImagePosted ImagePosted ImagePosted ImagePosted Image
Offline Profile Quote Post Goto Top
 
Springer
Member Avatar


Some games are EASY to convert. Others are right pigs!
Please visit Lightning Games for over 3,900 more converted games for your arcade! :D
Offline Profile Quote Post Goto Top
 
Keedo
Member Avatar


Quote:
 
Simply paste this at the end of the game

OK, I'm making my first stab at converting a game, but am a little fuzzy on what you mean by "end of the game". Does that mean to post it in the Action box of the last frame in the Action Layer, or am I looking for something more specific?
Posted Image
Posted Image
I love this woman!
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Tutorials · Next Topic »
Add Reply
  • Pages:
  • 1