Timer for NPC actions?

09/10/2008 09:31 ~Yuki~#1
is it possible to make an npc do a buff on a char for a limited time?
If so how??
I know something with a timer dunno how exactly....
09/10/2008 13:31 tao4229#2
I don't think an NPC can do it(Without tons and tons of coding and shit, even then it still may be impossible), but you can fool around with mobs...(Like making a guard do stuff)
09/10/2008 14:41 glupkotrup#3
@tao4229 /Agreed
Alltho I think its impossible.
09/10/2008 15:11 YukiXian#4
What you mean?
09/10/2008 15:34 ~Yuki~#5
So NPC axtion Stigma on mychar for 100 sec?

How or not possible :P?
09/10/2008 15:43 glupkotrup#6
Well It is possible... But u need to kill your ass for it :D
09/10/2008 16:13 _Emme_#7
Quote:
Originally Posted by lolmaster123 View Post
So NPC axtion Stigma on mychar for 100 sec?

How or not possible :P?
Well,thats possible. If you want specific stigma for 100 sec,you can either code a "new" stigma,like Stigma1,that does it for 100 seconds,so you dont modify the real one.

Anyways.just to do something like this:


if (CurrentNPC == 1337)
{
if (Control == 1)
{
SendPacket(General.MyPackets.NPCSay("I could stig you for 100 seconds if you would like that."));

SendPacket(General.MyPackets.NPCLink("Yes sir,please do", 2));
SendPacket(General.MyPackets.NPCLink("No,thanks.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}

if (Control == 2)
{
MyChar.StigBuff = true;
}
}


Might not be working but worth a try!

Emme
09/10/2008 16:14 _Emme_#8
Quote:
Originally Posted by tao4229 View Post
I don't think an NPC can do it(Without tons and tons of coding and shit, even then it still may be impossible), but you can fool around with mobs...(Like making a guard do stuff)

Add my msn u newbie :D [Only registered and activated users can see links. Click Here To Register...]
09/10/2008 18:37 glupkotrup#9
Hmm... I'll try it out later... If it works you earned 1 thanks :D
09/10/2008 20:00 © Haydz#10
Quote:
Originally Posted by emildayan1 View Post
Well,thats possible. If you want specific stigma for 100 sec,you can either code a "new" stigma,like Stigma1,that does it for 100 seconds,so you dont modify the real one.

Anyways.just to do something like this:


if (CurrentNPC == 1337)
{
if (Control == 1)
{
SendPacket(General.MyPackets.NPCSay("I could stig you for 100 seconds if you would like that."));

SendPacket(General.MyPackets.NPCLink("Yes sir,please do", 2));
SendPacket(General.MyPackets.NPCLink("No,thanks.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}

if (Control == 2)
{
MyChar.StigBuff = true;
}
}


Might not be working but worth a try!

Emme
That will just give him the effect not the stats
09/10/2008 21:54 _Emme_#11
My bad,LOL,didnt though of that.

Find the
Quote:
MyChar.StigBuff = true;
in the npc script.

Replace it with:

Quote:
MyChar.StigBuff = true;
MyChar.Stigged = DateTime.Now;
MyChar.MyClient.SendPacket(General.MyPackets.Vital (MyChar.UID, 26, MyChar.GetStat()));
World.UpdateSpawn(MyChar);
Done,should work.

Emme
09/10/2008 22:08 tao4229#12
Quote:
Originally Posted by emildayan1 View Post
My bad,LOL,didnt though of that.

Find the
in the npc script.

Replace it with:



Done,should work.

Emme
Was about to correct you there :rolleyes:.

Edit:: Emme I added you, It should be pretty easy to know whether it's my email or not..