V1N1C1U5 Posted December 23, 2022 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 2 Reputation: 0 Joined: 04/12/13 Last Seen: January 17, 2023 Share Posted December 23, 2022 I ask to chat gpt to make an npc to heal and give buff to near players, this is the result: #include <stdio.h> #include <unistd.h> // Função para obter jogadores próximos Player* get_nearby_players(int* num_players) { // Código para obter jogadores próximos return players; } // Função para curar jogadores void heal_players(Player* players, int num_players) { for (int i = 0; i < num_players; i++) { // Código para curar o jogador players[i].health = players[i].max_health; } } // Função para dar buff nos jogadores void buff_players(Player* players, int num_players) { for (int i = 0; i < num_players; i++) { // Código para adicionar um buff ao jogador players[i].buffs |= BUFF_ID; } } int main() { while (1) { int num_players; // Obter jogadores próximos Player* players = get_nearby_players(&num_players); // Curar jogadores heal_players(players, num_players); // Dar buff nos jogadores buff_players(players, num_players); // Pausar por alguns segundos antes de executar novamente sleep(5); } return 0; } Now my question to u guys, this gonna work in emulator? Quote Link to comment Share on other sites More sharing options...
peterl Posted December 25, 2022 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 20 Reputation: 1 Joined: 09/04/17 Last Seen: May 22, 2024 Share Posted December 25, 2022 If you mean an "rAthena NPC script" I guess this won't work. The code you've shown above only seems like some C style code rather than rAthena script. 1 Quote Link to comment Share on other sites More sharing options...
Rynbef Posted March 6, 2023 Group: Forum Moderator Topic Count: 48 Topics Per Day: 0.01 Content Count: 941 Reputation: 125 Joined: 05/23/12 Last Seen: Yesterday at 12:01 PM Share Posted March 6, 2023 Its rly possible. I've tested it yesterday with a simple script. Rynbef~ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.