PDA

View Full Version : Npc buffing players


Runeblade
06-29-2006, 11:21 AM
Hey, was wondering in how to get a npc to cast a spell on a player using the questeditor. I seen the translocater post but don't think selfcast will work. i just tried quest::cast but i still can't get it to work.

Can anyone post an example?
I just say buff and he responds in text but no buffs land or cast.

Runeblade
06-29-2006, 01:34 PM
I think i might've got it but not quite sure yet.

Belfedia
06-29-2006, 08:36 PM
I think i might've got it but not quite sure yet.

I'm not a perl master,
But selfcast work, not cast on player for buff.

Runeblade
06-30-2006, 09:30 AM
Still can't get it to work.

I tried this in teh questeditor

sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::selfcast($userid,2049);
}
}
#END of FILE Zone:qeynos2 ID:336104 -- #Boluen Areden

Can anyone tell me if something is wrong with this? He just looks in my direction when i hail him and nothing else :P.

think i need perl enabled or something, seen examples of a message that pops up when your loading up your world and i don't have it or think theres 2 of them.

Runeblade
06-30-2006, 12:52 PM
Well i'll start it up later when i've edited the server more, every other type of quest i can make, just not that silly selfcast function. I know it can work cause my friend had one that gave buffs, lvled u to 70, etc. But if i find anything i'll post it. Experimented on placing the selfcast bind on on the exterminator npc in qeynos and logged on and he wasn't even there Lol, so took that line of code off and he poped back :P

Craleu
07-01-2006, 01:00 PM
KMRA did that to
there was a NPC that gave you level 65 and like 10kplat
then another one gave you buffs

Craleu
07-01-2006, 01:04 PM
here is a demo of it
i know it works on 6.0

if($platinum == "100")
{
if (($ulevel > 1) && ($ulevel <=70))
{
if(($class eq Magician) || ($class eq Enchanter) || ($class eq Necromancer) || ($class eq Wizzard) || ($class eq Cleric) || ($class eq Druid) || ($class eq Shaman))
{
if($uguildid eq 5)
{
quest::selfcast(1693);
quest::selfcast(67);
}
else{
quest::say("You Need To Give Me Plat!");
}
}
else{
if($uguildid eq 5)
{
quest::selfcast(67);
quest::selfcast(3391);
}
}
}
}