Guest User

Untitled

a guest
Apr 25th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. case 0x39D://Use Skill
  2. {
  3. if(PACKET_SIDE == CLIENT_SIDE)
  4. {
  5. UseSkill(m_PacketBuffer[6],m_PacketBuffer[24]);
  6. break;
  7. }
  8. }
  9. ----------------------------------------
  10.  
  11. void UseSkill(WORD clientid, WORD skillid);
  12.  
  13. ----------------------------------------
  14.  
  15. void UseSkill(WORD clientid, WORD skillid)
  16. {
  17. st_Mob*p=(st_Mob*)GetMobFromIndex(clientid);
  18. switch(skillid)
  19. {
  20. case 99://Ressureição
  21. {
  22. srand(time(NULL));
  23. int hp = PInt(clientid * 0x410 + 0x015C6A00);// Hp Maximo
  24. int hp2 = PInt(clientid * 0x410 + 0x015C6A04);//HPAtual
  25. int cX = PInt(clientid * 0x410 + 0x015C6CEC);
  26. int cY = PInt(clientid * 0x410 + 0x015C6CF0);
  27. WORD chanceb = 50;//50% de chance
  28. WORD chance = rand()%50, chance2 = rand()%50, total = chance + chance2;
  29. if(total <=chanceb)//sucesso
  30. {
  31. DoTeleport(clientid,cX,cY);
  32. PInt(clientid * 0x410 + 0x015C6A04) = PInt(clientid * 0x410 + 0x015C6A00);
  33. SendStats(clientid);
  34. GetCurrentScore(clientid);
  35. GetCurrentScore2(clientid);
  36. SendScore(clientid);
  37. return;
  38. }
  39. }
  40. }
  41. }
Add Comment
Please, Sign In to add comment