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

Monster Player Killer, looks like real player

Gesior.pl

Mega Noob&LOL 2012
Senator
Joined
Sep 18, 2007
Messages
2,966
Solutions
99
Reaction score
3,383
Location
Poland
GitHub
gesior
17:30 You see a player killer(level 102). he is a royal paladin. he is member of pk sqd.
Health: [1700 / 1700].
Mana: [0 / 0].
Position: [X: 1016] [Y: 1096] [Z: 7].
Monster use:
- haste when hp under 500
- sudden death rune (hit 250-500)
- exori san (hit 60-200)
- exura san (heal 700-900)
- don't use 2 attack/2 heals in same time (interval 2000 between spells, can heal and attack in same time)
- great spirit potion (heal 200-400)
- has random outfit
Screens (4 PK vs. demon):
mpklv3.jpg
mpk2jv5.jpg

In data/monster/monsters.xml add:
PHP:
<monster name="PK" file="PK.xml"/>
In data/monster/ create file PK.xml and paste:
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Player Killer" nameDescription="a player killer(Level 102). He is a Royal Paladin. He is Member of PK SQD" race="blood" experience="1500" speed="450" manacost="0">
  <health now="1700" max="1700"/>
  <look type="128" head="20" body="30" legs="40" feet="50" corpse="6080"/>
  <targetchange interval="20000" chance="0"/>
  <strategy attack="100" defense="0"/>
  <flags>
    <flag summonable="0"/>
    <flag attackable="1"/>
    <flag hostile="1"/>
    <flag illusionable="0"/>
    <flag convinceable="0"/>
    <flag pushable="1"/>
    <flag canpushitems="1"/>
    <flag staticattack="100"/>
    <flag lightlevel="233"/>
    <flag lightcolor="35"/>
    <flag targetdistance="3"/>
    <flag runonhealth="500"/>
	<flag skull="3" />
  </flags>
  <attacks>
	<attack name="physical" interval="2000" chance="100" range="6" min="-20" max="-320">
      <attribute key="shootEffect" value="arrow"/>
    </attack>
	<attack name="PKspellMonster" interval="2000" chance="100"/>
  </attacks>
  <defenses armor="27" defense="52" />
  <immunities>
    <immunity physical="0"/>
    <immunity energy="0"/>
    <immunity fire="0"/>
    <immunity poison="0"/>
    <immunity lifedrain="0"/>
    <immunity paralyze="0"/>
    <immunity outfit="0"/>
    <immunity drunk="0"/>
    <immunity invisible="1"/>
  </immunities>
  <loot>
    <item id="2148" countmax="20" chance1="100000" chancemax="0"/>
    <item id="1949" chance="10000"/>
    <item id="2467" chance="10000"/>
    <item id="2642" chance="6666"/>
    <item id="1987" chance="100000">
      <inside>
        <item id="2044" chance="6666"/>
        <item id="2689" countmax="3" chance1="20000" chancemax="0"/>
        <item id="2401" chance="3333"/>
        <item id="2166" chance="1428"/>
      </inside>
    </item>
  </loot>
</monster>
In data/spells/spells.xml add:
PHP:
<instant name="PKspellMonster" words="PKspellMonster" lvl="10" mana="500" prem="1" aggressive="0" needtarget="1" params="0" exhaustion="100" soul="3500" script="PK.lua" />
(soul 3500, player can't use)
In data/spells/scripts/ create file PK.lua and paste:
PHP:
-- haste
local combatHaste = createCombatObject()
setCombatParam(combatHaste, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combatHaste, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combatHaste, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)


local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 14000)
setConditionFormula(condition, 0, 350, 0, 350)
setCombatCondition(combatHaste, condition)

-- outfit
local outCombat = createCombatObject()
setCombatParam(outCombat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)

