Raised This Month: $ Target: $400
 0% 

WC3FT changing the scaling with level for shopmenu items.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PreDominance
Member
Join Date: Jul 2014
Old 08-08-2014 , 22:25   Re: WC3FT changing the scaling with level for shopmenu items.
Reply With Quote #1

It's as good a time as ever to learn, friend. I will give you a present but I expect that you learn how to modify this kind of stuff on your own.

items.inl, line 65
PHP Code:
public ITEM_CanBuyidiItem )
{
    if (
iItem == ITEM_BOOTS && (floatcmp(floatabs(get_user_maxspeed(id)), 1.0) != 0)) {
        
client_print(idprint_center"Your speed is already enhanced.");
        return 
false;
    } else if (
iItem == ITEM_SOCK && (floatcmp(get_user_gravity(id), 1.0) != 0) {
        
client_print(idprint_center"Your gravity is already enhanced.";
        return 
false;
    }
    
// User doesn't have the money
    
else if ( SHARED_GetUserMoneyid ) < ITEM_CostidiItem ) )
    {
        
client_printidprint_center"%L"id"INSUFFICIENT_FUNDS" );

        return 
false;
    }
    
    
// User already owns the item and it's not a chargeable item!
    
else if ( ITEM_HasidiItem ) > ITEM_NONE && !ITEM_CheckFlagiItemITEM_CHARGEABLE ) )
    {
        
client_printidprint_center"%L"id"ALREADY_OWN_THAT_ITEM" );

        return 
false;
    } 

You should be able to figure it out from here. I've added the two necessary blocks of code. Read what I did, and learn from it!

Last edited by PreDominance; 08-08-2014 at 22:27.
PreDominance is offline
Indigoism
Junior Member
Join Date: Aug 2014
Old 08-09-2014 , 08:57   Re: WC3FT changing the scaling with level for shopmenu items.
Reply With Quote #2

Thanks for taking the time to help me. Cant believe fixing the ratio was as simple as this.
PHP Code:
#define ITEM_COST_RATIO        1.0        // Changed from 0.7 to 1.0 
I tried adding the code you made for me to the items.inl but it wouldnt compile and I have something else to do right now. Ill report back later.

Indigo~

EDIT:
Alright, so I suppose you left out a few signs to make me look at it

PHP Code:
public ITEM_CanBuyidiItem )
{
    if (
iItem == ITEM_BOOTS && (floatcmp(floatabs(get_user_maxspeed(id)), 1.0) != 0)) {
        
client_print(idprint_center"Your speed is already enhanced.");
        return 
false;
    } else if (
iItem == ITEM_SOCK && (floatcmp(get_user_gravity(id), 1.0) != 0)) {
        
client_print(idprint_center"Your gravity is already enhanced.");
        return 
false;
    } 
That did the trick!

Thanks for the help its much appriciated.

Last edited by Indigoism; 08-09-2014 at 14:26.
Indigoism is offline
Reply



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


All times are GMT -4. The time now is 12:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode