Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void TranslateBaseNPCFiles()
- {
- static const int npc_address[36] = {
- 0x0413F49, 0x0413F94, 0x0413FF1, 0x041404E,
- 0x04140AA, 0x0414107, 0x0414164, 0x04141C0,
- 0x041421D, 0x041427A, 0x04142D6, 0x0414333,
- 0x0414390, 0x04143EC, 0x0414449, 0x04144A6,
- 0x0414502, 0x041455F, 0x04145BC, 0x0414618,
- 0x0414675, 0x04146D2, 0x041472E, 0x041478B,
- 0x04147E8, 0x0414844, 0x04148AE, 0x041490A,
- 0x0414967, 0x04149C4, 0x0414A20, 0x0414A7D,
- 0x0414ADA, 0x0414B36, 0x0414B93, 0x0414BF0
- };
- static const char* npc_name[37] = {
- "Condor", "Javali", "Lobo", "Urso", "Tigre",
- "Gorila", "Dragao_Negro", "Succubus", "Porco",
- "Javali_", "Lobo_", "Dragao_Menor", "Urso_",
- "Dente_de_Sabre", "Sem_Sela", "Fantasma", "Leve",
- "Equipado", "Andaluz", "Sem_Sela_", "Fantasma_",
- "Leve_", "Equipado_", "Andaluz_", "Fenrir", "Dragao",
- "Grande_Fenrir", "Tigre_de_Fogo", "Dragao_Vermelho",
- "Unicornio", "Pegasus", "Unisus", "Grifo", "Hippo_Grifo",
- "Grifo_Sangrento", "Sleipnir", "Svadilfire"
- };
- // Escreve o nome dos arquivos que possuem as
- // informações sobre as montarias e as crias.
- for(int i = 0; i < 36; i++)
- *(int*)(npc_address[i] + 1) = (int)npc_name[i];
- // Modifica a string da pasta das montarias
- strcpy((char*)0x4C0C64, "npc_base");
- }
- // Comando criado
- else if(strcmp(p->eCommand, "goto") == 0)
- {
- static char* szCitys[] = {"armia", "erion", "arzan", "karden", "vip", "deserto"};
- static int szCitysPos[6][2] =
- {
- {2100, 2100},
- {2459, 1990},
- {2496, 1709},
- {3646, 3125},
- {4000, 4000},
- {1200, 1700}
- };
- char city[16];
- // city = armia
- int ret = sscanf(p->eValue, "%16s", city);
- if(ret != 1)
- {
- SendClientMessage(p->Header.ClientId, "Cidade inexistente");
- return;
- }
- //goto armia
- // 0
- for(int i = 0; i < 6; i++)
- {
- if(!strcmp(szCitys[i], city))
- {
- DoTeleport(p->Header.ClientId, szCitysPos[i][0], szCitysPos[i][1]);
- return;
- }
- }
- SendClientMessage(p->Header.ClientId, "Cidade inexistente");
- }
Advertisement
Add Comment
Please, Sign In to add comment