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

Pages: 1 2 [3] 4 5 ... 13
31
Items / Re: Prediction - Guessing Item
« on: September 28, 2007, 02:46:42 pm »
 O0

32
Items / Re: Prediction - Guessing Item
« on: September 28, 2007, 03:59:50 am »
use this code instead fellas

Code: [Select]
<?php


class item_Prediction extends itemTemplate {

    function 
getItemDetails() {
        
$this->authorName 'Inkstains';
        
$this->authorWeb '';
        
$this->authorEmail 'inkstains@nurcharecords.com';
        
        
$this->name "Prediction";
        
$this->desc "Predict what you will roll with the dice";
        
$this->price 10;

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

    function 
getAddInput()
{
global $item_info$db_prefix;
return '<br><b>You must assign a value to each</b><br>
                        Minimum amount of credits to give: <input type="text" name="info1" value="' 
$item_info[1] . '" /><br />
                        Maximum amount of credits to give: <input type="text" name="info2" value="' 
$item_info[2] . '" /><br />';
                }

    function 
getUseInput() {

        return 
'Select which number you think you will roll: <select name="dieside_" size="1" id="number">
        <option value="1">1</option>
<option value="2">2</option>
        <option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
  </select>'
;

    }



    function 
onUse() {

        global 
$db_prefix$ID_MEMBER$item_info$boardurl$txt$scripturl;

                
$value mt_rand(16);

                if (
$value == 1) {
                                     if (
$_REQUEST["dieside_"] ==  $value)
                          {          
$value1 mt_rand($item_info[1], $item_info[2]);
                                       
$result db_query("UPDATE {$db_prefix}members SET money = money + {$value1} WHERE ID_MEMBER = {$ID_MEMBER}"__FILE____LINE__);
                               return "<img src='".$boardurl."/Sources/shop/item_images/Roll1.gif' align='texttop'/><br><br>Congratulations your prediction was right you rolled a 1 and got ".formatMoney($value1)."";
}
        else
        {return 
"You rolled a $value <br><br>The force is weak in this one";}
        }
                elseif (
$value == 2) {
                                     if (
$_REQUEST["dieside_"] ==  $value)
                          {          
$value1 mt_rand($item_info[1], $item_info[2]);
                                       
$result db_query("UPDATE {$db_prefix}members SET money = money + {$value1} WHERE ID_MEMBER = {$ID_MEMBER}"__FILE____LINE__);
                                               return 
"<img src='".$boardurl."/Sources/shop/item_images/Roll2.gif' align='texttop'/><br><br>Congratulations your prediction was right you rolled a 2 and got ".formatMoney($value1)."";
}
        else
        {return 
"You rolled a $value <br><br>I don't think you'll be opening a psychic hotline any time soon :p";}
        }
        elseif (
$value == 3) {
                                     if (
$_REQUEST["dieside_"] ==  $value)
                          {          
$value1 mt_rand($item_info[1], $item_info[2]);
                                       
$result db_query("UPDATE {$db_prefix}members SET money = money + {$value1} WHERE ID_MEMBER = {$ID_MEMBER}"__FILE____LINE__);
                                               return 
"<img src='".$boardurl."/Sources/shop/item_images/Roll3.gif' align='texttop'/><br><br>Congratulations your prediction was right you rolled a 3 and got ".formatMoney($value1)."";
}
        else
        {return 
"You rolled a $value <br><br>I predicted you would fail you must meditate and focus your mind";}
        }
        elseif (
$value == 4) {
                                     if (
$_REQUEST["dieside_"] ==  $value)
                          {          
$value1 mt_rand($item_info[1], $item_info[2]);
                                       
$result db_query("UPDATE {$db_prefix}members SET money = money + {$value1} WHERE ID_MEMBER = {$ID_MEMBER}"__FILE____LINE__);
                                               return 
"<img src='".$boardurl."/Sources/shop/item_images/Roll4.gif' align='texttop'/><br><br>Congratulations your prediction was right you rolled a 4 and got ".formatMoney($value1)."";
}
        else
        {return 
"You rolled a $value <br><br>Duh!";}
        }
        elseif (
$value == 5) {
                                     if (
$_REQUEST["dieside_"] ==  $value)
                          {          
$value1 mt_rand($item_info[1], $item_info[2]);
                                       
$result db_query("UPDATE {$db_prefix}members SET money = money + {$value1} WHERE ID_MEMBER = {$ID_MEMBER}"__FILE____LINE__);
                                               return 
"<img src='".$boardurl."/Sources/shop/item_images/Roll5.gif' align='texttop'/><br><br>Congratulations your prediction was right you rolled a 5 and got ".formatMoney($value1)."";
}
        else
        {return 
"You rolled a $value <br><br>I don't think you'll be opening a psychic hotline any time soon :p";}
        }
        elseif (
$value == 6) {
                                     if (
$_REQUEST["dieside_"] ==  $value)
                          {          
$value1 mt_rand($item_info[1], $item_info[2]);
                                       
$result db_query("UPDATE {$db_prefix}members SET money = money + {$value1} WHERE ID_MEMBER = {$ID_MEMBER}"__FILE____LINE__);
                                               return 
"<img src='".$boardurl."/Sources/shop/item_images/Roll6.gif' align='texttop'/><br><br>Congratulations your prediction was right you rolled a 6 and got ".formatMoney($value1)."";
}
        else
        {return 
"You rolled a $value <br><br>Try calling 1900-YOUR-NO-PSYCHIC for the answer :p";}
        }
    }



}



?>

also code updated in first post

33
Items / Re: Magic 8 Ball
« on: September 27, 2007, 03:55:01 pm »
your best bet is to probably try emailing the author of the mod

34
Installation Problems / Re: Error when installing on SMF 1.1.3
« on: September 27, 2007, 03:47:14 pm »
you'll just need to do that part of the install manually it basically means that another mod has altered the piece of code that SMFShop was looking for. so just open up your default themes Display.template.php file and do the following.

find
 
Code: [Select]
// Show how many posts they have made.
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />
<br />';
 

replace with:

Code: [Select]
// Show how many posts they have made.
// echo '
// ', $txt[26], ': ', $message['member']['posts'], '<br />
// <br />';
 
