EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=590)
-   -   Client-side stat caps? (https://www.eqemulator.org/forums/showthread.php?t=37041)

ChessyCats 07-06-2013 12:04 AM

Client-side stat caps?
 
I managed to change the stat caps on the server, but the client will not display the correct stats/HP/mana etc. Obviously it is using its own stat cap formula.

Unfortunately, would I be correct to assume that the only way to fix this would be to alter the source code for the client itself?

Kingly_Krab 07-06-2013 12:12 AM

#mystats Will display the stats correctly for you, as well as there being stat variables you can pull. Code below for a stats NPC.
Code:

sub EVENT_SAY
{

        my $stats = quest::saylink("stats", 1);

               
    if($text=~/hail/i)
        {
                plugin::Whisper("Hey there $name, I'm really good at guessing your $stats. Go on, try me!");
    }
    elsif($text=~/stats/i)
        {
                my $str = $client->GetSTR();
                my $sta = $client->GetSTA();
                my $agi = $client->GetAGI();
                my $dex = $client->GetDEX();
                my $wis = $client->GetWIS();
                my $intel = $client->GetINT();
                my $cha = $client->GetCHA();
                my $ac = $client->GetAC();
                my $atk = $client->GetATK();
                my $hp = $client->GetHP();
                my $hp2 = $client->GetMaxHP();
                my $mana = $client->GetMana();
                my $mana2 = $client->GetMaxMana();
                my $end = $client->GetEndurance();
                my $end2 = $client->GetMaxEndurance();
                my $aa = $client->GetAAPoints();
                my $aa2 = $client->GetSpentAA();
                plugin::Whisper("Current Health: $hp/$hp2");
                plugin::Whisper("Current Endurance: $end/$end2'");
                plugin::Whisper("Current Mana: $mana/$mana2");
                plugin::Whisper("Total AA Points: $aa Spent AA Points: $aa2");
                plugin::Whisper("Armor Class: $ac Attack: $atk");
                plugin::Whisper("Strength: $str Stamina: $sta Agility: $agi");
                plugin::Whisper("Dexterity: $dex Wisdom: $wis");
                plugin::Whisper("Intelligence: $intel Charisma: $cha");
        }
}

sub EVENT_ITEM
{
        plugin::Whisper("I do not need this.");
        quest::givecash($copper,$silver,$gold,$platinum);
        plugin::return_items(\%itemcount);
}


ChessyCats 07-06-2013 01:55 AM

Awesome, thank you! That may be a good alternative to this problem. As far as displaying the stats correctly in the client UI, would I be right to assume that can't happen?

KLS 07-06-2013 03:00 AM

The client needs to know about the stat cap increase somehow. A spell/AA effect is the most convenient way to do that from the server's pov.

Secrets 07-06-2013 03:27 AM

More specifically, the tribute code can be hacked up a bit. Tributes get sent to the client as an equipped item and you can add an item with a worn effect that increases the clients' stat cap. AAs also reference an effect like this.

Kingly_Krab 07-06-2013 03:28 AM

AA Effect would be best, honestly, that way it's permanent and you can just raise the cap by like 2500 or something so that there's no way you can break it.

ChessyCats 07-06-2013 05:10 AM

Awesome, thanks guys! I really appreciate the info.


All times are GMT -4. The time now is 06:42 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.