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

TalkAction TFS 1.0 Spellid Generator

Codinablack

Dreamer
Content Editor
Joined
Dec 26, 2013
Messages
1,557
Solutions
11
Reaction score
774
Greetings Otland. Here today I release a script I was trying to make so it would be easier to customize the spell id of custom spells. I couldn't find a picture of all the icons with all the numbers, so I thought a command might speed everything up. Anyways credits to @forgee for debugging the script.

Use talkaction like this /spellid 2 and you will receive an icon of spellid as a cooldown on your character for 5 seconds.

talkactions/scripts/spellid.lua

Code:
local cooldown = Condition(CONDITION_SPELLCOOLDOWN)
cooldown:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
cooldown:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_YELLOW_RINGS)
cooldown:setParameter(CONDITION_PARAM_TICKS, 5000)

function onSay(cid, words, param)
    local player = Player(cid)
    local spellid = tonumber(param)
    cooldown:setParameter(CONDITION_PARAM_SUBID, spellid)
    player:addCondition(cooldown)
    return false
end

talkactions.xml
Code:
<talkaction words="/spellid" separator=" " script="spellid.lua"/>

Here is a folder with all the spellid images for tfs 1.0 that I could find using this command
https://drive.google.com/file/d/0B1kXc88erqmjS2lzNXVWVVRLajA/view?usp=sharing

P.S. It returns false on purpose, I didn't like my command showing up, just the cooldown and animation.
 
Last edited:
BUGGED

Sorry Guys its bugged, it adds newly tried spell id with previously done spellid, so if you have tried 5 different ones, on the sixth one, all six show up, just keeps adding to the old...

Anyone know how to fix it?

EDIT: Forgee debugged check main post
 
Last edited:
a small tip: only declare a variable if you are going to use it more than once :p
 
Ok so the problem is in spellid, so I need to do a check, then spellid, I think that's what you mean, let me try something..
 
a small tip: only declare a variable if you are going to use it more than once :p

I tried some things, even tried to reset the spellid to nil, didn't seem to work same problem everytime, but @forgee found another way that works perfectly :D

updating main post with fix
 
Don't do anything above 169 it crashes the client
 
oh sorry for not being clear enough xD my tip was not about the error you had, just some thing to make the script looks better :p example:

if we use Player(cid) more than one time we use:

Code:
local player = Player(cid)
player:something1
player:something2
player:something3
player:something4

but if we are going to use it only once, we use:

Code:
Player(cid):something1

so we avoid creating a new variable :p
 
Oh, okay. My bad, I see what you are saying, I am still a noob, didn't know that looked bad, however I did know I could do that the second way you showed me, I have just kind of gotten in the habit of defining player everytime I am going to use it, same with creatuer. Thanks for the tip.

@Ninja or some moderator, I have saved pictures of the icons now with the spellid labeled to each picture, I was wanting to release here somewhere on the forum, but I am unsure where would be appropriate?
 
Last edited by a moderator:
Why don't you just put the image in the opening post?
 
It's a folder with all the images... But okay, done!
 
We spoke about it and then you created it, thumbs up for you @Codinablack
The images makes my job faster, loads faster.

Kind Regards,
Eldin.

Yeah, I know what you mean, I was dreading doing the spellid's but now its all done for all of my spells. It's no problem, it's something the community can use. I try to give back as much as I can, I believe that's what this is all about, people help me, and I help people and we all grow and learn and inspire each other.
 
This is nice, even if you can just search for spellid icons on google or see the ids convertion of otclient :D
(I know that might sound a little ironic... but it's not.)
 
252 views! Barely any comments... Kinda wish I could see how many have downloaded my attachment... anyways, I believe this deserves a bump....
 
Well, just to let you know I've just downloaded it :D! It sure deserves a bump, it will fasten the way I update spells in github ;). By the way, valid spellids goes up until 178, beyond that tibia client will crash.
 
Ugh... Can I have an updated link of these spellids list?
 
Ugh... Can I have an updated link of these spellids list?

That link still works. I tried it.


Code:
local cooldown = Condition(CONDITION_SPELLCOOLDOWN)
cooldown:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
cooldown:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_YELLOW_RINGS)
cooldown:setParameter(CONDITION_PARAM_TICKS, 5000)
function onSay(player, words, param)
    local spellid = tonumber(param)
    cooldown:setParameter(CONDITION_PARAM_SUBID, spellid)
    player:addCondition(cooldown)
    return false
end

UPDATE

works for 1.1 1.2 1.3
 
Back
Top