Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.1.x Mods

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 12-24-2010, 07:44 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 327,300
Hall of Famer is on a distinguished road
Default Trade System[Released]

Well before releasing RA version 1.10 to public, I'd like to post a thread about this Trade system used in RA v1.10. This thread is mainly for users who are already using a heavily modified version of RA v1.00 and therefore cannot upgrade to RA v1.10 properly. It is still possible to add a trade system to your site though, just follow the instructions below:

There are three new script files added, namely trade.php, redeem.php and mytrades.php. Trade.php is where a trade is initialized, while redeem.php allows users to see trade requests and accept them. mytrades.php is currently still under construction, and we will bring it to life someday. The three script files are attached in this thread, you can simply download them and place in your adoptables directory. However, there are three more steps to take in order for your trade system to work...

First of all, you will need to execute the following SQL commands in PHPmyadmin to add a new table and a few entries in your database:

Code:
CREATE TABLE adopts_trades (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, userrequestingtrade varchar(50), tradetype varchar(20), adoptableoffered INT, cashoffered INT, adoptabledesired INT, custommessage varchar(150), offerstatus varchar(30), tradeto varchar(40));

INSERT INTO adopts_settings (name, value) VALUES ('enabletrades', 'yes');
INSERT INTO adopts_settings (name, value) VALUES ('tradecost', '0');
INSERT INTO adopts_settings (name, value) VALUES ('tradeoffercost', '0');
Second, find the following lines in inc/function.php:

PHP Code:
function grabanysetting($where){

include(
"config.php");

$query "SELECT * FROM ".$prefix."settings WHERE name = '".$where."'";
$result = @mysql_query($query);
$num = @mysql_numrows($result); 
Add above:

PHP Code:
function getcash(){


The last step is, well, to enable trade for each new adoptables. In doadopt.php, find the following fine:

PHP Code:
mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no')"); 
Replace with:

PHP Code:
mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','fortrade','no')"); 
If you have gender mod, your script will look like this:

PHP Code:
mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no','$gender')"); 
Again change the entry 'notfortrade' to 'fortrade', otherwise you will receive an error that the ID of adoptable does not exist when offering a trade.

So yeah, thats all you need for a trade system. Dont forget to download the three new files and place them in your adoptables root directory. Have fun everyone, and merry christmas!
Attached Files
File Type: php trade.php (12.7 KB, 8 views)
File Type: php redeem.php (17.8 KB, 6 views)
File Type: php mytrades.php (4.3 KB, 6 views)
Reply With Quote
  #2  
Old 12-26-2010, 11:46 AM
Kaeliah's Avatar
Kaeliah Kaeliah is offline
Premium Member
 
Join Date: Sep 2010
Location: Pennsylvania, United States
Posts: 485
Gender: Female
Credits: 31,858
Kaeliah will become famous soon enough
Send a message via AIM to Kaeliah Send a message via MSN to Kaeliah
Default RE: Trade System[Released]

Nice script, although it's pretty limited it seems.
__________________
[My Shop] ♥ [My Blog] ♥ [Subscribe] ♥ [My Mods] ♥ [Mod TOS]
Reply With Quote
  #3  
Old 12-26-2010, 01:02 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 327,300
Hall of Famer is on a distinguished road
Default RE: Trade System[Released]

Well unfortunately, this is how trade system looks like on myadopts.com, and I do not plan to add anything new until next release. Sure cash trade can be done atm, and maybe an option for users to enable/disable trades on each individual pet. Anna also suggested adoptable search engine to support trades, which I find it quite interesting too. For RA version 1.10, however, the trade system will remain exactly the same as MA's
Reply With Quote
  #4  
Old 12-26-2010, 02:18 PM
Kaeliah's Avatar
Kaeliah Kaeliah is offline
Premium Member
 
Join Date: Sep 2010
Location: Pennsylvania, United States
Posts: 485
Gender: Female
Credits: 31,858
Kaeliah will become famous soon enough
Send a message via AIM to Kaeliah Send a message via MSN to Kaeliah
Default RE: Trade System[Released]

Hm. Well... I've written a completely different, much more flexible trading script(Not the one I used for Asryndia), but seeing as I'm not really part of the team I haven't decided if I should release any more scripts...
__________________
[My Shop] ♥ [My Blog] ♥ [Subscribe] ♥ [My Mods] ♥ [Mod TOS]
Reply With Quote
  #5  
Old 01-02-2011, 04:32 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 327,300
Hall of Famer is on a distinguished road
Default RE: Trade System[Released]

Oh interesting, I can ask Brandon if you want to be a part of the dev staff team too(or you can wait till January 13th-16th, you know what I mean by this. ^^). BMR is rather slow replying to messages though, so it will take time.

Hall of Famer
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
Trade System Kyttias Questions and Supports 4 05-29-2016 12:29 AM
Make pets' trade status Not For Trade by default tahbikat Questions and Supports 3 12-13-2015 10:21 PM
Trade System? sensacion Questions and Supports 5 08-20-2010 11:36 AM
Trade System? SieghartZeke Questions and Supports 1 12-28-2009 07:06 AM
Trade System? Ashje Questions and Supports 5 12-24-2009 04:02 AM


All times are GMT -5. The time now is 04:02 AM.

Currently Active Users: 473 (0 members and 473 guests)
Threads: 4,080, Posts: 32,024, 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 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636