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

Manarune with animated text

mamon_2

Banned User
Joined
Jul 2, 2007
Messages
424
Reaction score
0
I have this script:

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
	doPlayerAddMana(cid, math.random(300, 350))
	return doCombat(cid, combat, var)
end

I want to make that when you use it, send an animation saying "+321" for example, meaning how many mana you receibed.
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)

	local mana = math.random(300, 350)
	doPlayerAddMana(cid, mana)
    doSendAnimatedText(playerPos, '+' + mana, TEXTCOLOR_GOLD)
	return doCombat(cid, combat, var)	   
	
end

Enjoy
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)

	local mana = math.random(300, 350)
	doPlayerAddMana(cid, mana)
    [b]doSendAnimatedText(playerPos, '+' + mana, TEXTCOLOR_GOLD)[/b]
	return doCombat(cid, combat, var)	   
	
end

Enjoy

playerPos is not declared in your script...
... and the bold line is kinda bugged.
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)

	local mana = math.random(300, 350)
	doPlayerAddMana(cid, mana)
    doSendAnimatedText(playerPos, '+' + mana, TEXTCOLOR_GOLD)
	return doCombat(cid, combat, var)	   
	
end

Enjoy

i think its DoPlayerSendText dunno havent made a mana rune with tfs so dont know if it would work because TFS runes and Evolutions runes are totally different
 
I have this, but it is an actions and it will have other exhausted, so you could use any spells and at the same time this rune...
If hope it can help getting ideas, cause I tried, but could make it.

Code:
-- Mana Rune - by Killavus. --
-- Feel free to edit! --
function onUse(cid, item, frompos, item2, topos)

    local level = getPlayerLevel(cid)
    local mlevel = getPlayerMagLevel(cid)
    
    -- Exhausted Settings --
    local exhausted_seconds = 1 -- How many seconds manarune will be unavailible to use. --
    local exhausted_storagevalue = 7520 -- Storage Value to store exhaust. It MUST be unused! --
    -- Exhausted Settings END --
    
    -- Mana Formula Settings --
    -- You can use "level" and "mlevel" --
    local mana_minimum = 400
    local mana_maximum = 510
    -- Mana Formula Settings END --
    
    local mana_add = math.random(mana_minimum, mana_maximum)
    
        
	if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then -- Exhausted check. --
		if(isPlayer(item2.uid) == 1) then -- Entity is player? --
			doSendMagicEffect(frompos, CONST_ME_MAGIC_RED)
			doSendMagicEffect(topos, CONST_ME_MAGIC_GREEN)
			doSendAnimatedText(topos, mana_add, TEXTCOLOR_LIGHTBLUE)
			doPlayerAddMana(item2.uid, mana_add)
			setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
			if item.type > 1 then -- We check the charges. --
				doChangeTypeItem(item.uid, item.type - 1)
			else
				doRemoveItem(item.uid, 1)
			end
		else
			doSendMagicEffect(frompos, CONST_ME_POFF)
			doPlayerSendCancel(cid, "Esta runa solo se puede usar en jugadores.")
	    end
	else
		doSendMagicEffect(frompos, CONST_ME_POFF)
		doPlayerSendCancel(cid, "You are exhausted.")
	end
    return 1
end
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
    local mana = math.random(300, 350)
    doPlayerAddMana(cid, mana)
    doSendAnimatedText(getPlayerPosition(cid), '+' .. mana, TEXTCOLOR_GOLD)
    return doCombat(cid, combat, var)	   	
end
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
    local mana = math.random(300, 350)
    doPlayerAddMana(cid, mana)
    doSendAnimatedText(getPlayerPosition(cid), '+' .. mana, TEXTCOLOR_GOLD)
    return doCombat(cid, combat, var)	   	
end

Omg I know this is a really old thread but I think its better to bump it up than to make a new one for a related thing.

Anyhow, can someone tell me how can I possibly use this for UHs/Exura etc?

A script that shows an animated text for healing runes/spells.

I made one myself for manarunes (which is like this one but worse coded lol) but it doesnt work with for example exura vita, because the healing amount is not a "set" value like on the manarune, but a value based on lvl and maglvl so after playing with the script over and over I couldnt get it to work.. and the one from here doesnt work for that matter either...

Can anyone make this script for exura vita or UH that works?

[For TFS 0.2]

Thanks in advance.
~Guitar Freak
 
hi dude, go to your main config and enable showHealingDamages

-- Battle
worldType = "pvp"
hotkeyAimbotEnabled = "yes"
protectionLevel = 1
pvpTileIgnoreLevelAndVocationProtection = "yes"
killsToRedSkull = 3
pzLocked = 60 * 1000
criticalHitChance = 7
displayCriticalHitNotify = "no"
removeAmmoWhenUsingDistanceWeapon = "yes"
removeChargesFromRunes = "yes"
timeToDecreaseFrags = 24 * 60 * 60 * 1000
whiteSkullTime = 15 * 60 * 1000
noDamageToSameLookfeet = "no"
experienceByKillingPlayers = "no"
showHealingDamage = "yes"
fieldOwnershipDuration = 5 * 1000
 
for your UH this is nice script and works in TFS 0.3.5

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
local health = math.random(650, 900)
doCreatureAddHealth(cid, health)
doSendAnimatedText(getPlayerPosition(cid), '+' .. health, TEXTCOLOR_RED)
return doCombat(cid, combat, var)
end
 
Back
Top