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 - Masterhand

Pages: [1] 2
1
Just a redirect? I would think that something like this would work:
 
Code: [Select]
echo "<meta http-equiv="REFRESH" content="0;url=http://www.the-domain-you-want-to-redirect-to.com">";

2
Items / Re: New items: Red Balls
« on: June 25, 2008, 02:00:18 am »
Hi!  I am getting this error with both of the redball scripts.
Quote
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/.elvee/bgwebmistress/www.burn-gorman.com/smf/Sources/shop/items/RedBall.php on line 2

Parse error: syntax error, unexpected T_STRING in /home/.elvee/bgwebmistress/www.burn-gorman.com/smf/Sources/shop/items/RedBall.php on line 2

AND....

Quote
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/.elvee/bgwebmistress/www.burn-gorman.com/smf/Sources/shop/items/Redball2.php on line 2

Parse error: syntax error, unexpected T_STRING in /home/.elvee/bgwebmistress/www.burn-gorman.com/smf/Sources/shop/items/Redball2.php on line 2

Warning: Unexpected character in input: '\' Means that you put an invalid character into the input field. [I think]. Does that error happen after you hit submit? Also, what is the name of the user you're putting in if you are?

I think this would be more interesting to our users if instead of reducing their post count it took away xx amount of credits from them.  Our users all tell me the same thing about karma and post count, "They mean nothing to us" is what they tell me, and "if anybody judges me and my writings by my post count or my karma then they are a fool" is also what they say.

So anyway, I wonder if there is a way to take away credits from user instead of dropping post count.

Redball2 does that  :P.

3
Items / Re: New items: Red Balls
« on: April 08, 2008, 07:11:57 am »
Wow. I haven't really been here / coded with SMF in a long time. I have a few things I need to sort out first. Then I can fix up the code.

4
Items / Re: New items: Red Balls
« on: March 17, 2007, 02:10:46 am »
Thanks Bl; I'll update the first post right away.
@Lew_Cipher: Sounds great, could i have a link? (Im a sports fan)

5
Items / Re: Cookie
« on: March 06, 2007, 01:14:30 am »
Cookies are sweet right? Adding a query to update points +1 for each cookie, would be easy. I'll try that out.

6
To do a lottery, you would need to do the following:

A) Add a column to the members table which called "Tickets" or something. Tickets should probably be a INT, with default value 0.
B) Make an item that upon use that adds one to the Tickets of the user.
C) Call a weekly script, via a cronjob more likely that not, which totals the number of tickets, randomly chooses the winner, and gives out all the currency.

Shouldn't be that hard to code if you actually want it. Would be a fun project for someone who doesn't know php to learn it =). You'll be surpirzed what you can learn just from the internet.

I'll get to work on it :).

7
Items / Re: New items: Red Balls
« on: March 06, 2007, 01:01:54 am »
Create a file called redball.php in your /shop/items directory. Then copy the code into the file.
After that, you add the item in your Shot ACP.
(Sorry about being away for a while, i was busy alot).
I will take a look at the code and see why the pm function is not working in Redball 2...

8
Items / Re: New items: Red Balls
« on: January 12, 2007, 03:11:49 am »
Cheesenub; When your enter your username, it has to be the exact way you see it, not your display name..I think.

2: The reason why the PM isn't working is because this bit of code is disabled:

Code: [Select]
/*global $sourcedir;
require_once($sourcedir . '/Subs-Post.php');
*/
Because it gives errors.

If you want to try it, remove the /* and the */ .
Works fine for me....


9
Items / Re: New items: Red Balls
« on: December 31, 2006, 10:42:20 am »
Sorry about that, old browser added it, and its fixed.

10
Items / Re: New items: Red Balls
« on: December 21, 2006, 05:19:18 am »
Ok, but thanks anyway.

11
Items / Re: New item: Red Ball
« on: December 21, 2006, 01:15:06 am »
Got it working.  Full code below

Code: [Select]
<?php

