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

Lua Knight not using ultimate health on TFS 0.3

djlucas15

New Member
Joined
Feb 18, 2008
Messages
99
Reaction score
0
Location
RS - Brasil
I have one knight level 285 if I go drink one ultimate health potion I get the message "only knight of level 130 or more..."

Knight:
Level: 285
Vocation: 4
Promotion: 2


If I look I see this character that he is an epic elite knight and suggested the Elf I upgraded everything in fact I swapped all the files just left my database and my map but still not working
 
I have one knight level 285 if I go drink one ultimate health potion I get the message "only knight of level 130 or more..."

Knight:
Level: 285
Vocation: 4
Promotion: 2


If I look I see this character that he is an epic elite knight and suggested the Elf I upgraded everything in fact I swapped all the files just left my database and my map but still not working

I didnt quite understood what you said so clear this out for me, that character is a Knight, an ELITE knight OR an EPIC elite knight?

Because if your char is the epic elite knight you must go to the Actions folder and find the script called Potions.lua, and in there you can add the epic vocations to each potion so its usable (sp?) by them.

Hope it helps~
 
This is the lasted script of potions in TFS

local MIN = 700
local MAX = 800
local EMPTY_POTION = 7635

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) == FALSE then
return FALSE
end

if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return TRUE
end

if((not(isKnight(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 130) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then
doCreatureSay(itemEx.uid, "Only knights of level 130 or above may drink this fluid.", TALKTYPE_ORANGE_1)
return TRUE
end

if doCreatureAddHealth(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then
return FALSE
end

doAddCondition(cid, exhaust)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
doTransformItem(item.uid, EMPTY_POTION)
return TRUE
end
 
Edit isKnight(cid) function in data/lib/function.lua || data/functions.lua || data/global.lua

in return array add vocation id, probably, 12.
 
Back
Top