Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Addons/Mods Graveyard (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=41)
-   -   Extra click (http://www.mysidiaadoptables.com/forum/showthread.php?t=1205)

SleepWalker 12-06-2009 05:43 AM

Extra click
 
I'm planning a new mod:the extra click system!The meaning:when somebody clikc on your adoptable,due to type the clicks are multiplying.
Step 1:Create a new adoptable type under the name extra.Be sure to make the adoptable with restrictions such as donator-only and artist-only or promo code,etc.
Step 2:modify the levelup.php(put this code under the Adoptable is NOT frozen...comment)
PHP Code:

mysql_query("SELECT * FROM ".$prefix." adopts_owned_adoptables WHERE type = '$type'");
if (
$type "extra"){
$newclicks $currentclicks 2;}
else{
$newclicks =$currentclicks 1;} 

This is my first mod.I'm going to make a level-dependent and a giving system.If you found some errors in my script,please write to this thread.

Arianna 12-06-2009 08:44 AM

RE: Extra click
 
I don't know how you are planning to update it... Isn't the code usually somewhat different? It lists the table and stuff like that in the update query.

SleepWalker 12-06-2009 08:52 AM

RE: Extra click
 
UPDATE in the code means changing the number of the clicks to the most recent.Plus,this code means to make special adoptables with faster growing.

Arianna 12-06-2009 09:12 AM

RE: Extra click
 
Yes, but doesn't it usually have a whole query? Otherwise, you'd be changing a variable, like $update, and then changing the query. Lemme get this code and I'll show you. ;)[hr]
Here we go...
PHP Code:

    $query "UPDATE ".$prefix."owned_adoptables SET totalclicks='".$newclicks."' WHERE aid='".$id."'";
    
mysql_query($query); 

You see? :/ You have to have stuff like that in there. :)

SleepWalker 12-06-2009 10:42 AM

RE: Extra click
 
Good tip from you.I will test it.

Arianna 12-06-2009 10:43 AM

RE: Extra click
 
Haha, yeah. You gotta have the tables in the queries, or they're useless!

SleepWalker 12-06-2009 10:53 AM

RE: Extra click
 
Thanks again!


All times are GMT -5. The time now is 04:32 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.