
Send me a PM and post your data/events/scripts/creature.lua (before you modified with this system)It is possible that it asks for an object to be able to do the event, I am testing it seems to work wellView attachment 68181
I think it is not compatible with the canary version
I have only been able to observe 2 failures you can change color test character no gm and when you die you lose level
to die do not return to the event but thais
How do i instantly close event after end? Instead of closing it with the gm?Send me a PM and post your data/events/scripts/creature.lua (before you modified with this system)
Lua Script Error: [Scripts Interface]
/home/otserv/data/scripts/ctf.lua:callback
/home/otserv/data/scripts/ctf.lua:257: attempt to index global 'posMax' (a nil v alue)
stack traceback:
[C]: in function '__index'
/home/otserv/data/scripts/ctf.lua:257: in function </home/otserv/data/sc ripts/ctf.lua:240>
Hello, I hope you are well and I hope you continue to support this system, I tried to install it but I don't know if I did something wrong or what could be happening, I leave you the error, thanks in advance if you manage to help me, I use TFS 1.3This is a remake of my previous version. This CTF system uses outfits to show which team the players are on.
Check here for a list of features: TFS 1.3 Capture the Flag (https://otland.net/threads/tfs-1-3-capture-the-flag.271357/)
Key differences:
1) Outfits instead of skulls
2) Multiple respawn positions
3) Cannot attack allies
4) Cannot change outfit while in CTF
5) More testing/less bugs
6) Revscript
MAKE SURE THE CTF AREA IS NO LOGOUT
Add a file in data/libs and include it in data/libs/libs.lua
![]()
---CTF STATUS TRACKING DONT TOUCH --CTF_STATUS = 0CTF_PLAYERS_QUEUE = {}CT - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.pastebin.com
Add a folder/file in data/scripts named ctf and add this
LUA:--- TALKACTION -- local ctfTalk = TalkAction("!ctf", "!CTF") function ctfTalk.onSay(player, words, param) if param == "enter" then for i = 1, #CTF_PLAYERS_QUEUE do if CTF_PLAYERS_QUEUE[i] == player:getName() then player:sendCancelMessage("You are already queued for capture the flag.") return false end end if player:getLevel() < CTF_LEVEL_REQ then player:sendCancelMessage("You must be level "..CTF_LEVEL_REQ.." to enter capture the flag.") return false end CTF_PLAYERS_QUEUE[#CTF_PLAYERS_QUEUE + 1] = player:getName() player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "You are now queued for capture the flag. You may type !ctf leave to leave the queue.") elseif param == "leave" then for i = 1, #CTF_PLAYERS_QUEUE do if CTF_PLAYERS_QUEUE[i] == player:getName() then CTF_PLAYERS_QUEUE[i] = nil player:sendCancelMessage("You have left the capture the flag queue.") return false end end player:sendCancelMessage("You are not queued in capture the flag.") return false elseif param == "start" then if not player:getGroup():getAccess() then return true end if player:getAccountType() < ACCOUNT_TYPE_GOD then return true end if CTF_STATUS > 0 then player:sendCancelMessage("Capture the flag is already started.") return false end Game.broadcastMessage("Capture the flag is now open. Type !ctf enter to join the queue. It will start in " ..CTF_CHECK_QUEUE.. " minutes.") CTF_STATUS = 1 CTF_GREEN_TEAM_PLAYERS = {} CTF_RED_TEAM_PLAYERS = {} CTF_PLAYER_OUTFITS = {} CTF_GREEN_SCORE = 0 CTF_RED_SCORE = 0 CTF_GREEN_FLAG_HOLDER = nil CTF_RED_FLAG_HOLDER = nil addEvent(checkCTFPlayers, CTF_CHECK_QUEUE * 60 * 1000) elseif param == "cancel" or param == "stop" then if not player:getGroup():getAccess() then return true end if player:getAccountType() < ACCOUNT_TYPE_GOD then return true end stopCTF() end return false end ctfTalk:separator(" ") ctfTalk:register() -- GLOBALEVENT -- local ctfGlobal = GlobalEvent("CTF_GLOBAL") function ctfGlobal.onThink(...) if CTF_STATUS == 0 then Game.broadcastMessage("Capture the flag is now open. Type !ctf enter to join the queue. It will start in 5 minutes.", 1) addEvent(checkCTFPlayers, 1 * 60 * 1000) end if CTF_GREEN_FLAG_HOLDER then local player = Player(CTF_GREEN_FLAG_HOLDER) if player then player:getPosition():sendMagicEffect(CONST_ME_POFF) end end if CTF_RED_FLAG_HOLDER then local player = Player(CTF_RED_FLAG_HOLDER) if player then player:getPosition():sendMagicEffect(CONST_ME_POFF) end end return true end ctfGlobal:interval(1000) ctfGlobal:register() -- ACTION -- local ctfAction = Action() function ctfAction.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == CTF_GREEN_FLAGID then if isGreenTeam(player:getName()) then if item:getPosition() == CTF_GREEN_FLAG_POSITION then return player:sendCancelMessage("You cannot pick up your own flag.") else item:moveTo(CTF_GREEN_FLAG_POSITION) broadcastToCTFPlayers(CTF_MSG_FLAG_RETRUNED_GREEN) end else CTF_GREEN_FLAG_HOLDER = player:getName() item:remove() broadcastToCTFPlayers("The green flag has been taken by "..player:getName().."!") end elseif item.itemid == CTF_RED_FLAGID then if isRedTeam(player:getName()) then if item:getPosition() == CTF_RED_FLAG_POSITION then return player:sendCancelMessage("You cannot pick up your own flag.") else item:moveTo(CTF_RED_FLAG_POSITION) broadcastToCTFPlayers(CTF_MSG_FLAG_RETRUNED_RED) end else CTF_RED_FLAG_HOLDER = player:getName() item:remove() broadcastToCTFPlayers("The red flag has been taken by "..player:getName().."!") end end return true end ctfAction:aid(CTF_ACTIONID) ctfAction:register() -- Moveevent -- local ctfMovement = MoveEvent() function ctfMovement.onStepIn(creature, item, position, fromPosition) local player = Player(creature) if not player then return true end if item.itemid == CTF_GREEN_CAPTURE_TILE_ID and item.actionid == CTF_ACTIONID and item:getPosition() == CTF_GREEN_CAPTURE_TILE_POS then if isGreenTeam(player:getName()) then if CTF_RED_FLAG_HOLDER ~= player:getName() then player:teleportTo(fromPosition, true) player:sendCancelMessage("You cannot stand on your capture tile.") return false else player:teleportTo(fromPosition, true) CTF_RED_FLAG_HOLDER = nil CTF_GREEN_SCORE = CTF_GREEN_SCORE + 1 local flag = Game.createItem(CTF_RED_FLAGID, 1, CTF_RED_FLAG_POSITION) flag:setAttribute('aid', CTF_ACTIONID) if CTF_GREEN_SCORE == CTF_WIN_SCORE then stopCTF() return true end broadcastToCTFPlayers(CTF_MSG_FLAG_CAPTURED_GREEN.." The green team now has "..CTF_GREEN_SCORE.." point(s).") end else player:teleportTo(fromPosition, true) player:sendCancelMessage("You cannot stand on the green teams capture tile.") return false end elseif item.itemid == CTF_RED_CAPTURE_TILE_ID and item.actionid == CTF_ACTIONID and item:getPosition() == CTF_RED_CAPTURE_TILE_POS then if isRedTeam(player:getName()) then if CTF_GREEN_FLAG_HOLDER ~= player:getName() then player:teleportTo(fromPosition, true) player:sendCancelMessage("You cannot stand on your capture tile.") return false else player:teleportTo(fromPosition, true) CTF_GREEN_FLAG_HOLDER = nil CTF_RED_SCORE = CTF_RED_SCORE + 1 local flag = Game.createItem(CTF_GREEN_FLAGID, 1, CTF_GREEN_FLAG_POSITION) flag:setAttribute('aid', CTF_ACTIONID) if CTF_RED_SCORE == CTF_WIN_SCORE then stopCTF() return true end broadcastToCTFPlayers(CTF_MSG_FLAG_CAPTURED_RED.." The red team now has "..CTF_RED_SCORE.." point(s).") end else player:teleportTo(fromPosition, true) player:sendCancelMessage("You cannot stand on the red teams capture tile.") return false end end return true end ctfMovement:aid(CTF_ACTIONID) ctfMovement:register() -- CreatureEvents -- local ctfPrepareDeath = CreatureEvent("CTF_PREPAREDEATH") function ctfPrepareDeath.onPrepareDeath(creature, killer) if not creature:isPlayer() then return true end local player = Player(creature) if isGreenTeam(player:getName()) then if CTF_RED_FLAG_HOLDER and CTF_RED_FLAG_HOLDER == player:getName() then CTF_RED_FLAG_HOLDER = nil local flag = Game.createItem(CTF_RED_FLAGID, 1, player:getPosition()) flag:setAttribute('aid', CTF_ACTIONID) end player:addHealth(999999) player:addMana(999999) local randSpawn = math.random(3) local posMin = CTF_RESPAWN_POSITIONS.GREEN_TEAM[randSpawn].min local posMan = CTF_RESPAWN_POSITIONS.GREEN_TEAM[randSpawn].max local spawnPos = Position(math.random(posMin.x, posMax.x), math.random(posMin.y, posMax.y), math.random(posMin.z, posMax.z)) player:teleportTo(spawnPos) return false elseif isRedTeam(player:getName()) then if CTF_GREEN_FLAG_HOLDER and CTF_GREEN_FLAG_HOLDER == player:getName() then CTF_GREEN_FLAG_HOLDER = nil local flag = Game.createItem(CTF_GREEN_FLAGID, 1, player:getPosition()) flag:setAttribute('aid', CTF_ACTIONID) end player:addHealth(999999) player:addMana(999999) local randSpawn = math.random(3) local posMin = CTF_RESPAWN_POSITIONS.RED_TEAM[randSpawn].min local posMax = CTF_RESPAWN_POSITIONS.RED_TEAM[randSpawn].max local spawnPos = Position(math.random(posMin.x, posMax.x), math.random(posMin.y, posMax.y), math.random(posMin.z, posMax.z)) player:teleportTo(spawnPos) return false end return true end ctfPrepareDeath:register()
In data/creaturescripts/scripts/login.lua add
LUA:player:registerEvent("CTF_PREPAREDEATH")
In data/events/scripts/creature.lua
LUA:function Creature:onChangeOutfit(outfit) local player = Player(self) if player and CTF_STATUS == 2 then if isGreenTeam(player:getName()) or isRedTeam(player:getName()) then player:sendCancelMessage("You cannot change outfit while in capture the flag.") return false end end if hasEventCallback(EVENT_CALLBACK_ONCHANGEMOUNT) then if not EventCallback(EVENT_CALLBACK_ONCHANGEMOUNT, self, outfit.lookMount) then return false end end if hasEventCallback(EVENT_CALLBACK_ONCHANGEOUTFIT) then return EventCallback(EVENT_CALLBACK_ONCHANGEOUTFIT, self, outfit) else return true end end function Creature:onAreaCombat(tile, isAggressive) local player = Player(self) local target = tile:getTopCreature() if player and target and CTF_STATUS == 2 then if isGreenTeam(player:getName()) and isGreenTeam(target:getName()) then return false elseif isRedTeam(player:getName()) and isRedTeam(target:getName()) then return false end end if hasEventCallback(EVENT_CALLBACK_ONAREACOMBAT) then return EventCallback(EVENT_CALLBACK_ONAREACOMBAT, self, tile, isAggressive) else return RETURNVALUE_NOERROR end end function Creature:onTargetCombat(target) local player = Player(self) if player and target and CTF_STATUS == 2 then if isGreenTeam(player:getName()) and isGreenTeam(target:getName()) then return false elseif isRedTeam(player:getName()) and isRedTeam(target:getName()) then return false end end if hasEventCallback(EVENT_CALLBACK_ONTARGETCOMBAT) then return EventCallback(EVENT_CALLBACK_ONTARGETCOMBAT, self, target) else return RETURNVALUE_NOERROR end end
Make sure you enable the events in data/events/events.xml
XML:<event class="Creature" method="onChangeOutfit" enabled="1" /> <event class="Creature" method="onAreaCombat" enabled="1" /> <event class="Creature" method="onTargetCombat" enabled="1" />
Let me know if there are any issues. Hope people use it.

