• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Why not learn spells from books?

Elite Knight Le

Ja Tu Tylko Sprzatam
Joined
Jul 18, 2010
Messages
38
Reaction score
2
What about making books which makes you learn new spell? The book will be like food, you use it and you learn new spell. It cloud be usefull for quests, and others.
 
Last edited:
As a mod:
XML:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Spell Scroll" version="1.0" author="Ledtheron" contact="[email protected]" enabled="yes">
    <item id="8189" article="a" name="Spell Scroll">
        <attribute key="weight" value="500" />
        <attribute key="description" value="Use it for learn the spell!!!" />
    </item>
</mod>
As action:
Code:
local spell = "[color=red]NAME OF SPELL[/color]"
local words = "[color=blue]WORDS[/color]"
function onUse(cid, item, fromPos, itemEx, toPos)
if getPlayerLearnedInstantSpell(cid, spell) then
doPlayerPopupFYI(cid, "You already know how to cast this spell.")
else
doPlayerLearnInstantSpell(cid, spell)
doRemoveItem(item.uid, 1)
doPlayerPopupFYI(cid, "You learned ... " ..spell.. " for cast it use the words: " ..words.. ".")
end
return true
end
Well... [[sorry for bad english i am chilean c:]]
and open your actions.xml in YOUROT/data/actions
and put this into the file:
Code:
<action itemid="[color=green]ITEMID[/color]" event="script" value="sc.lua"/>
Credits to: Soki2000
 
Last edited:
Okey, but how to make a scroll for one spell. For example exura spell scroll? Or how to make a scroll that learn you all spells?

No problem, my english doesn't rule too.
 
okay, if you can't figure out that by seeing what he posted then I'm sorry for you.
I'm going to adopt your signature and ignore your post ;)

@Edit: Tonks, i'm asking how to make this mod for one spell. I know how to use action, but what about mod? And is it possible to make a scroll which learns you all healing spells?
 
I'm going to adopt your signature and ignore your post ;)

@Edit: Tonks, i'm asking how to make this mod for one spell. I know how to use action, but what about mod? And is it possible to make a scroll which learns you all healing spells?
Lol, You can dude.
Just write the names of spells like ; ; ; ; ; ; ;
And it will learn you those spells.
I already give in my previous post the mod script, do it then
Also
Why did you write this then in your request?
What about making books which makes you learn new spell?
You asked for 1 spell!
Anyways, I did all I can do
If I helped, Just rep me
 
ot server world is full of ppl that don't even read thee codes or look at it, just by looking at it you can see how to add new stuff or edit itto your liking, and I'm sorry if you can't see it. Btw there is many topics about spell scroll/books you just need to use the search function.
 
I agree, the script tonks provided is enough for anyone to do this, if you can't then I feel sorry for you :(
 
Nothing to do..
Just go to your SERVER FOLDER/mods/create a new mod file and paste this inside:

XML:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Spell Scroll" version="1.0" author="Ledtheron" contact="[email protected]" enabled="yes">
    <item id="8189" article="a" name="Spell Scroll">
        <attribute key="weight" value="500" />
        <attribute key="description" value="Use it for learn the spell!!!" />
    </item>
</mod>
That's the spellbook item ID [8189]
Then go to spells.xml
and search for the spell that u want to.., then change this line:
XML:
needlearn="0"
To
XML:
needlearn="1"
 
Last edited:
::sigh::

If you use a table and some Action IDs, you can make that a lot more advanced, plus you can also change the name of the Item ingame with out modifying the items.xml.

Simple Script is Painfully Simple!
 
Back
Top