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

REQUEST! Help with custom spells, please

thief

Member
Joined
Sep 23, 2008
Messages
342
Reaction score
16
Location
Canada
Custom Spells

  • A spells that increase the speed attack from 2x for 30 seconds and will cost 2 banana's
  • A spells for that summon 2 fire element's at once but cost 3 banana's
  • A spells with the same exevo gran mas flam but exept after it will do 100dmg per 1 sec for 10 seconds but cost 4 banan's
  • A spell that will increase Knight DMG temporaly for 30 seconds but decrease shielding by 30 but cost 2 banan's
  • A spell that will regen the mana of druid by 600 instantly but will cost 5 banana's from their inventory

I will rep+ TO EVERYONE who helps me!
 
  • A spells for that summon 2 fire element's at once but cost 3 banana's

Im almost sure this can only be done as a spell by editing sources, but if you dont mind having it as a talkaction (works the same anyways), then here it is:

talkactions.xml:

PHP:
<talkaction access="0" log="no" filter="quotation" words="mas res" event="script" value="2fe.lua" />

You can change the words to what you want.

In talkactions > scripts folder, make 2fe.lua and add this:

Lua:
function doPlayerAddSummon(cid, name, pos)  
    local MyCreature = doSummonCreature(name, pos)  
    doConvinceCreature(cid, MyCreature)
end

function onSay(cid, words, param, channel)

local level = 80
local mana = 450
local item = 2676 -- ID of Bananas
local amount = 3
local vocsCanUse = {1, 2, 3, 4, 5, 6, 7, 8}
local canBeSummoned = {"Fire Elemental"}
local summons = getCreatureSummons(cid)

		if getPlayerItemCount(cid,item) < amount then
					doPlayerSendCancel(cid, "You need 3 bananas to use this spell.")
					doSendMagicEffect(getCreaturePosition(cid), 2)
                return TRUE
		end
                 
        if(table.maxn(summons) >= 1) then	-- Working thanks to Old Greg
                        doPlayerSendCancel(cid, "You may not have more than 2 summoned creatures at once.")
						doSendMagicEffect(getCreaturePosition(cid), 2)
                return TRUE
        end

        if getPlayerLevel(cid) < level then
                doPlayerSendCancel(cid, "Your level is too low.")
				doSendMagicEffect(getCreaturePosition(cid), 2)
                return TRUE
        end

        if getCreatureMana(cid) < mana then
                doPlayerSendCancel(cid, "You do not have enough mana.")
				doSendMagicEffect(getCreaturePosition(cid), 2)
                return TRUE
        end

        if(not isInArray(vocsCanUse, getPlayerVocation(cid))) then
                doPlayerSendCancel(cid, "Your vocation cannot use this spell.")
				doSendMagicEffect(getCreaturePosition(cid), 2)
                return TRUE
        end

        if(not isInArray(canBeSummoned, param)) then
                doPlayerSendCancel(cid, "You cannot summon this creature with this spell.")
				doSendMagicEffect(getCreaturePosition(cid), 2)
                return TRUE
        end
 
	doPlayerRemoveItem(cid, item, amount)
    doPlayerAddSummon(cid, param, getCreaturePosition(cid))
	doPlayerAddSummon(cid, param, getCreaturePosition(cid))
    doSendMagicEffect(getCreaturePosition(cid), 15)		-- Use any effect you wish here.
        return TRUE
end

You can change the lvl, mana, itemID and everything you want there in the locals.

I based this script on this:
http://otland.net/f132/summon-single-creature-rep-36507/

I tested it on TFS 0.3.2 and it works, but it should work too for any newer version.

Ill post the other spells you requested (the ones I can possibly do) when I finish making them and testing them, but some I dont know how to do them (1st and 3rd).

Also, give more info on the 4th, what do you mean by Knight DMG? Spell damage, melee-related damage or to raise skills?

And just in case Im misunderstanding, in 3rd when you say "100 dmg every 1 seconds for 10 seconds", you mean this damage to be done to the caster or to the victim?

Cheers.
 
i got it to work, i just need help editting to cause fire damage to my target like exori flam.
 
Last edited:
Back
Top