Hello There, Guest! › Register

MySubscriptions 2.2 released.
Looking for a custom plugin for your site? Ask here for a quote.

[Release] MyRPG 1.2.0
#51

hi again,

i'm newbie at php programming, but in myrpg_user.php in the switch:


Code:
    switch($item['idname'])
    {
        case 'myrpg_axe':
            if (intval($mybb->user['myrpg_attack']) >= intval($mybb->settings['myrpg_attack_max']))
            {
                $buyRtnMsg = $lang->myrpg_attack_not_increased;
                myrpg_fix_stats(intval($mybb->user['uid']), true); // fix all stats
                return false;
            }
            elseif (intval($mybb->user['myrpg_attack']) + intval($mybb->settings['myrpg_axe'])...........


cant use?:

$itemn=$item['idname']

(instead of switch($item['idname']))
and then one block for all the weaps:

Code:
{
            if (intval($mybb->user['myrpg_attack']) >= intval($mybb->settings['myrpg_attack_max']))
            {
                $buyRtnMsg = $lang->myrpg_attack_not_increased;
                myrpg_fix_stats(intval($mybb->user['uid']), true); // fix all stats
                return false;
            }
            elseif (intval($mybb->user['myrpg_attack']) + intval($mybb->settings['$itemn'])...........

where "myrpg_axe" now is $itemn (the name of the item)


maybe is stupid, I said I'm new at php.


getting back to the weapon system subject,

would be posible, if I add new column in items table named "weapon" as a flag,
and if it is activated it make the rpg block code when buying items:


if ($item['weapon'])
{
Code:
(the block of above)


on this way the item would stay in the inventory,
and then add something to decrease the attack if that weapon is sold.

s: sry my bad english and my bad explanations x)
#52

Your logic makes sense yes tho the code would probably not work correctly because it also needs a setting for each item.
I will make a script tonight to allow you to add items into the database. You will also require to do some code edits to get the new items working with MyRPG
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#53

I will do this tomorrow. I forgot I didn't install Dreamweaver, neither FileZilla (to upload files to my test forum). I re-installed Windows and there are a few programs that I haven't installed yet.
Dreamweaver installation is nearly completed and it's getting late, the few time it will be opened is for me check a few things to complete the shoutbox guide
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#54

; P no problem master

you should take a look for virtual machine (vmware,...) to testing forums and servers,
I do it to test mods for mybb, game servers, other cms's ... is clean and fast x)
#55

I had a virtual machine program before I re-installed Windows 7 (and other OS's) yesterday Tongue
But for testing, I prefer to test it on the internet
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#56

So can i add items? or is it impossible
(i can play around with codes if necessary)

Also is there any way i can reinstall the items i deleted (yes i fail)?
I reinstalled myplaza but i think that it is coded into the data base
i have phpmyadmin
#57

No you can't reinstall the items unless you create a script to do so or deactivate and activate MyRPG.

No at the moment you can'add any items
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#58

Are you close to finishing the script to add items? no rush at all, I personally won't need it on a long time >.>
#59

The script is done, but I need to write a document to give you instructions. I am busy with school now :/
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#60

I´m getting "invalid item" on buyng an AXE

any advice about how to fix this?

Thanks Smile
Please register and show your gratitude to Pirata Nervo and Module Authors!

I´m investing all my money in new registrations Big Grin




Users browsing this thread: 1 Guest(s)