Xikini's best answers

  • Xikini

    Lua Block action item in Protection Zone

    function onUse(cid, item, fromPosition, itemEx, toPosition) if getTileInfo(getThingPos(cid)).protection or getTileInfo(getThingPos(itemEx.uid)).protection then doPlayerSendCancel(cid, "You can't use this item in Protection Zone.") return true end if item.itemid ==...
  • Xikini

    Lua [0.4] Deconstruct kit.

    aid shouldn't be required. Just deconstruct the items back into the normal construction kits.
  • Xikini

    Lua function onPrepareDeath error

    When a player reaches the 'PrepareDeath' stage, the character is already dead. If you return false, it will keep the character in-game, but the character won't be alive. If you are wanting to 'revive' the player without killing them, use 'onStatsChange' and check the damage being applied to the...
  • Xikini

    Bosses room

    Untested, but should work as expected. -- <movevent type="StepIn" actionid="111111111111111111111111" event="script" value="boss_room_xikini.lua"/> -- actionid needs to be placed onto the "Tile to enter boss room". local config = { -- this controls where the script will check for players...
  • Xikini

    TFS 0.X Action script is passing through walls

    isSightClear(fromPos, toPos, floorCheck)
  • Xikini

    Summoning monster on level

    you've added extra parameters to doSummonCreature doSummonCreature(name, pos) -------- Change this local clone = doSummonCreature(cid, cloneName, pos) to this local clone = doSummonCreature(cloneName, pos)
  • Xikini

    Npc Death

    Yes, it's possible. if msgcontains(msg, "kill") and talkState[talkUser] == 0 then selfSay("Please tell me the name of the person you want to kill.", cid) talkState[talkUser] = 1 elseif talkState[talkUser] == 1 then for _, pid in ipairs(getPlayersOnline()) do if msg:lower()...
  • Xikini

    Lua Getting values from LUA Tables.

    Worked via teamviewer with elnelson to find a good solution to his overall problem. To the original question he posed in this thread self.type.items[1][1] -- itemid self.type.items[1][2] -- count This was the answer.
  • Xikini

    Lua [0.4] Stackpos item.

    change all doTransformItem(getThingfromPos(toPosition).uid to doTransformItem(itemEx.uid
  • Xikini

    Lua stopEvent on logout.

    Stop event is only useful if you are using it for something that doesn't require a creatureID. Such as removing and re-adding a wall after x amount of seconds, where the trigger for this wall addition / removal can be triggered from two separate locations. In order to stop an event, the event...
  • Xikini

    TFS 0.X Tfs 0.4 "You have to wait a while" on talkactions?

    To be clear, you don't need the modification by source you want the modification by source. Opening up the 20 or so files in your talkactions and pasting in 6 lines of script to add the exhaust is really easy, and should take you less then 10 minutes total. put in /lib/000-constant...
  • Xikini

    TFS 1.X+ Nologout tile

    With a source edit, you probably could. But if the server shuts down or restarts, you're going to run into the same issue again.
  • Xikini

    Lua Quest Lever 7.6

    ok. I removed the 'true' portion, which I added. I guess your server doesn't have that functionality. Added in the level requirement as well. local reqLevel = 666 function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 5009) == 1 then...
  • Xikini

    TFS 0.X Tfs 0.4 Doubt with use "str"

    With 0.4 / 0.3.6 / 0.3.7 -> I swear there isn't a default broadcast function scripted into sources. It's really hit or miss. So I just made it 'broadcast' to all online players individually. put this in the monster somewhere (I do it right under defenses) <script> <event name="aaaaaaaaaa"/>...
  • Xikini

    Solved stopEvent TFS 0.4 is not working.

    I edited the above code very slightly. Was a small mistake. Please recopy. ----- local function countDown(number, pos, effect, msgonend, effectonend) local count = 0 -- We are setting this to zero, because at this point in the script, we aren't sure if there are any players in the area...
  • Xikini

    Need some help with a "attempt to index nil value"

    I believe storage values are '-1' by default, not nil. try changing if player:getStorageValue(STORAGE_SKILL_LEVEL) == nil then if player:getStorageValue(STORAGE_SKILL_LEVEL) < 0 then whenever you want to confirm if a storage value is not currently in use.
  • Xikini

    TFS 1.X+ globalevents boss

    I'm not sure what could be the problem, since there is not really an error to go on.. I don't see why this would cause an issue, but change line 22 to 'return true' instead of 'return false'. If that doesn't change anything, green text everythingexcept the main function and put 'print("Testing...
  • Xikini

    TFS 1.X+ Choose NPC direction

    Solved - Change direction of the monster. This would work for npc's as well. Cheers. :oops:
  • Xikini

    Check player rune for 7.6

    Check your pms, when you get a chance.
  • Xikini

    TFS 0.X tfs 0.4 help with lua

    Edit Just realised it should be or not and in this spot. lol We want to check if either of them are false, not if both are false. You are ending the script prematurely and it won't loop. Need to remove the second last return true. You can add another value and check your script against that...
Top