Buff Object or Npc ?

10/13/2013 15:00 tomas1234567#1
HI , First i am sorry for my bad english . How to give skill for npc ? For example : I ll click NPC and NPC give me buff .
Thx for help .
10/13/2013 15:21 .Shōgun#2
You can't give skills to a NPC, in any case you can create a quest that buffs the player using add_affect
10/13/2013 16:11 tomas1234567#3
Quote:
Originally Posted by tomas1234567 View Post
HI , First i am sorry for my bad english . How to give skill for npc ? For example : I ll click NPC and NPC give me buff .
Thx for help .
Ok . Add_affect , and then skill vnum ? Or what ?
10/13/2013 16:20 .Shōgun#4
affect.add(apply.ATTACK_SPEED, 10, 3600)

That would give you 10% Attack Speed for 1 hour. You can see the affect types in questlib.lua
10/13/2013 17:19 tomas1234567#5
Quote:
Originally Posted by Uncorrupted View Post
affect.add(apply.ATTACK_SPEED, 10, 3600)

That would give you 10% Attack Speed for 1 hour. You can see the affect types in questlib.lua
Thanks , but what is wrong on this quest ?

quest buffy begin
state start begin
when 20381.chat."Požehnání" with pc.getqf("pozehnani")== 0 begin
setskin(NOWINDOW)
chat("Nyní máš 20000 silný proti všem příšerám")
pc.setqf("pozehnani", 600)
affect.add(apply.ATTBONUS_MONSTER, 20000, 600)
end
end
when login with pc.getqf("pozehnani")== 0 begin
chat("Tvé požehnání právě skončilo.")
affect.remove(apply.ATTBONUS_MONSTER, 20000, 600)
end
when 20381.chat."Požehnání" with pc.getqf("pozehnani")== 1 begin
chat("Již si obdržel požehnání!")
chat("Přijď za 10 minut.")
end
end
end
end