local condition = createConditionObject(CONDITION_OUTFIT)
setConditionParam(condition, CONDITION_PARAM_TICKS, 3 * 24 * 3600 * 1000) -- here time in miliseconds, default 3 days
addOutfitCondition(condition, 0, 128, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 129, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 130, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 131, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 132, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 133, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 134, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 143, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 144, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 145, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 146, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 151, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 152, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 153, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 154, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 251, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 128,39, 35,45, 45)
addOutfitCondition(condition, 0, 129,39, 35,45, 45)
addOutfitCondition(condition, 0, 130,39, 35,45, 45)
addOutfitCondition(condition, 0, 131,39, 35,45, 45)
addOutfitCondition(condition, 0, 132,39, 35,45, 45)
addOutfitCondition(condition, 0, 133,39, 35,45, 45)
addOutfitCondition(condition, 0, 134,39, 35,45, 45)
addOutfitCondition(condition, 0, 143,39, 35,45, 45)
addOutfitCondition(condition, 0, 144,39, 35,45, 45)
addOutfitCondition(condition, 0, 145,39, 35,45, 45)
addOutfitCondition(condition, 0, 146,39, 35,45, 45)
addOutfitCondition(condition, 0, 151,39, 35,45, 45)
addOutfitCondition(condition, 0, 152,39, 35,45, 45)
addOutfitCondition(condition, 0, 153,39, 35,45, 45)
addOutfitCondition(condition, 0, 154,39, 35,45, 45)
addOutfitCondition(condition, 0, 251,39, 35,45, 45)
setCombatCondition(outCombat, condition) 

