xDiiZeRx 40 Posted January 25, 2020 Share Posted January 25, 2020 Hey! i use this function: pc.unmount(x,y) And stat's: (VIT,INT,STR,DX)It won't be cleared, only if I click on it. Link to comment Share on other sites More sharing options...
Premium Syreldar 1870 Posted January 25, 2020 Premium Share Posted January 25, 2020 Show the whole quest, if you can. "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
xDiiZeRx 40 Posted January 25, 2020 Author Share Posted January 25, 2020 when 31071.use begin if pc.is_polymorphed() then say("asd") elseif pc.is_mount() then say("asd") else pc.mount(22006,3600) end end Link to comment Share on other sites More sharing options...
Honorable Member Owsap 8144 Posted January 25, 2020 Honorable Member Share Posted January 25, 2020 What do you mean with "Status don't clear, only if you click them" and what are you trying todo with this function? If you're trying to add a bonus to the mount your using you can use this function: pc.mount_bonus(type, value, duration) local mount_vnum = 22006 -- Mount Vnum local affect_duration = 3600 -- 1h pc.mount(mount_vnum, affect_durration) pc.mount_bonus(apply.MOV_SPEED, 20, affect_durration) -- Apply bonus with +20 move speed https://owsap.dev/ / https://osf.owsap.dev/ Link to comment Share on other sites More sharing options...
Premium Syreldar 1870 Posted January 25, 2020 Premium Share Posted January 25, 2020 Basically what @Owsap said. pc.unmount() only clears the bonuses you give via the pc.mount_bonus(apply, quantity, duration) function. "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
xDiiZeRx 40 Posted January 25, 2020 Author Share Posted January 25, 2020 How can I update to delete the stats as well? I use ctrl+g. Link to comment Share on other sites More sharing options...
Active+ Member ScriptMan 1530 Posted January 25, 2020 Active+ Member Share Posted January 25, 2020 8 minutes ago, Owsap said: What do you mean with "Status don't clear, only if you click them" and what are you trying todo with this function? If you're trying to add a bonus to the mount your using you can use this function: pc.mount_bonus(type, value, duration) local mount_vnum = 22006 -- Mount Vnum local affect_duration = 3600 -- 1h pc.mount(mount_vnum, affect_durration) pc.mount_bonus(apply.MOV_SPEED, 20, affect_durration) -- Apply bonus with +20 move speed No no. Here is problem this: Base Riding code added for your character riding bonus: str vit etc point.. If you using this code... pc.mount() So.. Now stop riding and check your Character window ingame. (Bonus cp. VIT, INT, STR ..) Link to comment Share on other sites More sharing options...
Honorable Member Owsap 8144 Posted January 25, 2020 Honorable Member Share Posted January 25, 2020 (edited) I still don't understand... When you unmount all bonuses are removed. -- Quest when 31071.use begin if pc.is_polymorphed() then return syschat("You can't ride while transformed.") end if pc.is_riding() or pc.is_mount() then pc.unmount() else if horse.is_summon() then horse.unsummon() end pc.mount(22006, 3600) pc.mount_bonus(apply.MOV_SPEED, 60, 3600) end end // @ questlua_pc.cpp int pc_mount_bonus(lua_State* L) { BYTE applyOn = static_cast<BYTE>(lua_tonumber(L, 1)); long value = static_cast<long>(lua_tonumber(L, 2)); long duration = static_cast<long>(lua_tonumber(L, 3)); LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); if (ch && ch->GetMountVnum()) { ch->RemoveAffect(AFFECT_MOUNT_BONUS); ch->AddAffect(AFFECT_MOUNT_BONUS, aApplyInfo[applyOn].bPointType, value, AFF_NONE, duration, 0, false); } return 0; } int pc_unmount(lua_State* L) { LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); ch->RemoveAffect(AFFECT_MOUNT); ch->RemoveAffect(AFFECT_MOUNT_BONUS); if (ch->IsHorseRiding()) ch->StopRiding(); return 0; } Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal https://owsap.dev/ / https://osf.owsap.dev/ Link to comment Share on other sites More sharing options...
Active+ Member ScriptMan 1530 Posted January 25, 2020 Active+ Member Share Posted January 25, 2020 (edited) 6 minutes ago, Owsap said: I still don't understand... When you unmount all bonuses are removed. -- Quest when 31071.use begin if pc.is_polymorphed() then return syschat("You can't ride while transformed.") end if pc.is_riding() or pc.is_mount() then pc.unmount() else if horse.is_summon() then horse.unsummon() end pc.mount(22006, 3600) pc.mount_bonus(apply.MOV_SPEED, 60, 3600) end end // @ questlua_pc.cpp int pc_mount_bonus(lua_State* L) { BYTE applyOn = static_cast<BYTE>(lua_tonumber(L, 1)); long value = static_cast<long>(lua_tonumber(L, 2)); long duration = static_cast<long>(lua_tonumber(L, 3)); LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); if (ch && ch->GetMountVnum()) { ch->RemoveAffect(AFFECT_MOUNT_BONUS); ch->AddAffect(AFFECT_MOUNT_BONUS, aApplyInfo[applyOn].bPointType, value, AFF_NONE, duration, 0, false); } return 0; } int pc_unmount(lua_State* L) { LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); ch->RemoveAffect(AFFECT_MOUNT); ch->RemoveAffect(AFFECT_MOUNT_BONUS); if (ch->IsHorseRiding()) ch->StopRiding(); return 0; } Yes but! Use ctrl+g or h or j. And Dizer not use Costume mount system. Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
xDiiZeRx 40 Posted January 25, 2020 Author Share Posted January 25, 2020 You use COSTUME_MOUNT. I use simple quest, and item_proto type ITEM_QUEST. Try on my quest, use ctrl+g, and see this bug. Link to comment Share on other sites More sharing options...
Premium Syreldar 1870 Posted January 25, 2020 Premium Share Posted January 25, 2020 ..It's the same thing, it doesn't change a thing in that field. 1 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
xDiiZeRx 40 Posted January 25, 2020 Author Share Posted January 25, 2020 (edited) Haha, right? @Syreldar Look the gif, and see the character window stats :). The first mount is COSTUME_MOUNT, and the second is ITEM_QUEST. Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Honorable Member Owsap 8144 Posted January 25, 2020 Honorable Member Share Posted January 25, 2020 (edited) Well testing only with quest type, in fact there is a problem in refreshing the status points. (never noticed this) This is what you can do in order to refresh them. // @ questlua_pc.cpp int pc_unmount(lua_State* L) { LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); ch->RemoveAffect(AFFECT_MOUNT); ch->RemoveAffect(AFFECT_MOUNT_BONUS); ch->PointsPacket(); // 2020.01.25.Owsap - Refresh Status Points if (ch->IsHorseRiding()) ch->StopRiding(); return 0; } Before: After: Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 1 https://owsap.dev/ / https://osf.owsap.dev/ Link to comment Share on other sites More sharing options...
xDiiZeRx 40 Posted January 25, 2020 Author Share Posted January 25, 2020 Thanks, i test it. Not work, but i'm solved. Thanks. Link to comment Share on other sites More sharing options...
Premium Beforekk 87 Posted May 2 Premium Share Posted May 2 How did you solve? I always wanted to be a hero, but destiny given me a role of a villain throw my whole life - Tenebris Viator Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now