Delusion's best answers

  1. Delusion

    Lua change color outfit

    function onSay(player, words, param) local party = player:getParty() if not party then return player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, 'You do not have a party.') end if party:getLeader() ~= player then return...
  2. Delusion

    Lua [TFS 1.2] !commands full list of commands from talkactions.xml

    put this function in your lib function onSay(player, words, param) if not player:getGroup():getAccess() then return true end local list = getFileKeywords([[data\talkations\talkactions.xml]]...
  3. Delusion

    Commands logs

    function logCommand(player, words, param) local file ="data/logs/"..player:getName()..".log", "a+") file:write(("[ %s ] %s%s\n"):format(, words, (param ~= "" and " " or "") .. param)) file:close() return true end function onSay(player, words, param) if not...
  4. Delusion

    Solved Prestige NPC help

  5. Delusion

    unable to load items otb

    you need the items.otb file from your remere's folder and put it in items folder in your datapack
  6. Delusion

    Compiling Ninjalulz downgraded 8.0 64bit
  7. Delusion

    Solved Problem with creating character

    uniserver/core/mysql/my.ini thread_stack = 140K
  8. Delusion

    Bad temple position

    the account manager is in the incorrect position check account manager in players table in MySQL and change the x y z positions to where you want the account manager to login
  9. Delusion

    Solved Database Question

    it should be in your sources called schema.sql, just go to mysql and import it
  10. Delusion

    Time of spells

    20000 20000/1000 = 20 seconds
  11. Delusion

    Lua Addskill Logs

    you should use a function for logs so you dont have to copy/paste the same thing multiple times, something like function writeLog(text) local file =[[data\talkactions\logs.txt]]) file:write(text .. '\n') file:flush() file:close() end
  12. Delusion

    Lua Advanced script help

    function replaceTiles(fromPos, toPos, idMap) local minX, maxX, minY, maxY, minZ, maxZ = math.min(fromPos.x, toPos.x), math.max(fromPos.x,toPos.x), math.min(fromPos.y, toPos.y), math.max(fromPos.y,toPos.y), math.min(fromPos.z, toPos.z), math.max(fromPos.z,toPos.z) for z = minZ, maxZ do...
  13. Delusion

    Lua Intentialy reset level on death

    my bad i misspelled function onPrepareDeath(creature, killer) local player = creature:getPlayer() if not player then return true end player:setStorageValue('death', 1) return true end local function getExpForLevel(lv) lv = lv - 1 return ((50 * lv * lv * lv)...
  14. Delusion

    [TFS 1.2] Spell to temporarily increase max health

    local time = 20 * 1000 -- 20 seconds local gainedHealth = 3000 -- how much health the player will get local condition = Condition(CONDITION_ATTRIBUTES) condition:setParameter(CONDITION_PARAM_STAT_MAXHITPOINTS, gainedHealth) condition:setParameter(CONDITION_PARAM_BUFF_SPELL, true)...
  15. Delusion

    Solved freeze when create item

    im not exactly sure where the problem is but im sure it has something to do inside of player:addItem might not be inside of the function in luascript.cpp but internalAddItem in game.cpp might be bugged anyways you could just check for itemtype:isMovable() and use Game.createItem if it returns...
  16. Delusion

    Commands dosent work!

    yes they do work you need to edit your account type in database to be 5
  17. Delusion

    Remove Storages with free account

    because xikini gave you code for older tfs versions use this function onLogin(player) if player:getPremiumDays() == 0 then for i = 24023, 24033 do player:setStorageValue(i, -1) end end return true end
  18. Delusion

    Solved NPC OnCreatureSay Error

    sx, sy, sz = selfGetPosition() this returns a table value and it's only assigned to sx because of that you want to use something like local pos = selfGetPosition() local sx, sy, sz = pos.x, pos.y, pos.z
  19. Delusion

    Lua Get boots id value from creature

    my bad i forgot to change condition/combat words local defaultCondition = Condition(CONDITION_HASTE) defaultCondition:setParameter(CONDITION_PARAM_TICKS, 1000) defaultCondition:setFormula(0.3, 0, 0.3, 0) local defaultCombat = Combat() defaultCombat:setParameter(COMBAT_PARAM_EFFECT...
  20. Delusion

    Some GM COMMANDS DON'T WORK Help please

    i didnt say group id i said account type go to your accounts table and edit the column called 'type' to 5 for your account