Forums WoW Modding Support Archives WoWModding Threads [DiscordArchive] Is it possible to schedule an event to happen f...

[DiscordArchive] Is it possible to schedule an event to happen f...

[DiscordArchive] Is it possible to schedule an event to happen f...

Pages (10): Previous 1 4 5 6 7 8 10 Next  
rektbyfaith
Administrator
0
12-18-2024, 11:10 PM
#51
Archived author: stoneharry • Posted: 2024-12-18T23:10:06.126000+00:00
Original source

`RegisterWorldMapScript` might take a map id
rektbyfaith
12-18-2024, 11:10 PM #51

Archived author: stoneharry • Posted: 2024-12-18T23:10:06.126000+00:00
Original source

`RegisterWorldMapScript` might take a map id

rektbyfaith
Administrator
0
12-18-2024, 11:10 PM
#52
Archived author: stoneharry • Posted: 2024-12-18T23:10:27.151000+00:00
Original source

or maybe it's just `new spell_my_custom_map_script(name, id);`
rektbyfaith
12-18-2024, 11:10 PM #52

Archived author: stoneharry • Posted: 2024-12-18T23:10:27.151000+00:00
Original source

or maybe it's just `new spell_my_custom_map_script(name, id);`

rektbyfaith
Administrator
0
12-18-2024, 11:10 PM
#53
Archived author: stoneharry • Posted: 2024-12-18T23:10:28.871000+00:00
Original source

not checked
rektbyfaith
12-18-2024, 11:10 PM #53

Archived author: stoneharry • Posted: 2024-12-18T23:10:28.871000+00:00
Original source

not checked

rektbyfaith
Administrator
0
12-18-2024, 11:14 PM
#54
Archived author: Drikish • Posted: 2024-12-18T23:14:12.879000+00:00
Original source

```c++
class StormsReachMapScript : public WorldMapScript
{
public:
StormsReachMapScript() : WorldMapScript("storms_reach_map_script", 2000)
{
}
```
rektbyfaith
12-18-2024, 11:14 PM #54

Archived author: Drikish • Posted: 2024-12-18T23:14:12.879000+00:00
Original source

```c++
class StormsReachMapScript : public WorldMapScript
{
public:
StormsReachMapScript() : WorldMapScript("storms_reach_map_script", 2000)
{
}
```

rektbyfaith
Administrator
0
12-18-2024, 11:14 PM
#55
Archived author: Drikish • Posted: 2024-12-18T23:14:17.264000+00:00
Original source

Seems to be like this I think
rektbyfaith
12-18-2024, 11:14 PM #55

Archived author: Drikish • Posted: 2024-12-18T23:14:17.264000+00:00
Original source

Seems to be like this I think

rektbyfaith
Administrator
0
12-18-2024, 11:16 PM
#56
Archived author: Drikish • Posted: 2024-12-18T23:16:59.098000+00:00
Original source

it's working like this btw
rektbyfaith
12-18-2024, 11:16 PM #56

Archived author: Drikish • Posted: 2024-12-18T23:16:59.098000+00:00
Original source

it's working like this btw

rektbyfaith
Administrator
0
12-18-2024, 11:17 PM
#57
Archived author: stoneharry • Posted: 2024-12-18T23:17:00.185000+00:00
Original source

try this:
```c++
class spell_my_custom_map_script : public WorldMapScript
{
public:
spell_my_custom_map_script(const char* name, uint32 mapId) : WorldMapScript(name, mapId)
{

}

void OnUpdate(Map* /*map*/, uint32 /*diff*/)
{
// Your logic here
}
};

void AddCustomScripts()
{
const char* name = "spell_my_custom_map_script";
uint32 mapId = 1u;
new spell_my_custom_map_script(name, mapId);
}
```
rektbyfaith
12-18-2024, 11:17 PM #57

Archived author: stoneharry • Posted: 2024-12-18T23:17:00.185000+00:00
Original source

try this:
```c++
class spell_my_custom_map_script : public WorldMapScript
{
public:
spell_my_custom_map_script(const char* name, uint32 mapId) : WorldMapScript(name, mapId)
{

}

void OnUpdate(Map* /*map*/, uint32 /*diff*/)
{
// Your logic here
}
};

void AddCustomScripts()
{
const char* name = "spell_my_custom_map_script";
uint32 mapId = 1u;
new spell_my_custom_map_script(name, mapId);
}
```

rektbyfaith
Administrator
0
12-18-2024, 11:17 PM
#58
Archived author: Drikish • Posted: 2024-12-18T23:17:29.989000+00:00
Original source

```c++
class StormsReachMapScript : public WorldMapScript
{
public:
StormsReachMapScript() : WorldMapScript("storms_reach_map_script", 2000)
{
}

void OnCreate(Map* map) override
{
TC_LOG_INFO("scripts", "MyCustomMapScript: Map %u has been created!", map->GetId());
}

void OnPlayerEnter(Map* map, Player* player) override
{
player->ModifyMoney(100000);
}

void OnUpdate(Map* map, uint32 diff) override
{

}
};

void NightfallMapScripts()
{
new StormsReachMapScript();
}
```
rektbyfaith
12-18-2024, 11:17 PM #58

Archived author: Drikish • Posted: 2024-12-18T23:17:29.989000+00:00
Original source

```c++
class StormsReachMapScript : public WorldMapScript
{
public:
StormsReachMapScript() : WorldMapScript("storms_reach_map_script", 2000)
{
}

void OnCreate(Map* map) override
{
TC_LOG_INFO("scripts", "MyCustomMapScript: Map %u has been created!", map->GetId());
}

void OnPlayerEnter(Map* map, Player* player) override
{
player->ModifyMoney(100000);
}

void OnUpdate(Map* map, uint32 diff) override
{

}
};

void NightfallMapScripts()
{
new StormsReachMapScript();
}
```

rektbyfaith
Administrator
0
12-18-2024, 11:17 PM
#59
Archived author: Drikish • Posted: 2024-12-18T23:17:48.749000+00:00
Original source

Just did the money add to check it works and its working
rektbyfaith
12-18-2024, 11:17 PM #59

Archived author: Drikish • Posted: 2024-12-18T23:17:48.749000+00:00
Original source

Just did the money add to check it works and its working

rektbyfaith
Administrator
0
12-18-2024, 11:18 PM
#60
Archived author: Drikish • Posted: 2024-12-18T23:18:27.534000+00:00
Original source

You mentioned about having the onUpdate function to be more efficient?
rektbyfaith
12-18-2024, 11:18 PM #60

Archived author: Drikish • Posted: 2024-12-18T23:18:27.534000+00:00
Original source

You mentioned about having the onUpdate function to be more efficient?

Pages (10): Previous 1 4 5 6 7 8 10 Next  
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)