PDA

View Full Version : Problem with Quest Implement


Richardo
04-12-2004, 12:34 PM
Ok, I made my quest file below... Trying to get "Soulbinder Gendal" to work in "the arena".

Here is the .pl for soulbinder... Also, his ID is 78252 (78252.pl)

Located in: C:\EqEmu\quests\arena


sub EVENT_SAY{
if($mname =~ /^Soulbinder/{

if($text=~/Hail/i){quest::say("Greetings $name. When a hero of our world is slain their soul returns to the place it was last bound and the body is reincarnated. As a member of the Order of Eternity it is my duty to [bind your soul] to this location if that is your wish.");}
if($text=~/bind my soul/i) {
quest::say("You shall return here when your fate chooses death.");
quest::castspell($userid,2049);
}
}

#your standard default.pl EVENT_SAY behavior
}

Ok, I went in game... Got the npcID, made the PL file titled... 78252.pl and I put it in quests\arena and it still does'nt work. Is there a command im supposed to put in to make it work? I also restarted server a few times but still no luck...

Monrezz
04-12-2004, 12:41 PM
Try:
sub EVENT_SAY
{
if($mname =~ /^Soulbinder/i)
{
if($text=~/Hail/i)
{
quest::say("Greetings $name. When a hero of our world is slain their soul returns to the place it was last bound and the body is reincarnated. As a member of the Order of Eternity it is my duty to [bind your soul] to this location if that is your wish.");
}
if($text=~/bind my soul/i)
{
quest::say("You shall return here when your fate chooses death.");
quest::castspell($userid,2049);
}
}
}

Richardo
04-12-2004, 12:45 PM
Ok trying it now

Richardo
04-12-2004, 12:48 PM
No Luck, whenever I hail me, he just looks at me...

Richardo
04-12-2004, 12:53 PM
Nevermind! Restarted server and it works, woot thanks a lot Monrezz!!!!

Monrezz
04-12-2004, 12:55 PM
Np.

RexChaos
04-12-2004, 02:45 PM
I can't get the soulbinders to actually have the spell "stick". None of the npc's casting beneficial spells on players work. :-/

Richardo
04-12-2004, 03:24 PM
Show us your .pl

cofruben
04-13-2004, 03:07 AM
try quest::selfcast(id);

Charmy
05-11-2004, 07:25 AM
Sry for bring up an older topic here, but i am having same issue with getting benificial spells to stick when cast by npc, i tried the selfcast to force the client to cast the spell on himself, but for some very odd reason when i do quest::selfcast($userid,2049); it casts the lvl 4 bard group heal hymn of restoration, yet when i do #castspell 2049 while having myself targeted it casts bind, so i am stumped here any ideas on why this might not be working?

m0oni9
05-11-2004, 08:05 AM
From http://www.eqemulator.net/forums/viewtopic.php?t=12020:

quest::castspell(id,spellid); - Casts "spell" on entity with "id".

quest::selfcast(spellid); - Forces client to cast spell on themself (useful for self only and group effect spells).

Instead of quest::selfcast($userid,2049); try quest::castspell($userid,2049);

animepimp
05-11-2004, 08:31 AM
Yeah the reason you are getting that spell is that the userid happens to be the same number as that spells number and that method only takes one parameter. C and Perl allows you to call a method with any number of parameters and won't crash as long as you send the same or more parameters than expected. But it still only reads the number its expecting which is just the first.

Charmy
05-11-2004, 12:39 PM
ahh ok i understand now, thanks for the info =) didn't realize that it was selfonly/group spells that worked that way, however i still can't seem to get the npc to have a benifical spell stick, buffs, bind whatever, detrimental spells i have been able to however =), any ideas on how to fix this? or maybe an alternate way to work around it?

gandar
05-11-2004, 06:28 PM
Hello!

Try this:

On (or about) line 2417 in zone::mob.cpp ->

Change:
else if(_NPC(mob2)) // client to npc
{
return false;
}To:
else if(_NPC(mob2)) // client to npc
{
return true;
}

That's where I changed it on my server - worked perfectly. My Soulbinder now binds your soul or heals on command...

Good Luck!

~Gandar

Charmy
05-11-2004, 09:49 PM
Aswome! thanks!