Extra click

Forum
Last Post
Threads / Messages

SleepWalker

Member
Member
Joined
Jul 6, 2009
Messages
32
Points
0
Mysidian Dollar
0
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:
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.
 
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.
 
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.
 
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. ;)

Here we go...
PHP:
	$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. :)
 
Haha, yeah. You gotta have the tables in the queries, or they're useless!
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,118
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top