Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int pc_mount(lua_State* L)
- {
- if (!lua_isnumber(L, 1))
- return 0;
- int length = 60;
- if (lua_isnumber(L, 2))
- length = (int)lua_tonumber(L, 2);
- DWORD mount_vnum = (DWORD)lua_tonumber(L, 1);
- if (length < 0)
- length = 60;
- LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
- ch->RemoveAffect(AFFECT_MOUNT);
- ch->RemoveAffect(AFFECT_MOUNT_BONUS);
- // ¸»ŔĚ ĽŇČŻµÇľî µű¶ó´Ů´Ď´Â »óŶó¸é ¸»şÎĹÍ ľřľÚ
- if (ch->GetHorse())
- ch->HorseSummon(false);
- if (mount_vnum)
- {
- sys_log(0, "%d REMAIN TIME FOR MOUNT !!!!!!!!!!!!", length);
- ch->AddAffect(AFFECT_MOUNT, POINT_MOUNT, mount_vnum, AFF_NONE, length, 0, true);
- switch (mount_vnum)
- {
- case 20201:
- case 20202:
- case 20203:
- case 20204:
- case 20213:
- case 20216:
- ch->AddAffect(AFFECT_MOUNT, POINT_MOV_SPEED, 30, AFF_NONE, length, 0, true, true);
- break;
- case 20205:
- case 20206:
- case 20207:
- case 20208:
- case 20214:
- case 20217:
- ch->AddAffect(AFFECT_MOUNT, POINT_MOV_SPEED, 40, AFF_NONE, length, 0, true, true);
- break;
- case 20209:
- case 20210:
- case 20211:
- case 20212:
- case 20215:
- case 20218:
- ch->AddAffect(AFFECT_MOUNT, POINT_MOV_SPEED, 50, AFF_NONE, length, 0, true, true);
- break;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement