Advertisement
Guest User

Untitled

a guest
Aug 28th, 2020
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. int pc_mount(lua_State* L)
  2. {
  3. if (!lua_isnumber(L, 1))
  4. return 0;
  5.  
  6. int length = 60;
  7.  
  8. if (lua_isnumber(L, 2))
  9. length = (int)lua_tonumber(L, 2);
  10.  
  11. DWORD mount_vnum = (DWORD)lua_tonumber(L, 1);
  12.  
  13. if (length < 0)
  14. length = 60;
  15.  
  16. LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
  17.  
  18. ch->RemoveAffect(AFFECT_MOUNT);
  19. ch->RemoveAffect(AFFECT_MOUNT_BONUS);
  20.  
  21. // ¸»ŔĚ ĽŇČŻµÇľî µű¶ó´Ů´Ď´Â »óŶó¸é ¸»şÎĹÍ ľřľÚ
  22. if (ch->GetHorse())
  23. ch->HorseSummon(false);
  24.  
  25. if (mount_vnum)
  26. {
  27. sys_log(0, "%d REMAIN TIME FOR MOUNT !!!!!!!!!!!!", length);
  28. ch->AddAffect(AFFECT_MOUNT, POINT_MOUNT, mount_vnum, AFF_NONE, length, 0, true);
  29. switch (mount_vnum)
  30. {
  31. case 20201:
  32. case 20202:
  33. case 20203:
  34. case 20204:
  35. case 20213:
  36. case 20216:
  37. ch->AddAffect(AFFECT_MOUNT, POINT_MOV_SPEED, 30, AFF_NONE, length, 0, true, true);
  38. break;
  39.  
  40. case 20205:
  41. case 20206:
  42. case 20207:
  43. case 20208:
  44. case 20214:
  45. case 20217:
  46. ch->AddAffect(AFFECT_MOUNT, POINT_MOV_SPEED, 40, AFF_NONE, length, 0, true, true);
  47. break;
  48.  
  49. case 20209:
  50. case 20210:
  51. case 20211:
  52. case 20212:
  53. case 20215:
  54. case 20218:
  55. ch->AddAffect(AFFECT_MOUNT, POINT_MOV_SPEED, 50, AFF_NONE, length, 0, true, true);
  56. break;
  57.  
  58. }
  59. }
  60.  
  61. return 0;
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement