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

Magic effect problem

Thorn

Spriting since 2013
Joined
Sep 24, 2012
Messages
2,203
Solutions
1
Reaction score
921
Location
Chile
Hello, i'm trying to make an item to give an outfit, and when it does, it makes a magic effect. Recently i added one into my dat but i have no idea how to use it, if anyone could help me plz, here it is
Code:
function onUse(cid, item, frompos, item2, topos)
    if getPlayerSex(cid) == 1 then
            doPlayerAddOutfit(cid, 842, 1)
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREAREA)
            doCreatureSay(cid, "Felicidades, ahora posees el Ash Avatar", TALKTYPE_MONSTER)
            doRemoveItem(item.uid, 1)           
    elseif getPlayerSex(cid) == 0 then
            doPlayerAddOutfit(cid, 842, 1)
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREAREA)
            doCreatureSay(cid, "Felicidades, ahora posees el Ash Avatar", TALKTYPE_MONSTER)
            doRemoveItem(item.uid, 1)
    end
end
 
CONST_ME_FIREAREA is set to an integer in global.lua. It looks like the numbers have to be between 1 and 254.

When you created and saved yours did you get an index number in that range? If so, try the number instead of CONST_ME_FIREAREA. If you're not sure, try the first unused number (in my TFS it's 76)
 
i'm sorry i'm not following you, i replace once that CONST_ME_FIREAREA for the ID of the new spell but it didn't work :S
 
Your original post is ambiguous: it's not clear of you're having a problem with the new item, the new outfits, or a hand-built magic effect.
I guessed a magic effect but I might be wrong.

Also if you're using SpellCreator you should be in the Tools forum.
 
i'm not using spell creator, i added a maic effect into the dat, and i want to know how do i use that new effect, in that script
 
i'm not using spell creator, i added a maic effect into the dat, and i want to know how do i use that new effect, in that script

You need a better english man xD...

You problem is because you add a new effect to your client, if you want to server to recoignize it you have to recompile the server and add the effect in enums.h and in tools.cpp, and then the server will show what you add to the .dat
 
damm looks difficult, do you know if there's any tutorial about this? about the compiling specially?
 

Similar threads

Back
Top