Cast spell by Sending Packets menu

Shout-Out

User Tag List

Results 1 to 2 of 2
  1. #1
    starfish99's Avatar Corporal
    Reputation
    31
    Join Date
    May 2008
    Posts
    24
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cast spell by Sending Packets

    Finally, I found the way of casting aoe spells by programming
    I think this may be useful, so share it.

    delphi code :

    const

    ptrSendPacket = $00584450; //function address(currentconnection_sendpacket)
    pDataStore1 = $0092DB38; // first parameter (for normal)
    pDataStore2 = $0092EE40; // first parameter (for warden)
    ptrNextCastCount = $012E8541;//it's a counter, looping from 1 to FF
    //each casting packet will increase this value

    CMSG_CAST_SPELL = $12E; //OpCode for cast spell

    type

    //datastore structure

    PDataStore = ^TDataStore;
    TDataStore = record
    ptrDataStore : DWord; // pDataStore1,pDataStore2
    ptrPacketData : DWord; //pointer to packet data
    UnKnown1 : DWord; //always 0
    MayType : DWord; // 0x100 for normal, 0x300 for warden
    PacketLen : DWord; //data length
    UnKnown3: DWord; //always 0
    end;

    //packet data structure for cast spell with no target

    PCastSpell = ^TCastSpell;
    TCastSpell = packed record
    OpCode : DWord;
    Count : Byte; //
    SpellID : Word;
    Zero1 : Byte;
    Zero2 : Byte;
    Zero3 : Byte;
    SpellType : DWord;
    end;

    //packet data structure for cast spell with target

    PCastSpellTarget = ^TCastSpellTarget;
    TCastSpellTarget = packed record
    OpCode : DWord;
    Count : Byte;
    SpellID : Word;
    Zero : Array[1..3] of Byte;
    SpellType : DWord;
    Target : TGUID;
    end;

    //packet data structure for cast spell with postion

    PCastSpellAOE = ^TCastSpellAOE;
    TCastSpellAOE = packed record
    OpCode : DWord;
    Count : Byte;
    SpellID : Word;
    Zero1 : Byte;
    Zero2 : Byte;
    Zero3 : Byte;
    SpellType : DWord; //$40
    X : Single;
    Y : Single;
    Z : Single;
    end;

    var

    MyCastSpellAOE : TCastSpellAOE;
    PMyCastSpellAOE : PCastSpellAOE = @MyCastSpellAOE;
    procedure CastSpellAOE_Target(SpellID : Word);

    implementation

    //it's an example for casting aoe spells, centerd with target

    procedure CastSpellAOE_Target(SpellID : Word);
    var
    count : Byte;
    ptrTarget : DWord;
    PTargetObj : PWOWObject;
    begin

    try

    //get target object
    ptrTarget := GetTargetPointer;
    if ptrTarget=0 then
    exit;
    PTargetObj := PWOWObject(ptrTarget);

    //get current counter
    count := 0;
    ReadProcessMemory(ProcessHandle, Pointer(ptrNextCastCount), @count, 1, dwSize);

    //prepare casting packet data

    PMyCastSpellAOE^.OpCode := CMSG_CAST_SPELL;
    PMyCastSpellAOE^.Count := Byte(count);
    PMyCastSpellAOE^.SpellID := Word(SpellID);
    PMyCastSpellAOE^.Zero1 := Byte(0);
    PMyCastSpellAOE^.Zero2 := Byte(0);
    PMyCastSpellAOE^.Zero3 := Byte(0);
    PMyCastSpellAOE^.SpellType := $40;
    PMyCastSpellAOE^.X := PTargetObj^.X;
    PMyCastSpellAOE^.Y := PTargetObj^.Y;
    PMyCastSpellAOE^.Z := PTargetObj^.Z;

    //prepare datastore to send

    PMyDataStore^.ptrDataStore := pDataStore1;
    PMyDataStore^.ptrPacketData := LongWord(PMyCastSpellAOE);
    PMyDataStore^.UnKnown1 := 0;
    PMyDataStore^.MayType := $100;
    PMyDataStore^.PacketLen := $1A;
    PMyDataStore^.UnKnown3 := 0;

    //call sendpacket

    asm

    mov ecx,[ptrCurrentConnection]
    push PMyDataStore
    mov ebx,ptrSendPacket
    call ebx

    end;

    //increase counter by 1
    count := count+1;
    WriteProcessMemory(ProcessHandle, Pointer(ptrNextCastCount), @count, 1, dwSize);

    except
    LogInfo('Cast aoe Error!');
    end;
    end;
    Last edited by starfish99; 12-23-2008 at 09:25 AM.

    Cast spell by Sending Packets
  2. #2
    skyworld009's Avatar Member
    Reputation
    1
    Join Date
    Oct 2008
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it is very usefull

Similar Threads

  1. LUA scripting -- Making game objects cast spells.
    By Jotox in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 05-08-2008, 03:44 PM
  2. [Guide] Making GO`s cast spells.
    By Mr FlySquirrel in forum WoW EMU Guides & Tutorials
    Replies: 8
    Last Post: 02-27-2008, 02:39 PM
  3. Player Cast Spell?
    By Ballwinkle in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 02-06-2008, 06:06 PM
  4. [Question] hmm, how do i make a mob rapidly cast spells?
    By Creepfold in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 12-27-2007, 10:38 AM
  5. [GUIDE] - Scripting for Antrix, Making Mobs Talk, Cast Spells, etc
    By Greed in forum WoW EMU Guides & Tutorials
    Replies: 6
    Last Post: 12-10-2007, 07:51 PM
All times are GMT -5. The time now is 12:16 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search