            // BEGIN SMFShop MOD New Version Code
// Removed one <br /> from end of post count line.
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />
';

echo '
', $modSettings['shopCurrencyPrefix'], $message['member']['money'], $modSettings['shopCurrencySuffix'], '<br /><br />
<a href="', $scripturl, '?action=shop;do=invother2;member=', $message['member']['username'], '">View Inventory</a><br />
<a href="', $scripturl, '?action=shop;do=sendmoney;member=', $message['member']['username'], '">Send Money to ', $message['member']['name'], '</a><br />';
//END SMFShop code

the code that you're searching for will have changed slightly in your version due to a mod or another reason so you won't be able to search for exactly what's listed above but close enough. before you replace just check and see what has been edited and if it looks like a mod may have added to the original code just make sure to make the addition to the above replace code. hope that makes sense. basically just do a backup of your Display.template.php file then do the above edits to the original and then do the SMFShop install and all should be good.

35
Items / Re: Item request: Lotery
« on: September 27, 2007, 03:32:01 pm »
not yet it's been in development a while now last i read fieldmaster had some problems and it had halted development or something. you can check this site for more information

http://feildmaster.com/mods-codes/

36
Modifications / Re: SMFShop Stats Modification
« on: September 25, 2007, 09:07:12 pm »
 O0

37
Modifications / Re: SMFShop Inventory Post Modification
« on: September 25, 2007, 09:06:36 pm »
no problem if you want a hand setting it up so it'll only show from those to categories like you were saying earlier in this thread just send me an IM

also package updated

38
Requested additions / Re: HOW MUCH SPEND
« on: September 25, 2007, 04:53:19 pm »
this is a little different to what you guys are looking for but check it out it might be suitable

http://www.daniel15.com/forum/index.php/topic,1219.0.html

39
Modifications / SMFShop Stats Modification
« on: September 25, 2007, 04:52:27 pm »
THIS HAS ONLY BEEN TESTED ON A CLEAN INSTALL OF SMF 1.1.3  AND SMFShop 3.0

WARNING IF YOU INSTALL THIS MOD AND EVER GO TO REMOVE/UPGRADE YOUR INSTALL OF SMFShop YOU MAY ENCOUNTER ERRORS IF THIS MOD IS NOT UNINSTALLED FIRST. YOU'VE BEEN WARNED

This mod will add a few more stats to the SMFShop home section (Top Purchasers and Top Traders) as well as a persistent Recently Purchased section which if you mouseover the images will display a tooltip with the items description

enjoy  :)

