Guest User

Untitled

a guest
Oct 22nd, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 7.72 KB | None | 0 0
  1. ------------------------------------cQuest.cpp--------------------------------
  2.  
  3. void Quest_Cemiterio(int clientid, int npcid)
  4. {
  5.     FILE *arquivo;
  6.     MOB *player = (MOB*)GetMobFromIndex(clientid);
  7.     char quest[100];
  8.     int addr_bclient = clientid * 0x0410;
  9.     int itenslot = GetFirstSlotSADD(clientid,4038,64);
  10.     int Coveiro1 = PByte(0x04BFB9B);                  
  11.     int Coveiro2 = PByte(0x04BFB9C);
  12.     long cNick = PLong(addr_bclient + 0x015C69B8);
  13.     if(player->Equip[0].EFV2 == 1)
  14.     {
  15.         if(player->bStatus.Level >= 39 && player->bStatus.Level <= 115)
  16.         {
  17.             if(itenslot != -1)
  18.             {
  19.                 sprintf(quest,"DataBase/Quests/mortal/Coveiro[%s].xml", player->Name);
  20.                 arquivo = fopen(quest, "w");
  21.                 fclose(arquivo);
  22.                 SendSay(npcid,"Quest [Defensor da Alma] foi iniciada.");
  23.                 DoTeleport(clientid,2398,2105);
  24.                 player->Inventory[itenslot].Index = 0;
  25.                 SendALL(clientid);
  26.                 SaveChar(1,clientid);
  27.                 printf("Player [%s] iniciou a quest Defensor da Alma.  \n", player->Name);
  28.                 return;
  29.             }
  30.             else
  31.             {
  32.                 SendSay(npcid, "Você não possui a Vela do Coveiro.");
  33.             }
  34.         }
  35.         else
  36.         {
  37.             SendSay(npcid,"Level Inadequado (Lv 40~116)");
  38.         }
  39.     }
  40.     else
  41.     {
  42.         SendSay(npcid,"Somente Mortais.");
  43.     }
  44.     return;
  45. }
  46. void Quest_Jardim(int clientid, int npcid)
  47. {
  48.     FILE *arquivo;
  49.     char quest[100];
  50.     MOB *player = (MOB*)GetMobFromIndex(clientid);
  51.     int itenslot = GetFirstSlotSADD(clientid,4039,64);
  52.     if(player->Equip[0].EFV2 == 1)
  53.     {
  54.         if(player->bStatus.Level >= 115 && player->bStatus.Level <= 190)
  55.         {
  56.             if(itenslot != -1)
  57.             {
  58.                 sprintf(quest,"DataBase/Quests/mortal/Jardim[%s].xml", player->Name);
  59.                 arquivo = fopen(quest, "w");
  60.                 fclose(arquivo);
  61.                 SendSay(npcid,"Quest [Jardim dos Deuses] foi iniciada.");
  62.                 DoTeleport(clientid,2234,1714);
  63.                 player->Inventory[itenslot].Index = 0;
  64.                 SendALL(clientid);
  65.                 SaveChar(1,clientid);
  66.                 printf("Player [%s] iniciou a quest Jardim dos Deuses.  \n", player->Name);
  67.                 return;
  68.             }
  69.             else
  70.             {
  71.                 SendSay(npcid,"Você não possui a Colheita do Jardineiro.");
  72.             }
  73.         }
  74.         else
  75.         {
  76.             SendSay(npcid,"Level Inadequado (Lv 116~191)");
  77.         }
  78.     }
  79.     else
  80.     {
  81.         SendSay(npcid,"Somente Mortais.");
  82.     }
  83.     return;
  84. }
  85. void Quest_Kaizen(int clientid, int npcid)
  86. {
  87.     FILE *arquivo;
  88.     char quest[100];
  89.     MOB *player = (MOB*)GetMobFromIndex(clientid);
  90.     int itenslot = GetFirstSlotSADD(clientid,4040,64);
  91.     if(player->Equip[0].EFV2 == 1)
  92.     {
  93.         if(player->bStatus.Level >= 190 && player->bStatus.Level <= 265)
  94.         {
  95.             if(itenslot != -1)
  96.             {
  97.                 sprintf(quest,"DataBase/Quests/mortal/Kaizen[%s].xml", player->Name);
  98.                 arquivo = fopen(quest, "w");
  99.                 fclose(arquivo);
  100.                 SendSay(npcid,"Quest [Ressu. Cav. Negro] foi iniciada.");
  101.                 DoTeleport(clientid,464,3902);
  102.                 player->Inventory[itenslot].Index = 0;
  103.                 SendALL(clientid);
  104.                 SaveChar(1,clientid);
  105.                 printf("Player [%s] iniciou a quest Ressu. Cav. Negro.  \n", player->Name);
  106.                 return;
  107.             }
  108.             else
  109.             {
  110.                 SendSay(npcid,"Você não possui a Cura do Batedor.");
  111.             }
  112.         }
  113.         else
  114.         {
  115.             SendSay(npcid,"Level Inadequado (Lv 191~266)");
  116.         }
  117.     }
  118.     else
  119.     {
  120.         SendSay(npcid,"Somente Mortais.");
  121.     }
  122.     return;
  123. }
  124. void Quest_Hidra(int clientid, int npcid)
  125. {
  126.     FILE *arquivo;
  127.     char quest[100];
  128.     MOB *player = (MOB*)GetMobFromIndex(clientid);
  129.     int itenslot = GetFirstSlotSADD(clientid,4041,64);
  130.     if(player->Equip[0].EFV2 == 1)
  131.     {
  132.         if(player->bStatus.Level >= 265 && player->bStatus.Level <= 320)
  133.         {
  134.             if(itenslot != -1)
  135.             {
  136.                 sprintf(quest,"DataBase/Quests/mortal/Hidra[%s].xml", player->Name);
  137.                 arquivo = fopen(quest, "w");
  138.                 fclose(arquivo);
  139.                 SendSay(npcid,"Quest [Hidra Imortal] foi iniciada.");
  140.                 DoTeleport(clientid,668,3756);
  141.                 player->Inventory[itenslot].Index = 0;
  142.                 SendALL(clientid);
  143.                 SaveChar(1,clientid);
  144.                 printf("Player [%s] iniciou a quest Hidra Imortal.  \n", player->Name);
  145.                 return;
  146.             }
  147.             else
  148.             {
  149.                 SendSay(npcid,"Você não possui a Mana do Batedor.");
  150.             }
  151.         }
  152.         else
  153.         {
  154.             SendSay(npcid,"Level Inadequado (Lv 266~321)");
  155.         }
  156.     }
  157.     else
  158.     {
  159.         SendSay(npcid,"Somente Mortais.");
  160.     }
  161.     return;
  162. }
  163. void Quest_Elfo(int clientid, int npcid)
  164. {
  165.     FILE *arquivo;
  166.     char quest[100];
  167.     MOB *player = (MOB*)GetMobFromIndex(clientid);
  168.     int itenslot = GetFirstSlotSADD(clientid,4042,64);
  169.     if(player->Equip[0].EFV2 == 1)
  170.     {
  171.         if(player->bStatus.Level >= 320 && player->bStatus.Level <= 350)
  172.         {
  173.             if(itenslot != -1)
  174.             {
  175.                 sprintf(quest,"DataBase/Quests/mortal/Elfo[%s].xml", player->Name);
  176.                 arquivo = fopen(quest, "w");
  177.                 fclose(arquivo);
  178.                 SendSay(npcid,"Quest [Inicio da Infelicidade] foi iniciada.");
  179.                 DoTeleport(clientid, 1322,4041);
  180.                 player->Inventory[itenslot].Index = 0;
  181.                 SendALL(clientid);
  182.                 SaveChar(1,clientid);
  183.                 printf("Player [%s] iniciou a quest Inicio da Infelicidade.  \n", player->Name);
  184.                 return;
  185.             }
  186.             else
  187.             {
  188.                 SendSay(npcid,"Você não possui o Emblema do Guarda.");
  189.             }
  190.         }
  191.         else
  192.         {
  193.             SendSay(npcid,"Level Inadequado (Lv 321~351)");
  194.         }
  195.     }
  196.     else
  197.     {
  198.         SendSay(npcid,"Somente Mortais.");
  199.     }
  200.     return;
  201. }
  202. void Quest_CapaVerde(int clientid, int npcid)
  203. {
  204.     MOB *player = (MOB*)GetMobFromIndex(clientid);
  205.     if(player->Equip[0].EFV2 == 1)
  206.     {
  207.         if(player->bStatus.Level >= 100 && player->bStatus.Level <= 149)
  208.         {
  209.             {
  210.                 SendSay(npcid,"Quest [Formatura do Aprendiz] foi iniciada.");
  211.                 DoTeleport(clientid,2244,1581);
  212.                 printf("Player [%s] iniciou a quest Formatura do Aprendiz.  \n", player->Name);
  213.                 return;
  214.             }
  215.         }
  216.         else
  217.         {
  218.             SendSay(npcid,"Level Inadequado (Lv 101~150)");
  219.         }
  220.     }
  221.     else
  222.     {
  223.         SendSay(npcid,"Somente Mortais.");
  224.     }
  225.     return;
  226. }
  227. void quest_gargula(int clientid, int npcid)
  228. {
  229.     MOB *player = (MOB*)GetMobFromIndex(clientid);
  230.     if(player->Equip[0].EFV2 == 1)
  231.     {
  232.         if(player->bStatus.Level >= 201 && player->bStatus.Level <= 255)
  233.         {
  234.             {
  235.                 SendSay(npcid,"Quest [Molar do Gargula] foi iniciada.");
  236.                 DoTeleport(clientid,2100,2100);
  237.                 printf("Player [%s] iniciou a quest Molar do Gargula.  \n", player->Name);
  238.                 return;
  239.             }
  240.         }
  241.         else
  242.         {
  243.             SendSay(npcid,"Level Inadequado (Lv 201~255)");
  244.         }
  245.     }
  246.     else
  247.     {
  248.         SendSay(npcid,"Somente Mortais.");
  249.     }
  250.     return;
  251. }
  252.  
  253. void Quest_Reinos(int clientid, int npcid)
  254. {
  255.     MOB *player = (MOB*)GetMobFromIndex(clientid);
  256.     if(player->Equip[0].EFV2 == 1)
  257.     {
  258.         if(player->bStatus.Level >= 201 && player->bStatus.Level <= 255)
  259.         {
  260.             {
  261.                 SendSay(npcid,"Quest foi iniciada.");
  262.                 DoTeleport(clientid,1725,1725);
  263.                 printf("Player [%s] iniciou a quest Reino.  \n", player->Name);
  264.                 return;
  265.             }
  266.         }
  267.         else
  268.         {
  269.             SendSay(npcid,"Level Inadequado (Lv 201~255)");
  270.         }
  271.     }
  272.     else
  273.     {
  274.         SendSay(npcid,"Somente Mortais.");
  275.     }
  276.     return;
  277. }
  278.  
  279. -------------------------------Npcs.h--------------------------------
  280.  
  281. void Quest_Cemiterio(int clientid, int npcid);
  282. void Quest_Jardim(int clientid, int npcid);
  283. void Quest_Kaizen(int clientid, int npcid);
  284. void Quest_Hidra(int clientid, int npcid);
  285. void Quest_Elfo(int clientid, int npcid);
  286. void Quest_CapaVerde(int clientid, int npcid);
  287. void quest_gargula(int clientid, int npcid);
  288. void Quest_Reinos(int clientid, int npcid);
  289.  
  290. -------------------------------Main.h---------------------------------
  291.  
  292.                 case 1:
  293.             Quest_Cemiterio(clientid,npcid);
  294.             break;
  295.  
  296.         case 2:
  297.             Quest_Jardim(clientid,npcid);
  298.             break;
  299.  
  300.         case 3:
  301.             Quest_Kaizen(clientid,npcid);
  302.             break;
  303.  
  304.         case 4:
  305.             Quest_Hidra(clientid,npcid);
  306.             break;
  307.  
  308.         case 5:
  309.             Quest_Elfo(clientid,npcid);
  310.             break;
  311.  
  312.                 case 7:
  313.             Quest_CapaVerde(clientid,npcid);
  314.             break;
  315.  
  316.                 case 26:
  317.             quest_gargula(clientid,npcid);
  318.             break;
  319.  
  320.                 case 28:
  321.             Capaverde(clientid,npcid);
  322.             break;
  323.  
  324.                 case 29:
  325.             Quest_Reinos(clientid,npcid);
  326.             break;
Add Comment
Please, Sign In to add comment