couple of questions about perl
There is a couple of commands I am having trouble with. One of them is the Quest::depop command. How is this actually used? I have tried useing it as quest::depop, quest::depop() and quest:depop(xxx)
XXX is the npc id of the mob I wish to depop. None of these seemed to work. I know the syntax in the quest file is right, cause I changed the quest::depop to a quest::say and it worked fine. Another I am unsure about how to make a NPC do something when they get to a certain waypoint. I see the subevent for it, but how do you actually define the WP you wish to have the action take place? And finnally is there a place with a sample quest on how to make a mob despawn after X time. Like say I wanted a mob to spawn for 2 minutes (120 seconds) then depop? |
im curious about this as well. i was never able to the depop command to work. anybody who HAS actually seen it work with their quests. please post your experiences )
|
IF quest::depop does not work, does anybody have any idea's how to get rid of a npc after a certain amount of time? Basically we got a mob that spawns after a boss npc is slayed. This npc ports you to part 2 of the zone. We are wanting to leave the zone static, and obviously it wouldn't be good to just leave that npc there forever.
One thing I thought of, what if you set the npc to cast a spell on itself that would kill it? Like say after 5 minutes it would cast ice comet on itself? Think that might work? Of course the npc would have to be lower level and have low hp. |
interesting idea. make it Cazic Touch. (aka death touch) and flag the npc as a merchant so his corpse poofs )
|
Er...quest::depop(); works for me.
|
Please post your code that works so we may see it.
thanks |
Yeah...ive never been able to get quest::depop(); to work for me... plz post cisyouc.
|
Im not sure if you wanted the source code or the perl quest, but here is an example of a perl quest I have for a Planar Projection that is triggered by quest::spawn(); on the death of Manaetic Behemoth in Innovation.
The code is set up so after 5 hails he depops or after 1 minute. Code:
sub EVENT_SAY |
That is the exact way I have tried useing quest::depop() but it just won't work. I tried useing it that way on Fronglo's Server, and have tried in on Evolutions and both times it has done nothing. Both Servers have used .5.7dr6, maybe that has something to do with it?
Looks like I might go with plan b, and have the npc suicide after a few minutes. ***EDIT*** The idea of useing cazic touch don't seem to work too well. Here is the script I have been useing to try and despawn the npc. I know the timer is set pretty low that is just for testing purposes. I plan to let it stay spawned alot longer once its working. Code:
#teleporter |
Just wanted to bump this for anyone still having problems. here is a very simple quest that is tested and depop() works fine.
Code:
sub EVENT_SPAWN |
another note that might yeild a little more success is that depop can take an optional arg which is a id from npc_types and will depop the first of those that it finds in the zone. This will fix the timer issue as well as might work better overall.
|
Is that a recent change? It was $timer a while back, not $timername.
Edit: That *may* be your problem - perl variables are in embparser.cpp, the variable you need to use is $timer. The variables from parser.cpp are for the old quest system. |
All times are GMT -4. The time now is 06:44 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.