Jump to content
Eternal Lands Official Forums
idefix

Casting spell

Recommended Posts

Hey

 

Maybe someone can help me. I'm making small improvements to the Android client, and I got the combat working. Yay.

 

Next I thought I'd try to make casting spells work. However, I can't really get the restoration spell to work. Nothing simply happens. So I thought I'd ask here in case someone knows what's up with it.

 

I tried both of these:

public static final int CAST_SPELL = 39;
// Cast spell with reagents 1 and 24
... new Message(new byte[]{
                CAST_SPELL, 3, 0, (byte) 1, (byte) 24
        });

and

// Cast spell with ID 7 (Restoration)
... new Message(new byte[]{
                CAST_SPELL, 2, 0, (byte) 7
        });

On the other hand, my attackActor (and all the other messages) works just fine, so the problem is that I don't know what kind of message to send to the server to get the spell cast.

 

Thanks for any tips.

Share this post


Link to post
Share on other sites

The protocol is explained here. You need to send the number of sigils and each sigil image id. The ids are referenced to icons in the texture sigils.dds.

The desktop client sends 4 bytes for restoration.

39 2 1 24

Share this post


Link to post
Share on other sites

Hi

 

Thanks for response.

 

Based on the wiki I realised message length must be two bytes and len = 1 + data_length, so I got it to work with the following code:

return new Message(new byte[]{ CAST_SPELL, 4, 0, 2, 1, 24 });

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×