Jump to content

IA RAGNAROK


Yukaiii

Recommended Posts

Posted
Quote

prontera,149,184,5 script PartyVsParty -1,{

  // Nome do NPC
  set .namenpc$, "^CD0000[Party vs Party]^000000";

  // Mensagem de boas-vindas
  mes .namenpc$;
  mes "Olá "+strcharinfo(0)+"! Seja bem-vindo ao Party vs Party!";

  // Opções do menu
  menu "- Entrar na Fila",EntrarFila,"- Ver Fila",VerFila,"- Sair",Sair;

  // Entrar na Fila
  EntrarFila:

    // Verificar se o jogador está em uma partido
    if (getpartymember(0) == 0) {
      mes "Você precisa estar em um partido para entrar na fila!";
    } else {

      // Verificar se o partido já está na fila
      query_sql "SELECT `id` FROM `pvp_queue` WHERE `party_id`='"+strcharinfo(1)+"'",.@party_id$;
      if (.@party_id$ != "") {
        mes "Seu partido já está na fila!";
      } else {

        // Adicionar partido à fila
        query_sql "INSERT INTO `pvp_queue` (`party_id`, `party_name`) VALUES ('"+strcharinfo(1)+"', '"+strcharinfo(2)+"')";
        mes "Partido adicionado à fila com sucesso!";

        // Verificar se há partidos suficientes para iniciar uma partida
        query_sql "SELECT COUNT(*) FROM `pvp_queue`",.@queue_count$;
        if (.@queue_count$ >= 2) {
          // Iniciar partida
          query_sql "SELECT `party_id` FROM `pvp_queue` LIMIT 1",.@party1_id$;
          query_sql "SELECT `party_id` FROM `pvp_queue` LIMIT 1 OFFSET 1",.@party2_id$;
          // Código para iniciar a partida entre os dois partidos
          mes "Partida iniciada entre "+.@party1_id$+" e "+.@party2_id$+"!";
          // Remover partidos da fila
          query_sql "DELETE FROM `pvp_queue` WHERE `party_id` IN ('"+.@party1_id$+"', '"+.@party2_id$+"')";
        }
      }
    }
    close;

  // Ver Fila
  VerFila:

    // Mostrar partidos na fila
    query_sql "SELECT `party_name` FROM `pvp_queue`",.@party_names$;
    mes "Fila atual:";
    foreach (.@party_names$, .@party_name$) {
      mes "- "+.@party_name$;
    }
    close;

  // Sair
  Sair:
    mes "Tchau!";
    close;
}

Guys, how are you?
I would like to know if anyone is already using AI to use scripts in Ragnarok?
I did some testing and managed to create some scripts perfectly using AI via WhatsApp.

 

IA.png

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...