Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/10/19 in all areas

  1. CLICK FOR VIDEO Server\src\game\src\DragonSoul.h Server\src\game\src\DragonSoul.cpp How-To-How-To-How-To-Use-Ex: [Hidden Content]
    8 points
  2. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) Petit exemple. Juste une partie c ++:
    3 points
  3. That's what he requested in private, if someone need it, those are not my calculations/code. void CItemAddonManager::ApplyAddonTo(int iAddonType, LPITEM pItem) { if (!pItem) { sys_err("ITEM pointer null"); return; } bool bCustomizedAddon = false; switch (pItem->GetVnum()) { case 1129: case 2129: case 3129: case 5129: bCustomizedAddon = true; break; } int iSkillBonus = MINMAX(-30, static_cast<int>(gauss_random(0, 5) + 0.5f), 30); int iNormalHitBonus = 0; if (bCustomizedAddon) { if (abs(iSkillBonus) <= 0) iNormalHitBonus = (-1 * iSkillBonus) / 2 + abs(number(-2, 2) + number(-2, 2)) + number(1, 2); else iNormalHitBonus = (-1 * iSkillBonus) / 2 + abs(number(-3, 6)); if (abs(iSkillBonus) <= 0) iSkillBonus = (1 * iSkillBonus) / 2 + abs(number(-1, 1) + number(-1, 1)) + number(1, 2); else iSkillBonus = (1 * iSkillBonus) / 2 + abs(number(-3, 1)); } else { if (abs(iSkillBonus) <= 20) iNormalHitBonus = -2 * iSkillBonus + abs(number(-8, 8) + number(-8, 8)) + number(1, 4); else iNormalHitBonus = -2 * iSkillBonus + number(1, 5); } pItem->RemoveAttributeType(APPLY_SKILL_DAMAGE_BONUS); pItem->RemoveAttributeType(APPLY_NORMAL_HIT_DAMAGE_BONUS); pItem->AddAttribute(APPLY_NORMAL_HIT_DAMAGE_BONUS, iNormalHitBonus); pItem->AddAttribute(APPLY_SKILL_DAMAGE_BONUS, iSkillBonus); }
    3 points
  4. In arabic we say يدك على زبي إذا لقيت حل يازامل ياولد القحبه which means hope you find a solution sooner than later. Try searching ChangeAttribute in all src files and compare it with another src that doesn't have the problem .
    2 points
  5. He means, on official server if you active a page with full mitic alchemy you will get a bonus from it, like the photo (screenshot from official).
    2 points
  6. I posted the code some months ago and i thought is fine to be here too, not just in category of q&a.
    1 point
  7. Cool idea Only the mute and the collective sending method are missing. For example: send a message to a person instead of everyone. Also mute that person who spamming all the time or something like that.
    1 point
  8. Very usefull to curse kids ingame.
    1 point
  9. V1 You can use unlimited arguments on functions, now is using the apply method which returns the result of a function or class object called with supplied arguments, with the old structure you could use just one argument. You can lock/unlock an event for being processed, it's like a prevent in some actions, if the event is created and you want to do something, you should lock the event, do some actions then you can unlock it again and the process function will run where remained. Delete an event instantly and force it to stop the process. Adding return t.EXIT inside of the running function, will delete the event too. Functions to check if an event exists or is locked or not. Check if the function is a method type. Delete the events with a properly method. Using app.GetGlobalTimeStamp() now will give you the chance to run the event after teleport where timer remained instantly. V2 Fixed non-returning time for processing, if the specific event function has no value from returning, it runs continuously. Fixed the check if an event exist, now will be replaced with the new one. Removed types library (i heard that some people don't have it) and using builtin functions, instead of types.MethodType now we're using callable(object), which check if the event function can be called, now you can insert classes and others callable methods, not just simple functions. Added a reset time event function. Next update: (when i'll have some free time again) Insert a new type of event, which you can run an event by specific counter like: t.AppendEvent(eventName='RUN', eventStartTime=5, eventRunCount=10, eventFunc=self.Run, eventFuncArgs=player.GetLevel()) The following things will happen: The function Run(args), will start to run in 5 seconds for 10 times. PS: Check my first reply for code.
    1 point
  10. Add me discord HellBlazer#0833
    1 point
  11. V19.5.9 New pet, mount, costumes. Locales&protos: Download Metin2 Download
    1 point
  12. Instead of repeating yourself in every reply that the code is bullshit, how about showing us your coding skills and let us criticize it too? I'm sure that i'll have a lot of fun, and not only me. ? Btw, is funny how you're talking about shit code and say to people 'learn how to code', when you do this:
    1 point
  13. Thanks for release, the idea isn't bad, but there're some bad things. I'll show you the problems part and how can be improved, there're just advices, i hope you'll get them. def __del__(self): if len(self.eventList) > 0: self.eventList.clear() If you're using Python 2+ or Python 3.2 and below, you can't use the clear() method (allowed on 3.3+), also as i said in the second message you don't need to check the length of the list, already the clear() method doing that inside and there's no reason to put it to __del__ method, it will be called when the object is garbage collected. if you really want to use in future, something outside of this and want just to check the list if isn't empty, is enough to do it just with if some_list, like a normal boolean, there no need to check the length of the list if you don't use it in your code. if len(self.eventList) > 0: for j in xrange(len(self.eventList)): [...] You don't have to check the list if you already did a numeric range loop or iterator based loop. app.GetTime() + time I would say to use app.GetGlobalTimeStamp() instead of app.GetTime(), if you teleport while the event is running, the event function will run after 10 seconds like. While app.GetGlobalTimeStamp() will run after the specific time, because is the server timestamp and is updated on each enter in game. if i == 0: self.eventList[j].clear() I would put here an big exclamation, with this you creating 999999999 lines in syserr, what you do here is like: While Process() function is called in OnUpdate, so, your condition trying to get the returned value from an specific function, what means the next update time or 0 to destroy the event/clear it. Everything's fine until you return 0 and event should be stopped yes? But there is a problem, you clear the specific dictionary of event and still remained in the list [{}], and the Process() function will take your self.eventList with the items included, the empty dictionaries from your events, and of course even if you've [{}, {}, {}], that doesn't mean your list is empty, have 3 items, so, the loop will trying to read an empty dictionary and you'll get key errors in each milisecond. The method which you need is to delete the dictionary itself from the list after the result value from the function is 0, like this: _______________________________________ I wrote fast some self extensions, if somebody is interested i'll do another updates in the next days. You can use unlimited arguments on functions, now is using the apply method which returns the result of a function or class object called with supplied arguments, with the old structure you could use just one argument. You can lock/unlock an event for being processed, it's like a prevent in some actions, if the event is created and you want to do something, you should lock the event, do some actions then you can unlock it again and the process function will run where remained. Delete an event instantly and force it to stop the process. Adding return t.EXIT inside of the running function, will delete the event too. Functions to check if an event exists or is locked or not. Check if the function is a method type. Delete the events with a properly method. Using app.GetGlobalTimeStamp() now will give you the chance to run the event after teleport where timer remained instantly. _______________________________________ The code: [Hidden Content] PS: Don't quote this reply, will be updated.
    1 point
  14. Holly kebab! This code looks like chernobyl.
    1 point
  15. I don't use twitter... but i am pretty sure twitter is Free.
    1 point
  16. work like charm thanks again!
    1 point
  17. @VegaS™ sometimes i cannot understand why u spend so much time to write the comments that nobody reads ?
    0 points
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.