I will eventually come back to this but first and formost make sure you didn't miss any of the steps in installing it. When I originally tested it I was unable to attack teammates. It could be that you somehow started the event and players were not assigned to teams properly which i will look into when I have time.I've tried this in tfs 1.4.2 and it doesnt seem to work but at the same time it does, its very "buggy" and i dont really know why.
sometimes it doesnt wait 5 minutes on the queue before teleporting players, and sometime it teleports 1 or more players into the event but leaves behind other players who are queued, and after a while they will also later on be teleported into the event.
you can attack teammates.
when you attack players you get "skull" (idk if this is intended) meaning when the event ends and you are teleported to temple you still have skull.
to my knowledge everything else seems to work as intended.
any insight of what i might be missing?
Depending on what version you are using this could work or not work. Go to the function for broadcastToCTFPlayers. You can copy the code from data/talkactions/scripts/broadcast.lua where it sends a message to all players in the game. The function should make sure the player is in the CTF event before sending the message.LUA:broadcastToCTFPlayers("The green flag has been taken by "..player:getName().."!")
is not working no broadcast
Ye i made it work by adding a new globalevent in The data/script/ctf.luaGood morning friends, very good script Is it possible to make it boot automatically?
Thank you for creating this event, its super cool.This is a remake of my previous version. This CTF system uses outfits to show which team the players are on.
Check here for a list of features: TFS 1.3 Capture the Flag (https://otland.net/threads/tfs-1-3-capture-the-flag.271357/)
Key differences:
1) Outfits instead of skulls
2) Multiple respawn positions
3) Cannot attack allies
4) Cannot change outfit while in CTF
5) More testing/less bugs
6) Revscript
MAKE SURE THE CTF AREA IS NO LOGOUT
Add a file in data/libs and include it in data/libs/libs.lua
![]()
---CTF STATUS TRACKING DONT TOUCH --CTF_STATUS = 0CTF_PLAYERS_QUEUE = {}CT - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.pastebin.com
Add a folder/file in data/scripts named ctf and add this
LUA:--- TALKACTION -- local ctfTalk = TalkAction("!ctf", "!CTF") function ctfTalk.onSay(player, words, param) if param == "enter" then for i = 1, #CTF_PLAYERS_QUEUE do if CTF_PLAYERS_QUEUE[i] == player:getName() then player:sendCancelMessage("You are already queued for capture the flag.") return false end end if player:getLevel() < CTF_LEVEL_REQ then player:sendCancelMessage("You must be level "..CTF_LEVEL_REQ.." to enter capture the flag.") return false end CTF_PLAYERS_QUEUE[#CTF_PLAYERS_QUEUE + 1] = player:getName() player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "You are now queued for capture the flag. You may type !ctf leave to leave the queue.") elseif param == "leave" then for i = 1, #CTF_PLAYERS_QUEUE do if CTF_PLAYERS_QUEUE[i] == player:getName() then CTF_PLAYERS_QUEUE[i] = nil player:sendCancelMessage("You have left the capture the flag queue.") return false end end player:sendCancelMessage("You are not queued in capture the flag.") return false elseif param == "start" then if not player:getGroup():getAccess() then return true end if player:getAccountType() < ACCOUNT_TYPE_GOD then return true end if CTF_STATUS > 0 then player:sendCancelMessage("Capture the flag is already started.") return false end Game.broadcastMessage("Capture the flag is now open. Type !ctf enter to join the queue. It will start in " ..CTF_CHECK_QUEUE.. " minutes.") CTF_STATUS = 1 CTF_GREEN_TEAM_PLAYERS = {} CTF_RED_TEAM_PLAYERS = {} CTF_PLAYER_OUTFITS = {} CTF_GREEN_SCORE = 0 CTF_RED_SCORE = 0 CTF_GREEN_FLAG_HOLDER = nil CTF_RED_FLAG_HOLDER = nil addEvent(checkCTFPlayers, CTF_CHECK_QUEUE * 60 * 1000) elseif param == "cancel" or param == "stop" then if not player:getGroup():getAccess() then return true end if player:getAccountType() < ACCOUNT_TYPE_GOD then return true end stopCTF() end return false end ctfTalk:separator(" ") ctfTalk:register() -- GLOBALEVENT -- local ctfGlobal = GlobalEvent("CTF_GLOBAL") function ctfGlobal.onThink(...) if CTF_STATUS == 0 then Game.broadcastMessage("Capture the flag is now open. Type !ctf enter to join the queue. It will start in 5 minutes.", 1) addEvent(checkCTFPlayers, 1 * 60 * 1000) end if CTF_GREEN_FLAG_HOLDER then local player = Player(CTF_GREEN_FLAG_HOLDER) if player then player:getPosition():sendMagicEffect(CONST_ME_POFF) end end if CTF_RED_FLAG_HOLDER then local player = Player(CTF_RED_FLAG_HOLDER) if player then player:getPosition():sendMagicEffect(CONST_ME_POFF) end end return true end ctfGlobal:interval(1000) ctfGlobal:register() -- ACTION -- local ctfAction = Action() function ctfAction.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == CTF_GREEN_FLAGID then if isGreenTeam(player:getName()) then if item:getPosition() == CTF_GREEN_FLAG_POSITION then return player:sendCancelMessage("You cannot pick up your own flag.") else item:moveTo(CTF_GREEN_FLAG_POSITION) broadcastToCTFPlayers(CTF_MSG_FLAG_RETRUNED_GREEN) end else CTF_GREEN_FLAG_HOLDER = player:getName() item:remove() broadcastToCTFPlayers("The green flag has been taken by "..player:getName().."!") end elseif item.itemid == CTF_RED_FLAGID then if isRedTeam(player:getName()) then if item:getPosition() == CTF_RED_FLAG_POSITION then return player:sendCancelMessage("You cannot pick up your own flag.") else item:moveTo(CTF_RED_FLAG_POSITION) broadcastToCTFPlayers(CTF_MSG_FLAG_RETRUNED_RED) end else CTF_RED_FLAG_HOLDER = player:getName() item:remove() broadcastToCTFPlayers("The red flag has been taken by "..player:getName().."!") end end return true end ctfAction:aid(CTF_ACTIONID) ctfAction:register() -- Moveevent -- local ctfMovement = MoveEvent() function ctfMovement.onStepIn(creature, item, position, fromPosition) local player = Player(creature) if not player then return true end if item.itemid == CTF_GREEN_CAPTURE_TILE_ID and item.actionid == CTF_ACTIONID and item:getPosition() == CTF_GREEN_CAPTURE_TILE_POS then if isGreenTeam(player:getName()) then if CTF_RED_FLAG_HOLDER ~= player:getName() then player:teleportTo(fromPosition, true) player:sendCancelMessage("You cannot stand on your capture tile.") return false else player:teleportTo(fromPosition, true) CTF_RED_FLAG_HOLDER = nil CTF_GREEN_SCORE = CTF_GREEN_SCORE + 1 local flag = Game.createItem(CTF_RED_FLAGID, 1, CTF_RED_FLAG_POSITION) flag:setAttribute('aid', CTF_ACTIONID) if CTF_GREEN_SCORE == CTF_WIN_SCORE then stopCTF() return true end broadcastToCTFPlayers(CTF_MSG_FLAG_CAPTURED_GREEN.." The green team now has "..CTF_GREEN_SCORE.." point(s).") end else player:teleportTo(fromPosition, true) player:sendCancelMessage("You cannot stand on the green teams capture tile.") return false end elseif item.itemid == CTF_RED_CAPTURE_TILE_ID and item.actionid == CTF_ACTIONID and item:getPosition() == CTF_RED_CAPTURE_TILE_POS then if isRedTeam(player:getName()) then if CTF_GREEN_FLAG_HOLDER ~= player:getName() then player:teleportTo(fromPosition, true) player:sendCancelMessage("You cannot stand on your capture tile.") return false else player:teleportTo(fromPosition, true) CTF_GREEN_FLAG_HOLDER = nil CTF_RED_SCORE = CTF_RED_SCORE + 1 local flag = Game.createItem(CTF_GREEN_FLAGID, 1, CTF_GREEN_FLAG_POSITION) flag:setAttribute('aid', CTF_ACTIONID) if CTF_RED_SCORE == CTF_WIN_SCORE then stopCTF() return true end broadcastToCTFPlayers(CTF_MSG_FLAG_CAPTURED_RED.." The red team now has "..CTF_RED_SCORE.." point(s).") end else player:teleportTo(fromPosition, true) player:sendCancelMessage("You cannot stand on the red teams capture tile.") return false end end return true end ctfMovement:aid(CTF_ACTIONID) ctfMovement:register() -- CreatureEvents -- local ctfPrepareDeath = CreatureEvent("CTF_PREPAREDEATH") function ctfPrepareDeath.onPrepareDeath(creature, killer) if not creature:isPlayer() then return true end local player = Player(creature) if isGreenTeam(player:getName()) then if CTF_RED_FLAG_HOLDER and CTF_RED_FLAG_HOLDER == player:getName() then CTF_RED_FLAG_HOLDER = nil local flag = Game.createItem(CTF_RED_FLAGID, 1, player:getPosition()) flag:setAttribute('aid', CTF_ACTIONID) end player:addHealth(999999) player:addMana(999999) local randSpawn = math.random(3) local posMin = CTF_RESPAWN_POSITIONS.GREEN_TEAM[randSpawn].min local posMan = CTF_RESPAWN_POSITIONS.GREEN_TEAM[randSpawn].max local spawnPos = Position(math.random(posMin.x, posMax.x), math.random(posMin.y, posMax.y), math.random(posMin.z, posMax.z)) player:teleportTo(spawnPos) return false elseif isRedTeam(player:getName()) then if CTF_GREEN_FLAG_HOLDER and CTF_GREEN_FLAG_HOLDER == player:getName() then CTF_GREEN_FLAG_HOLDER = nil local flag = Game.createItem(CTF_GREEN_FLAGID, 1, player:getPosition()) flag:setAttribute('aid', CTF_ACTIONID) end player:addHealth(999999) player:addMana(999999) local randSpawn = math.random(3) local posMin = CTF_RESPAWN_POSITIONS.RED_TEAM[randSpawn].min local posMax = CTF_RESPAWN_POSITIONS.RED_TEAM[randSpawn].max local spawnPos = Position(math.random(posMin.x, posMax.x), math.random(posMin.y, posMax.y), math.random(posMin.z, posMax.z)) player:teleportTo(spawnPos) return false end return true end ctfPrepareDeath:register()
In data/creaturescripts/scripts/login.lua add
LUA:player:registerEvent("CTF_PREPAREDEATH")
In data/events/scripts/creature.lua
LUA:function Creature:onChangeOutfit(outfit) local player = Player(self) if player and CTF_STATUS == 2 then if isGreenTeam(player:getName()) or isRedTeam(player:getName()) then player:sendCancelMessage("You cannot change outfit while in capture the flag.") return false end end if hasEventCallback(EVENT_CALLBACK_ONCHANGEMOUNT) then if not EventCallback(EVENT_CALLBACK_ONCHANGEMOUNT, self, outfit.lookMount) then return false end end if hasEventCallback(EVENT_CALLBACK_ONCHANGEOUTFIT) then return EventCallback(EVENT_CALLBACK_ONCHANGEOUTFIT, self, outfit) else return true end end function Creature:onAreaCombat(tile, isAggressive) local player = Player(self) local target = tile:getTopCreature() if player and target and CTF_STATUS == 2 then if isGreenTeam(player:getName()) and isGreenTeam(target:getName()) then return false elseif isRedTeam(player:getName()) and isRedTeam(target:getName()) then return false end end if hasEventCallback(EVENT_CALLBACK_ONAREACOMBAT) then return EventCallback(EVENT_CALLBACK_ONAREACOMBAT, self, tile, isAggressive) else return RETURNVALUE_NOERROR end end function Creature:onTargetCombat(target) local player = Player(self) if player and target and CTF_STATUS == 2 then if isGreenTeam(player:getName()) and isGreenTeam(target:getName()) then return false elseif isRedTeam(player:getName()) and isRedTeam(target:getName()) then return false end end if hasEventCallback(EVENT_CALLBACK_ONTARGETCOMBAT) then return EventCallback(EVENT_CALLBACK_ONTARGETCOMBAT, self, target) else return RETURNVALUE_NOERROR end end
Make sure you enable the events in data/events/events.xml
XML:<event class="Creature" method="onChangeOutfit" enabled="1" /> <event class="Creature" method="onAreaCombat" enabled="1" /> <event class="Creature" method="onTargetCombat" enabled="1" />
Let me know if there are any issues. Hope people use it.
That's exactly what I was looking for!I have started on a TFS 1.5 version in revscript. It should be compatible with anything 1.x.
That's exactly what I was looking for!
Did you ever finish the TFS 1.5 version?![]()
Alright, that's cool!Not yet. I got recruited to another project but I have a decent amount of it done.
Yes of course, but I'd rather just let the actual developer do his own work if he decides to finish it.It takes about 30 seconds to change everything into revscript with 10% experience
Anyway solution for non experience people: ChatGpt