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

    Add Player 3% Mana per sec needed

    I meant, the overhead that comes with addEvent such as the function call itself, locking/unlocking before moving the task to the dispatcher thread, checking whether the event has stopped or not, etc. Ah, right.
  2. ahmed30

    Add Player 3% Mana per sec needed

    I can't confirm without tests but I believe a loop would be better approach here as the overhead of addEvent could be greater than calling doPlayerAddMana directly. 500 events of doPlayerAddMana would still be unnoticeable. But, if we assumed they are 500 events of a bigger function I'd say...
  3. ahmed30

    parseAreaMap - extract positions from "map" table

    Awesome release @Colandus as always, but the code is kinda sophisticated, it could be much more cleaner by finding the centerPos before generating the positions. For example: do local function findCenterPos(t, centerValue) for iy, yt in ipairs(t) do for ix, v in...
  4. ahmed30

    Solved Simple lua error

    doSummonMonster(cid,"Healing Totem") local totem -- nil for _, m in ipairs(getCreatureSummons(cid)) do if (getCreatureName(m) == "Healing Totem") then totem = m break end end local hp = getPlayerLevel(cid)*10+150 doSendMagicEffect(getCreaturePosition(totem),CONST_ME_CARNIPHILA)...
  5. ahmed30

    Solved teleport potion

    local function teleportPlayer(cid, n, pos, topos, effect, msgonend, effectonend) if not isCreature(cid) then return end if n == 0 then doSendMagicEffect(pos, CONST_ME_POFF) doTeleportThing(cid, topos, true) doSendMagicEffect(topos, CONST_ME_TELEPORT) doCreatureSetNoMove(cid, false)...
  6. ahmed30

    edit prestige sys

    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local t = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid)...
  7. ahmed30

    dosendanimatedtext deprecated function on which script??

    first of all we shouldn't look on the arguments since we are not going to use them :p function doSendAnimatedText(...) print('[Error] doSendAnimatedText is now a deprecated function \n'.. debug.getinfo(2).source) end
  8. ahmed30

    Solved Creat teleport with action/unique id?

    function doCreateTeleport returns uid doItemSetAttribute(doCreateTeleport(itemid, toPosition, fromPosition), "aid", 1234)
  9. ahmed30

    dosendanimatedtext deprecated function on which script??

    debug your script by adding this to where your animatedText function is located print(debug.getinfo(2).source)
  10. ahmed30

    Database query result question.

    I don't know what are you trying to do but this might help you :p DBQuery query; query << "SELECT `id` FROM `players` WHERE `group_id` < 4 AND `deleted` = 0 ORDER BY `experience` DESC LIMIT 5"; DBResult* result; if(!(result = db->storeQuery(query.str()))) return false; int...
  11. ahmed30

    Solved getTopCreature Issue

    local function getPlayers(from, to) local t = {} for x = from.x, to.x do for y = from.y, to.y do local pos = {x = x, y = y, z = from.z} local creatures = getTileInfo(pos).creatures if creatures ~= 0 then pos.stackpos = 1 local c = getThingfromPos(pos) while c.uid ~= 0 do...
  12. ahmed30

    DDoS

    iptables have NO control on the network before it arrives on your computer, you would in this case need a ISP level block (most of ISP doesn't support this since people aren't paying for the bandwidth). Enable some logging to figure out what he does, also enable ip connection limits this will...
  13. ahmed30

    Action Promotion using action :)

    replace doCreatureSay(cid, "Promoted !", TALKTYPE_ORANGE_1) with doPlayerSendTextMessage(cid, 19, "Promoted !")
  14. ahmed30

    Action Promotion using action :)

    local promotion = 1 local itemId = 2159 -- here item id local count = 100 -- how many items needed local level = 200 -- level needed to use this item function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerPromotionLevel(cid) < promotion then if getPlayerLevel(cid) >= level...
  15. ahmed30

    Lua Rune make PZ Locked

    local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1492) local area =...
  16. ahmed30

    Solved!

    count = 0 -- global variable to count players local amount = 2 -- the required amount of players to step in the tiles local walls = -- walls positions { {x=123, y=123, z=7, stackpos=1}, {x=123, y=123, z=7, stackpos=1}, {x=123, y=123, z=7, stackpos=1}, } local id = 1234 -- wall id...
  17. ahmed30

    Help Me If You got a heart

    i thought you would be asking for blood donations.
  18. ahmed30

    Sirion_Mido Free Scripting Service (Actions/Movements/Talkactions/Creaturescripts)

    7i7a local str = 123 -- vip storage function onSay(cid, word, param) local t = {} for _, cid in ipairs(getPlayersOnline()) do if getCreatureStorage(cid, str) > 0 then table.insert(t, cid) end end table.sort(t, function(k, v) return getCreatureStorage(k, str) >...
  19. ahmed30

    Solved Small easy question

    exactly.
Back
Top