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

Lua How to set spell target without attacking?

Sacarus

Member
Joined
Mar 15, 2016
Messages
52
Reaction score
7
Is there some way to use a spell openning a target like in actions (use with, like a rune)? Or maybe, some way to call an action when I use some spell? Tnx
Note: TFS 1.2
 
Last edited:
Is there some way to use a spell openning a target like in actions (use with, like a rune)? Or maybe, some way to call an action when I use some spell? Tnx
The reason no one has responded to your question is because you have not given the server version you are using. Bumping the thread isn't going to help you get an answer to your problem. There are many different server versions on this forum, remember to ALWAYS included the server version with your question.
 
I'm not sure I understand the question, would you perhaps be able to rephrase it? Correct me if I'm wrong, but do you want a talkAction (player says something) to "open" (as in, open the door?)? Something like a "secret password"? :)
 
I'm not sure I understand the question, would you perhaps be able to rephrase it? Correct me if I'm wrong, but do you want a talkAction (player says something) to "open" (as in, open the door?)? Something like a "secret password"? :)
I guess he wants to create a spell casted on target, like with a crosshair. ('Use with...')

Is there some way to use a spell openning a target like in actions (use with, like a rune)? Or maybe, some way to call an action when I use some spell? Tnx
Note: TFS 1.2
You already answered it yourself. You can do it by onUse scripts in actions.
I can't see any other possibility.
 
I guess he wants to create a spell casted on target, like with a crosshair. ('Use with...')


You already answered it yourself. You can do it by onUse scripts in actions.
I can't see any other possibility.

Alright, this would make more sense than my interpretation. If that's the case I also think onUse script would be correct way to do this and seems like the only possibility as well - unless you use OTClient to mimic 'use with' behavior when casting a spell.
 
Last edited:
I guess he wants to create a spell casted on target, like with a crosshair. ('Use with...')


You already answered it yourself. You can do it by onUse scripts in actions.
I can't see any other possibility.

Yes, that´s what I want to do. Ok guys, I know i can use some action, but if I do it, it´s not a spell anymore, is an action applied to a item (I think). So, how can i force onUse event through onCastSpell or onSay? Or, how can i call onUse not using some item? Maybe, that was the point that you wanna tell me.
 
I just don't think you can. You can only use "onUse" with an item, because you need to click the object in-game (or have it targeted) since Tibia does not send your mouse position to the server. OTClient would probably be able to do this, if modified. The only thing I can think of is using onSay with user's "name", something that "exiva" / find person does. Other than that I don't think you simply cast a spell that will target creature / tile you're pointing with your mouse.
 
Yeah, thats what i thought. Sure I could modify the client, but its not a thing that i wanna spend my time now. My idea was exatly to avoid the necessity of to write a name to use a target spell (sry possible bad english)
 
Back
Top