stumped with some perl
Ive been scripting the monk epic in perl, and I need to know how to script a few things. If anyone could supply sample code, id appreciate it. or if what im wanting to do is not in yet just let me know. only looking for posts from people who understand perl very well. saves me from getting confused. thanks in advance, hope my questions get answered.
FYI: if someone can help me with atleast problems 1 & 2, I have mostly all of the monk epic done including headband/sash, robe of the lost circle, and robe of the whistling fist. and ofcourse ill post it on the forum, just got stumped be a few things in the cestial fist part. problem #1 doing a quest where the npc is at first in one part of the zone, and when you kill him he respawns in another part of the same zone. ive included a snippit of the code below to give an example of what im try to pull off. Code:
problem #2 this problem ties in with problem 1. I have an npc that when given a certain if($text=~/..../i) will depop and triggers a totally different npc to spawn in another part of the same zone. but there are two different npc id's for example 00001.pl and 00002.pl and when 00001.pl depops it tells 00002.pl to spawn and start the actual quest, but when the npc from 00002.pl is killed he triggers the npc from 00001.pl to respawn. if this is possible then alot of quests repeat this implement. the code i got for each npc id is below. Code:
Code:
problem #3 has nothing to do with the monk epic, but was curious if theres was a way to implement it. if so it might enable all newbie armor quests. 1.) setup a global.pl for any assemblykit. example: 17270.pl = silentfist assembly kit (item id) 2.) inside 17270.pl put something like: Code:
|
quest::spawn(npc_type,grid,guildwarset,x,y,z); - Spawn "npc_type" on "grid" with "guildwarset" at "x","y","z".
Npc_type is the id of the NPC you want to spawn. This id is the same number that you name the quest file. Grid is a grid number for the zone that they should walk around on. Just use 0 if you don't want them to walk. Guildwarset should be 0 unless you are running a guildwar server. And the rest is the position. You cannot spawn a copy of the same NPC in a different place to do what you want in #1. You need to make 2 NPCs with the same name and stats but different IDs because they need to have different quest files. And for #2 yes you can have them both spawn each other if you use the right spawn() syntax. For #3 you cannot do this with perl quests. Only NPCs can trigger quests, not items. You could make a NPC with those quest files to turn stuff into them. Or there is a section of the DB devoted to combining items in containers with formulas to get something to come out, but I ahve no idea of the syntax and its fairly buggy. |
[quote="animepimp"]quest::spawnGrid is a grid number for the zone that they should walk around on. Just use 0 if you don't want them to walk. [quote]
Quick question: does the mob just wander around randomly in that grid? |
thx
thanks animepimp. your post was exactly what I was looking for. I understand the syntax better now.
I had an idea that the quest forum admin might take under consideration. create two sub directories under quest creation. name the first directory legit perl quests, and a second directory called non legit perl quests. so people can post in either folder full working quests or snippits for others to use. while keeping this forum for general quest support. just an idea. |
Quote:
|
All times are GMT -4. The time now is 02:25 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.