-- exevo san
local sanCombat = createCombatObject()
setCombatParam(sanCombat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(sanCombat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
setCombatParam(sanCombat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
function onGetDmg1(cid, level, maglevel)
	return -60, -200
end

setCombatCallback(sanCombat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetDmg1")
-- SD
local sdCombat = createCombatObject()
setCombatParam(sdCombat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(sdCombat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(sdCombat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
function onGetDmg2(cid, level, maglevel)
	return 250, 500
end

setCombatCallback(sdCombat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetDmg2")

function onCastSpell(cid, var)
	if(isCreature(variantToNumber(var)) == TRUE) then
		if(getCreatureCondition(cid, CONDITION_OUTFIT) == 0) then -- random outfit
			doCombat(0, outCombat, numberToVariant(cid))
		end
		if(getCreatureHealth(cid) < 500 and getCreatureCondition(cid, CONDITION_HASTE) == 0) then
			doCombat(0, combatHaste, numberToVariant(cid))
			doCreatureSay(cid,"utani hur",TALKTYPE_SAY)
		else
			if(math.random(0,99) > 80 and (getCreatureMaxHealth(cid) - getCreatureHealth(cid) > 450)) then -- 20% percent chance to heal when hp lose higher then 450
				doTargetCombatHealth(0, cid, COMBAT_HEALING, 600, 800, CONST_ME_MAGIC_BLUE)
				doCreatureSay(cid,"exura san",TALKTYPE_SAY)
			elseif(math.random(0,99) > 60 and (getCreatureMaxHealth(cid) - getCreatureHealth(cid) > 750)) then -- 40% percent chance to heal when hp lose higher then 750
				doTargetCombatHealth(0, cid, COMBAT_HEALING, 600, 800, CONST_ME_MAGIC_BLUE)
				doCreatureSay(cid,"exura san",TALKTYPE_SAY)
			elseif(math.random(0,99) > 20 and (getCreatureMaxHealth(cid) - getCreatureHealth(cid) > 950)) then -- 80% percent chance to heal when hp lose higher then 950
				doTargetCombatHealth(0, cid, COMBAT_HEALING, 600, 800, CONST_ME_MAGIC_BLUE)
				doCreatureSay(cid,"exura san",TALKTYPE_SAY)
			elseif(getCreatureMaxHealth(cid) - getCreatureHealth(cid) > 300) then -- 100% to drink great spirit potion if hp lose higher then 100
				doTargetCombatHealth(0, cid, COMBAT_HEALING, 200, 400, CONST_ME_MAGIC_BLUE)
				doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
			end
		end
		if(math.random(0,99) > 60) then -- 40% to shot sd
			doCombat(cid, sdCombat, var)
			doTargetCombatHealth(cid, variantToNumber(var), COMBAT_DEATHDAMAGE, -250, -500, CONST_ME_NONE)
		elseif(math.random(0,99) > 30) then -- 70% to shot exori san
			doCombat(cid, sanCombat, var)
			doTargetCombatHealth(cid, variantToNumber(var), COMBAT_HOLYDAMAGE, -60, -200, CONST_ME_NONE)
			doCreatureSay(cid,"exori san",TALKTYPE_SAY)
		end
	end
end
 
Last edited:
they have skulls, how? source edit, like that code that creatures with red skull
 
they have skulls, how? source edit, like that code that creatures with red skull
TFS 0.3 and in monster:
PHP:
    <flag skull="3" />
EDIT:
A bit harder version :)
Now one Player Killer heal other Player Killer on his 'screen' if it's needed and don't need to heal himself. Fight like Paladin 150 lvl. Sometimes Player Killer can command and tell other Player Killers to attack same target :)
Now players can get scared...
XML:
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Player Killer" nameDescription="a player killer(Level 152). He is a Royal Paladin. He is Member of PK SQD" race="blood" experience="15000" speed="650" manacost="0">
  <health now="2600" max="2600"/>
  <look type="128" head="20" body="30" legs="40" feet="50" corpse="6080"/>
  <targetchange interval="10000" chance="30"/>
  <strategy attack="100" defense="0"/>
  <flags>
    <flag summonable="0"/>
    <flag attackable="1"/>
    <flag hostile="1"/>
    <flag illusionable="0"/>
    <flag convinceable="0"/>
    <flag pushable="1"/>
    <flag canpushitems="1"/>
    <flag staticattack="100"/>
    <flag lightlevel="233"/>
    <flag lightcolor="35"/>
    <flag targetdistance="3"/>
    <flag runonhealth="700"/>
	<flag skull="3" />
  </flags>
  <attacks>
	<attack name="physical" interval="2000" chance="100" range="6" min="-20" max="-320">
      <attribute key="shootEffect" value="arrow"/>
    </attack>
	<attack name="PKspellMonster" interval="2000" chance="100"/>
  </attacks>
  <defenses armor="27" defense="52" />
  <immunities>
    <immunity physical="0"/>
    <immunity energy="0"/>
    <immunity fire="0"/>
    <immunity poison="0"/>
    <immunity lifedrain="0"/>
    <immunity paralyze="0"/>
    <immunity outfit="0"/>
    <immunity drunk="0"/>
    <immunity invisible="1"/>
  </immunities>
  <loot>
    <item id="2148" countmax="20" chance1="100000" chancemax="0"/>
    <item id="1949" chance="10000"/>
    <item id="2467" chance="10000"/>
    <item id="2642" chance="6666"/>
    <item id="1987" chance="100000">
      <inside>
        <item id="2044" chance="6666"/>
        <item id="2689" countmax="3" chance1="20000" chancemax="0"/>
        <item id="2401" chance="3333"/>
        <item id="2166" chance="1428"/>
      </inside>
    </item>
  </loot>
</monster>
SPELL:
PHP:
-- haste
local combatHaste = createCombatObject()
setCombatParam(combatHaste, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combatHaste, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combatHaste, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)


local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 14000)
setConditionFormula(condition, 0, 350, 0, 350)
setCombatCondition(combatHaste, condition)

-- outfit
local outCombat = createCombatObject()
setCombatParam(outCombat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)

local condition = createConditionObject(CONDITION_OUTFIT)
setConditionParam(condition, CONDITION_PARAM_TICKS, 3 * 24 * 3600 * 1000) -- here time in miliseconds, default 3 days
addOutfitCondition(condition, 0, 128, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 129, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 130, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 131, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 132, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 133, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 134, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 143, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 144, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 145, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 146, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 151, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 152, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 153, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 154, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 251, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 128,39, 35,45, 45)
addOutfitCondition(condition, 0, 129,39, 35,45, 45)
addOutfitCondition(condition, 0, 130,39, 35,45, 45)
addOutfitCondition(condition, 0, 131,39, 35,45, 45)
addOutfitCondition(condition, 0, 132,39, 35,45, 45)
addOutfitCondition(condition, 0, 133,39, 35,45, 45)
addOutfitCondition(condition, 0, 134,39, 35,45, 45)
addOutfitCondition(condition, 0, 143,39, 35,45, 45)
addOutfitCondition(condition, 0, 144,39, 35,45, 45)
addOutfitCondition(condition, 0, 145,39, 35,45, 45)
addOutfitCondition(condition, 0, 146,39, 35,45, 45)
addOutfitCondition(condition, 0, 151,39, 35,45, 45)
addOutfitCondition(condition, 0, 152,39, 35,45, 45)
addOutfitCondition(condition, 0, 153,39, 35,45, 45)
addOutfitCondition(condition, 0, 154,39, 35,45, 45)
addOutfitCondition(condition, 0, 251,39, 35,45, 45)
setCombatCondition(outCombat, condition) 

-- exevo san
local sanCombat = createCombatObject()
setCombatParam(sanCombat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(sanCombat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
setCombatParam(sanCombat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
function onGetDmg1(cid, level, maglevel)
	return 0,0
end

setCombatCallback(sanCombat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetDmg1")
-- SD
local sdCombat = createCombatObject()
setCombatParam(sdCombat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(sdCombat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(sdCombat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
function onGetDmg2(cid, level, maglevel)
	return 0,0
end

setCombatCallback(sdCombat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetDmg2")

function onCastSpell(cid, var)
	if(isCreature(variantToNumber(var)) == TRUE) then
		if(getCreatureCondition(cid, CONDITION_OUTFIT) == 0) then -- random outfit
			doCombat(0, outCombat, numberToVariant(cid))
		end
		if(getCreatureHealth(cid) < 700 and getCreatureCondition(cid, CONDITION_HASTE) == 0) then
			doCombat(0, combatHaste, numberToVariant(cid))
			doCreatureSay(cid,"utani hur",TALKTYPE_SAY)
			addEvent(doTargetCombatHealth, 300, 0, cid, COMBAT_HEALING, 600, 1100, CONST_ME_MAGIC_BLUE)
			addEvent(doCreatureSay, 300, cid,"exura san",TALKTYPE_SAY)
			addEvent(doTargetCombatHealth, 1300, 0, cid, COMBAT_HEALING, 600, 1100, CONST_ME_MAGIC_BLUE)
			addEvent(doCreatureSay, 1300, cid,"exura san",TALKTYPE_SAY)
		else
			if(math.random(0,99) > 60 and (getCreatureMaxHealth(cid) - getCreatureHealth(cid) > 950)) then -- 40% percent chance to heal when hp lose higher then 750
				doTargetCombatHealth(0, cid, COMBAT_HEALING, 600, 1100, CONST_ME_MAGIC_BLUE)
				doCreatureSay(cid,"exura san",TALKTYPE_SAY)
			elseif(math.random(0,99) > 20 and (getCreatureMaxHealth(cid) - getCreatureHealth(cid) > 1550)) then -- 80% percent chance to heal when hp lose higher then 1500
				doTargetCombatHealth(0, cid, COMBAT_HEALING, 600, 1100, CONST_ME_MAGIC_BLUE)
				doCreatureSay(cid,"exura san",TALKTYPE_SAY)
			elseif(math.random(0,99) > 10 and (getCreatureMaxHealth(cid) - getCreatureHealth(cid) > 2000)) then -- 90% percent chance to heal when hp lose higher then 2000
				doTargetCombatHealth(0, cid, COMBAT_HEALING, 600, 1100, CONST_ME_MAGIC_BLUE)
				doCreatureSay(cid,"exura san",TALKTYPE_SAY)
			elseif(getCreatureMaxHealth(cid) - getCreatureHealth(cid) > 700) then -- 100% to drink great spirit potion if hp lose higher then 100
				doTargetCombatHealth(0, cid, COMBAT_HEALING, 200, 400, CONST_ME_MAGIC_BLUE)
				doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
			else
				local friends = {}
				local hp_loss = 0
				local heal = 0
				local commander = 0
				local position = getCreaturePosition(cid)
				for x = -7, 7 do
					for y = -5, 5 do
						if not (x == 0 and y == 0) then
							pos = {x = position.x+x, y = position.y+y, z = position.z, stackpos = STACKPOS_TOP_CREATURE}
							creature = getTopCreature(pos)
							if (isCreature(creature.uid) == TRUE and getCreatureName(creature.uid) == "Player Killer") then
								table.insert(friends,creature.uid)
							end
						end
					end
				end
				if(math.random(0,99) < 15) then
					commander = 1
				end
				for i=1, #friends do
					if(commander == 1) then
						doChallengeCreature(friends[i], variantToNumber(var))
					end
					if(getCreatureMaxHealth(friends[i]) - getCreatureHealth(friends[i]) > hp_loss) then
						hp_loss = getCreatureMaxHealth(friends[i]) - getCreatureHealth(friends[i])
						heal = friends[i]
					end
				end
				if(heal ~= 0 and hp_loss > 450 and math.random(0,99) < 65) then
					doTargetCombatHealth(cid, heal, COMBAT_HEALING, 500, 900, CONST_ME_MAGIC_BLUE)
				end
			end
		end
		if(math.random(0,99) > 60) then -- 40% to shot sd
			doCombat(cid, sdCombat, var)
			doTargetCombatHealth(cid, variantToNumber(var), COMBAT_DEATHDAMAGE, -250, -500, CONST_ME_NONE)
		elseif(math.random(0,99) > 30) then -- 70% to shot exori san
			doCombat(cid, sanCombat, var)
			doTargetCombatHealth(cid, variantToNumber(var), COMBAT_HOLYDAMAGE, -60, -200, CONST_ME_NONE)
			doCreatureSay(cid,"exori san",TALKTYPE_SAY)
		end
	end
end
 
Last edited:
Nice work gesior, thx :>
make more scripts like this ;D

to jest genialne ;D

#can u make scipts for sorc and druid like this?
sorc can use exori vis/mort, exevo flam hur, exevo gran mas vis and exura gran..
druid - exori frigo, exevo frigo hur, exevo gran mas frigo and heal exura gran/vita etc.

Wiec po polsku - chodzi mi o to, zebys zrobil podobne potworki, ale jako druida i sorca zeby uzywali tych czarow i podobnych oraz run. Knighta nie trzeba, bo on czarow nie uzywa tylko melee..

z gory thx

[to mods] sry for pl language ;o
 
Last edited:
It's cool! Many guys on my OTS and my friends was suprised when they see that.Thanks Gesior :p
 
maan, im using this:D but I made more monsters with different names so ppl think it's real pk:s ;), but can't u make so u can exiva them? :D
 
when i put
Code:
<instant name="PKspellMonster" words="PKspellMonster" lvl="10" mana="500" prem="1" aggressive="0" needtarget="1" params="0" exhaustion="100" soul="3500" script="PK.lua" />

in spells.xml under <instant> i get an error in cmd and my server closes Please help i really want this on my ot

ERROR MESSAGE BEFORE SHUTDOWN OF SERVER:
[26/01/2009 19:38:44] Warning: [BaseEvents::loadFromXml] Can not open spells.xml
[26/01/2009 19:38:44] > ERROR: Unable to load Spells!
 
Gesior [Question]

Lawl, how did u wear the Green cape on ur admin? :p
 
I have the same problem as SnowFox ( nice nick :D )
wen i add command to spells, this dont wont to work, but without the monster is working
I have the TFS cryingdamson, console version.
Can some1 fix it ?
 
Back
Top