SMFShop Home




PACKAGE UPDATED 28/09/07

40
General SMFShop Discussion / Re: GM's & the shop
« on: September 25, 2007, 11:28:36 am »
i believe the short answer is no

41
Items / Re: Display Name
« on: September 24, 2007, 12:44:40 am »

42
General SMFShop Discussion / Re: Need Shop help...
« on: September 24, 2007, 12:40:57 am »
hmm don't know why they weren't offered as options in the item but i just checked the name style item on my forum and you're right there is no option to reverse.

just edit your Change_Style.php and replace it's content with the below code no need to re-install through admin or anything. and you will have two new options Decoration none and Transform none

Code: [Select]
<?php

/**********************************************\

| SMFSHOP (Shop MOD for Simple Machines Forum) |

|         (c) 2005 DanSoft Australia           |

|      http://www.dansoftaustralia.net/        |

\**********************************************/



//File: Change_Style.php

//This item allows users to change their name style using a drop down menu.


//NOTE: This item requires that the DisplayNameCSS addon item be installed!

//Authors Website: www.graphicaddicts.net


//VERSION: 1.0

//DATE: April 21st 2006



class item_Change_Style extends itemTemplate {

    function 
getItemDetails() {
        
$this->name "Change Name Style (Bold, Italic, etc.)!";
        
$this->desc "Change the style of your display name to: Bold, Italic, Underline, Overline or Line Through.";
        
$this->price 75;

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



    function 
getUseInput() {

        return 
'Select a Style: <select name="style_" size="1" id="color">
    <option value="font-weight:bold" style="font-weight:bold">Bold</option>
<option value="font-style:italic" style="font-style:italic">Italic</option>
<option value="text-decoration:overline" style="text-decoration:overline">Overline</option>
<option value="text-decoration:underline" style="text-decoration:underline">Underline</option>
<option value="text-decoration:line-through" style="text-decoration:line-through">Line Through</option>
<option value="text-transform: uppercase" style="text-transform: uppercase">Uppercase</option>
<option value="text-transform: lowercase" style="text-transform: lowercase">Lowercase</option>
<option value="text-transform:none" style="text-transform:none">Transform none</option>
<option value="text-decoration:none" style="text-decoration:none">Decoration none</option>
  </select>'
;

    }



    function 
onUse() {

        global 
$db_prefix$ID_MEMBER;

        

        
$result db_query("UPDATE {$db_prefix}members
                            SET shop_nameStyle = 
                                concat(shop_nameStyle,'
{$_POST['style_']};')
                            WHERE ID_MEMBER = 
{$ID_MEMBER}",
                            
__FILE____LINE__);



        return 
"Successfully updated your display name style!";

    }



}



?>


 :)

43
Modifications / Re: SMFShop Inventory Post Modification
« on: September 23, 2007, 02:58:23 pm »
updated. please check first post.  :)

44
Installation Problems / Re: HELP !!!! Database Errror!
« on: September 23, 2007, 10:32:05 am »
can you attach the item please

45
Completed Additions / Re: Where do I download shop items
« on: September 23, 2007, 07:49:50 am »
could be worse you could have waited a few days

heres the edited file replace your current Boardindex.php file in forum/Sources

Pages: 1 2 [3] 4 5 ... 13