• 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!

Scripts and Custom Client $

Kacyk

New Member
Joined
Mar 17, 2010
Messages
265
Reaction score
0
Location
Poland
Script: TFS 1.2 on PVP-Enforced if player kill guild mates he loses, not gains expierence.
Clinet: change to my own ip/domain (login without ip changer), remove information on login "The tibia clinety you are currenty using.."
 
I wrote this mostly without reference and certainly have not tested it, but it should be a decent start to creating the script that you need. It might even just work immediately.
It is designed to only punish a player for killing a guild member if they are the last hitter or dealt the most damage. This should avoid people being punished for using fire bomb runes etc.

Lua:
-- data/creaturescripts/creaturescripts.xml:
-- <event type="death" name="DeathByGuild" script="deathbyguild.lua" />

function onDeath(player, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified)
  
  if not Player(killer) and not Player(mostDamageKiller) then
    return true
  end
  
  local killedGuild = player:getGuild():getId()
  local killerGuild = killer:getGuild():getId()
  local mostDamageGuild = mostDamageKiller:getGuild():getId()
  
  if killedGuild == killerGuild then
    killer:addExperience(-1000000)
    killer:sendTextMessage(MESSAGE_INFO_DESCR, "You lose 1,000,000 EXP for killing a guild member [Last Hit].")
  end
  if killedGuild == mostDamageGuild then
    mostDamageKiller:addExperience(-1000000)
    mostDamageKiller:sendTextMessage(MESSAGE_INFO_DESCR, "You lose 1,000,000 EXP for killing a guild member [Most Damage].")
  end
  
  return true
end
 
Back
Top