Ahilphino
Excellent OT User
- Joined
- Jun 5, 2013
- Messages
- 1,667
- Solutions
- 1
- Reaction score
- 726
is this possible with TFS 1.0?
I know I can make it in orange text but how would i make it in purple text or some other color?
this is my current script potion script, i can source edit if necessary!
I know I can make it in orange text but how would i make it in purple text or some other color?
Code:
amount = {
-- [vocation] = {minmp, maxmp, minhp, maxhp}, (it will be multiplied by player level)
[1] = {3, 3.5, 4, 4},
[2] = {3, 3.5, 0, 0},
[3] = {1,1.2, 2, 2.2},
[4] = {0, 0, 5, 7},
[5] = {3, 3.5, 0, 0},
[6] = {3, 3.5, 0, 0},
[7] = {1,1.2, 2, 2.2},
[8] = {0, 0, 5, 7}
}
function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)
local lv = getPlayerLevel(player)
local conf = {
v = amount[getPlayerVocation(player)],
voc = getPlayerVocation(player),
level = 180 -- min level
}
if getPlayerLevel(player) >= conf.level then
local hps = math.random((lv*conf.v[3]),(lv*conf.v[4]))
local manas = math.random((lv*conf.v[1]),(lv*conf.v[2]))
doCreatureAddHealth(player, hps)
doPlayerAddMana(player, manas)
player:say("+" ..manas.."", TALKTYPE_MONSTER_SAY)
doSendMagicEffect(getPlayerPosition(player), CONST_ME_MAGIC_BLUE)
else
doPlayerSendTextMessage(player, 22, "Only players above " .. conf.level .. " level can drink this potion.")
end
end