• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] OnSummonCreature / OnSummonCreatureDied problem.

Status
Not open for further replies.

mjafko

Epic Member
Hey guy's I have problem with "GossipSummonWB.OnSummonedCreature" and "GossipSummonWB.OnSummonedCreatureDied". Well basecly With gossip I just spawncreaure. But it never get into one of this not when I spawn it or if I kill this spawned creature. Maybe any help ?

I know for OnSummonedCreature, would be probably better to you event = 5? But still main problem is with on die. What am I doing wrong here.

Code:
RegisterCreatureGossipEvent(NpcId, 1, OnGossipHello)
RegisterCreatureGossipEvent(NpcId, 2, OnGossipSelect)
RegisterPlayerGossipEvent(MenuId, 2, OnGossipSelect)
RegisterCreatureEvent( BossNpcId, 22, GossipSummonWB.OnSummonedCreature )
RegisterCreatureEvent( BossNpcId, 21, GossipSummonWB.OnSummonedCreatureDied )

Greeting's, Marko!
 

Grandelf

Esteemed Member
I think you're assigning these events to the wrong creature.
Code:
CREATURE_EVENT_ON_JUST_SUMMONED_CREATURE          = 19, // (event, creature, summon)
CREATURE_EVENT_ON_SUMMONED_CREATURE_DESPAWN       = 20, // (event, creature, summon)
CREATURE_EVENT_ON_SUMMONED_CREATURE_DIED          = 21, // (event, creature, summon, killer)
These events have to be registered on the creature that does the summoning.
So in your case I think you should register the events like this:
Code:
RegisterCreatureGossipEvent(NpcId, 1, OnGossipHello)
RegisterCreatureGossipEvent(NpcId, 2, OnGossipSelect)
RegisterPlayerGossipEvent(MenuId, 2, OnGossipSelect)
RegisterCreatureEvent( NpcId, 22, GossipSummonWB.OnSummonedCreature )
RegisterCreatureEvent( NpcId, 21, GossipSummonWB.OnSummonedCreatureDied )
Then whenever the function GossipSummonWB.OnSummonedCreature is called, the variables will be:
Code:
event = 22
creature = NpcId (userdata)
summon = BossNpcId (userdata)
 
Status
Not open for further replies.
Top