Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - zsw007

Pages: [1] 2
1
Items / Re: New items: Red Balls
« on: January 01, 2008, 06:15:44 am »
That's exactly what I mean. If the recipient lost credits, it should say he lost XX credits. If he gained credits, then it should say he gained XX credits. The message I get after I throw the ball should say that as well as the PM the recipient gets should also tell them whether they won or lost.

well... im not a PHP person, im more of a VB person.

Probaly there can be a check where if the number is negative it says lots, and if is positive it says gain. But i don't know how to do that yet. sorry.

2
Items / Re: An idea of Item Redball
« on: December 31, 2007, 09:53:36 am »
Redball2 does sent a PM but only to the one you threw it to, if I sent the ball to some one i don't know what it did, of the receiver of theball, and that's annoying

so if I throw a ball at my victim, I too want to know if I win or lose... how can this be done ?

FIND:
Code: [Select]
return "You've thrown the ball to {$_POST['stealfrom']} if he catches it he'll gain money, else he'll lose it!!!";
REPLACE WITH
Code: [Select]
return "You've thrown the ball to {$_POST['stealfrom']} he gain/lost ".formatMoney($amount)." credit!!!";


And you know what would be really nice? is if when the ball is thrown to someone, a PM well be send, BUT there is a xx second wait, and if the person reply the PM with in the xx second wait, he catchs the ball, he gain money and the ball. if he dosn't, he loses money and no one get the ball.

Think that could be done?

I used this code in my site, and it works great, but is there a way for it to say whether the credits were gained or lost instead of "...gained/lost xxx credits"? It tells me the number of credits, but it doesn't say whether or not the credits were given to the recipient or taken from them.

what do u mean?

do u mean you want it  just say  he gain

or just say  he

or if he gain it says  he gain  and if he lost,  it says  he lost

can u give an example?

3
Installation Problems / Re: Not Geting Intrest from Bank!
« on: November 27, 2007, 08:37:01 am »
Did you set up the cron job? See http://www.dansoftaustralia.net/smfshop_wiki/Bank_Interest.

i don't know my Cpanel Username... where can i find it?

