Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------------------------cQuest.cpp--------------------------------
- void Quest_Cemiterio(int clientid, int npcid)
- {
- FILE *arquivo;
- MOB *player = (MOB*)GetMobFromIndex(clientid);
- char quest[100];
- int addr_bclient = clientid * 0x0410;
- int itenslot = GetFirstSlotSADD(clientid,4038,64);
- int Coveiro1 = PByte(0x04BFB9B);
- int Coveiro2 = PByte(0x04BFB9C);
- long cNick = PLong(addr_bclient + 0x015C69B8);
- if(player->Equip[0].EFV2 == 1)
- {
- if(player->bStatus.Level >= 39 && player->bStatus.Level <= 115)
- {
- if(itenslot != -1)
- {
- sprintf(quest,"DataBase/Quests/mortal/Coveiro[%s].xml", player->Name);
- arquivo = fopen(quest, "w");
- fclose(arquivo);
- SendSay(npcid,"Quest [Defensor da Alma] foi iniciada.");
- DoTeleport(clientid,2398,2105);
- player->Inventory[itenslot].Index = 0;
- SendALL(clientid);
- SaveChar(1,clientid);
- printf("Player [%s] iniciou a quest Defensor da Alma. \n", player->Name);
- return;
- }
- else
- {
- SendSay(npcid, "Você não possui a Vela do Coveiro.");
- }
- }
- else
- {
- SendSay(npcid,"Level Inadequado (Lv 40~116)");
- }
- }
- else
- {
- SendSay(npcid,"Somente Mortais.");
- }
- return;
- }
- void Quest_Jardim(int clientid, int npcid)
- {
- FILE *arquivo;
- char quest[100];
- MOB *player = (MOB*)GetMobFromIndex(clientid);
- int itenslot = GetFirstSlotSADD(clientid,4039,64);
- if(player->Equip[0].EFV2 == 1)
- {
- if(player->bStatus.Level >= 115 && player->bStatus.Level <= 190)
- {
- if(itenslot != -1)
- {
- sprintf(quest,"DataBase/Quests/mortal/Jardim[%s].xml", player->Name);
- arquivo = fopen(quest, "w");
- fclose(arquivo);
- SendSay(npcid,"Quest [Jardim dos Deuses] foi iniciada.");
- DoTeleport(clientid,2234,1714);
- player->Inventory[itenslot].Index = 0;
- SendALL(clientid);
- SaveChar(1,clientid);
- printf("Player [%s] iniciou a quest Jardim dos Deuses. \n", player->Name);
- return;
- }
- else
- {
- SendSay(npcid,"Você não possui a Colheita do Jardineiro.");
- }
- }
- else
- {
- SendSay(npcid,"Level Inadequado (Lv 116~191)");
- }
- }
- else
- {
- SendSay(npcid,"Somente Mortais.");
- }
- return;
- }
- void Quest_Kaizen(int clientid, int npcid)
- {
- FILE *arquivo;
- char quest[100];
- MOB *player = (MOB*)GetMobFromIndex(clientid);
- int itenslot = GetFirstSlotSADD(clientid,4040,64);
- if(player->Equip[0].EFV2 == 1)
- {
- if(player->bStatus.Level >= 190 && player->bStatus.Level <= 265)
- {
- if(itenslot != -1)
- {
- sprintf(quest,"DataBase/Quests/mortal/Kaizen[%s].xml", player->Name);
- arquivo = fopen(quest, "w");
- fclose(arquivo);
- SendSay(npcid,"Quest [Ressu. Cav. Negro] foi iniciada.");
- DoTeleport(clientid,464,3902);
- player->Inventory[itenslot].Index = 0;
- SendALL(clientid);
- SaveChar(1,clientid);
- printf("Player [%s] iniciou a quest Ressu. Cav. Negro. \n", player->Name);
- return;
- }
- else
- {
- SendSay(npcid,"Você não possui a Cura do Batedor.");
- }
- }
- else
- {
- SendSay(npcid,"Level Inadequado (Lv 191~266)");
- }
- }
- else
- {
- SendSay(npcid,"Somente Mortais.");
- }
- return;
- }
- void Quest_Hidra(int clientid, int npcid)
- {
- FILE *arquivo;
- char quest[100];
- MOB *player = (MOB*)GetMobFromIndex(clientid);
- int itenslot = GetFirstSlotSADD(clientid,4041,64);
- if(player->Equip[0].EFV2 == 1)
- {
- if(player->bStatus.Level >= 265 && player->bStatus.Level <= 320)
- {
- if(itenslot != -1)
- {
- sprintf(quest,"DataBase/Quests/mortal/Hidra[%s].xml", player->Name);
- arquivo = fopen(quest, "w");
- fclose(arquivo);
- SendSay(npcid,"Quest [Hidra Imortal] foi iniciada.");
- DoTeleport(clientid,668,3756);
- player->Inventory[itenslot].Index = 0;
- SendALL(clientid);
- SaveChar(1,clientid);
- printf("Player [%s] iniciou a quest Hidra Imortal. \n", player->Name);
- return;
- }
- else
- {
- SendSay(npcid,"Você não possui a Mana do Batedor.");
- }
- }
- else
- {
- SendSay(npcid,"Level Inadequado (Lv 266~321)");
- }
- }
- else
- {
- SendSay(npcid,"Somente Mortais.");
- }
- return;
- }
- void Quest_Elfo(int clientid, int npcid)
- {
- FILE *arquivo;
- char quest[100];
- MOB *player = (MOB*)GetMobFromIndex(clientid);
- int itenslot = GetFirstSlotSADD(clientid,4042,64);
- if(player->Equip[0].EFV2 == 1)
- {
- if(player->bStatus.Level >= 320 && player->bStatus.Level <= 350)
- {
- if(itenslot != -1)
- {
- sprintf(quest,"DataBase/Quests/mortal/Elfo[%s].xml", player->Name);
- arquivo = fopen(quest, "w");
- fclose(arquivo);
- SendSay(npcid,"Quest [Inicio da Infelicidade] foi iniciada.");
- DoTeleport(clientid, 1322,4041);
- player->Inventory[itenslot].Index = 0;
- SendALL(clientid);
- SaveChar(1,clientid);
- printf("Player [%s] iniciou a quest Inicio da Infelicidade. \n", player->Name);
- return;
- }
- else
- {
- SendSay(npcid,"Você não possui o Emblema do Guarda.");
- }
- }
- else
- {
- SendSay(npcid,"Level Inadequado (Lv 321~351)");
- }
- }
- else
- {
- SendSay(npcid,"Somente Mortais.");
- }
- return;
- }
- void Quest_CapaVerde(int clientid, int npcid)
- {
- MOB *player = (MOB*)GetMobFromIndex(clientid);
- if(player->Equip[0].EFV2 == 1)
- {
- if(player->bStatus.Level >= 100 && player->bStatus.Level <= 149)
- {
- {
- SendSay(npcid,"Quest [Formatura do Aprendiz] foi iniciada.");
- DoTeleport(clientid,2244,1581);
- printf("Player [%s] iniciou a quest Formatura do Aprendiz. \n", player->Name);
- return;
- }
- }
- else
- {
- SendSay(npcid,"Level Inadequado (Lv 101~150)");
- }
- }
- else
- {
- SendSay(npcid,"Somente Mortais.");
- }
- return;
- }
- void quest_gargula(int clientid, int npcid)
- {
- MOB *player = (MOB*)GetMobFromIndex(clientid);
- if(player->Equip[0].EFV2 == 1)
- {
- if(player->bStatus.Level >= 201 && player->bStatus.Level <= 255)
- {
- {
- SendSay(npcid,"Quest [Molar do Gargula] foi iniciada.");
- DoTeleport(clientid,2100,2100);
- printf("Player [%s] iniciou a quest Molar do Gargula. \n", player->Name);
- return;
- }
- }
- else
- {
- SendSay(npcid,"Level Inadequado (Lv 201~255)");
- }
- }
- else
- {
- SendSay(npcid,"Somente Mortais.");
- }
- return;
- }
- void Quest_Reinos(int clientid, int npcid)
- {
- MOB *player = (MOB*)GetMobFromIndex(clientid);
- if(player->Equip[0].EFV2 == 1)
- {
- if(player->bStatus.Level >= 201 && player->bStatus.Level <= 255)
- {
- {
- SendSay(npcid,"Quest foi iniciada.");
- DoTeleport(clientid,1725,1725);
- printf("Player [%s] iniciou a quest Reino. \n", player->Name);
- return;
- }
- }
- else
- {
- SendSay(npcid,"Level Inadequado (Lv 201~255)");
- }
- }
- else
- {
- SendSay(npcid,"Somente Mortais.");
- }
- return;
- }
- -------------------------------Npcs.h--------------------------------
- void Quest_Cemiterio(int clientid, int npcid);
- void Quest_Jardim(int clientid, int npcid);
- void Quest_Kaizen(int clientid, int npcid);
- void Quest_Hidra(int clientid, int npcid);
- void Quest_Elfo(int clientid, int npcid);
- void Quest_CapaVerde(int clientid, int npcid);
- void quest_gargula(int clientid, int npcid);
- void Quest_Reinos(int clientid, int npcid);
- -------------------------------Main.h---------------------------------
- case 1:
- Quest_Cemiterio(clientid,npcid);
- break;
- case 2:
- Quest_Jardim(clientid,npcid);
- break;
- case 3:
- Quest_Kaizen(clientid,npcid);
- break;
- case 4:
- Quest_Hidra(clientid,npcid);
- break;
- case 5:
- Quest_Elfo(clientid,npcid);
- break;
- case 7:
- Quest_CapaVerde(clientid,npcid);
- break;
- case 26:
- quest_gargula(clientid,npcid);
- break;
- case 28:
- Capaverde(clientid,npcid);
- break;
- case 29:
- Quest_Reinos(clientid,npcid);
- break;
Add Comment
Please, Sign In to add comment