EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   If mob is up... Have to fight it (https://www.eqemulator.org/forums/showthread.php?t=41473)

Fridgecritter 08-11-2017 10:37 PM

OK so I changed the script name to player.pl and it works. But it won't work as an NPC script. Super weird.

The_Beast 08-11-2017 11:03 PM

No, ENTERZONE has to be on a player.pl script. On an NPC, using a sub EVENT_ENTER is for coming within a proximity of an NPC.

Fridgecritter 08-11-2017 11:31 PM

Ahh ok, well then I need a check to see if the NPC is up, for the summon part. If the NPC isn't up then it doesn't need to move them. So a group of players can kill the guardian for the server for a while until he repops, but it will keep new players from zoning in just to loot corpses still. I'll check naggy's script cause I know it does a check for the NPC.

The_Beast 08-11-2017 11:47 PM

Something I doing on mine, with a customized zone, players have to be script ported in and they will have the option to
go instance or non-instance version. Some like to be alone, others don't, lol

Fridgecritter 08-12-2017 12:18 AM

After I get the server migrated to the new machine I can do a lot more with it. That sounds cool.

Kingly_Krab 08-12-2017 04:32 AM

This isn't the best, but it'll do what you want it to do I believe. When the player zones in the script checks if NPC ID # is spawned. If it is a timer for 30 seconds is set on the player. When the timer expires, the client is moved to the NPC's current co-ordinates.

Code:

sub EVENT_ENTERZONE {
    if ($entity_list->GetNPCByNPCTypeID(#)) {
        quest::settimer("Summon", 30);
    }
}

sub EVENT_TIMER {
    if ($timer eq "Summon") {
        if ($entity_list->GetNPCByNPCTypeID(#)) {
            $client->MovePC($zoneid, $entity_list->GetNPCByNPCTypeID(#)->GetX(), $entity_list->GetNPCByNPCTypeID(#)->GetY(), $entity_list->GetNPCByNPCTypeID(#)->GetZ(), $entity_list->GetNPCByNPCTypeID(#)->GetHeading());
        }
        quest::stoptimer("Summon");
    }
}


NatedogEZ 08-12-2017 05:47 AM

Why not just make the NPC spawn immune until that mob is killed? Have like a 30sec timer that checks if the NPC is dead it sets him attackable.

The_Beast 08-12-2017 07:10 AM

Quote:

Originally Posted by Kingly_Krab (Post 255471)
This isn't the best, but it'll do what you want it to do I believe.

I just checked this out myself. I put it in the player script in nexus for one of the scion ID's and I did indeed get
summoned. I don't need it for FC's purpose, but it gives me other ideas. Thanks to you Kingly :)
I am curious if something like this would be picked up as a "warp" in the db radar system. I'll check it out later.

Scorpious2k 08-12-2017 09:33 AM

Seems to me the problem is that you give players #zone. Why not just give them #peqzone instead and disable it in any zone where it causes a problem?

Fridgecritter 08-12-2017 10:24 AM

Yeah it's more of a fun thing than preventing any kind of cheat. I just want them to kill that dragon first as sort of a right of passage.

Fridgecritter 08-12-2017 10:24 AM

That code looks simple and amazing. Thanks a ton.


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

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