Hi,

[? 1] How do I create an API for a game?
[? 2] If this subject is too hard for a novice/intermediate programmer, where do I best find tutorials/resources about API's?

[1]
I asked myself this question, as well as google, yet no easy answers or explanations popped up, so this is where I go when everything else fails.

The reason for asking this is, I downloaded an application that used a so called API-hook, a term which is much unfamiliar to me. My guess is that it is linked with the game's natives and can therefore use its functions and also through this API use the natives from the game to create a chat message in the game. An example would be:

  1. API sends a query to game, GetLastJoinedPlayer(), and returns the name of the last joined player, "Adam".
  2. API uses native, SendChatMessage("Adam"+" has joined the game.") and displays in game "Adam has joined the game."

In this case, I want to learn how to create an API for Warcraft III, such as this program: Warcraft 3 Banlist

I hope I've expressed my intentions well, otherwise I'll have to explain further.

If this thread is in the wrong section, I apologize

Ok so first off you going to use strings... you can use strcmp() for comparing two strings such as Game: "adam ahs joined the game" compared to " " has joined the game... then itll basically tell you who joined the game... for the second part you can use
sk.SendKeys(" Adam Has Joined the game ");

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.