[LUA] Server Hooks
#21
Posted 08 March 2010 - 03:45 PM
Use QuestEvent.
Here is the list with Quest Events:
--QuestEvents
QUEST_EVENT_ON_ACCEPT = 1
QUEST_EVENT_ON_COMPLETE = 2
QUEST_EVENT_ON_CANCEL = 3
QUEST_EVENT_GAMEOBJECT_ACTIVATE = 4
QUEST_EVENT_ON_CREATURE_KILL = 5
QUEST_EVENT_ON_EXPLORE_AREA = 6
QUEST_EVENT_ON_PLAYER_ITEMPICKUP = 7
QUEST_EVENT_COUNT = 8
...
So, you gonna use: RegisterQuestEvent(QUESTID, 2, "OnQuestFinished") .
Thanks,
ZxOxZ.
#24
Posted 31 March 2010 - 06:32 AM
function BG_OnHonorableKill(event, pPlayer, pKilled)
print("working")
pPlayer:SendAreaTriggerMessage("You killed "..pKilled:GetName()..".")
pKilled:SendAreaTriggerMessage("You were killed by "..pPlayer:GetName()..".")
pPlayer:AddItem(2344, 1)
end
RegisterServerHook(23, "BG_OnHonorableKill")
#26
Posted 31 March 2010 - 07:10 PM
function fightage_finish(event, pPlayer, pQuestGiver, questId) if (questId == 1) then pQuestGiver:SendChatMessage(12, 0, "Welcome to the Alliance of Azeroth, "..pPlayer:GetName()..".") pQuestGiver:Emote(66) --salute end end RegisterServerHook(22, "fightage_finish")I'm using a compiled core and have the latest ArcScripts rev - since I don't know the Lua arguments that are used for RegisterQuestEvent, I didn't think I should've used it.
So... what's wrong with this script? When I finish the quest, the NPC doesn't do anything.
And yes, the quest ID is supposed to be 1.
#27
Posted 31 March 2010 - 07:18 PM
Quote
function fightage_finish(event, pPlayer, pQuestGiver, questId) if (questId == 1) then pQuestGiver:SendChatMessage(12, 0, "Welcome to the Alliance of Azeroth, "..pPlayer:GetName()..".") pQuestGiver:Emote(66) --salute end end RegisterServerHook(22, "fightage_finish")I'm using a compiled core and have the latest ArcScripts rev - since I don't know the Lua arguments I should use for RegisterQuestEvent, I didn't think I should use it.
So... what's wrong with this script? When I finish the quest, the NPC doesn't do anything.
And yes, the quest ID is supposed to be 1.
What errors are in the console?
#29
Posted 31 March 2010 - 07:22 PM
Use QuestEvent.
Here is the list with Quest Events:
--QuestEvents
QUEST_EVENT_ON_ACCEPT = 1
QUEST_EVENT_ON_COMPLETE = 2
QUEST_EVENT_ON_CANCEL = 3
QUEST_EVENT_GAMEOBJECT_ACTIVATE = 4
QUEST_EVENT_ON_CREATURE_KILL = 5
QUEST_EVENT_ON_EXPLORE_AREA = 6
QUEST_EVENT_ON_PLAYER_ITEMPICKUP = 7
QUEST_EVENT_COUNT = 8
...
So, you gonna use: RegisterQuestEvent(QUESTID, 2, "OnQuestFinished") .
(Written by ZxoZxxzxZXzXZxzXZxozxxxZXOzxOZXz
#30
Posted 31 March 2010 - 07:24 PM
Quote
#31
Posted 31 March 2010 - 07:38 PM
Quote
Quote
Oooh, didn't see that, sorry.
#32
Posted 31 March 2010 - 09:16 PM
Quote
function fightage_finish(event, pPlayer, pQuestGiver, questId) if (questId == 1) then pQuestGiver:SendChatMessage(12, 0, "Welcome to the Alliance of Azeroth, "..pPlayer:GetName()..".") pQuestGiver:Emote(66) --salute end end RegisterServerHook(22, "fightage_finish")
...and nevermind, looks like the order of arguments got changed at some point, now it's:
(event, pPlayer, questId, pQuestGiver)
but in future, don't be afraid to tostring and print the arugments to see what's happenin ^_^
#33
Posted 01 April 2010 - 05:22 AM
#34
Posted 01 April 2010 - 05:35 AM
Quote
The core, I'd expect. Whilst hypersniper has done his best, a large part of the ArcEmu wiki is still out of date.
#35
Posted 01 April 2010 - 05:38 AM
Quote
http://wow-v.com/for...p?topic=13056.0
#36
Posted 03 April 2010 - 07:14 AM
:Emote(emoteID, delay)but no sure.
When i tried
:Emote(emoteID)didn't work. Test it...
#37
Posted 03 April 2010 - 08:59 AM
Quote
:Emote(emoteID, delay)but no sure.
When i tried
:Emote(emoteID)didn't work. Test it...
#39
Posted 06 April 2010 - 04:08 PM
Umm, im sorry but my script_bin, is not working with my new core, and every svn i get just does not give me any information, can u please tell me how to get the "latest" version.
I do have svn checkout program and some reason its not working. Am i missing anything or is there anything i should know about
#40
Posted 07 April 2010 - 04:41 PM
Quote
Umm, im sorry but my script_bin, is not working with my new core, and every svn i get just does not give me any information, can u please tell me how to get the "latest" version.
I do have svn checkout program and some reason its not working. Am i missing anything or is there anything i should know about
Woah! Wrong topic, wrong section...
Similar Topics
![]() |
| 1.5.2 server | MinecraftSMP.org | PVP | SMP | 24/7 | No Whitelist | Shops | iConomy | MCMMO Skills |Started by briahnanicole, 06 Feb 2012 |
|
|
|
![]() |
[Wow-Pwnage 3.3.5a] The Top Rated Server is back.Started by metalivo, 3 weeks ago |
|
|
|
![]() ![]() |
SICKind Castle Doctrine Server InfoStarted by SickBoy, 23 Mar 2013 |
|
|
|
![]() |
2013 Trinitycore server item issuesStarted by mannyrettre, 16 Mar 2013 |
|
|
|
![]() |
MinecraftSMP.org | PVP | SMP |1.4.6 server | 24/7 | No Whitelist | Shops | iConomy | MCMMO Skills |Started by briahnanicole, 04 Jan 2013 |
|
|
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users
















