• 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 Xikini's Free Scripting Service TFS 1.4.2

    The onHealthChange is only registered to players (via onLogin), so creature in this instance can only ever be the player. xP
  2. Xikini

    Lua GlobalStorage dont save

    You actually have to use the function for it to work. lol anywhere you are using Game.getStorageValue or Game.setStorageValue you'd have to replace with getGlobalStorageValue or setGlobalStorageValue
  3. Xikini

    Lua Xikini's Free Scripting Service TFS 1.4.2

    Good point. Should do onManaChange as well, since there is magical attacks, and mana shield. lol Technically yes.. But what monsters are casting healing onto players?
  4. Xikini

    Lua Xikini's Free Scripting Service TFS 1.4.2

    Put it into data/scripts local critical_monsters = { ["dragon"] = {multiplier = 2.0, chance = 50}, -- 2x dmg, 5% chance ["make sure the monster names are lowercase"] = {multiplier = 2.0, chance = 5} } local healthChange = CreatureEvent("onHealthChange_Critical_Monsters") function...
  5. Xikini

    Lua Xikini's Free Scripting Service TFS 1.4.2

    Can you be more specific?
  6. Xikini

    Lua Shovel

    at top of script, add shovel_whitelist = {1111, 2222, 3333} -- itemIds that will be ignored, and shovel can pass through above local ground = tile:getGround() add local topVisible = tile:getTopVisibleThing(player) if not topVisible:isItem() then return false end if not...
  7. Xikini

    Lua Shovel

    above local ground = tile:getGround() add if tile:getCreatureCount() > 0 then return false end if tile:getItemCount() > 0 then return false end
  8. Xikini

    talkaction mana train tfs 0.4

    You can find most functions in luascript.cpp I've only used the functions, don't really know how they are made in source. Try searching for partial, like MaxMana it might be like getPlayerMaxMana in older distro's. doCreatureCastSpell will probably be hard to find, as it wasn't included in...
  9. Xikini

    Lua Get list of item by item id, then get item uid of items in list

    Untested.. but try this. It will attempt to find the first item on the player that matches the itemId you chose. I'm uncertain if you need to return item or item.uid, so play around with it a bit? local blank = findItemOnPlayer(cid, itemId) if blank == 0 then -- unable to find a blank...
  10. 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)
  11. 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.
  12. 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.
  13. 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.
  14. 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"...
  15. 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.
  16. Xikini

    Lua How to access ”item” object across events?

    That's just removing a random item instead of the item that was used, tho?
  17. 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
  18. 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.
  19. 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)
Back
Top