• 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. Roddet

    PHP Some PHP Expert to Help me of This command...

    SELECT `g`.`id`, `g`.`name`, COUNT(`p`.`id`) AS `members` FROM `players` p, `guilds` g, `guild_membership` gm WHERE `p`.`id` = `gm`.`player_id` AND `g`.`id` = `gm`.`guild_id` GROUP BY `g`.`id` ORDER BY `members` DESC LIMIT 5;
  2. Roddet

    TFS 1.4.2 onMoveItem does not react?

    Just apply the fixes I mentioned or update your eventcallback.lua as Evil Hero suggested and all should be ok. Assuming that you only have that callback and the default callback, could be possible that the callback with negative index is being executed after the default callback <index: 0> due...
  3. Roddet

    PHP Some PHP Expert to Help me of This command...

    Use this query instead SELECT `g`.`id`, `g`.`name`, SUM(`p`.`level`) AS `level` FROM `players` p, `guilds` g, `guild_membership` gm WHERE `p`.`id` = `gm`.`player_id` AND `g`.`id` = `gm`.`guild_id` GROUP BY `g`.`id` ORDER BY `level` DESC LIMIT 5;
  4. Roddet

    TFS 1.4.2 onMoveItem does not react?

    Both systems are pretty much the same, they use the same base (at least nekiro's). I would definitely choose 1.5 version over 1.4.2, yep!
  5. Roddet

    TFS 1.4.2 onMoveItem does not react?

    I just found something we could attribute the weird behavior on the system https://github.com/nekiro/TFS-1.5-Downgrades/blob/8.60/data/scripts/lib/event_callbacks.lua#L129 The system uses pairs as the iterator to iterate through an array, it should be ipairs to fully guaranteed the order of...
  6. Roddet

    TFS 1.4.2 onMoveItem does not react?

    Not true at all. Callbacks are pushed into an array as objects, not as a key <register index>. https://github.com/nekiro/TFS-1.5-Downgrades/blob/8.60/data/scripts/lib/event_callbacks.lua#L99-L102 Same behaviour on TFS 1.4.2
  7. Roddet

    TFS 1.4.2 onMoveItem does not react?

    There is no need to fix anything, except for the onMoveItem callback (due return values being numbers instead of booleans) There is also no "weird behaviour" regarding to negative numbers when registering an event, you just need to understand how the order works. When Marko999x registered a...
  8. Roddet

    PHP Some PHP Expert to Help me of This command...

    $query = $SQL->query('SELECT `g`.`id`, `g`.`name`, SUM(`p`.`level`) AS `level` FROM `players` p, `guilds` g, `guild_ranks` gr WHERE `p`.`rank_id` != 0 AND `p`.`rank_id` = `gr`.`id` AND `g`.`id` = `gr`.`guild_id` GROUP BY `g`.`id` ORDER BY `level` DESC LIMIT 5; '); foreach($query as...
  9. Roddet

    TFS 1.4.2 onMoveItem does not react?

    It definitely is but it's the same addition https://github.com/otland/forgottenserver/blob/v1.4.2/data/scripts/lib/event_callbacks.lua#L128
  10. Roddet

    TFS 1.4.2 onMoveItem does not react?

    It's more like a fact xD Here is the fix though (didn't look at the code until now) https://github.com/nekiro/TFS-1.5-Downgrades/blob/8.60/data/scripts/lib/event_callbacks.lua#L142 Just adding EVENT_CALLBACK_ONMOVEITEM should fix the issue, the same applies for TFS 1.4.2
  11. Roddet

    TFS 1.4.2 onMoveItem does not react?

    The last callback registered holds the return value. That means if you have 10 callbacks, on 9 of these callbacks the return value wouldn't matter except for the the last one (callback id: 10), obviously the order matters.
  12. Roddet

    TFS 1.X+ Errors when compiling TFS v1.4x (v1.4, v1.4.1, v1.4.2)

    Yes, the issue is related to fmt library (since v10~) You can see here that indeed the issue is related to the enums (implicit conversion), iomarket.cpp in this case Error C2079 '_' uses undefined struct 'fmt::v10::detail::type_is_unformattable_for<T,char>' with [...
  13. Roddet

    TFS 1.X+ Errors when compiling TFS v1.4x (v1.4, v1.4.1, v1.4.2)

    Just apply the iomapserialize.cpp, iomarket.cpp and tools.h changes https://github.com/otland/forgottenserver/commit/61452aa5dc2c8d3ff345e627295eef06d8aafa8a Alternatively, you can cast the enums to int static_cast<int> instead of tfs::to_underlying and ignore the changes on tools.h
  14. Roddet

    RevScripts if vocation id 10

    What do you mean by auto-equipping? The Equip feature from hotkeys or common methods as addItem Edit: This should cover everything. if (getVocation()->getId() == 10 && (slotIndex != CONST_SLOT_BACKPACK && slotIndex != CONST_SLOT_AMMO)) { continue; }...
  15. Roddet

    RevScripts if vocation id 10

    You might need to replace the return values for true, false depending on your source code. local ec = EventCallback function ec.onMoveItem(player, item, count, fromPosition, toPosition, fromCylinder, toCylinder) if player:getVocation():getId() ~= 10 then return RETURNVALUE_NOERROR...
  16. Roddet

    C++ Tfs 1.5 Skill lose

    You could divide the deathLossPercent by 2
  17. Roddet

    TFS 1.X+ exit after kill player and lose pk

    Hope it helps everyone with the same problem. diff --git a/src/player.cpp b/src/player.cpp index aa728d2..e4f9a03 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -940,11 +940,7 @@ void Player::sendPing() } int32_t noPongKickTime = vocation->getNoPongKickTime(); - if (pzLocked...
  18. Roddet

    Lua [1.4.2] Talkaction with 2 parms and config.

    A perfect time to use enums. Hopefully it's more clear for you. local ITEMS_CATEGORY = 1 local MOUNTS_CATEGORY = 2 local OUTFITS_CATEGORY = 3 local config = { [ITEMS_CATEGORY] = { [1] = {id = 2134, cost = 50, amount = 1}, [2] = {id = 2135, cost = 75, amount = 1} }...
  19. Roddet

    [USA] [8.60] Marlboro Wars - December 1st 15:00 GMT-6

    A reset level took place today 01.03.24, we encourage new people to try out our server. All frags/deaths/assists/ranks and levels has been wiped - hope to see you there.
  20. Roddet

    Lua Xikini's Free Scripting Service TFS 1.4.2

    That's how it works by default. You need both for critical hits.
Back
Top