• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Search results

  1. Flatlander

    Alpha-Test Part 2 - Multiverse - Released **New Client**

    Haha, Still a work in progress. Right now I am working on the NPCs. Designing a new and complex NPC system from the ground up is almost complete and is going to allow for a lot of interesting and fun gameplay.
  2. Flatlander

    Optimizing TFS Pathfinding

    Mark made a good point on my pull request: If we calculate the "distance Cost" when we create the node, it would avoid calculating the distance cost for each node each time getBestNode() is run. I'll work on this when I get home from work today. After this I have no idea how I could optimize it...
  3. Flatlander

    Optimizing TFS Pathfinding

    So it sounds like I was right. When you load an Array, and loop through it, it is faster than altering which array you are dealing with each call. But I still can't think of how I can apply this type of optimization to getBestNode or nodes.
  4. Flatlander

    Optimizing TFS Pathfinding

    First, I want to thank you for trying to help and teach me something I am completely ignorant on. I have no idea how to optimize code by using different methods, or how to use hardware (like processor cache) to my advantage. Things like this are basically impossible to "find" online. If you...
  5. Flatlander

    Optimizing TFS Pathfinding

    Below is testing on the Newest TFS Version. It is on a fast computer, therefor we needed to find the path a thousand times to get even milliseconds to show up. This is using the "Use" function to go to a tile, so this is running a lower number of max-nodes (I think 100 is the default for onUse...
  6. Flatlander

    Optimizing TFS Pathfinding

    Interesting, I guess you are going to make me do a testing video huh? Also can you let me know how you tested it? Also what path(s) did you run?
  7. Flatlander

    [Tutorial] Adding more tiles to game window - Updated 7/6/2018

    Also post what your otclient is showing for your: void Map::resetAwareRange() { AwareRange range; range.left = 14; range.top = 12; range.bottom = 13; range.right = 15; setAwareRange(range); } I do not see that you have the following function in Protocolgame.cpp bool...
  8. Flatlander

    [Tutorial] Adding more tiles to game window - Updated 7/6/2018

    Start over, follow my tutorial again using viewport and the below for OTC: void Map::resetAwareRange() { AwareRange range; range.left = 14; range.top = 12; range.bottom = 13; range.right = 15; setAwareRange(range); } Should be: { AwareRange range; range.left =...
  9. Flatlander

    [Tutorial] Adding more tiles to game window - Updated 7/6/2018

    I see you are typing in the values individually, rather than using: static const int32_t maxViewportX = 10; //min value: maxClientViewportX + 1 static const int32_t maxViewportY = 10; //min value: maxClientViewportY + 1 static const int32_t maxClientViewportX = 10...
  10. Flatlander

    [Tutorial] Adding more tiles to game window - Updated 7/6/2018

    I have never used OTX. How similar is it to TFS 1.X? Does it still have a protocolgame.cpp? If yes can you post it here so I can take a look at it?
  11. Flatlander

    For some reason attack speed didn't change

    Should stay 8.6 if you use this ninjalulz repo.
  12. Flatlander

    For some reason attack speed didn't change

    I just checked the Source Code from that and it doesn't match what you gave me for your doAttacking function in Player.cpp. [8.60] The Forgotten Server 1.2 ninjalulz/forgottenserver ninjalulz/forgottenserver if you are going to compile, I would download the newest sources from this distro and...
  13. Flatlander

    For some reason attack speed didn't change

    I have been working on OT Servers for like.... 10+ years? I'm not an official contributor to the TFS Project, but I know my way around the code pretty well, the reason we weren't able to accurately test my solutions to his problem was because he was not compiling correctly. (I'm not amazing at...
  14. Flatlander

    For some reason attack speed didn't change

    In the onAttacking function, it schedules another "creatureCheck" in the scheduler. This is exactly like doing an addEvent. So there are 3 ways onAttacking can be called. Every time your creature thinks (onThink) Every time you, or a nearby creature moves. (onWalk) Scheduled event - repeats...
  15. Flatlander

    For some reason attack speed didn't change

    You cannot use Notepad++ to compile. After saving your changes in Notepad++, you have to "Compile" the server using Visual Studio or another compiler. This will create a brand new TFS.exe file, which will be what you use when running your server.
  16. Flatlander

    For some reason attack speed didn't change

    Weapons.xml "can" have things to do with how attackspeed works. Don't be so fast to be rude to people, he was trying to help. As for your issue, I am at a loss, honestly it should be working even with the earlier code and maybe even your original code. The scheduler either does 50 ms or your...
  17. Flatlander

    For some reason attack speed didn't change

    You do not need to create a new vocation. I think I was reading the function wrong (I thought TFS 1.x has this working right but maybe not) Try this: void Player::doAttacking(uint32_t) { if (lastAttack == 0) { lastAttack = OTSYS_TIME() - getAttackSpeed() - 1; } if...
  18. Flatlander

    For some reason attack speed didn't change

    Try this one more time, if it doesn't work let me know. (I changed one thing) void Player::doAttacking(uint32_t) { if (lastAttack == 0) { lastAttack = OTSYS_TIME() - getAttackSpeed() - 1; } if (hasCondition(CONDITION_PACIFIED)) { return; } if...
  19. Flatlander

    For some reason attack speed didn't change

    Try using this edited version of doAttacking. (It is the newest TFS 1.X version with extra functionality removed) void Player::doAttacking(uint32_t) { if (lastAttack == 0) { lastAttack = OTSYS_TIME() - getAttackSpeed() - 1; } if (hasCondition(CONDITION_PACIFIED)) {...
  20. Flatlander

    For some reason attack speed didn't change

    Awesome! Thank you for posting this code, I will now explain what is happening. In short, I believe you only need to make sure the below scheduler is working correctly. g_scheduler.addEvent(createSchedulerTask(std::max<uint32_t>(SCHEDULER_MINTICKS, getAttackSpeed())...
Back
Top