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

    Lua How can I get it to NOT remove the item already got MAX slots?

    move this if getSlotCount(nam) < conf.maxSlotCount then above this local number = math.random(0,10)
  2. Xikini

    Gatekeeping

    I don't know what I expected by following this thread and reading this far.. lmao I knew from the get go this was a waste of time.. yet I still had to see it through. Everyone who made it this far, let's crash and burn together. ❤️ Our time certainly has.
  3. Xikini

    Lua Xikini's Free Scripting Service TFS 1.4.2

    As far as I know, this is only possible if you simulate the death via script. I kind of explained it here, but it's too complicated for me.
  4. Xikini

    Lua PLEASE HELP PLAYER SUFFERS DAMAGE FROM PET

    The only way to avoid that, would be to edit it at the spell level, I think, so that it never even attempts to damage the player at all. But your monster is setup with just regular attacks.. so aside from recreating all of those attacks into custom spells, I think you're screwed.
  5. Xikini

    Lua PLEASE HELP PLAYER SUFFERS DAMAGE FROM PET

    data/creaturescripts/scripts/login.lua [somewhere near bottom with other registered events] registerCreatureEvent(cid, "PlayersSummonsCannotDamagePlayer") data/creaturescripts/creaturescripts.xml <event type="statschange" name="PlayersSummonsCannotDamagePlayer" event="script"...
  6. Xikini

    Lua How to access ”item” object across events?

    Player experience. They click item in backpack 5, you expect that is the item that will be consumed. Scripting wise, 2 items with same itemid but with custom attributes applied. 1 is legendary, 1 is common. Common is in backpack 5, but legendary item would be consumed in backpack 1.
  7. Xikini

    Lua How to access ”item” object across events?

    That's just removing a random item instead of the item that was used, tho?
  8. Xikini

    Lua How to access ”item” object across events?

    Not sure what to tell you. xD It seems to work fine and as intended. -- Edit Ah, the script in the thread wasn't updated. changed if not usedItem then to if not usedItem or not Item(usedItem.uid) then
  9. Xikini

    Lua How to access ”item” object across events?

    https://otland.net/threads/xikinis-free-scripting-service-tfs-1-4-2.287753/page-3#post-2743744 In the 4th.or 5th post merge I do what you're trying to do. They use the item, then choose a reward with modal window, and then it removes the item that was used.
  10. Xikini

    Change Text in a Quest item(a book) YurOTS 7.6 engine

    so yeah, you didn't add the local..? local book = doPlayerAddItem(cid,prize,1)
  11. Xikini

    Change Text in a Quest item(a book) YurOTS 7.6 engine

    Show the full script
  12. Xikini

    Change Text in a Quest item(a book) YurOTS 7.6 engine

    https://github.com/divinity76/YurOTS/blob/327e4960de7ee17d988c24ccf11ded350887a5f3/ots/source/actions.cpp#L1610 Found this.. So presumably when you create the item, you could also set it's text? local book = doPlayerAddItem(cid, book_itemid, 1) doSetItemText(book, "text")
  13. Xikini

    Lua Where do I put this code I put it in talkaction but it doesn't work

    onSay is a talkaction. You would put this in data/talkactions/scripts and then register that script in data/talkactions/talkactions.xml
  14. Xikini

    Windows How do you search in luas?

    notepad++ -> ctrl+f
  15. Xikini

    change if\else if to local table

    local sellables = { ["test"] = {itemid = 2446, price = 600000}, ["test2"] = {itemid = 2447, price = 100}, } function onCreatureSay(cid, type, msg) msg = string.lower(msg) if msgcontains(msg, 'hi') and (not isFocused(cid)) and getDistanceToCreature(cid) < 4 then...
  16. Xikini

    TFS 1.X+ How to make the summon still belong to the player after logging out in tfs 1.4?

    Could store the creatureId in storage instead, then check if the summon still exists, and make it your summon again? some pseudocode.. you'd need to use loops to make sure you get all the summons, but yeah -- in logout local summonId = summon:getId() player:setStorageValue(key, summonId) -- in...
  17. Xikini

    TFS 1.X+ How to make the summon still belong to the player after logging out in tfs 1.4?

    That'd be tough. I would probably store the names (and hp?) of the creatures in a couple of storages, and summon new one's when the player logs back in.
  18. Xikini

    Lua Remove item with actionid on my backpack

    For the whiners who want a function that allows for every situation.. instead of just what the OP wanted.. -- potentially very heavy function, if player has many many items on them. -- set deepSearch to false, to only check the top layer of containers. local function...
  19. Xikini

    Lua Remove item with actionid on my backpack

    Feel free to post a cleaner solution.
Back
Top