Don't like ads? PRO users don't see any ads ;-)
Guest

t status

By: a guest on Sep 21st, 2012  |  syntax: None  |  size: 24.66 KB  |  hits: 24  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include "DLLMain.h"
  2.  
  3. void Volatiles::TS_I(int clientid)
  4. {
  5.         MOB *thisclient = (MOB*)GetMobFromIndex(clientid);
  6.         Atualizar *p;
  7.         int itenslot = p->GetFirstSlotSADD(clientid,3259,64);
  8.         int retirar = 100;
  9.         int adicionar = 100;
  10.         int atual1 = thisclient->bStatus.STR;
  11.         int atual2 = thisclient->bStatus.INT;
  12.         int depois1 = 0;
  13.         int depois2 = 0;
  14.         if(thisclient->bStatus.STR >= 100)
  15.         {
  16.                 depois1 = atual1-retirar;
  17.                 depois2 = adicionar+atual2;
  18.                 thisclient->bStatus.STR = depois1;
  19.                 thisclient->bStatus.INT = depois2;
  20.                 thisclient->Inventory[itenslot].Index = 0;
  21.                 p->SendClientMsg(clientid,"Troca de 100 em [Força] para [Inteligêcia] feita com sucesso.");
  22.                 p->SendStats(clientid);
  23.                 p->SendScore(clientid);
  24.                 p->SendEquip(clientid);
  25.                 p->SaveChar(1,clientid);
  26.                 p->SendALL(clientid);
  27.                 p->SendCharList(clientid);
  28.                 return;
  29.         }
  30.         else
  31.         {
  32.                 p->SendClientMsg(clientid,"É necessário ter 100 ou mais pontos em [Força].");
  33.                 p->SendALL(clientid);
  34.                 return;
  35.         }
  36. }
  37. void Volatiles::TS_D(int clientid)
  38. {
  39.         MOB *thisclient = (MOB*)GetMobFromIndex(clientid);
  40.         Atualizar *p;
  41.         int itenslot = p->GetFirstSlotSADD(clientid,3260,64);
  42.         int retirar = 100;
  43.         int adicionar = 100;
  44.         int atual1 = thisclient->bStatus.STR;
  45.         int atual2 = thisclient->bStatus.DEX;
  46.         int depois1 = 0;
  47.         int depois2 = 0;
  48.         if(thisclient->bStatus.STR >= 100)
  49.         {
  50.                 depois1 = atual1-retirar;
  51.                 depois2 = adicionar+atual2;
  52.                 thisclient->bStatus.STR = depois1;
  53.                 thisclient->bStatus.DEX = depois2;
  54.                 thisclient->Inventory[itenslot].Index = 0;
  55.                 p->SendClientMsg(clientid,"Troca de 100 em [Força] para [Destreza] feita com sucesso.");
  56.                 p->SendStats(clientid);
  57.                 p->SendScore(clientid);
  58.                 p->SendEquip(clientid);
  59.                 p->SaveChar(1,clientid);
  60.                 p->SendALL(clientid);
  61.                 p->SendCharList(clientid);
  62.                 return;
  63.         }
  64.         else
  65.         {
  66.                 p->SendClientMsg(clientid,"É necessário ter 100 ou mais pontos em [Força].");
  67.                 p->SendALL(clientid);
  68.                 return;
  69.         }
  70. }
  71. void Volatiles::TS_C(int clientid)
  72. {
  73.         MOB *thisclient = (MOB*)GetMobFromIndex(clientid);
  74.         Atualizar *p;
  75.         int itenslot = p->GetFirstSlotSADD(clientid,3261,64);
  76.         int retirar = 100;
  77.         int adicionar = 100;
  78.         int atual1 = thisclient->bStatus.STR;
  79.         int atual2 = thisclient->bStatus.CON;
  80.         int depois1 = 0;
  81.         int depois2 = 0;
  82.         if(thisclient->bStatus.STR >= 100)
  83.         {
  84.                 depois1 = atual1-retirar;
  85.                 depois2 = adicionar+atual2;
  86.                 thisclient->bStatus.STR = depois1;
  87.                 thisclient->bStatus.CON = depois2;
  88.                 thisclient->Inventory[itenslot].Index = 0;
  89.                 p->SendClientMsg(clientid,"Troca de 100 em [Força] para [Constituição] feita com sucesso.");
  90.                 p->SendStats(clientid);
  91.                 p->SendScore(clientid);
  92.                 p->SendEquip(clientid);
  93.                 p->SaveChar(1,clientid);
  94.                 p->SendALL(clientid);
  95.                 p->SendCharList(clientid);
  96.                 return;
  97.         }
  98.         else
  99.         {
  100.                 p->SendClientMsg(clientid,"É necessário ter 100 ou mais pontos em [Força].");
  101.                 p->SendALL(clientid);
  102.                 return;
  103.         }
  104. }
  105. void Volatiles::TI_S(int clientid)
  106. {
  107.         MOB *thisclient = (MOB*)GetMobFromIndex(clientid);
  108.         Atualizar *p;
  109.         int itenslot = p->GetFirstSlotSADD(clientid,3262,64);
  110.         int retirar = 100;
  111.         int adicionar = 100;
  112.         int atual1 = thisclient->bStatus.INT;
  113.         int atual2 = thisclient->bStatus.STR;
  114.         int depois1 = 0;
  115.         int depois2 = 0;
  116.         if(thisclient->bStatus.INT >= 100)
  117.         {
  118.                 depois1 = atual1-retirar;
  119.                 depois2 = adicionar+atual2;
  120.                 thisclient->bStatus.INT = depois1;
  121.                 thisclient->bStatus.STR = depois2;
  122.                 thisclient->Inventory[itenslot].Index = 0;
  123.                 p->SendClientMsg(clientid,"Troca de 100 em [Inteligêcia] para [Força] feita com sucesso.");
  124.                 p->SendStats(clientid);
  125.                 p->SendScore(clientid);
  126.                 p->SendEquip(clientid);
  127.                 p->SaveChar(1,clientid);
  128.                 p->SendALL(clientid);
  129.                 p->SendCharList(clientid);
  130.                 return;
  131.         }
  132.         else
  133.         {
  134.                 p->SendClientMsg(clientid,"É necessário ter 100 ou mais pontos em [Inteligêcia].");
  135.                 p->SendALL(clientid);
  136.                 return;
  137.         }
  138. }
  139. void Volatiles::TI_D(int clientid)
  140. {
  141.         MOB *thisclient = (MOB*)GetMobFromIndex(clientid);
  142.         Atualizar *p;
  143.         int itenslot = p->GetFirstSlotSADD(clientid,3263,64);
  144.         int retirar = 100;
  145.         int adicionar = 100;
  146.         int atual1 = thisclient->bStatus.INT;
  147.         int atual2 = thisclient->bStatus.DEX;
  148.         int depois1 = 0;
  149.         int depois2 = 0;
  150.         if(thisclient->bStatus.INT >= 100)
  151.         {
  152.                 depois1 = atual1-retirar;
  153.                 depois2 = adicionar+atual2;
  154.                 thisclient->bStatus.INT = depois1;
  155.                 thisclient->bStatus.DEX = depois2;
  156.                 thisclient->Inventory[itenslot].Index = 0;
  157.                 p->SendClientMsg(clientid,"Troca de 100 em [Inteligêcia] para [Destreza] feita com sucesso.");
  158.                 p->SendStats(clientid);
  159.                 p->SendScore(clientid);
  160.                 p->SendEquip(clientid);
  161.                 p->SaveChar(1,clientid);
  162.                 p->SendALL(clientid);
  163.                 p->SendCharList(clientid);
  164.                 return;
  165.         }
  166.         else
  167.         {
  168.                 p->SendClientMsg(clientid,"É necessário ter 100 ou mais pontos em [Inteligêcia].");
  169.                 p->SendALL(clientid);
  170.                 return;
  171.         }
  172. }
  173. void Volatiles::TI_C(int clientid)
  174. {
  175.         MOB *thisclient = (MOB*)GetMobFromIndex(clientid);
  176.         Atualizar *p;
  177.         int itenslot = p->GetFirstSlotSADD(clientid,3264,64);
  178.         int retirar = 100;
  179.         int adicionar = 100;
  180.         int atual1 = thisclient->bStatus.INT;
  181.         int atual2 = thisclient->bStatus.CON;
  182.         int depois1 = 0;
  183.         int depois2 = 0;
  184.         if(thisclient->bStatus.INT >= 100)
  185.         {
  186.                 depois1 = atual1-retirar;
  187.                 depois2 = adicionar+atual2;
  188.                 thisclient->bStatus.INT = depois1;
  189.                 thisclient->bStatus.CON = depois2;
  190.                 thisclient->Inventory[itenslot].Index = 0;
  191.                 p->SendClientMsg(clientid,"Troca de 100 em [Inteligêcia] para [Constituição] feita com sucesso.");
  192.                 p->SendStats(clientid);
  193.                 p->SendScore(clientid);
  194.                 p->SendEquip(clientid);
  195.                 p->SaveChar(1,clientid);
  196.                 p->SendALL(clientid);
  197.                 p->SendCharList(clientid);
  198.                 return;
  199.         }
  200.         else
  201.         {
  202.                 p->SendClientMsg(clientid,"É necessário ter 100 ou mais pontos em [Inteligêcia].");
  203.                 p->SendALL(clientid);
  204.                 return;
  205.         }
  206. }
  207. void Volatiles::TD_S(int clientid)
  208. {
  209.         MOB *thisclient = (MOB*)GetMobFromIndex(clientid);
  210.         Atualizar *p;
  211.         int itenslot = p->GetFirstSlotSADD(clientid,3265,64);
  212.         int retirar = 100;
  213.         int adicionar = 100;
  214.         int atual1 = thisclient->bStatus.DEX;
  215.         int atual2 = thisclient->bStatus.STR;
  216.         int depois1 = 0;
  217.         int depois2 = 0;
  218.         if(thisclient->bStatus.DEX >= 100)
  219.         {
  220.                 depois1 = atual1-retirar;
  221.                 depois2 = adicionar+atual2;
  222.                 thisclient->bStatus.DEX = depois1;
  223.                 thisclient->bStatus.STR = depois2;
  224.                 thisclient->Inventory[itenslot].Index = 0;
  225.                 p->SendClientMsg(clientid,"Troca de 100 em [Destreza] para [Força] feita com sucesso.");
  226.                 p->SendStats(clientid);
  227.                 p->SendScore(clientid);
  228.                 p->SendEquip(clientid);
  229.                 p->SaveChar(1,clientid);
  230.                 p->SendALL(clientid);
  231.                 p->SendCharList(clientid);
  232.                 return;
  233.         }
  234.         else
  235.         {
  236.                 p->SendClientMsg(clientid,"É necessário ter 100 ou mais pontos em [Destreza].");
  237.                 p->SendALL(clientid);
  238.                 return;
  239.         }
  240. }
  241. void Volatiles::TD_I(int clientid)
  242. {
  243.         MOB *thisclient = (MOB*)GetMobFromIndex(clientid);
  244.         Atualizar *p;
  245.         int itenslot = p->GetFirstSlotSADD(clientid,3266,64);
  246.         int retirar = 100;
  247.         int adicionar = 100;
  248.         int atual1 = thisclient->bStatus.DEX;
  249.         int atual2 = thisclient->bStatus.INT;
  250.         int depois1 = 0;
  251.         int depois2 = 0;
  252.         if(thisclient->bStatus.DEX >= 100)
  253.         {
  254.                 depois1 = atual1-retirar;
  255.                 depois2 = adicionar+atual2;
  256.                 thisclient->bStatus.DEX = depois1;
  257.                 thisclient->bStatus.INT = depois2;
  258.                 thisclient->Inventory[itenslot].Index = 0;
  259.                 p->SendClientMsg(clientid,"Troca de 100 em [Destreza] para [Inteligêcia] feita com sucesso.");
  260.                 p->SendStats(clientid);
  261.                 p->SendScore(clientid);
  262.                 p->SendEquip(clientid);
  263.                 p->SaveChar(1,clientid);
  264.                 p->SendALL(clientid);
  265.                 p->SendCharList(clientid);
  266.                 return;
  267.         }
  268.         else
  269.         {
  270.                 p->SendClientMsg(clientid,"É necessário ter 100 ou mais pontos em [Destreza].");
  271.                 p->SendALL(clientid);
  272.                 return;
  273.         }
  274. }
  275. void Volatiles::TD_C(int clientid)
  276. {
  277.         MOB *thisclient = (MOB*)GetMobFromIndex(clientid);
  278.         Atualizar *p;
  279.         int itenslot = p->GetFirstSlotSADD(clientid,3267,64);
  280.         int retirar = 100;
  281.         int adicionar = 100;
  282.         int atual1 = thisclient->bStatus.DEX;
  283.         int atual2 = thisclient->bStatus.CON;
  284.         int depois1 = 0;
  285.         int depois2 = 0;
  286.         if(thisclient->bStatus.DEX >= 100)
  287.         {
  288.                 depois1 = atual1-retirar;
  289.                 depois2 = adicionar+atual2;
  290.                 thisclient->bStatus.DEX = depois1;
  291.                 thisclient->bStatus.CON = depois2;
  292.                 thisclient->Inventory[itenslot].Index = 0;
  293.                 p->SendClientMsg(clientid,"Troca de 100 em [Destreza] para [Constituição] feita com sucesso.");
  294.                 p->SendStats(clientid);
  295.                 p->SendScore(clientid);
  296.                 p->SendEquip(clientid);
  297.                 p->SaveChar(1,clientid);
  298.                 p->SendALL(clientid);
  299.                 p->SendCharList(clientid);
  300.                 return;
  301.         }
  302.         else
  303.         {
  304.                 p->SendClientMsg(clientid,"É necessário ter 100 ou mais pontos em [Destreza].");
  305.                 p->SendALL(clientid);
  306.                 return;
  307.         }
  308. }
  309. void Volatiles::TC_S(int clientid)
  310. {
  311.         MOB *thisclient = (MOB*)GetMobFromIndex(clientid);
  312.         Atualizar *p;
  313.         int itenslot = p->GetFirstSlotSADD(clientid,3268,64);
  314.         int retirar = 100;
  315.         int adicionar = 100;
  316.         int atual1 = thisclient->bStatus.CON;
  317.         int atual2 = thisclient->bStatus.STR;
  318.         int depois1 = 0;
  319.         int depois2 = 0;
  320.         if(thisclient->bStatus.CON >= 100)
  321.         {
  322.                 depois1 = atual1-retirar;
  323.                 depois2 = adicionar+atual2;
  324.                 thisclient->bStatus.CON = depois1;
  325.                 thisclient->bStatus.STR = depois2;
  326.                 thisclient->Inventory[itenslot].Index = 0;
  327.                 p->SendClientMsg(clientid,"Troca de 100 em [Constituição] para [Força] feita com sucesso.");
  328.                 p->SendStats(clientid);
  329.                 p->SendScore(clientid);
  330.                 p->SendEquip(clientid);
  331.                 p->SaveChar(1,clientid);
  332.                 p->SendALL(clientid);
  333.                 p->SendCharList(clientid);
  334.                 return;
  335.         }
  336.         else
  337.         {
  338.                 p->SendClientMsg(clientid,"É necessário ter 100 ou mais pontos em [Constituição].");
  339.                 p->SendALL(clientid);
  340.                 return;
  341.         }
  342. }
  343. void Volatiles::TC_I(int clientid)
  344. {
  345.         MOB *thisclient = (MOB*)GetMobFromIndex(clientid);
  346.         Atualizar *p;
  347.         int itenslot = p->GetFirstSlotSADD(clientid,3269,64);
  348.         int retirar = 100;
  349.         int adicionar = 100;
  350.         int atual1 = thisclient->bStatus.CON;
  351.         int atual2 = thisclient->bStatus.INT;
  352.         int depois1 = 0;
  353.         int depois2 = 0;
  354.         if(thisclient->bStatus.CON >= 100)
  355.         {
  356.                 depois1 = atual1-retirar;
  357.                 depois2 = adicionar+atual2;
  358.                 thisclient->bStatus.CON = depois1;
  359.                 thisclient->bStatus.INT = depois2;
  360.                 thisclient->Inventory[itenslot].Index = 0;
  361.                 p->SendClientMsg(clientid,"Troca de 100 em [Constituição] para [Inteligêcia] feita com sucesso.");
  362.                 p->SendStats(clientid);
  363.                 p->SendScore(clientid);
  364.                 p->SendEquip(clientid);
  365.                 p->SaveChar(1,clientid);
  366.                 p->SendALL(clientid);
  367.                 p->SendCharList(clientid);
  368.                 return;
  369.         }
  370.         else
  371.         {
  372.                 p->SendClientMsg(clientid,"É necessário ter 100 ou mais pontos em [Constituição].");
  373.                 p->SendALL(clientid);
  374.                 return;
  375.         }
  376. }
  377. void Volatiles::TC_D(int clientid)
  378. {
  379.         MOB *thisclient = (MOB*)GetMobFromIndex(clientid);
  380.         Atualizar *p;
  381.         int itenslot = p->GetFirstSlotSADD(clientid,3270,64);
  382.         int retirar = 100;
  383.         int adicionar = 100;
  384.         int atual1 = thisclient->bStatus.CON;
  385.         int atual2 = thisclient->bStatus.DEX;
  386.         int depois1 = 0;
  387.         int depois2 = 0;
  388.         if(thisclient->bStatus.CON >= 100)
  389.         {
  390.                 depois1 = atual1-retirar;
  391.                 depois2 = adicionar+atual2;
  392.                 thisclient->bStatus.CON = depois1;
  393.                 thisclient->bStatus.DEX = depois2;
  394.                 thisclient->Inventory[itenslot].Index = 0;
  395.                 p->SendClientMsg(clientid,"Troca de 100 em [Constituição] para [Destreza] feita com sucesso.");
  396.                 p->SendStats(clientid);
  397.                 p->SendScore(clientid);
  398.                 p->SendEquip(clientid);
  399.                 p->SaveChar(1,clientid);
  400.                 p->SendALL(clientid);
  401.                 p->SendCharList(clientid);
  402.                 return;
  403.         }
  404.         else
  405.         {
  406.                 p->SendClientMsg(clientid,"É necessário ter 100 ou mais pontos em [Constituição].");
  407.                 p->SendALL(clientid);
  408.                 return;
  409.         }
  410. }
  411.  
  412.  
  413.  
  414. void Volatiles::AceleradorNascimento(int clientid)
  415. {
  416.         Atualizar *p;
  417.         MOB *player = (MOB*)GetMobFromIndex(clientid);
  418.         int cMes = PInt(0x00A5EA420) + 1; //Mês
  419.         int cDia = PInt(0x00A5EA41c); //Data
  420.         int cHor = PInt(0x00A5EA418); //Hora
  421.         int cMin = PInt(0x00A5EA414); //Minutos
  422.         int cSeg = PInt(0x00A5EA410); //Segundos
  423.         int Acelerador = p->GetFirstSlotSADD(clientid,3272,64);
  424.         int Comparar1 = player->Equip[14].EFV1;
  425.         int Comparar2 = player->Equip[14].EFV2;
  426.         int Resultado = 0;
  427.         {
  428.                 if(player->Equip[14].Index >= 2300 && player->Equip[14].Index <= 2329)
  429.                 {
  430.                         Resultado = Comparar2 - Comparar1;
  431.                         if(Resultado >= 2)
  432.                         {
  433.                                 player->Equip[14].EF1 = 43;
  434.                                 player->Equip[14].EFV1 += 1;
  435.                                 p->SendEffect(3,0x0E,clientid);
  436.                                 p->SendEffect(1,0x0E,clientid);
  437.                                 p->SendItens(clientid,14);
  438.                                 player->Inventory[Acelerador].Index = 0;
  439.                                 PrintfTM(clientid,"usou o item usou o item [Acelerador do Crescimento].");
  440.                                 p->SendALL(clientid);
  441.                                 return;
  442.                         }
  443.                         else if(Resultado <= 1)
  444.                         {
  445.                                 int num;
  446.                                 num = rand()  %100;
  447.                                 p->SendEffect(3,0x0E,clientid);
  448.                                 p->SendEffect(1,0x0E,clientid);
  449.                                 player->Inventory[Acelerador].Index = 0;
  450.                                 PrintfTM(clientid,"usou o item usou o item [Acelerador do Crescimento].");
  451.                                 p->SendClientMsg(clientid,"Incubação terminada com sucesso.");
  452.                                 if((num >= 0) && (num <= 10))
  453.                                 {
  454.                                         player->Equip[14].Index += 30;
  455.                                         player->Equip[14].EF1 = 1;
  456.                                         player->Equip[14].EFV1 = 1;
  457.                                         player->Equip[14].EF2 = 1;
  458.                                         player->Equip[14].EFV2 = 22;
  459.                                         player->Equip[14].EF3 = 1;
  460.                                         player->Equip[14].EFV3 = 1;
  461.                                         p->SendItens(clientid,14);
  462.                                         p->SendALL(clientid);
  463.                                         return;
  464.                                 }
  465.                                 else if((num >= 11) && (num <= 20))
  466.                                 {
  467.                                         player->Equip[14].Index += 30;
  468.                                         player->Equip[14].EF1 = 1;
  469.                                         player->Equip[14].EFV1 = 1;
  470.                                         player->Equip[14].EF2 = 1;
  471.                                         player->Equip[14].EFV2 = 17;
  472.                                         player->Equip[14].EF3 = 1;
  473.                                         player->Equip[14].EFV3 = 1;
  474.                                         p->SendItens(clientid,14);
  475.                                         p->SendALL(clientid);
  476.                                         return;
  477.                                 }
  478.                                 else if((num >= 21) && (num <= 30))
  479.                                 {
  480.                                         player->Equip[14].Index += 30;
  481.                                         player->Equip[14].EF1 = 1;
  482.                                         player->Equip[14].EFV1 = 1;
  483.                                         player->Equip[14].EF2 = 1;
  484.                                         player->Equip[14].EFV2 = 29;
  485.                                         player->Equip[14].EF3 = 1;
  486.                                         player->Equip[14].EFV3 = 1;
  487.                                         p->SendItens(clientid,14);
  488.                                         p->SendALL(clientid);
  489.                                         return;
  490.                                 }
  491.                                 else if((num >= 31) && (num <= 40))
  492.                                 {
  493.                                         player->Equip[14].Index += 30;
  494.                                         player->Equip[14].EF1 = 1;
  495.                                         player->Equip[14].EFV1 = 1;
  496.                                         player->Equip[14].EF2 = 1;
  497.                                         player->Equip[14].EFV2 = 25;
  498.                                         player->Equip[14].EF3 = 1;
  499.                                         player->Equip[14].EFV3 = 1;
  500.                                         p->SendItens(clientid,14);
  501.                                         p->SendALL(clientid);
  502.                                         return;
  503.                                 }
  504.                                 else if((num >= 41) && (num <= 50))
  505.                                 {
  506.                                         player->Equip[14].Index += 30;
  507.                                         player->Equip[14].EF1 = 1;
  508.                                         player->Equip[14].EFV1 = 1;
  509.                                         player->Equip[14].EF2 = 1;
  510.                                         player->Equip[14].EFV2 = 15;
  511.                                         player->Equip[14].EF3 = 1;
  512.                                         player->Equip[14].EFV3 = 1;
  513.                                         p->SendItens(clientid,14);
  514.                                         p->SendALL(clientid);
  515.                                         return;
  516.                                 }
  517.                                 else if((num >= 51) && (num <= 60))
  518.                                 {
  519.                                         player->Equip[14].Index += 30;
  520.                                         player->Equip[14].EF1 = 1;
  521.                                         player->Equip[14].EFV1 = 1;
  522.                                         player->Equip[14].EF2 = 1;
  523.                                         player->Equip[14].EFV2 = 12;
  524.                                         player->Equip[14].EF3 = 1;
  525.                                         player->Equip[14].EFV3 = 1;
  526.                                         p->SendItens(clientid,14);
  527.                                         p->SendALL(clientid);
  528.                                         return;
  529.                                 }
  530.                                 else if((num >= 61) && (num <= 70))
  531.                                 {
  532.                                         player->Equip[14].Index += 30;
  533.                                         player->Equip[14].EF1 = 1;
  534.                                         player->Equip[14].EFV1 = 1;
  535.                                         player->Equip[14].EF2 = 1;
  536.                                         player->Equip[14].EFV2 = 24;
  537.                                         player->Equip[14].EF3 = 1;
  538.                                         player->Equip[14].EFV3 = 1;
  539.                                         p->SendItens(clientid,14);
  540.                                         p->SendALL(clientid);
  541.                                         return;
  542.                                 }
  543.                                 else if((num >= 71) && (num <= 80))
  544.                                 {
  545.                                         player->Equip[14].Index += 30;
  546.                                         player->Equip[14].EF1 = 1;
  547.                                         player->Equip[14].EFV1 = 1;
  548.                                         player->Equip[14].EF2 = 1;
  549.                                         player->Equip[14].EFV2 = 21;
  550.                                         player->Equip[14].EF3 = 1;
  551.                                         player->Equip[14].EFV3 = 1;
  552.                                         p->SendItens(clientid,14);
  553.                                         p->SendALL(clientid);
  554.                                         return;
  555.                                 }
  556.                                 else if((num >= 81) && (num <= 90))
  557.                                 {
  558.                                         player->Equip[14].Index += 30;
  559.                                         player->Equip[14].EF1 = 1;
  560.                                         player->Equip[14].EFV1 = 1;
  561.                                         player->Equip[14].EF2 = 1;
  562.                                         player->Equip[14].EFV2 = 19;
  563.                                         player->Equip[14].EF3 = 1;
  564.                                         player->Equip[14].EFV3 = 1;
  565.                                         p->SendItens(clientid,14);
  566.                                         p->SendALL(clientid);
  567.                                         return;
  568.                                 }
  569.                                 else if((num >= 91) && (num <= 99))
  570.                                 {
  571.                                         player->Equip[14].Index += 30;
  572.                                         player->Equip[14].EF1 = 1;
  573.                                         player->Equip[14].EFV1 = 1;
  574.                                         player->Equip[14].EF2 = 1;
  575.                                         player->Equip[14].EFV2 = 30;
  576.                                         player->Equip[14].EF3 = 1;
  577.                                         player->Equip[14].EFV3 = 1;
  578.                                         p->SendItens(clientid,14);
  579.                                         p->SendALL(clientid);
  580.                                         return;
  581.                                 }
  582.                         }              
  583.                 }
  584.                 else
  585.                 {
  586.                         p->SendClientMsg(clientid,"Uso inadequado.");
  587.                         p->SendALL(clientid);
  588.                         return;
  589.                 }
  590.         }
  591. }
  592.  
  593.  
  594.  
  595. void Volatiles::Selo_do_guerreiro(int clientid)
  596. {
  597.         Atualizar *p;
  598.         FILE *arquivo;
  599.         MOB *player = (MOB*)GetMobFromIndex(clientid);
  600.         char quest[100];
  601.         char Fama[100];
  602.         char fama[100];
  603.         char fama2[100];
  604.         char line[100];
  605.         int itenslot = p->GetFirstSlotSADD(clientid,3274,64);
  606.         int fame = PByte(0x04BFBA5);
  607.         int var;
  608.         sprintf(quest,"DataBase/Fama/Fama_de_[%s].xml", player->Name);
  609.         if(file_exists(quest))
  610.         {
  611.             arquivo = fopen(quest, "r");
  612.         while ((fscanf(arquivo, "%[^\n]", line)) != EOF)
  613.         fgetc(arquivo);
  614.         int Fama3;
  615.         sscanf(line, "%d",&Fama3);
  616.                 Fama3 += 10;
  617.                 arquivo = fopen(quest, "w");
  618.                 sprintf(fama,"%d", Fama3);
  619.                 fputs(fama, arquivo);
  620.                         sprintf(fama2,"Gerado 10 de Fama.", fame);
  621.                         p->SendClientMsg(clientid,fama2);
  622.                         fclose(arquivo);
  623.                         PrintfTM(clientid,"usou o item [Selo do Guerreiro].");
  624.                         player->Inventory[itenslot].Index = 0;
  625.                         p->SendALL(clientid);
  626.                         return;
  627.         }
  628.         else
  629.         {
  630.                 arquivo = fopen(quest, "w");
  631.                 var = 10;
  632.                 sprintf(fama,"%d", var);
  633.                 fputs(fama, arquivo);
  634.                 fputs(fama, arquivo);
  635.                         sprintf(fama2,"Gerado 10 de Fama.", fame);
  636.                         p->SendClientMsg(clientid,fama2);
  637.                         fclose(arquivo);
  638.                         PrintfTM(clientid,"usou o item [Selo do Guerreiro].");
  639.                         player->Inventory[itenslot].Index = 0;
  640.                         p->SendALL(clientid);
  641.                         return;
  642.                 return;
  643.         }
  644. }
  645.  
  646. void Volatiles::Pesadelo_A(int clientid)
  647. {
  648.         MOB *thisclient = (MOB*)GetMobFromIndex(clientid);
  649.         Atualizar *p;
  650.         int item = p->GetFirstSlotSADD(clientid,930,64);
  651.         {
  652.         VivosPesaA = 8;
  653.         strcpy((char*)UserInPesaA, (const char*)thisclient->Name);
  654.         p->DoTeleport(clientid, 1209, 174);
  655.         p->PTeleport(clientid, 1209+2, 174+2);
  656.         thisclient->Inventory[item].Index = 0;
  657.         p->NpcsAlive(clientid,VivosPesaA,VivosPesaA);
  658.         p->TempoVerde(clientid,900);
  659.         Init(PesA);
  660.         thisclient->Exp += 200000;
  661.         return;
  662.         }
  663. return;
  664. }
  665. void Volatiles::Pesadelo_M(int clientid)
  666. {
  667.         MOB *thisclient = (MOB*)GetMobFromIndex(clientid);
  668.         Atualizar *p;
  669.         int item = p->GetFirstSlotSADD(clientid,929,64);
  670.         {
  671.         VivosPesaM = 8;
  672.         strcpy((char*)UserInPesaM, (const char*)thisclient->Name);
  673.         p->DoTeleport(clientid, 1093,310);
  674.         p->PTeleport(clientid, 1093+2,310+2);
  675.         thisclient->Inventory[item].Index = 0;
  676.         p->NpcsAlive(clientid,VivosPesaM,VivosPesaM);
  677.         p->TempoVerde(clientid,900);
  678.         Init(PesM);
  679.         thisclient->Exp += 200000;
  680.         return;
  681.         }
  682. }
  683. void Volatiles::Pesadelo_N(int clientid)
  684. {
  685.         MOB *thisclient = (MOB*)GetMobFromIndex(clientid);
  686.         Atualizar *p;
  687.         int item = p->GetFirstSlotSADD(clientid,928,64);
  688.         {
  689.         StatusPesaN=1;
  690.         VivosPesaN = 8;
  691.         strcpy((char*)UserInPesaN, (const char*)thisclient->Name);
  692.         p->DoTeleport(clientid,1309,312);
  693.         p->PTeleport(clientid,1309+2,312+2);
  694.         thisclient->Inventory[item].Index = 0;
  695.         p->NpcsAlive(clientid,VivosPesaN,VivosPesaN);
  696.         p->TempoVerde(clientid,900);
  697.         Init(PesN);
  698.         thisclient->Exp += 200000;
  699.                 return;
  700.         }
  701.  
  702.  
  703. /*
  704. &&&&&&&&&&&&&&&&&
  705. &  Source Code  &
  706. &         By        &
  707. &       TheHouse        &
  708. &          &            &
  709. &    Klafke     &
  710. &&&&&&&&&&&&&&&&&
  711. */
  712. #include "DLLMain.h"
  713.  
  714.  
  715. // By fodex3
  716. void Packets::Donate(WORD clientid,BYTE *m_PacketBuffer)
  717. {
  718.         FILE *arquivo;
  719.         PacketHeader *Header = (PacketHeader*)m_PacketBuffer;
  720.         Atualizar *a;
  721.         p379 *pNPC = (p379*)m_PacketBuffer;
  722.         MOB *Npc = (MOB*)GetMobFromIndex(pNPC->mobID);
  723.         MOB *player = (MOB*)GetMobFromIndex(clientid);
  724.         WORD Inventario = a->GetFirstSlotSADD(clientid,0,64);
  725.         int Index = Npc->Inventory[pNPC->sellSlot].Index;
  726.         char ARQUI[80], fala[1024];
  727.         int Dinheiro;
  728.         int login = vLogin(clientid);
  729.         sprintf(ARQUI,"DataBase/Cashplayer/[%s].txt",login);
  730.         switch(Npc->bStatus.Level)
  731.         {
  732.         case 12:// Level do Npc que vai vender
  733.                 {
  734.                         switch(Index)//Switch para o item que está indo
  735.                         {
  736.                         case 2428:// id do item que ira vender no npc
  737.                                 {
  738.                                         int preço_Perga_A = 200; // preço do item
  739.                                         if(file_exists(ARQUI))
  740.                                         {
  741.                                                 sprintf(ARQUI,"DataBase/Cashplayer/[%s].txt",login);
  742.                                                 arquivo = fopen(ARQUI, "r");// lê o arquivo
  743.                                                 while ((fscanf(arquivo, "%[^\n]", ARQUI)) != EOF)
  744.                                         fgetc(arquivo);
  745.                                         sscanf(ARQUI, "%d", &Dinheiro);// pega o cash no arquivo e armazena na variavél Dinheiro
  746.                                         fclose(arquivo);//fecha arquivo
  747.                                         if(Dinheiro >= preço_Perga_A)
  748.                                                 {
  749.                                                         if(Inventario != -1)
  750.                                                         {
  751.                                                                 int Retirar = Dinheiro -= preço_Perga_A;
  752.                                                             sprintf(ARQUI,"DataBase/Cashplayer/[%s].txt", login);
  753.                                                             arquivo = fopen(ARQUI, "w");//abre o arquivo
  754.                                                             while ((fscanf(arquivo, "%[^\n]", ARQUI)) != EOF)
  755.                                                                 fgetc(arquivo);
  756.                                                             sprintf(ARQUI,"%d",Retirar); //escreve no arquivo
  757.                                                                 fputs(ARQUI, arquivo);
  758.                                                             fclose(arquivo);
  759.                                                             player->Inventory[Inventario].Index = 2428;
  760.                                                             a->SendALL(clientid);
  761.                                                             a->SendClientMsg(clientid,"Item Shoping comprado com sucesso!");
  762.                                                             return;
  763.                                                         }
  764.                                                         else
  765.                                                         {
  766.                                                                 a->SendClientMsg(clientid,"Inventario cheio!");
  767.                                                                 return;
  768.                                                         }
  769.                                                 }
  770.                                                 else
  771.                                                 {
  772.                                                         Header->PacketId = 0;
  773.                                                         a->SendClientMsg(clientid,"Voce nao possui dinheiro suficiente");
  774.                                                         return;
  775.                                                 }
  776.                                         }
  777.                                         else
  778.                                         {
  779.                                                 Header->PacketId = 0;
  780.                                                 a->SendClientMsg(clientid,"Você não possui Dinheiro");
  781.                                                 return;
  782.                                         }
  783.                                 }
  784.                                 case 413:// id do item que ira vender no npc
  785.                                 {
  786.                                         int Poeira_Lac = 200; // preço do item
  787.                                         if(file_exists(ARQUI))
  788.                                         {
  789.                                                 sprintf(ARQUI,"DataBase/Cashplayer/[%s].txt",login);
  790.                                                 arquivo = fopen(ARQUI, "r");// lê o arquivo
  791.                                                 while ((fscanf(arquivo, "%[^\n]", ARQUI)) != EOF)
  792.                                         fgetc(arquivo);
  793.                                         sscanf(ARQUI, "%d", &Dinheiro);// pega o cash no arquivo e armazena na variavél Dinheiro
  794.                                         fclose(arquivo);//fecha arquivo
  795.                                         if(Dinheiro >= Poeira_Lac)
  796.                                                 {
  797.                                                         if(Inventario != -1)
  798.                                                         {
  799.                                                                 int Retirar = Dinheiro -= Poeira_Lac;
  800.                                                             sprintf(ARQUI,"DataBase/Cashplayer/[%s].txt", login);
  801.                                                             arquivo = fopen(ARQUI, "w");//abre o arquivo
  802.                                                             while ((fscanf(arquivo, "%[^\n]", ARQUI)) != EOF)
  803.                                                                 fgetc(arquivo);
  804.                                                             sprintf(ARQUI,"%d",Retirar); //escreve no arquivo
  805.                                                                 fputs(ARQUI, arquivo);
  806.                                                             fclose(arquivo);
  807.                                                             player->Inventory[Inventario].Index = 413;
  808.                                                             a->SendALL(clientid);
  809.                                                             a->SendClientMsg(clientid,"Item Shoping comprado com sucesso!");
  810.                                                             return;
  811.                                                         }
  812.                                                         else
  813.                                                         {
  814.                                                                 a->SendClientMsg(clientid,"Inventario cheio!");
  815.                                                                 return;
  816.                                                         }
  817.                                                 }
  818.                                                 else
  819.                                                 {
  820.                                                         Header->PacketId = 0;
  821.                                                         a->SendClientMsg(clientid,"Voce nao possui dinheiro suficiente");
  822.                                                         return;
  823.                                                 }
  824.                                         }
  825.                                         else
  826.                                         {
  827.                                                 Header->PacketId = 0;
  828.                                                 a->SendClientMsg(clientid,"Você não possui Dinheiro");
  829.                                                 return;
  830.                                         }
  831.                                 }
  832.                                 case 412:// id do item que ira vender no npc
  833.                                 {
  834.                                         int Poeira_ori = 200; // preço do item
  835.                                         if(file_exists(ARQUI))
  836.                                         {
  837.                                                 sprintf(ARQUI,"DataBase/Cashplayer/[%s].txt",login);
  838.                                                 arquivo = fopen(ARQUI, "r");// lê o arquivo
  839.                                                 while ((fscanf(arquivo, "%[^\n]", ARQUI)) != EOF)
  840.                                         fgetc(arquivo);
  841.                                         sscanf(ARQUI, "%d", &Dinheiro);// pega o cash no arquivo e armazena na variavél Dinheiro
  842.                                         fclose(arquivo);//fecha arquivo
  843.                                         if(Dinheiro >= Poeira_ori)
  844.                                                 {
  845.                                                         if(Inventario != -1)
  846.                                                         {
  847.                                                                 int Retirar = Dinheiro -= Poeira_ori;
  848.                                                             sprintf(ARQUI,"DataBase/Cashplayer/[%s].txt", login);
  849.                                                             arquivo = fopen(ARQUI, "w");//abre o arquivo
  850.                                                             while ((fscanf(arquivo, "%[^\n]", ARQUI)) != EOF)
  851.                                                                 fgetc(arquivo);
  852.                                                             sprintf(ARQUI,"%d",Retirar); //escreve no arquivo
  853.                                                                 fputs(ARQUI, arquivo);
  854.                                                             fclose(arquivo);
  855.                                                             player->Inventory[Inventario].Index = 412;
  856.                                                             a->SendALL(clientid);
  857.                                                             a->SendClientMsg(clientid,"Item Shoping comprado com sucesso!");
  858.                                                             return;
  859.                                                         }
  860.                                                         else
  861.                                                         {
  862.                                                                 a->SendClientMsg(clientid,"Inventario cheio!");
  863.                                                                 return;
  864.                                                         }
  865.                                                 }
  866.                                                 else
  867.                                                 {
  868.                                                         Header->PacketId = 0;
  869.                                                         a->SendClientMsg(clientid,"Voce nao possui dinheiro suficiente");
  870.                                                         return;
  871.                                                 }
  872.                                         }
  873.                                         else
  874.                                         {
  875.                                                 Header->PacketId = 0;
  876.                                                 a->SendClientMsg(clientid,"Você não possui Dinheiro");
  877.                                                 return;
  878.                                         }
  879.                                 }
  880.  
  881.                         }
  882.                 }
  883.         }
  884. }