Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Addons/Mods Graveyard

Notices

Closed Thread
 
Thread Tools Display Modes
  #81  
Old 04-16-2009, 08:05 AM
Ashje Ashje is offline
Member
 
Join Date: Jan 2009
Posts: 179
Credits: 9,949
Ashje
Default RE: Currency for leveling up / Adoptable shop (Fixed again)

$money should work for the amount you get but you're on your own on figuring out how to make it random. You see, if you manage to get it random, $money will show the random number, which is what you want. The problem is getting the random number. Try talking to Brandon, it is similar to the "Featured Adoptable". For that error, show me line 62 and I'll show you the error.
  #82  
Old 04-16-2009, 08:48 AM
trollis76 trollis76 is offline
Member
 
Join Date: Feb 2009
Posts: 160
Credits: 13,295
trollis76
Default RE: Currency for leveling up / Adoptable shop (Fixed again)

OK, well, I already know how to make it random. You helped me a lot. I'll show you the document soon.

EDIT: Here it is:

PHP Code:
<?php

// Easy Adoptables Script by Brandon Rusnak
// Get our includes out of the way

include("inc/functions.php");
include(
"inc/config.php");
include(
"inc/settings.php");
include(
"inc/nbbc.php");  // BBCODE Parser
$bbcode = new BBCode;

// Connect to our database

$conn mysql_connect($dbhost$dbuser$dbpass) or die ('Error connecting to mysql database!');
mysql_select_db($dbname);


//Set up our login info...
$username "";
$password "";

//Check for cookie

