• 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!

Recent content by imkingran

  1. imkingran

    Why it ignores my max value (spell)

    Add this check: function onCastSpell(creature, var) -- check to make sure creature isn't a summon already if creature:getMaster() then return false end
  2. imkingran

    Why it ignores my max value (spell)

    @SixNine After you summon the monster, you don't assign it as a summon to its master. So when you check how many summons the master has, it will still be 0. Add this line into your current for loop: for i = 1, maxsummons - #summonsPlayer do local mid =...
  3. imkingran

    OTClient Spells actionbar in mehah's OTClient

    I believe you can edit the spells table in modules/gamelib/spells.lua: https://github.com/mehah/otclient/blob/main/modules/gamelib/spells.lua#L17
  4. imkingran

    Scroll that boosts exp for x time

    You probably overwrote the default onGainExperience: https://github.com/otland/forgottenserver/blob/master/data/events/scripts/player.lua#L131
  5. imkingran

    Different daily task for each player

    Honestly as I look at it more carefully now, it was made from the ground up to change once per day for the whole game world. So many of the variables are stored globally in the NPC file and not individually by character storage. There are still more changes needed to make it the way you want it...
  6. imkingran

    Different daily task for each player

    That's because on this line 45, you reset the task if the time is not the same as start time: if tonumber(minhaHora) ~= tonumber(hora) then setPlayerStorageValue(cid, storages.miniQuests.storNpcTaskName3, -1) setPlayerStorageValue(cid, storages.miniQuests.storPokeNameTask3, -1)...
  7. imkingran

    Different daily task for each player

    Here is the part that is changing the monsters. It is only changing monsters once per day, when the previous stored day (hora variable) is no longer equal to os.date("%d"). So everyday (or gameworld restart) there will be only 2 monsters to choose from. If you want it to change for every player...
  8. imkingran

    C++ Otservlist ban, c++ code to count online.

    * I added comments in the code I'll use this one for example, by Gunz post: uint32_t real = 0; std::map<uint32_t, uint32_t> listIP; for (const auto& it : g_game.getPlayers()) { if (it.second->getIP() != 0) { auto ip = listIP.find(it.second->getIP()); if (ip != listIP.end()) {...
  9. imkingran

    C++ Otservlist ban, c++ code to count online.

    Yes it's added up to 5. If ips[ip] is still less than 5 when it reaches that point in the loop (aka it's 4), it will add to the table (now it's 5). The next time it comes around it's no longer less than 5, because it is 5.
  10. imkingran

    Old school Exhausted system

    Instead of: if cid:getExhaustion(1000) <= 0 then change to: if not cid:hasExhaustion(1000) then
  11. imkingran

    Old school Exhausted system

    Instead of os.time() you can use os.mtime(), with mtime you will put in milliseconds: 1000 = 1 second 1500 = 1.5 seconds
  12. imkingran

    How to remove spell from the server?

    Okay I see, I believe when you type adori blank, it's reading it as "adori" and that's why it's saying "You need a magic item to cast this spell" If it was reading it as "adori blank" it wouldn't return that message because adori blank doesn't require a magical item, it creates the magical item...
  13. imkingran

    How to remove spell from the server?

    Is there a github repository for this distribution that you are using? Or do you have a link to where you got it from?
Back
Top