Log in

View Full Version : New NPC Wander Type


Scorpious2k
09-21-2003, 12:59 PM
I have found the need in my work with the Scorpious2k Server for a different NPC wander type.

The type I have come up with I call single run. In this type, the NPC starts at waypoint 1 and travels in sequence to the last waypoint. When he reaches it, he depops and respawns (after the specified respawn time) to start again at waypoint 1.

In order to implement this wandertype, you MUST have installed the fixes I describe in http://www.eqemulator.net/forums/viewtopic.php?t=10204

Here are the changes. In mobAI.cpp Mob::CalculateNewWaypoint() after

switch (wandertype)
{
case 0: //Circular
if (reached_end)
cur_wp = 0;
else
cur_wp = cur_wp + 1;
break;
case 1: //Random 5
if (ranmax > 5)
ranmax = 5;
if (ranmax2 > 5)
ranmax2 = 5;
cur_wp = cur_wp + rand()%(ranmax+1) - rand()%(ranmax2+1);
break;
case 2: //Random
cur_wp = (rand()%max_wp) + (rand()%2);
break;
case 3: //Patrol
if (reached_end)
patrol = 1;
else if (reached_beginning)
patrol = 0;
if (patrol == 1)
cur_wp = cur_wp - 1;
else
cur_wp = cur_wp + 1;
break;

add

case 4: // single run
cur_wp = cur_wp + 1;
break;


in Mob::AI_Process() change the line (this is in the fix I gave for wandering bug fix)
if (gridno < 50 && cur_wp == max_wp)

to read
if (wandertype == 4 && cur_wp == max_wp)


That's it. You will now have wander type 4 - single run.

If I can find somewhere to host it, I will make the final version of this available for download.

DeletedUser
09-21-2003, 02:58 PM
neat.

I can fuzzily remember a few of them in EQlive.

Scorpious2k
09-21-2003, 10:22 PM
The most obvious use for this type would be boats, which travel across the ocean, deliver their passengers and then depop only to appear on the other side to do it all again.

As I thought about it, another use came to mind. Rare mobs could use this. They spawn, move around a bit, depop and then don't respawn for a while (could be hours even).

Quests could also use this, making the finding of a quest char more of a challenge.

Trumpcard
09-22-2003, 12:56 AM
This would be awesome for use with quests !

'The Kracken comes to attack the city! Prepare the defenses!'

Bunga
09-24-2003, 08:32 AM
Like the Ghoul Messenger in WK

jawa21
09-24-2003, 11:07 AM
Or the orc runner in Butcherblock :D

DeletedUser
09-24-2003, 11:54 AM
Now that I think about it.. did boats poof? Last I knew that had a path. From zone line to zone line, then zone line to zone line. Do they start when it triggers the last one poofed, or does it really go through the zones, like Wizard Familiars.

As for the ones that are obvious, yeah. the goblin and orc messangers. I remember those dudes. :P

Purcevil
09-24-2003, 03:16 PM
there are tons of them in live.

shawl quests, ring quests, epics....

cool cool

sup2069
09-24-2003, 05:24 PM
Now that I think about it.. did boats poof? Last I knew that had a path. From zone line to zone line, then zone line to zone line. Do they start when it triggers the last one poofed, or does it really go through the zones, like Wizard Familiars.

As for the ones that are obvious, yeah. the goblin and orc messangers. I remember those dudes. :P


Nah zoneline to zoneline if Im correct.

Thats why it would take forever waiting for the damn boat pre-luclin, pre-pop. If they did depop and repop at the begining then the waiting time would be quick.


Correct me if I am wrong

sup2069
09-24-2003, 05:28 PM
Now that I think about it.. did boats poof? Last I knew that had a path. From zone line to zone line, then zone line to zone line. Do they start when it triggers the last one poofed, or does it really go through the zones, like Wizard Familiars.

As for the ones that are obvious, yeah. the goblin and orc messangers. I remember those dudes. :P


Nah zoneline to zoneline if Im correct.

Thats why it would take forever waiting for the damn boat pre-luclin, pre-pop. If they did depop and repop at the begining then the waiting time would be quick.


Correct me if I am wrong

killspree
09-24-2003, 09:15 PM
Just because they depopped and repopped doesn't mean it was instant respawn after depopping.