Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] Another Question:

[DiscordArchive] Another Question:

[DiscordArchive] Another Question:

rektbyfaith
Administrator
0
03-31-2022, 12:53 PM
#1
Archived author: Neo2k • Posted: 2022-03-31T12:53:22.169000+00:00
Original source

Another Question:
Is it possible to simple add a delay between 2 commands in c++ script? Because i create a eventmanager script and want to announce, that a event is beginning with the following code:

Function:


`void SendServerMessage(string Message)
{
ChatHandler* handler;
std:Confusedtring str = Message;
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
data << str;
sWorld->SendGlobalMessage(&data);
}`

And onGossipSelect I call it like:


`SendServerMessage("|cff0000ffAb sofort kann man sich im GT bei XXX registrieren!|r");
SendServerMessage("|cff0000ffEs wird in K\303\274rze ein Jumpevent beginnen!|r");`


This works fine (See Image), but i want a delay between the 2 Messages..

Any ideas?
[Image: unknown.png?ex=690bf181&is=690aa001&hm=4...0aec8db42&]
rektbyfaith
03-31-2022, 12:53 PM #1

Archived author: Neo2k • Posted: 2022-03-31T12:53:22.169000+00:00
Original source

Another Question:
Is it possible to simple add a delay between 2 commands in c++ script? Because i create a eventmanager script and want to announce, that a event is beginning with the following code:

Function:


`void SendServerMessage(string Message)
{
ChatHandler* handler;
std:Confusedtring str = Message;
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
data << str;
sWorld->SendGlobalMessage(&data);
}`

And onGossipSelect I call it like:


`SendServerMessage("|cff0000ffAb sofort kann man sich im GT bei XXX registrieren!|r");
SendServerMessage("|cff0000ffEs wird in K\303\274rze ein Jumpevent beginnen!|r");`


This works fine (See Image), but i want a delay between the 2 Messages..

Any ideas?
[Image: unknown.png?ex=690bf181&is=690aa001&hm=4...0aec8db42&]

rektbyfaith
Administrator
0
03-31-2022, 02:10 PM
#2
Archived author: L2S • Posted: 2022-03-31T14:10:16.360000+00:00
Original source

Good. it looks like everyone cares... GJ
rektbyfaith
03-31-2022, 02:10 PM #2

Archived author: L2S • Posted: 2022-03-31T14:10:16.360000+00:00
Original source

Good. it looks like everyone cares... GJ

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)