if (isset($_COOKIE['adoptu']) and isset($_COOKIE['adoptp'])){

$username $_COOKIE['adoptu'];
$password $_COOKIE['adoptp'];

$username preg_replace("/[^a-zA-Z0-9\\040.]/"""$username);
$password preg_replace("/[^a-zA-Z0-9s]/"""$password);

//Run login operation
$query "SELECT * FROM users WHERE username = '$username'";
$result mysql_query($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$luser=@mysql_result($result,$i,"username");
$lpass=@mysql_result($result,$i,"password");

$i++;
}

    if(
$username == $luser and $password == $lpass){
        
$isloggedin "yes";
    }
    else{
    if (isset(
$_COOKIE['adoptu'])){
    
$past time() - 10
    
setcookie("adoptu",$username,$past);
    }

    if (isset(
$_COOKIE['adoptp'])){
    
$past time() - 10
    
setcookie("adoptp",$password,$past);
    }
    
$isloggedin "no";
    }
if (
$isloggedin == "yes"){
$query "SELECT * FROM `users` WHERE `username` = '".$luser."'";
$result mysql_query($query);
$num mysql_numrows($result);
$i=0;
    while (
$i 1) {
    
    
$money =@mysql_result($result,$i,"money");
    
$i++;
            }
$template replace(':WELCOMEORREGISTER:','',$template);
$template replace(':LOGINORACCT:''<p>Hi, '.$username.'
<p>Currency name: '
.$money.'
<p><a href="logout.php">Log out</a>' 
,$template)
}
else
{
//User is not logged in
$isloggedin "no";





// Define our Template File

$file $current_theme;



// Get our content for the index page

$query "SELECT * FROM article_content WHERE page = 'index'";
$result mysql_query($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$article_title=mysql_result($result,$i,"title");
$article_date=mysql_result($result,$i,"date");
$article_content=mysql_result($result,$i,"content");

$i++;
}

$article_title stripslashes($article_title);
$article_content stripslashes($article_content);

$article_content $bbcode->Parse($article_content);

// Run the BBCODE parser on the content

// Should we show the extra pages in the nav bar?

$link1 "";
if(
$show_extra_page1 == "yes"){
$link1 "<li><a href='$extra_page1_link'>$extra_page1_name<span class='tab-l'></span><span class='tab-r'></span></a></li>"
}

$link2 "";
if(
$show_extra_page2 == "yes"){
$link2 "<li><a href='$extra_page2_link'>$extra_page2_name<span class='tab-l'></span><span class='tab-r'></span></a></li>"
}

// Do the template changes and echo the ready template

$template file_get_contents($file);
$template replace(':SITETITLE:',$site_title,$template);
$template replace(':SITENAME:',$site_name,$template);
$template replace(':ARTICLETITLE:',$article_title,$template);
$template replace(':ARTICLEDATE:',$article_date,$template);
$template replace(':ARTICLECONTENT:',$article_content,$template);
$template replace(':LINK1:',$link1,$template);
$template replace(':LINK2:',$link2,$template);
$template replace(':LINK3:',$link3,$template);

//Get the featured adoptable...
$featured getfeatured();
$template replace(':FEATURED:',$featured,$template);

//Ad Management
$header = @file_get_contents("ads/header.txt");
$footer = @file_get_contents("ads/footer.txt");
$tower = @file_get_contents("ads/tower.txt");

$header stripslashes($header);
$footer stripslashes($footer);
$tower stripslashes($tower);

$template replace(':HEADERAD:',$header,$template);
$template replace(':FOOTERAD:',$footer,$template);
$template replace(':TOWERAD:',$tower,$template);

//Is the user logged in?
//$isloggedin = "no";
if ($isloggedin == "yes"){
$template replace(':WELCOMEORREGISTER:','<u>Welcome Back:</u>',$template);
$template replace(':LOGINORACCT:''Welcome back '.$username.'.  <br><br><a href="account.php">Click here to view or edit your account.</a><br><br><a href="logout.php">Log Out</a>' ,$template);
}
else{

//User is not logged in
$template replace(':WELCOMEORREGISTER:','<u>Member Login:</u>',$template);
$loginform "<form name='form1' method='post' action='login.php'>
  <p>Username: 
    <input name='username' type='text' id='username'>
</p>
  <p>Password: 
    <input name='password' type='password' id='password'>
</p>
  <p>
    <input type='submit' name='Submit' value='Submit'>
  </p>
  <p>Don't have an account?<br>
  <a href='register.php'>Register Free</a>  </p>
</form>
"
;
$template replace(':LOGINORACCT:'$loginform ,$template);
}

echo 
$template;
?>
Oh, if it is any help: I used Words to make this. If you can't use that program, please tell me so.
  #83  
Old 04-16-2009, 04:57 PM
Ashje Ashje is offline
Member
 
Join Date: Jan 2009
Posts: 179
Credits: 9,949
Ashje
Default RE: Currency for leveling up / Adoptable shop (Fixed again)

I use Notepad but I also use Microsoft Word. I prefer Notepad as it is much easier to use. Also, you do realise that that document is reading from your index page..?
  #84  
Old 04-16-2009, 11:59 PM
trollis76 trollis76 is offline
Member
 
Join Date: Feb 2009
Posts: 160
Credits: 13,295
trollis76
Default RE: Currency for leveling up / Adoptable shop (Fixed again)

What do you mean "Reading from your Index"? He/She said we were supposed to paste it into every page!
It just doesn't work on any of them.
  #85  
Old 04-17-2009, 02:31 AM
Ashje Ashje is offline
Member
 
Join Date: Jan 2009
Posts: 179
Credits: 9,949
Ashje
Default RE: Currency for leveling up / Adoptable shop (Fixed again)

Never mind, I made a mistake. Now I just need line 62. Instead of clicking 'Edit' or 'Open', click 'View' and it will show you the line numbers. Copy-paste line 62...
  #86  
Old 04-17-2009, 09:50 AM
trollis76 trollis76 is offline
Member
 
Join Date: Feb 2009
Posts: 160
Credits: 13,295
trollis76
Default RE: Currency for leveling up / Adoptable shop (Fixed again)

Well, I don't have that version any more. Do you know if this currency-thing will work with the new release?
  #87  
Old 04-17-2009, 09:55 AM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 10,553
BMR777 is on a distinguished road
Default RE: Currency for leveling up / Adoptable shop (Fixed again)

Quote:
Originally Posted by trollis76
Well, I don't have that version any more. Do you know if this currency-thing will work with the new release?
It will need to be upgraded to work with the new release.
  #88  
Old 04-17-2009, 10:04 AM
trollis76 trollis76 is offline
Member
 
Join Date: Feb 2009
Posts: 160
Credits: 13,295
trollis76
Default RE: Currency for leveling up / Adoptable shop (Fixed again)

OK, thank you.

Hope you upgrade it!
  #89  
Old 04-17-2009, 06:30 PM
Ashje Ashje is offline
Member
 
Join Date: Jan 2009
Posts: 179
Credits: 9,949
Ashje
Default RE: Currency for leveling up / Adoptable shop (Fixed again)

^
Kisazeky needs to do that, but I'll give it a shot once I get the upgrade script. He hasn't been responding of late...
  #90  
Old 04-21-2009, 11:05 AM
zhiichiro zhiichiro is offline
Member
 
Join Date: Mar 2009
Posts: 106
Credits: 11,624
zhiichiro
Default RE: Currency for leveling up / Adoptable shop (Fixed again)

the adoptables bought from my shop doesnt level up XD

it always says "max level" when it's about to level-up
Closed Thread

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
leveling idea Nemesis Suggestions and Feature Requests 2 01-08-2012 12:23 PM
Shop to buy an adoptable? SilverDragonTears Questions and Supports 8 08-16-2011 02:17 PM
Adoptable shop new version! [UPDATED!] mapleblade Mys v1.1.x Mods 57 08-15-2011 07:50 AM
How to create a a battle system ,shop and currency?? SieghartZeke Questions and Supports 9 11-02-2009 12:15 AM
Pets Not leveling up Seapyramid Questions and Supports 4 02-02-2009 05:03 PM


All times are GMT -5. The time now is 07:45 PM.

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