You can try this:Searching someone who can help me to make a script for TFS 1.3.
When you have a killstreak 10 without die you will get a unique spell until you die.
if the script is hard to do i can pay some money to.
<event type="death" name="Kill_Streak" script="other/kill_streak.lua" />
local kill_streak = {} -- DO NOT CHANGE
local spell_name = "YOU CUSTOM SPELL NAME HERE"
function onDeath(creature, corpse, killer, mostDamageKiller, lastHitUnjustified)
local player = creature:getPlayer()
if not player then return true end
if killer and killer:isPlayer() then
if not kill_streak[killer.uid] then...
You can try this:Searching someone who can help me to make a script for TFS 1.3.
When you have a killstreak 10 without die you will get a unique spell until you die.
if the script is hard to do i can pay some money to.
<event type="death" name="Kill_Streak" script="other/kill_streak.lua" />
local kill_streak = {} -- DO NOT CHANGE
local spell_name = "YOU CUSTOM SPELL NAME HERE"
function onDeath(creature, corpse, killer, mostDamageKiller, lastHitUnjustified)
local player = creature:getPlayer()
if not player then return true end
if killer and killer:isPlayer() then
if not kill_streak[killer.uid] then
kill_streak[killer.uid] = 0
end
kill_streak[killer.uid] = kill_streak[killer.uid] + 1
local string = "Kill Streak: " .. kill_streak[killer.uid]
if kill_streak[killer.uid] >= 10 and not killer:hasLearnedSpell(spell_name) then
killer:learnSpell(spell_name)
string = string .. ". You may now use " .. spell_name .. "."
end
killer:sendTextMessage(MESSAGE_INFO_DESCR, string)
end
kill_streak[player.uid] = 0
if player:hasLearnedSpell(spell_name) then
player:forgetSpell(spell_name)
end
return true
end
player:registerEvent("Kill_Streak")
That's what it should be doing. Is it sending the text message when you kill? And does it say you learned spell at 10 kills?The player need to "learn the spell" until he die. For now everything work without learn the spell" xD
I got needlearn="1" but when the player got 10 killstreaks it need to get learned but when he die he will lose it again. @Apollos
That's what it should be doing. Is it sending the text message when you kill? And does it say you learned spell at 10 kills?
Well the learnSpell function is there. Are you sure all vocations are set up to be able to use it? Or maybe something what in spells.xml is prohibiting you.Yes it do but it don't "learn the spell"
<instant group="support" spellid="6" name="Haste" words="utani hur" level="10" mana="60" premium="0" aggressive="0" selftarget="1" cooldown="2000" groupcooldown="2000" needlearn="1" script="support/haste.lua">
<vocation name="Druid" />
<vocation name="Elder Druid" />
<vocation name="Sorcerer" />
<vocation name="Master Sorcerer" />
<vocation name="Paladin" />
<vocation name="Royal Paladin" />
<vocation name="Knight" />
<vocation name="Elite Knight" />
</instant>
Spell name isn't "utani hur", but "Haste". Did u try it?09:26 Kill Streak: 10, You may now use utani hur.
Code:<instant group="support" spellid="6" name="Haste" words="utani hur" level="10" mana="60" premium="0" aggressive="0" selftarget="1" cooldown="2000" groupcooldown="2000" needlearn="1" script="support/haste.lua"> <vocation name="Druid" /> <vocation name="Elder Druid" /> <vocation name="Sorcerer" /> <vocation name="Master Sorcerer" /> <vocation name="Paladin" /> <vocation name="Royal Paladin" /> <vocation name="Knight" /> <vocation name="Elite Knight" /> </instant>
"You need to learn this spell first."
"09:26 Kill Streak: 10, You may now use utani hur. " @Apollos
View attachment 35914
Thank you!Spell name isn't "utani hur", but "Haste". Did u try it?