Cripplez
-
Posts
118 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Cripplez
-
-
Thank you
Do you think would be possible to adapt this code for this version too?
So when you click F1 the first saved account will be loaded, if you click F2 will be loaded the second account, and the same thing for F3 and F4.
Now it's not working because the account are saved like this:
0 : idaccount1 : password1 : idaccount2 : password
instead of :
idaccount1 : password
Do you know how the first index number could be ignored during the login?
def OnKeyDown(self, key): # A fast method to login by keyboard shortcuts. # Create a keyboard range enum as tuple from F1 to F4. dikAvailableList = range(0x3B, 0x3E + 1) if not key in dikAvailableList: return try: # Creates a file object, which would be utilized to call other support methods associated with it. # Change old_open method with open if you get error. file = old_open('user//credentials', 'r') try: # Finds the given element in a list and returns its position. account_index = dikAvailableList.index(key) # Reads until EOF using readline() and returns a list containing the lines. account_data = file.readlines().__getitem__(account_index) # Returns a list of all the words in the string, using str as the separator. account_data = account_data.split(':') # Applies a function to all the items in an input list. account_data = map(lambda item: item.rstrip(), account_data) # Decode the password. account_data[-1] = self.decode(self.__ReadSavedPassword(), next(reversed(account_data))) # Connect to the server by using list [id, pw]. self.Connect(*account_data) # Raised when a sequence subscript is out of range. except IndexError: pass # A closed file cannot be read or written any more. file.close() # Raised when an I/O operation fails for an I/O-related reason, e.g., “file not found” or “disk full”. except IOError: return
- 1
-
Hello, I'm trying to make an effect that interrupt the animation of a skill, for example when you get stunned and you are doing a skill it is interrupted, i want to make a similar thing but that doesnt make you stop moving/attacking, but only interrupt a skill. I tried to find in the client the function that does this for stun but didn't work, do you have any suggestion? Thank you
-
Thank you
I think with so much HP there is a bug with mob health regen.
For example i tried a mob with 40kk hp and is health regen works okay, but for example with 400kk or 1kkk hp the health regen is like 1hp every 8 sec instead of millions
Is this the correct way to fix this?
in char.cpp search EVENTFUNC(recovery_event)
else if (!ch->IsDoor()) { ch->MonsterLog("HP_REGEN +%d", MAX(1, (ch->GetMaxHP() * ch->GetMobTable().bRegenPercent) / 100)); ch->PointChange(POINT_HP, MAX(1, (ch->GetMaxHP() * ch->GetMobTable().bRegenPercent) / 100)); }
change to
else if (!ch->IsDoor()) { ch->MonsterLog("HP_REGEN +%d", MAX(1, (ch->GetMaxHP() * ch->GetMobTable().bRegenPercent) / 100)); ch->PointChange(POINT_HP, MAX(1, ((int64_t)ch->GetMaxHP() * ch->GetMobTable().bRegenPercent) / 100));//fix }
-
8 hours ago, PACI said:
You're confusing vnum (virtual number) with vid (virtual ID). That is why it does not work.
The quest-function d.spawn_mob() returns, on successful spawn, the vid of the monster spawned, so you must store that value in a dungeon flag and use it in your npc.set_vid_attack_mul() and npc.set_vid_damage_mul() quest-functions.
Now, what'd they do specifically:
- npc.set_vid_attack_mul: alters the damage multiplier of the monster's hits. The higher the value, the higher the hit damage it will give.
- npc.set_vid_damage_mul: this is another multiplier and, unlike what you may think, does not reduce the monster's damage, it weakens it by increasing the damage it takes.Thank you for the answer, so I did a test like this:
when spawn_final_boss.server_timer begin if d.select(get_server_timer_arg()) then d.spawn_mob(1095, 350, 500); npc.set_vid_attack_mul(1095, 8) end end when 8110.kill begin d.setf("add_attack", d.getf("add_attack")+1); local stone_killed = d.getf("add_attack") npc.set_vid_attack_mul(1095, 8 - stone_killed) d.notice("Boss damage has been reduced.") end
Now the damage of the boss increase (or decrease when i destroy a metin stone in my case) only for the basic normal attacks, this function doest not affect the damage of his skills, the have always the same damage. Do you know what should be modified in the server source to apply the increase damage to skills too?
-
Hello, I'm making a dungeon quest with a boss that reduce his damage when you destroy a metin stone, but I don't understand how to use this function:
npc.set_vid_damage_mul or npc.set_vid_attack_mulfor example this is what I'm doing but it's not working, do i need to do it with set_unique spawn or how would be the correct way to make it work? Thank you
when spawn_final_boss.server_timer begin if d.select(get_server_timer_arg()) then d.spawn_mob(1095, 350, 500); npc.set_vid_damage_mul(1095, 8) end end when 8110.kill begin d.setf("reduce_damage", d.getf("reduce_damage")+1); local stone_killed = d.getf("reduce_damage") npc.set_vid_damage_mul(1095, 8 - stone_killed) d.notice("Boss damage has been reduced.") end
-
On 4/17/2021 at 8:45 PM, Mali said:
If you have a bug, comment section below.
Hello Mali, I just noticed a weird bug. It all works perfectly, but in some maps when you go far the mark in the minimap of your party members disappear completely.
For example, in village 1 even when you go really far it is all okay, but in some others maps when you go far this happens:
I thought it was a bug for the maps in core99 because i tried another map in the same core99 and had this bug too, then i tried again another map in the core99 but this time that map did not have this problem. Do you have any ideas?Here for example everything is okay
Spoiler -
Hello, the max guild member has a problem when you change your guild leader. The bonus from m_iMemberCountBonus will not count if the new guild leader is in a map in a different Core of the map where your Guild Land is.
Is it possibile to do that the new guild leader receive this bonus in all Core? Thank you
-
Hello, I'm trying to make a daily quest and I wanted to ask you if the structure of this quest is correct or it is missing code or could have unexpected bug that i didn't calculate.
Is it correct to use set_state(start) at the end to make it repeatable? thank you
This is just an example
quest daily_quest begin state start begin when login or levelup with pc.get_level() >= 50 begin if get_time() > pc.getqf("daily_cd") then set_state(daily) end end when letter with pc.get_level() >= 50 begin send_letter("Daily QUest") end when button or info begin say_title("Daily QUesta") if ((get_global_time() - pc.getf("daily_cd","daily_wait_time")) < 60) then local remaining_wait_time = (pc.getf("daily_cd", "daily_wait_time") - get_global_time() + (60 * 60 * 24)) say("You must wait for timer") say_reward("You can repeat in: "..get_time_remaining(remaining_wait_time)..'[ENTER]') return end say("Now you can repeat the quest.") set_state(daily) end end state daily begin when letter begin send_letter("Daily quest") end when button or info begin say_title("Daily quest") say("Daily quest active") end // mission when 101.kill begin chat("daily quest completed.") pc.setf("daily_cd", "daily_wait_time", get_global_time()); pc.setqf("daily_cd", get_time() + 60 * 60 * 24); set_state(start) end end end
-
10 minutes ago, Owsap said:
Just replace CPythonNonPlayer::MOB_RANK_PAWN with 0.
I tried replacing it with 0 but when i compile i get this errors
-
2 hours ago, Owsap said:
const CPythonNonPlayer::TMobTable* pkMobTable = CPythonNonPlayer::instance().GetTable(rVictim.GetRace()); if (pkMobTable && pkMobTable->bRank == CPythonNonPlayer::MOB_RANK_PAWN) return false;
You also need to include PythonNonPlayer.h
#include "../UserInterface/PythonNonPlayer.h"
Thank you for the answer I included it but i have this prolem:
In my binary files i searched for MOB_RANK_PAWN but there isn't, only in server source.
In the binary the rank of mob i think are only here in PythonNonPlayerModule.cpp
-
Hello, i'm trying to stop the collision for mobs with rank Pawn
for example like this but instead of race vnum using the rank of the mob
#ifdef ENABLE_PETS_WITHOUT_COLLISIONS
if (rVictim.GetRace()>=34001 && rVictim.GetRace()<=34119)
return FALSE;
#endifsomething like this could be made?
if (rVictim.GetMobRank() =< 1)
return FALSE; -
Hello, I wanted to create a new use_affect item for strong against stone for example.
This is the use_affect for critical pct bonus
71045 °üÅëÀÇ Àå ITEM_USE USE_AFFECT 1 ANTI_DROP|ANTI_SELL|ANTI_GIVE|ANTI_MYSHOP ITEM_STACKABLE|LOG NONE NONE 0 0 0 0 0 LIMIT_NONE 0 LIMIT_NONE 0 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 510 16 20 600 0 0 0 0 0
And this is the new item i made for strong stone:
71604 PotionStone ITEM_USE USE_AFFECT 1 NONE ITEM_STACKABLE|LOG NONE NONE 0 0 0 0 0 LEVEL 90 LIMIT_NONE 0 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 510 106 10 1800 0 0 0 0 0
In game it works good and i receive the bonus strong against stone +10% for 30 minutes, but i will not see the icon in the top left of the screen I want to fix this
this is my uiaffectshower.pyI tried to make even a new use_effect item for strong against animal and i can see the icon for it, but not for stone bonus do you know why? thanks
-
Thank you!
In PythonMiniMap.cpp there are 2 of these:
m_AtlasMarkInfoVectorIterator = m_AtlasWarpInfoVector.begin(); while (m_AtlasMarkInfoVectorIterator != m_AtlasWarpInfoVector.end()) { ... }
Should I add this under both of them or only one? If one which one? first or second? thanks
#if defined(__BL_PARTY_POSITION__) for (const auto& PartyInfo : mAtlasPartyPlayerMark) { const float fffx = static_cast<float>(PartyInfo.second->lX) - static_cast<float>(m_dwAtlasBaseX); const float fffy = static_cast<float>(PartyInfo.second->lY) - static_cast<float>(m_dwAtlasBaseY); if (fffx - fCheckWidth / 2 < fRealX && fffx + fCheckWidth > fRealX && fffy - fCheckWidth / 2 < fRealY && fffy + fCheckHeight > fRealY) { rReturnString = PartyInfo.second->sName; *pReturnPosX = fffx; *pReturnPosY = fffy; *pdwTextColor = CInstanceBase::GetIndexedNameColor(CInstanceBase::NAMECOLOR_PARTY); return true; } } #endif
-
Hello, I'm trying to make this ride.lua with a LIB. Which one the of the 2 versions do you think would be better?
ride.lua without LIB
Spoilerquest ride begin state start begin function GetRideInfo(vnum) if ride.ride_info==nil then ride.ride_info = { [71114]= { ["mount_vnum"] = 20110, ["duration"] = 60*60*24*365, ["bonus_id"] = apply.DEF_GRADE_BONUS, ["bonus_value"] = 30, ["req_level"] = 30, }, [71116]= { ["mount_vnum"] = 20111, ["duration"] = 60*60*24*365, ["bonus_id"] = apply.DEF_GRADE_BONUS, ["bonus_value"] = 50, ["req_level"] = 30, },-- Lupo Selvatico [71118]= { ["mount_vnum"] = 20112, ["duration"] = 60*60*24*365, ["bonus_id"] = apply.ATT_GRADE_BONUS, ["bonus_value"] = 40, ["req_level"] = 30, }, [71120]= { ["mount_vnum"] = 20113, ["duration"] = 60*60*24*365, ["bonus_id"] = apply.ATT_GRADE_BONUS, ["bonus_value"] = 70, ["req_level"] = 30, }, } end return ride.ride_info[vnum] end function Ride(vnum, remain_time) local mount_info = ride.GetRideInfo(vnum) if mount_info==nil then return end if pc.level < mount_info["req_level"] then syschat("Your level is too low.") else if 112 == pc.get_map_index() then -- duel map return end if remain_time==0 then if mount_info["duration"] <= 0 then if item.is_available0() then remain_time = item.get_socket(0) else remain_time = 60 end else remain_time = mount_info["duration"] end end -- syschat("duration "..remain_time) -- syschat("socket1 "..item.get_socket(1)) -- syschat("socket2 "..item.get_socket(2)) pc.mount(mount_info["mount_vnum"], remain_time) pc.mount_bonus(mount_info["bonus_id"], mount_info["bonus_value"], remain_time) end end when login begin local vnum, remain_time = pc.get_special_ride_vnum() --syschat("remain_time "..remain_time) if vnum==0 then return end local mount_info = ride.GetRideInfo(vnum) if mount_info==nil then return end ride.Ride(vnum, remain_time) end when 71114.use or 71116.use or 71118.use or 71120.use begin if pc.is_polymorphed() then syschat("Can't ride polymorphed.") elseif not pc.is_riding() then if horse.is_summon() then horse.unsummon() end ride.Ride(item.vnum, 0) else pc.unmount() end end end end
I think i made some mistakes here but i can't understand where becuase it is not working
rideLIB.lua
SpoilerrideLIB = {}; rideLIB.Settings(vnum) = function() if (rideLIB.data == nil) then rideLIB.data = { [71114]= { ["mount_vnum"] = 20110, ["req_level"] = 30, ["bonus_id_1"] = apply.DEF_GRADE_BONUS, ["bonus_value_1"] = 50, ["bonus_id_2"] = apply.NONE, ["bonus_value_2"] = 0, ["bonus_id_3"] = apply.NONE, ["bonus_value_3"] = 0, }, [71116]= { ["mount_vnum"] = 20111, ["req_level"] = 30, ["bonus_id_1"] = apply.CRITICAL_PCT, ["bonus_value_1"] = 50, ["bonus_id_2"] = apply.NONE, ["bonus_value_2"] = 0, ["bonus_id_3"] = apply.NONE, ["bonus_value_3"] = 0, }, [71118]= { ["mount_vnum"] = 20112, ["req_level"] = 30, ["bonus_id_1"] = apply.ATTBONUS_ORC, ["bonus_value_1"] = 50, ["bonus_id_2"] = apply.NONE, ["bonus_value_2"] = 0, ["bonus_id_3"] = apply.NONE, ["bonus_value_3"] = 0, }, [71120]= { ["mount_vnum"] = 20113, ["req_level"] = 30, ["bonus_id_1"] = apply.ATT_GRADE_BONUS, ["bonus_value_1"] = 70, ["bonus_id_2"] = apply.NONE, ["bonus_value_2"] = 0, ["bonus_id_3"] = apply.NONE, ["bonus_value_3"] = 0, }, } end return rideLIB.data[vnum] end rideLIB.Ride(vnum, remain_time) = function() local mount_info = rideLIB.Settings(vnum) if mount_info == nil then return end if pc.level < mount_info["req_level"] then syschat("Your level is too low.") else if 112 == pc.get_map_index() then -- duel map return end if remain_time == 0 then if 86400 <= 0 then if item.is_available0() then remain_time = item.get_socket(0) else remain_time = 60 end else remain_time = 86400 end end if mount_info["bonus_value_3"] > 0 then pc.mount(mount_info["mount_vnum"], remain_time) pc.mount_bonus(mount_info["bonus_id_1"], mount_info["bonus_value_1"], remain_time) pc.mount_bonus(mount_info["bonus_id_2"], mount_info["bonus_value_2"], remain_time) pc.mount_bonus(mount_info["bonus_id_3"], mount_info["bonus_value_3"], remain_time) return elseif mount_info["bonus_value_2"] > 0 then pc.mount(mount_info["mount_vnum"], remain_time) pc.mount_bonus(mount_info["bonus_id_1"], mount_info["bonus_value_1"], remain_time) pc.mount_bonus(mount_info["bonus_id_2"], mount_info["bonus_value_2"], remain_time) return else pc.mount(mount_info["mount_vnum"], remain_time) pc.mount_bonus(mount_info["bonus_id_1"], mount_info["bonus_value_1"], remain_time) end end
ride.lua with lib
Spoilerquest ride begin state start begin when login begin local vnum, remain_time = pc.get_special_ride_vnum() if vnum == 0 then return end local mount_info = rideLIB.Settings(vnum) if mount_info == nil then return end rideLIB.Ride(vnum, remain_time) end when 71114.use or 71116.use or 71118.use or 71120.use begin if pc.is_polymorphed() then syschat("Cant ride polymorphed.") elseif not pc.is_riding() then if horse.is_summon() then horse.unsummon() end rideLIB.Ride(item.vnum, 0) else pc.unmount() end end end end
-
Hello, I need to make a quest that begins when you reach level 10+ and you have already choose your skill path
I tried something like this but it's not working, how can i make it with both pc.get_level and pc.get_skill_group() ? Thank you
quest new_test_lv10 begin state start begin when login or levelup with pc.get_level() >= 10 and pc.get_skill_group() > 0 begin
EDIT: i was missing an "end" for the state, everything with pc.get_level() >= 10 and pc.get_skill_group() > 0 is okay...
-
On 12/11/2019 at 10:43 PM, VegaS™ said:
You could do it with a map.
Hidden Content#include "cff.h" using TPetName = std::map<uint32_t, std::tuple<std::string, std::string>>; static const TPetName map_pet_names = { { 34003, {"Phoenix de Gheata", "#009DFF"} }, { 34004, {"Micul Azrael", "#732222"} }, { 34005, {"Porcusor", "#528508"} }, }; void CPetActor::SetName() { std::string& stPetName = m_pkOwner->GetName(); const auto& it = map_pet_names.find(m_dwVnum); if (it != map_pet_names.end()) stPetName.append(CFF::format(std::get<0>(it->second), std::get<1>(it->second))); m_pkChar->SetName(stPetName); }
And how could this be made without the color part?
Just like this for example:
{
{ 34003, {"Phoenix de Gheata"} },
{ 34004, {"Micul Azrael"} },
{ 34005, {"Porcusor"} },
}; -
Hello, I noticed that my npc are disappeared from the "atlas map" (the one you open with the "M" key, not the real map), does anyone know why it could be happen or what i could fix this problem? thank you
https://metin2.download/picture/jXU78lIkWGH5h4a13nQxl40Hzn7uRHou/.png -
Hello, in the server syserr i have multiple of this with every quest i use (warp.lua, dungeons, etc..)
This syserr is only when the server is in test mode, but i wanted to understand what exactly it is and if it cause any problem, or if it's normal for all
Example 1 HandeEvent:
SYSERR: Mar 18 21:14:21 :: HandleEvent: QUEST There's suspended quest state, can't run new quest state (quest: guild_manage pc: Tester123) SYSERR: Mar 18 21:14:21 :: HandleEvent: QUEST There's suspended quest state, can't run new quest state (quest: guild_manage pc: Tester123) SYSERR: Mar 18 21:14:22 :: HandleEvent: QUEST There's suspended quest state, can't run new quest state (quest: guild_manage pc: Tester123) SYSERR: Mar 18 21:14:22 :: HandleEvent: QUEST There's suspended quest state, can't run new quest state (quest: guild_manage pc: Tester123) SYSERR: Mar 18 21:14:23 :: HandleEvent: QUEST There's suspended quest state, can't run new quest state (quest: guild_manage pc: Tester123) SYSERR: Mar 18 21:14:23 :: HandleEvent: QUEST There's suspended quest state, can't run new quest state (quest: guild_manage pc: Tester123)
Example 2 HandleReceiveAllEvent
HandleReceiveAllEvent: QUEST There's suspended quest state, can't run new quest state
This is the source:
bool NPC::HandleEvent(PC& pc, int EventIndex) { if (EventIndex < 0 || EventIndex >= QUEST_EVENT_COUNT) { sys_err("QUEST invalid EventIndex : %d", EventIndex); return false; } if (pc.IsRunning()) { if (test_server) { CQuestManager & mgr = CQuestManager::instance(); sys_err("QUEST There's suspended quest state, can't run new quest state (quest: %s pc: %s)", pc.GetCurrentQuestName().c_str(), mgr.GetCurrentCharacterPtr() ? mgr.GetCurrentCharacterPtr()->GetName() : "<none>"); } return false; }
bool NPC::HandleReceiveAllEvent(PC& pc, int EventIndex) { if (EventIndex < 0 || EventIndex >= QUEST_EVENT_COUNT) { sys_err("QUEST invalid EventIndex : %d", EventIndex); return false; } if (pc.IsRunning()) { if (test_server) { CQuestManager & mgr = CQuestManager::instance(); sys_err("QUEST There's suspended quest state, can't run new quest state (quest: %s pc: %s)", pc.GetCurrentQuestName().c_str(), mgr.GetCurrentCharacterPtr() ? mgr.GetCurrentCharacterPtr()->GetName() : "<none>"); } return false; } FuncMissHandleReceiveAllEvent fMiss; FuncMatchHandleReceiveAllEvent fMatch; MatchingQuest(pc, m_mapOwnQuest[EventIndex], fMatch, fMiss); return fMiss.bHandled || fMatch.bHandled; }
Should i worry about this or is all okay? because it happens with every quest
-
I did everything but i have this syserr in client
0307 15:48:03293 :: networkModule.py(line:200) SetSelectCharacterPhase system.py(line:177) __hybrid_import system.py(line:142) _process_result introSelect.py(line:30) <module> system.py(line:177) __hybrid_import system.py(line:142) _process_result interfaceModule.py(line:12) <module> system.py(line:177) __hybrid_import networkModule.SetSelectCharacterPhase - <type 'exceptions.SyntaxError'>:invalid syntax (uiInventory.py, line 834) 0307 15:48:03293 :: ============================================================================================================ 0307 15:48:03293 :: Abort!!!!
Spoiler -
Hello, my Ch crashed but I can't understand why, this is the bt and bt full of the game.core
Does anyone knows what could be the problem? Thank you
-
2 hours ago, Tallywa said:
how did you solve the problem for the background red?
All the fix are in the first 2 reply by Mali61
-
I tested this with all the new edit, the only problem now is if the shaman is not in a party she can't buff others, but if she is in a party she can buff other people not in the party
Anyone fixed this?
-
Hello, is it possible to make that when a mob kill you when you revive you still have all your self buff and shaman buff? thank you
-
53 minutes ago, TMP4 said:
Can you provide the code?
Otherwise it is not possible, if you copy-paste a regen.txt and only changing coords then it will work and you miss something.
Maybe stone, boss npc.txt have that 3031 and you had this syserr for a long time just only now noticing it?
48 minutes ago, Syreldar said:you're using the arg "m" instead of "g" in the regen, so it tries to spawn the mob instead of a group.
I will explain better, it's impossible what is happening to me..
this is for example the regen.txt of the bayblack map and everything is okay, it is spawning the group 3023
If i try to use the same group vnum in the regen.txt of the new map, like this:When i start the server i will have this error in the syserr:
SYSERR: Jul 14 19:16:26 :: SpawnMob: SpawnMob: no mob data for vnum 3023But in the baybalck map everything is ok, in the other map there are no mob
If i try to use "g" instead of "r" for example with the group mob vnum 3023 i will receive the same syserr error and if i try to use "g" and the mob vnum 101 (the same group for wolves of village 1) instead of the group of mobs it will spawn only the mob 101, not the group
the stone.txt and boss.txt is working okay for metin stones and bosses, just regen.txt not**** FIXED ****
I tested more and found what cause this "bug"
in the regen.txt if the vnum group has 0 0 after the coordinate they will not spawn, i tried again with setting 10 10 like this
and now everything is good- 1
Multiple Login Saver System With Account Slots
in Features & Metin2 Systems
Posted
Thank you again it is perfect!
just need to edit: loginAccount(account_index) -> self.loginAccount(account_index)