PDA

View Full Version : A guide for new quests/NPC wandering.


Wiz
12-18-2002, 11:01 AM
As of next release, the quest system has recieved a major overhaul and NPC wandering has been implemented. This is a guide to using both, until they're more "settled" parts of the EMU.

--QUESTS--

A bunch of new triggers has been added. These are TRIGGER_FLAGS, TRIGGER_KILLED and TRIGGER_ATTACK.

TRIGGER_KILLED kicks in whenever an NPC kills someone. For example: a giant rat says, 'I pwned u lolo'

TRIGGER_ATTACK is the attack message of an NPC. For example: Guard D'Varr says, 'That was not a very intelligent thing to do.'

TRIGGER_FLAGS is a tad different. It works in two ways, either

TRIGGER FLAGS X X X X where X is the number of flags that need to be matched to fulfill the requiremenr, for example TRIGGER_FLAGS 3 1 2 0 would require flags 1 2 and 3 to be active.

Also, TRIGGER_FLAGS 50 X is used for CUMULATIVE_FLAG. X is the amount of flag 50's you need, in this case. So TRIGGER_FLAGS 50 3 needs CUMULATIVE_FLAGS to have been ran three times.

The following triggers have also been added:

CHECK_FACTION X

X is one of:
1: Ally
2: Kindly
3: Warmly
4: Amiably
5: Indifferent
6: Apprehensive

This is the minimum faction required for it to continue. So, for example:

TRIGGER_TEXT:Hail:{
CHECK_FACTION 5
SAY: Hi
}

This would only say hi if faction is at least indif.

NPC_FLAG X 1/0 - This is in conjuction with CHECK_FLAGS. You can set and unset flag X (Goes up to 50), so that if you for example want 3 items turned it to give a result, you make them set one flag each, check a trigger_flags against all three flags, and voila. Flag 50 is reserved, and instead uses CUMULATIVE_FLAG. This needs no other entries, but will simply raise flag 50 by one notch. This is for multi turnin of the same item and likewise.

Note:

- Multi item turnin only works if you trade one item at a time.
- NPC's will also return items they don't want with this code.
- You can never interact through talk/items with an NPC if they are threat/scowl.

--WANDERING--

Wandering is handled through a few simple commands.

#wpinfo 0-49 - Target an NPC and use this to retrieve WP information assigned to it for waypoints 0-49.
#gassign grid_num - Target an NPC and use this to assign it's spawn2 point to grid grid_num.
#grid add/delete grid_num wandertype pausetype - Adds grid grid_num with the wandertype/pausetype as follows:

Wandertype
0: Circular. NPC will cycle waypoints in order, then head back to the first waypoint.
1: Random 10. NPC will pick a random of the nearest 10 waypoints and go to it.
2: Random. NPCwill pick a random waypoint in the grid and go to it.
3: Patrol. NPC will walk the waypoints to the end, then turn and backtrack.

Pausetype
0: Random half. NPC pauses for half of it's pause time + random of half it's pause time.
1: Full. NPC pauses for full pause time.
2: Random. NPC pauses for random of it's pause time.

or deletes grid number grid_num.

#wp add/delete grid_num pause wp_num - Adds waypoint number wp_num to grid grid_num with a pause of pause on the location you're standing at, or deletes waypoint number wp_num in grid number grid_num (just leave pause at 0)

To setup an NPC to a grid, simply #gassign an NPC spawned by a certain spawn2 point, and all NPC's spawned by that point will adhere to the selected grid. An NPC assigned to a grid will simply start wandering it after spawning.

Nira
12-18-2002, 11:03 AM
Looking forward to the massice quest making you all will be doing now :D

Drawde
12-19-2002, 03:33 AM
Wow! That should help me out with my quest scripting. I'm currently working on getting some of the EQ quests and dialogue into my DB/world data, using the EthQ DB and Vaslin's Everquest Compendium.
Things like faction checks and accepting multi items will be very handy.
As I said before, any possibility of having script commands to accept and give cash in future releases?

Lurker_005
12-19-2002, 04:43 AM
Whoot! been looking foward to the improved quest system, and wandering mobs is great too!

Can you expand check faction to allow ranges. That way it can behave differently if faction is too low, instead of just ignoring you.

A thought for a new feature is a random timer to do or say something. mostly for speach, but also start wandering on a player event or something like that.

Edgar1898
12-19-2002, 03:01 PM
Wow! I cant wait to try it out. Speaking of which, where could I download the new DR version of the server? I usually get 15-20 ppl at a time (during peak times) on my server and I would love to help you test it out. I tried to get it from the cvs server, but it doesnt appear to be there. If possible let me know I want to put up the new version as soon as possible :)

just_add_water
12-19-2002, 04:07 PM
DR == development release
soo only dev's have access to DR's

