killerminx Posted August 30, 2009 Author Share Posted August 30, 2009 Im trying to make a command custommenuspellanime i thought basically i could just copy a custom menu thing and plug the spell information in ther and it did not work```Sub CustomMenuanime(ByVal SpellNum As Long, ByVal picture_index As Long, ByVal Left As Long, ByVal top As Long) Dim packet As String If alignment < 0 Or alignment > 2 Or picture_index < 0 Or player_index <= 0 Or player_index > MAX_PLAYERS Then Exit Sub End If packet = "scriptspellanim" & SEP_CHAR & picture_index & SEP_CHAR & Left & SEP_CHAR & top & END_CHAR Call SendDataTo(player_index, packet)End Sub```could anyone help me? Link to comment Share on other sites More sharing options...
Patrick Posted August 30, 2009 Share Posted August 30, 2009 Command? Wouldn't you need a command enterer? Eg. /commandenter Link to comment Share on other sites More sharing options...
balliztik1 Posted August 30, 2009 Share Posted August 30, 2009 Making your own command isn't as simple as copying/pasting. You have to tailor the parameters to suit your needs.I'll brb in a few. Sorry. But I'll explain then. Link to comment Share on other sites More sharing options...
killerminx Posted August 30, 2009 Author Share Posted August 30, 2009 Yea i didn't think it would but i wanted to give it a try first. alrighty no rush Link to comment Share on other sites More sharing options...
Patrick Posted August 30, 2009 Share Posted August 30, 2009 This should be in scripting questions.```command /lol'// not sure about that bit >.<Call ShowCustomMenu (index, "thisisthenameofthecustommenu")Call HideCustomMenu (index, "thisisthenameofthecustommenu")'//thathidesthatcustommenu.``` Link to comment Share on other sites More sharing options...
balliztik1 Posted August 30, 2009 Share Posted August 30, 2009 First thing you need to do is examine the code you have and pick out the variables:> Dim packet As String> > If alignment < 0 Or alignment > 2 Or picture_index < 0 Or player_index <= 0 Or player_index > MAX_PLAYERS Then> Exit Sub> End If> > packet = "scriptspellanim" & SEP_CHAR & picture_index & SEP_CHAR & Left & SEP_CHAR & top & END_CHAR> Call SendDataTo(player_index, packet)Every variable has to get its value from somewhere. That is, with this command, you'd need 6 sources for those variables.The packet is dimmed within the source code, so that's 1\. That still leaves 5 variables. These 5, then, would be the parameters of your sub. However, I don't believe what you have done here will accomplish what you need. For example purposes, I will write the sub you'd use.```Sub custommenuanime(ByVal player_index As Long, ByVal picture_index As Long, ByVal Left As Long, ByVal top As Long, ByVal alignment as Long)```This would successfully execute what you've got. However, half of these parameters aren't really doing much. Brush up on some commands and add to this. Link to comment Share on other sites More sharing options...
killerminx Posted August 30, 2009 Author Share Posted August 30, 2009 ok yea i really don't need the alignment all i really need is the anim,ation num and the coordinates so when i post it on a custom menu its where you want it, i don't think i need alignment or picture_index, but let me post the two commands im working with.This is call custom menu picture```Sub CustomMenuPicture(ByVal player_index As Long, ByVal picture_index As Long, ByVal FileName As String, ByVal Left As Long, ByVal top As Long) Dim packet As String If picture_index < 0 Or player_index <= 0 Or player_index > MAX_PLAYERS Then Exit Sub End If packet = "loadpiccustommenu" & SEP_CHAR & picture_index & SEP_CHAR & FileName & SEP_CHAR & Left & SEP_CHAR & top & END_CHAR Call SendDataTo(player_index, packet)End Sub```this is too call spellanim```Sub SpellAnim(ByVal SpellNum As Long, ByVal mapper As Long, ByVal X As Long, ByVal Y As Long) Call SendDataToMap(mapper, "scriptspellanim" & SEP_CHAR & SpellNum & SEP_CHAR & Spell(SpellNum).SpellAnim & SEP_CHAR & Spell(SpellNum).SpellTime & SEP_CHAR & Spell(SpellNum).SpellDone & SEP_CHAR & X & SEP_CHAR & Y & SEP_CHAR & Spell(SpellNum).Big & END_CHAR)End Sub```So i tried to combine the 2```Sub CustomMenuanime(ByVal SpellNum As Long, ByVal Left As Long, ByVal top As Long) Dim packet As String packet = "scriptspellanim" & SEP_CHAR Left & SEP_CHAR & top & END_CHAR Call SendDataTo(player_index, packet)End Sub``` Link to comment Share on other sites More sharing options...
balliztik1 Posted August 30, 2009 Share Posted August 30, 2009 Ah, no. I see what you're trying to do. This isn't about making a new command. To apply an animation on top of a menu would require some heavy edits. You'd need to make a blitting procedure with them and make the appropriate objects on the Custom form. Link to comment Share on other sites More sharing options...
killerminx Posted August 30, 2009 Author Share Posted August 30, 2009 so as you can tell im not a great at this but could you point me in a direction to try and figure it out? like what modules to look in and such, i at least what to try. Link to comment Share on other sites More sharing options...
balliztik1 Posted August 31, 2009 Share Posted August 31, 2009 Well, first of all, look at BltSpell (or something like that). That shows all the steps that a spell animation goes through. That'd be a good place to start. Then, take a look at how Custom Menus load the images in. You'd have to combine the two and add in a new object that will be used to display the animation on the menu. Link to comment Share on other sites More sharing options...
killerminx Posted September 1, 2009 Author Share Posted September 1, 2009 Yeah i cant seem to get it to work but I'm gonna play with it a little longer to see if i can, anyways thanks for the help though. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now