4
Modifications / Re: SMFPets Version 0.2
« on: November 27, 2007, 08:27:34 am »
dude SOMEONE PLEASE FIX IT OMG PLEEEEEEEASE!!!!

 :'( :'( :'( :'( :'( :'( :'( :'( :'(

5
General SMFShop Discussion / Re: SMFShop! No Admin Center on 1.1.4
« on: October 28, 2007, 10:55:37 pm »
soawg.com/sf


that's the link to the new forums, it got hacked over night, so I coded SMFForums over again and that's what I got so far, the trade centre doesn't work, and admin isn't set up yet, but register and see for yourself!

it got hacked? if your sure your forum got hacked then that could be the problem, the package manager should work though and you can install auto.and you should report to SMF that you got hacked

6
General SMFShop Discussion / Re: SMFShop! No Admin Center on 1.1.4
« on: October 28, 2007, 10:09:56 pm »
are you sure you used the fresh install and not the update?

7
General SMFShop Discussion / Re: SMFShop! No Admin Center on 1.1.4
« on: October 28, 2007, 11:07:10 am »
did you install any other mod? did you get any error on install? are you sure you used the fresh install and not the update?

8
Modifications / error with SMFPets Version 0.2...HELP
« on: October 27, 2007, 05:38:27 am »
One or more of your class files are the same name... You have to have different names for each.

but i never edited the file....


Code: [Select]
<?php
/**********************************************************************************
* Shop-Inventory.php                                                              *
* Inventory stuff (view inventory, use item, view other's inventory)              *
* -- This is not called directly. The code in here is used in Shop.php --         *
***********************************************************************************
* SMFShop: Shop MOD for Simple Machines Forum                                     *
* =============================================================================== *
* Software Version:           SMFShop 3.0 (Build 12)                              *
* $Date:: 2007-01-21 17:14:42 +1100 (Sun, 21 Jan 2007)                          $ *
* $Id:: Shop-Inventory.php 94 2007-01-21 06:14:42Z daniel15                     $ *
* Software by:                DanSoft Australia (http://www.dansoftaustralia.net/)*
* Copyright 2005-2007 by:     DanSoft Australia (http://www.dansoftaustralia.net/)*
* Support, News, Updates at:  http://www.dansoftaustralia.net/                    *
*                                                                                 *
* Forum software by:          Simple Machines (http://www.simplemachines.org)     *
* Copyright 2006-2007 by:     Simple Machines LLC (http://www.simplemachines.org) *
*           2001-2006 by:     Lewis Media (http://www.lewismedia.com)             *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under   *
* the terms of the provided license as published by Simple Machines LLC.          *
*                                                                                 *
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
*                                                                                 *
* See the "license.txt" file for details of the Simple Machines license.          *
* The latest version of the license can always be found at                        *
* http://www.simplemachines.org.                                                  *
**********************************************************************************/

// If this script isn't called by SMF, it's bad!
if (!defined('SMF'))
die('Hacking attempt...');


load_pets();

// Viewing your pets
if ($_GET['do'] == 'pets')
{
$context['linktree'][] = array(
'url' => $scripturl '?action=shop;do=pet',
'name' => $txt['pets_yourpet'],
);

// Check to see if the user has a pet
$result db_query("
SELECT COUNT(numpets) 
FROM 
{$db_prefix}members
WHERE ID_MEMBER = 
{$ID_MEMBER}"__FILE____LINE__);
$row mysql_fetch_assoc($result);

if ($row['COUNT(numpets)'] == 0) {
$context['shop_buy_message'] = sprintf($txt['pets_no_pet'], $scripturl);
}
elseif (isset($_GET['pet'])) {
$result db_query("SELECT breed FROM {$db_prefix}shop_pets WHERE pet_id = {$_GET['pet']}"__FILE____LINE__);
$row mysql_fetch_assoc($result);
eval('$temp = new pet_' $row['breed'] . ';');
$temp->load_breed();
$temp->load_values($_GET['pet']);
if ($temp->ownerid == $ID_MEMBER) {
if ($_GET['type'] == 'train') {
$context['shop_buy_message'] = $temp->train_pet();
}
elseif ($_GET['type'] == 'rename' && isset($_POST['newname'])) {
$temp->rename_pet($_POST['newname']);
$context['shop_buy_message'] = sprintf($txt['pets_new_name'], $_POST['newname']);
}
elseif ($_GET['type'] == 'describe' && isset($_POST['newname'])) {
$temp->redesc_pet($_POST['newname']);
$context['shop_buy_message'] = sprintf($txt['pets_new_desc'], $_POST['newname']);
}
elseif ($_GET['type'] == 'skills' && isset($_POST['skill'])) {
$context['shop_buy_message'] = $temp->use_skill($_POST['skill']);
}
$temp->store_values();
}
else {
$context['shop_buy_message'] = $txt['pets_not_yours'];
}
$context['shop_buy_message'] .= "<br />".sprintf($txt['pets_return_link'], $scripturl);
}
else {
$context['shop_buy_message'] = "<b>".$txt['pets_your_pets']."</b><br />";
$result db_query("
SELECT * FROM 
{$db_prefix}shop_pets
WHERE ownerid = 
{$ID_MEMBER}"__FILE____LINE__);
while ($row mysql_fetch_assoc($result)) {
require($sourcedir '/shop/pet_engine.php');
require($sourcedir '/shop/pets_breeds/' $row['breed'] . '.php');
eval('$temp = new pet_' $row['breed'] . ';');
$temp->load_values($row['pet_id']);
$context['shop_buy_message'] .= $temp->view_Pet_owner();
}
}

// The shop action
$context['shop_do'] = 'pet';
// Set the page title
$context['page_title'] = $txt['shop'] . ' - ' $txt['shop_pet_page'];
// Use the inventory template
$context['sub_template'] = 'message';
}
elseif (
$_GET['do'] == 'hatchery')
{
$context['linktree'][] = array(
'url' => $scripturl '?action=shop;do=hatchery',
'name' => $txt['pets_hatchery'],
);

$context['shop_buy_message'] = "";
if (!isset($_POST['newname'])) {
if ($handle opendir($sourcedir "/shop/pets_breeds/")) {
while (false !== ($file readdir($handle))) {
if (substr($file, -4) == '.php')
{
// Get the name (file name without .php extension)
$name basename($file'.php');
$code '
if (class_exists(\'pet_' 
$name '\'))
{
$pet = new pet_' 
$name ';
$pet->load_breed();
return true;
}
else
return false;'
;
if (eval($code) !== FALSE)
{
$context['shop_buy_message'] .= "<table width='75%' cellpadding='5' cellspacing='0' border='1'>
<tr><th colspan='6'>"
.$pet->breed."</th></tr>
<tr><td colspan='1' rowspan='3' width='10%'><img border='0' width='120' height='120' src='"
.$boardurl."/Sources/shop/pet_images/".$pet->breed_img."' alt='".$pet->breed."' />
     <th colspan='1' width='20%'>"
.$txt['pets_breed']."</th>
     <td colspan='1'>"
.$pet->breed."</td>
     <th colspan='1' width='20%'>"
.$txt['pets_cost']."</th>
<td colspan='2'>"
.$pet->price."</td></tr>
<tr><th colspan='1'>"
.$txt['pets_description']."</th>
<td colspan='5'>"
.$pet->breed_desc."</td></tr>
<tr><td colspan='6'><form method='post' action='"
.$scripturl."?action=shop;do=hatchery;breed=".$name."'>
    
{$txt['pets_find_name']} <input type='text' name='newname' value='Pet Name'>
                                <input type='submit' value='"
.sprintf($txt['pets_buy'], $pet->breed)."'></form></td></tr>
</table><br />"
;
}
}
}
}
}
else {
$result db_query("SELECT numpets, maxpets, money FROM {$db_prefix}members WHERE ID_MEMBER = {$ID_MEMBER}"__FILE____LINE__);
$row mysql_fetch_assoc($result);
if ($row['numpets'] < $row['maxpets']) {
$breed $_GET['breed'];
$code '
$pet = new pet_' 
$breed ';
return true;'
;
if (eval($code) !== false) {
$pet->load_breed();
if ($row['money'] > $pet->price) {
$name $_POST['newname'];
$result db_query("INSERT INTO {$db_prefix}shop_pets (`name`, `breed`, `desc`, `level`, `curap`, `maxap`, `age`, `happy`, `hunger`, `training`, `trainingend`, `ownerid`)
VALUES ('
{$name}', '{$breed}', 'No descrption', 1, 1, 1, 0, 10, 10, 0, 0, {$ID_MEMBER})"__FILE____LINE__);
$result db_query("UPDATE {$db_prefix}members SET money = money - {$pet->price}, numpets = numpets + 1 WHERE ID_MEMBER = {$ID_MEMBER}"__FILE____LINE__);
$context['shop_buy_message'] = sprintf($txt['pets_adpot'],$pet->breed);
}
else {
$context['shop_buy_message'] = $txt['pets_cost_too_much'];
}
}
else {
die();
}
}
else {
$context['shop_buy_message'] = $txt['pets_too_many'];
}
}

// The shop action
$context['shop_do'] = 'hatchery';
// Set the page title
$context['page_title'] = $txt['shop'] . ' - ' $txt['pets_hatchery'];
// Use the inventory template
$context['sub_template'] = 'message';
}
elseif (
$_GET['do'] == 'toppets')
{
$context['linktree'][] = array(
'url' => $scripturl '?action=shop;do=toppets',
'name' => $txt['pets_toppets'],
);

$result db_query("SELECT name, breed, level, age, ownerid FROM {$db_prefix}shop_pets ORDER BY level DESC LIMIT 15"__FILE____LINE__);

$context['shop_buy_message'] = $txt['pets_top_pets_blurb'];
$context['shop_buy_message'] .= "<table width='75%' cellpadding='5' cellspacing='0' border='1'>
<tr><th>Name</th><th>Breed</th><th>Owner</th><th>Age</th><th>Level</th></tr>"
;

while ( $row mysql_fetch_assoc($result) ) {
$result_2 db_query("SELECT memberName from {$db_prefix}members WHERE ID_MEMBER = {$row['ownerid']}"__FILE____LINE__);
$row_2 mysql_fetch_assoc($result_2);
$breed $row['breed'];
$code '
$pet = new pet_' 
$breed ';
return true;'
;
if (eval($code) !== false) {
$pet->load_breed();

if ($row['ownerid'] == $ID_MEMBER) {
$context['shop_buy_message'] .= '<tr style = "font-style: italic">
<th><a href="http://sandbox.nomicville.com/index.php?action=profile;u='
.$row['ownerid'].';sa=showPets">'.$row['name'].'</a><br />the<br />'.$pet->breed.'</th>
<th><img border="0" width="80" height="80" src="'
.$boardurl.'/Sources/shop/pet_images/'.$pet->breed_img.'" alt="'.$pet->breed.'" title="'.$pet->breed_desc.'" /></th>
<th>'
.$row_2['memberName'].'</th>
<th>'
.sprintf($txt['pets_days'], $row['age']).'</th>
<th>'
.$row['level'].'</th></tr>';
}
else {
$context['shop_buy_message'] .= '<tr>
<th><a href="http://sandbox.nomicville.com/index.php?action=profile;u='
.$row['ownerid'].';sa=showPets">'.$row['name'].'</a><br />the<br />'.$pet->breed.'</th>
<th><img border="0" width="80" height="80" src="'
.$boardurl.'/Sources/shop/pet_images/'.$pet->breed_img.'" alt="'.$pet->breed.'" title="'.$pet->breed_desc.'" /></th>
<th>'
.$row_2['memberName'].'</th>
<th>'
.sprintf($txt['pets_days'], $row['age']).'</th>
<th>'
.$row['level'].'</th></tr>';
}
  }
}

$context['shop_buy_message'] .= '</table>';

$context['shop_do'] = 'toppets';
// Set the page title
$context['page_title'] = $txt['shop'] . ' - ' $txt['pets_toppets'];
// Use the inventory template
$context['sub_template'] = 'message';
}

?>


this is the file ^

9
Modifications / Error with SMFPets Version 0.2
« on: October 25, 2007, 10:46:15 am »
Sorry i didn't look through all of the pages(i didn't have time to). But i was just trying this on my test forum to make sure that it dosn't mess my fourm up, and i got an error trying to go to Pet Central.

Code: [Select]
Fatal error: Cannot redeclare class in /home/www/test-forums.awardspace.com/SMF/Sources/shop/Shop-Pets.php on line 91
any ideas why? i want o make sure everything works out on my test forum for me to use it on my real forum.

10
Coding / Re: Need help with sending PM
« on: October 25, 2007, 10:12:18 am »
can someone do it please? is going to be easy for you guys anyway

11
Items / An idea of Item Redball
« on: October 16, 2007, 07:14:08 am »
Redball2 does sent a PM but only to the one you threw it to, if I sent the ball to some one i don't know what it did, of the receiver of theball, and that's annoying

so if I throw a ball at my victim, I too want to know if I win or lose... how can this be done ?

FIND:
Code: [Select]
return "You've thrown the ball to {$_POST['stealfrom']} if he catches it he'll gain money, else he'll lose it!!!";
REPLACE WITH
Code: [Select]
return "You've thrown the ball to {$_POST['stealfrom']} he gain/lost ".formatMoney($amount)." credit!!!";


And you know what would be really nice? is if when the ball is thrown to someone, a PM well be send, BUT there is a xx second wait, and if the person reply the PM with in the xx second wait, he catchs the ball, he gain money and the ball. if he dosn't, he loses money and no one get the ball.

Think that could be done?

12
Coding / Re: Need help with sending PM
« on: October 14, 2007, 11:03:35 pm »
Or can somone do for just ChangeOtherTitle, and DecreasePost

13
Requested additions / Donation Center?
« on: October 14, 2007, 10:06:08 pm »
Think someone can add a donation center? where people can like, just donate their item for free and anyone could get it for free(or the admin can chose,like only people with below xxx money can get it for free).  ;)

Or you could do it the easy way, and just add a delete(trash) button for each item.   :-\

14
Modifications / Re: Remove bad karma
« on: October 13, 2007, 06:40:40 am »
i dont know how to make a mod..
 ???

im not an expert either, but try this:

name the file RemoveBadKarma.php

Code: [Select]
<?php
/**********************************************************************************
* SMFShop item                                                                    *
***********************************************************************************
* SMFShop: Shop MOD for Simple Machines Forum                                     *
* =============================================================================== *
* Software Version:           SMFShop 3.0 (Build 12)                              *
* $Date:: 2007-01-18 19:26:55 +1100 (Thu, 18 Jan 2007)                          $ *
* $Id:: IncreaseKarma.php 79 2007-01-18 08:26:55Z daniel15                      $ *
* Software by:                DanSoft Australia (http://www.dansoftaustralia.net/)*
* Copyright 2005-2007 by:     DanSoft Australia (http://www.dansoftaustralia.net/)*
* Support, News, Updates at:  http://www.dansoftaustralia.net/                    *
*                                                                                 *
* Forum software by:          Simple Machines (http://www.simplemachines.org)     *
* Copyright 2006-2007 by:     Simple Machines LLC (http://www.simplemachines.org) *
*           2001-2006 by:     Lewis Media (http://www.lewismedia.com)             *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under   *
* the terms of the provided license as published by Simple Machines LLC.          *
*                                                                                 *
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
*                                                                                 *
* See the "license.txt" file for details of the Simple Machines license.          *
* The latest version of the license can always be found at                        *
* http://www.simplemachines.org.                                                  *
**********************************************************************************/

if (!defined('SMF'))
die('Hacking attempt...');

class 
item_RemoveBadKarma extends itemTemplate
{
function getItemDetails()
{
$this->authorName 'zsw';
$this->authorWeb 'http://www1.freewebs.com/sgasquad/joinsga.htm';
$this->authorEmail 'zsw007@hotmail.com';

$this->name 'Remove Bad Karma by xxx';
$this->desc 'Remove your Bad Karma by xxx';
$this->price 200;

$this->require_input false;
$this->can_use_item true;
$this->addInput_editable true;
}

// See 'AddToPostCount.php' for info on how this works
function getAddInput()
{
global $user_info;
if ($item_info[1] == 0$item_info[1] = 5;
return 'Amount to remove bad Karma by: <input type="text" name="info1" value="' $item_info[1] . '" />';
}

function onUse()
{
global $db_prefix$ID_MEMBER$item_info;

db_query("
UPDATE 
{$db_prefix}members
SET karmaBad = karmaBad - 
{$item_info[1]}
WHERE ID_MEMBER = 
{$ID_MEMBER}"__FILE____LINE__);
return 'Successfully removed your bad Karma by ' $item_info[1] . '!';
}

}

?>



if this is not right, someone please correct me  :)

15
Modifications / Re: Remove bad karma
« on: October 09, 2007, 05:40:16 am »
i want something that lets users shake off some bad karma for a fee...
i have the karma separated as 10/-10 and i wish for the -10 side to change lol

i think it would be great

you could just do
Code: [Select]
SET karmaBad = karmaBad - {$item_info[1]}ect

Pages: [1] 2