EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Custom (https://www.eqemulator.org/forums/forumdisplay.php?f=671)
-   -   #browserace (https://www.eqemulator.org/forums/showthread.php?t=38034)

Township EQ 04-06-2014 09:51 PM

#browserace
 
Just a simple command I made because I was sick of shift-upping to cycle through races in-game.

Note: If you want to see races on a higher scale there's a race viewer in EoC with all of them.


global_player.pl under sub EVENT_SAY
Code:

        if($text=~/#racebrowse/i) {
        my $CT = $client->GetTarget();
        my $CTR = $CT->GetRace();
        my $report = $CTR - 1;
                if($status > 100) {
                        if($CT->IsNPC()) {
                                $CT->SetRace($CTR + 1);
                                $client->Message(15, "Current Race: $report");
                        }
                        else {
                                $client->Message(13, "Error: Invalid Use");
                        }
                }
                else {
                $client->Message(13, "You are unable to use this command.");
                }
        }


Kingly_Krab 04-06-2014 10:12 PM

Wouldn't "my $report = $CTR -1" report race 1 if they're on race 2? I tested this and it does report back the wrong race. Also, this won't work on newer code. I put in the new "return 1;" and it didn't work once I did #reloadquest.

http://i.imgur.com/fktX43t.jpg

Township EQ 04-07-2014 09:18 PM

Quote:

Originally Posted by Kingly_Krab (Post 229359)
Wouldn't "my $report = $CTR -1" report race 1 if they're on race 2? I tested this and it does report back the wrong race. Also, this won't work on newer code. I put in the new "return 1;" and it didn't work once I did #reloadquest.

http://i.imgur.com/fktX43t.jpg

Shrug.. works for me on a revision compiled 2 days ago.. and when I didn't have the -1 on report it was reporting the changed race +1 for some reason.. literally NO clue why.

I only threw it together because i was sick of shift upping.. my new mechanical keyboard is loud as hell.


All times are GMT -4. The time now is 02:07 AM.

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