Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 08-04-2010, 12:40 AM
MikiHeart's Avatar
MikiHeart MikiHeart is offline
Premium Member
 
Join Date: Apr 2009
Posts: 187
Gender: Female
Credits: 27,959
MikiHeart
Default RE: Sea's trade script?

Line 497 add a }

Also, don't just copy and paste the whole code. Her myadopts.php will be different from yours because hers is modded to suit her sight.
You need to take out the trade sections and add it to your own :)

edit:

Search for
Code:
else if($act == "freeze"){
Above it, add
Code:
//******************************************************
  
  //Start Gift Section
  
  //******************************************************
   elseif ($act == "gift") {
      // We are renaming an adoptable
    
      if (is_numeric($id)) {
          // Now we see if the adoptable actually exists...
          
          $query = "SELECT * FROM " . $prefix . "owned_adoptables WHERE owner='$loggedinname' and aid='$id'";
          $result = mysql_query($query);
          $num = mysql_numrows($result);
          
          //Loop out code
          $i = 0;
          while ($i < 1) {
              //The adoptable's ID
              $aid = @mysql_result($result, $i, "aid");
              $currentlevel = @mysql_result($result, $i, "currentlevel");
              $newowner = @mysql_result($result, $i, "owner");
              $name = @mysql_result($result, $i, "name");
              $totalclicks = @mysql_result($result, $i, "totalclicks");
              $status = @mysql_result($result, $i, "tradestatus");
              
              $i++;
          }
          
          if ($aid == $id) {
              $image = getcurrentimage($id);
              
              if ($status != "notfortrade") {
                  if ($more == "") {
                      $article_title = "Sending " . $name . " to new Owner<br /><br />";
                      $article_content = $found . "<center><img src='" . $image . "'></center><br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;You are about to send this Pet to another Owner and add it to their Account.  Doing so will <b>permantally remove</b> the Pet from your Account.<br /><br />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;To complete your gift or trade type in the name of the Username you are sending this Pet to and then click the <b>Send Pet</b>button below.<br /><br />

                    <form name='form1' method='get' action='myadopts.php'>
                      <p>Caretaker's Name:
                        <input name='more' type='text' id='more'>
                    <input name='id' type='hidden' id='id' value='" . $id . "'>
                    <input name='act' type='hidden' id='act' value='gift'>
                    </p>
                      <p>
                    <input type='submit' name='Submit' value='Send Pet'>
                    </p>
                    </form>";
                    
                  } else {
                      $uchquery = "SELECT username FROM " . $prefix . "users WHERE username='$more'";
                      $uchresult = mysql_query($uchquery);
                      $uchnum = mysql_num_rows($uchresult);
                      if ($uchnum == "0") {
                          $article_title = "Pet Not Sent<br /><br />";
                          $article_content = $found . 'There is no user by the name of ' . $more . ' at the this site .<br /><br /><a href="myadopts.php?act=gift&id=' . $id . '">Enter Another user</a>';
                      } else {
                          
                          
                          $query = "UPDATE " . $prefix . "owned_adoptables SET owner='" . $more . "' WHERE aid='" . $id . "' and owner='" . $loggedinname . "'";
                          mysql_query($query);
                          
                          
                          $article_title = "Pet Sent<br /><br />";
                          $article_content = $found . "Pet is now with " . $more . " and can be seen on their account!";
                      }
                  }
              } else {
                  
                  
                  $article_title = "Action Forbidden!<br /><br />";
                  $article_content = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This Pet CAN NOT be abandoned! You may not do this, sorry. Return to your <a href='myadopts.php'> adoptables</a>.";
              }
          } else {
              $article_title = $err_idnoexist . "<br /><br />";
              $article_content = $err_idnoexist_text;
          }
      } else {
          $article_title = $err_idnoexist . "<br /><br />";
          $article_content = $err_idnoexist_text;
      }
  }
And it should work in your own myadopts.php
But this is just a theory, I haven't tested this.
I'm glad to have had a look at it though. So I know what it will take when I go to make my own trade system in which users can trade pets and items :)
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
Make pets' trade status Not For Trade by default tahbikat Questions and Supports 3 12-13-2015 10:21 PM
Trade id Tony Suggestions and Feature Requests 5 02-06-2011 08:53 PM
Why is rhere a trade script for Myadopts.com but not for Rusnakweb? Hall of Famer Questions and Supports 2 09-01-2010 07:25 PM
Trade Script ? gjac1 Questions and Supports 15 08-03-2010 01:24 PM


All times are GMT -5. The time now is 02:39 PM.

Currently Active Users: 2225 (0 members and 2225 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