IAkc7wzl
12-19-2002, 05:28 PM
I may be wrong but my exp. as a player on the 4.1-DR releace is kinda broken as far as casters are conserned. but I may be wrong but thats been the trend on my end. I use to play FA almost every chance i got untill the upgraded and my casting stoped working to I now look for the other servers that don't have -DR in the ver. :?

Wiz
12-19-2002, 10:47 PM
I may be wrong but my exp. as a player on the 4.1-DR releace is kinda broken as far as casters are conserned. but I may be wrong but thats been the trend on my end. I use to play FA almost every chance i got untill the upgraded and my casting stoped working to I now look for the other servers that don't have -DR in the ver. :?

Try making sense?

IAkc7wzl
12-20-2002, 05:52 AM
sorry english is not one of my strong points.

what I am trying to say that on the servers running 4.1-DR ver my casting spells is not working correctly

here is a smal example
I have a magic lore wepon that hits for x amount of damage also it has a spell bound to it that does foe X damage and give me the X to my hitpion bar

after the 4.1-DR release I get this

slash for x damage
spell something rather

then slash x piont of damage
spell something or rather

but the spell never completes it's task

the sword I am talking about is the sword of ssraeshza.

ok on my SK (shadow knight) I try to cast a spell the bar goes down then nothing happens and my spell bar is for ever greyed out untill I log out and back in.

I know it is not my client becouse I play on other servers with out that problem

Wiz
12-21-2002, 01:43 AM
Okay. Really not the right place to post this, but I'll look at it.

mByte
01-07-2003, 06:51 PM
Great work, Could I request a - TIMEOUT{sec}

This would be handy if you had to hand in somthing then run to the front before npc's spawned or give you time between waves in rings.

not sure how hard this would be to code.

ManJones
01-08-2003, 01:51 AM
Wiz, we thank you much for the wandering mobs. I have one small request though. Since I am stupid can you please give an example of the wandering and grid commands with numbers like it would actually be typed in game with a mob targeted?

Thank you

mByte
01-08-2003, 06:05 AM
I setup freportw yesterday was simple

Here is how I did a random grid in west freeport noobie area

go around to where you want each waypoint and #spawn WPMOB 60 (i use skeletons cause they are global and the z-axis is close to all the mobs you will have.

once all your WPMOB's are up go around and start making the grid after you target them and type #wp add grid pause wpid do a #kill so you know you have been there.

[Create a New Grid]
#grid add 1001 2 2

[Depop the zone] (this just helps but not needed)
#depopzone

[Spawn NPC as markers for waypoints]
#spawn WPMOB 60
#spawn WPMOB 60
#spawn WPMOB 60
#spawn WPMOB 60
#spawn WPMOB 60
#spawn WPMOB 60

[Add Waypoints to New Grid]
[45 = 45 second pause w/ random timer of how long npc will wait there]
#wp add 1001 45 0
#wp add 1001 45 1
#wp add 1001 45 2
#wp add 1001 45 3
#wp add 1001 45 4
#wp add 1001 45 5

[repop the zone]
#repop (clears out the WPMOB's and spawns the NPC's)

[Target the mob/mobs you want in the grid]
/target a_large_rat000 (or click on it)

[Add the grid to the mob]
#gassign 1001

[repop zone]
#repop

------------------------------------
You Mob will now move :)

--------------------
#wpinfo will tell you if the npc is part of a grid and what there current waypoint is.

Some tips
1. If your doing patrolling set up the path with the same (NPC RACE) that is in the grid

2. Check your targets all the time.

3. If a npc is hopping when moving its from the z-axsis in the grid table for that waypoint (just take it down some)

4. NPC's do not open doors and they do not care about wall's/objects ect...


Hope this helps, its really nice to see these things move.

killspree
01-08-2003, 01:33 PM
How is the multi item turn-in supposed to be entered?

ManJones
01-08-2003, 01:39 PM
It helps but after i assign the npc to the grid i and repop i get sent to charatcer select andcant get back in zone, even after reboot. I have to revert back to saved db to get back in zone

Solaris
02-02-2003, 04:07 PM
How do we adjust the z-axis for the waypoints or grid? Are u referring to the z-axis assigned for the mob itself that is assigned to a given waypoint?

SponkeyMonkey
02-17-2003, 06:01 AM
hello im trying too get the Preist of discord guy too make me pvp , i can get him too talk too me and such i just cant get him too make me pvp hwen i say yes. Ne ideas?

NPC_SCRIPT 124478{
TRIGGER_TEXT:Hail:{
SAY:Greetings %CHARNAME%, Would you like you like to go PvP [yes]
}
}
TRIGGER_TEXT:yes:{
#pvp on %CHARNAME%
SAY:Have a Safe Journey %CHARNAME%
}
}

IADaenks
03-05-2003, 06:49 AM
dont put the #

its just "PVP ON"

Yarea
04-27-2003, 09:11 PM
I was wondering how would you go about saving an npc into your database after creating it with the #spawn command?? and help would be greatly appreciated thanks