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

[Spell] [Lua] Need some spells and scrpits

VirrageS

←•†ĿuĀ && ©¤¤•→
Joined
May 30, 2010
Messages
984
Reaction score
63
Location
Poland
Hello!
I need some scrpits/spells for my OTS.

Here they are:

[SOLVED] 1.Pain - spell which looks like buff but it causing damage. It will be causing damage to the target for 20-30sec in steps of 5 sec.
(Here is spell similar to that which I want but it healing us: "Auto Heal" spell)

[SOLVED] 2.Fear – spell which making creature/target unable to using healing spell and potions or it making that creature/target run away from us for 5-10 sec.

[SOLVED] 3.Protection shield – spell/script (buff for 3min or some charges) which upgrade our shielding (skill) and we are able to absorb some damage.

4.Vampire rage – spell (buff for 3min or some charges) which will heal us 10% of damage done on target. E.G.: I cause 250 damage to the target and I will be healed 25 hp.

[SOLVED] 5.StepIn scrpit - script (for quest). If you stand on the specifed tile before you apear item (reward for quest).

[SOLVED] 6.VIP double exp - if you are VIP you are getting 2x exp

[SOLVED] 7.VIP Effect - if you are VIP you have effect.

[SOLVED] 8.Npc for certain Vocations - Npc with who will can talk only certain Vocations like: "Druid"

[SOLVED] 9.Reflect - when i use this spell then all attaks will be reflected.



Thanks for any help. Of course for help I will give rep+ :).

If someone don't understend any spell/scrpit i will explain :thumbup:

P.S. I’m using TFS 0.3.6pl1
 
Last edited:
LUA:
function onThink(cid, interval)
local storage = 21444 --your vip storage
local rate = 2
        if getPlayerStorageValue(cid, storage) >= 1 then
                doPlayerSetExperienceRate(cid, rate)
        else
        doPlayerSendTextMessage(cid,19, 'Purchase VIP and get more EXP from monsters!')
end
return TRUE
end

In creatureevent:
Code:
<event type="think" name="Vip" event="script" value="viprate.lua"/>
in login script paste this before <return true in last of script:
Code:
registerCreatureEvent(cid, "Vip")

for effect
go global event paste
Code:
<globalevent name="effects" [COLOR="Orange"]interval="2"[/COLOR] event="script" value="vip.lua"/>
change itnterval for time in seconds
then go creat new script and paste
LUA:
local storage = 1993     ---- vip storage
function onThink(cid, item, fromPosition, toPosition)
     for _, name in ipairs(getOnlinePlayers()) do
		local player = getPlayerByName(name)
		if getPlayerStorageValue(player,storage) == 1  then
        doSendAnimatedText(getPlayerPosition(getPlayerByName(name)),"Vip!!", math.random(01,255))
        doSendMagicEffect(getPlayerPosition(getPlayerByName(name)), 27)
        return true
		end

end
return true
end
 
cant understand this
.StepIn scrpit - script (for quest). If you stand on the specifed tile before you apear item (reward for quest).


you mean when you step on tile if you finish the quest you get reward?
 
here i don't know if it will work as you want but this is made just as i understood of what you wanted:
LUA:
-- change all xxxxx to the values that you want and make sure you link this in the movements.xml to an action id and not an item id--
function onStepIn(cid, item, fromPosition, toPosition)
	local gotItem = getPlayerStorageValue(cid, xxxxx)
	if gotItem == -1 then
		doPlayerSetStorageValue(cid, xxxxx, 1)
		doPlayerAddItem(cid, xxxx) --change to the item you want to give players--
		doPlayerSendTextMessage(cid, 25, "For your heroic endouver, you have earned your just reward.")
	else
		doPlayerSendTextMessage(cid, 25, "You have already earned your reward.")
	end
return true
end
 
Thanks for help :D
I arleady have this scrpit with quest reward (StepIn script) but i rep++ :)

I'm wating for next scrpits :)
 
I make scrpit (1.Pain).
Here it is:
LUA:
-- >>CONFIG<< --
local ATTACK_DELAY = 500 -- How big should the delay be between each heal? Milliseconds > 1000 = 1 second.
local ATTACK_TIMES = 20 -- How many times shall it heal you each time you use it?
-- >>CONFIG<< --

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.3, -30, -1.9, -45)

function onCastSpell(cid, var)
	local function onCastSpell1(parameters)
		doCombat(parameters.cid, parameters.combat, parameters.var)
	end
	
	local parameters = {cid = cid, combat = combat, var = var}
	for i = 0, math.max(ATTACK_TIMES, 1) - 1 do
		addEvent(onCastSpell1, ATTACK_DELAY * i, parameters)
	end
	return LUA_NO_ERROR
end
 
Back
Top