/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
|         (c) 2006 DanSoft Australia           |
|      http://www.dansoftaustralia.net/        |
\**********************************************/

//File: Redball2.php

// VERSION: 2.3 (Build 11)
// $Date: 2006-11-17 13:34:18 +1000 (Fri, 17 Nov 2006) $
// $Id: Redball2.php 24 2006-10-21 03:34:18Z Mh $

class item_Redball2 extends itemTemplate {
    
    function 
getItemDetails() {

$this->authorName "Masterhand";
                
$this->authorWeb "http://www.gameandcoders.uni.cc";
$this->authorEmail "austin.r.tanay@gmail.com";

          
$this->name "RedBall2";
          
          
$this->desc "Redball 2";
          
// The item's price
          
$this->price 100;

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

    
      function 
getAddInput() {
        return 
"Max amount to give: <input type='text' name='info1' value='100'><br>
               Max amount to take: <input type='text' name='info2' value='-100'>"
;
    
}  


       function 
getUseInput() {
       
global 
$context$scripturl$settings$txt;
        return 
"Bounce To: <input type='text' name='stealfrom' size='50'>
         <a href='
{$scripturl}?action=findmember;input=stealfrom;quote=0;sesc={$context['session_id']}' onclick='return reqWin(this.href, 350, 400);'><img src='{$settings['images_url']}/icons/assist.gif' border='0' alt='{$txt['find_members']}' /> Find Member</a>";
    }
    
    function 
onUse() {
        global 
$db_prefix$ID_MEMBER$item_info;
     
$result db_query("SELECT memberName
                                FROM 
{$db_prefix}members
                                WHERE ID_MEMBER = 
{$ID_MEMBER}"__FILE____LINE__);
     
$row mysql_fetch_array($resultMYSQL_ASSOC);
$user $row["memberName"];
       
       if (
$user == $_POST[&#8216;stealfrom&#8217;]) {
return "You cant throw it too yourself tbh!!!";
die();
  }

else {
$amount mt_rand($item_info[2], $item_info[1]);

$result db_query("UPDATE {$db_prefix}members
                                SET money = money + 
{$amount}
                                WHERE memberName = '
{$_POST['stealfrom']}'"__FILE____LINE__);
return 
"You've thrown the ball to {$_POST['stealfrom']} if he catches it he'll gain money, else he'll lose it!!!"
/*global $sourcedir;
require_once($sourcedir . '/Subs-Post.php');
*/
$result db_query("SELECT ID_MEMBER
       FROM 
{$db_prefix}members
                           WHERE memberName = '
{$_POST['stealfrom']}'"__FILE____LINE__);
$row mysql_fetch_array($resultMYSQL_ASSOC);
$pmfrom = array(
'id' => 1,
'name' => 'Masterhand',
'username' => 'Masterhand'
);
$pmto = array(
'to' => array($row['ID_MEMBER']),
'bcc' => array()
);
sendpm($pmto'Heres a redball?'"{$user} Bounces The Ball To You And You Lose/Win ".formatMoney($amount)."! [i] You do not need to reply to this automated message"0$pmfrom); ;                                          
            }

  }
  }

?>


Thanks to Masterhand for this great item

Your welcome xD, and thank you!  :)

12
Items / Re: New item: Red Ball
« on: November 19, 2006, 09:21:55 pm »
Yea, it is...

13
Items / Re: New item: Red Ball
« on: November 19, 2006, 02:00:27 am »
$user = $row["memberName"], Ok, i'll try that.

EDIT: Nope, Parse error: syntax error, unexpected T_IF in /home/***/public_html/forum/Sources/shop/items/Redball2.php on line 59

 

14
Items / Re: New item: Red Ball
« on: November 18, 2006, 07:46:07 pm »
 :D No, won't work, says: Prase Error: enespected T_IF ....*sigh*

15
General SMFShop Discussion / Re: SMF Shop Ideas..:Job Lottery Auctions..
« on: November 18, 2006, 06:11:11 am »
Hmm, Yea, i like the idea...

Pages: [1] 2