Script_UnitAffectingCombat what am I doing wrong? menu

User Tag List

Results 1 to 5 of 5
  1. #1
    fvicaria's Avatar Active Member
    Reputation
    29
    Join Date
    Jan 2009
    Posts
    55
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Script_UnitAffectingCombat what am I doing wrong?

    Can anyone spot what am I doing wrong here?

    Script_UnitAffectingCombat = 0x1CC149 (rebased)

    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
    private delegate bool UnitAffectingCombatDelegate(String name);

    private static UnitAffectingCombatDelegate _unitAffectingCombat;

    ...

    var unitAffectingCombat = IntPtr.Add(Game.Memory.ImageBase, (int)FunctionOffsets.Script_UnitAffectingCombat);
    _unitAffectingCombat = Game.Memory.CreateFunctionDelegate<UnitAffectingCombatDelegate>(unitAffectingCom bat);

    I have been calling this with the following...

    _unitAffectingCombat("player") or _unitAffectingCombat("party1") etc...


    Any help will be appreciated.

    Script_UnitAffectingCombat what am I doing wrong?
  2. #2
    WBR's Avatar Member
    Reputation
    1
    Join Date
    Dec 2014
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try to

    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
    private delegate uint UnitAffectingCombatDelegate(IntPtr name);
    (IntPtr nameptr = Marshal.StringToHGlobalAnsi("target"))

  3. #3
    danwins's Avatar Contributor
    Reputation
    189
    Join Date
    Mar 2013
    Posts
    143
    Thanks G/R
    6/62
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First of all, Where are you getting 0x1CC149?

    i see Script_UnitAffectingCombat @ 0x371A4B(rebased).

    secondly, this is a lua callback function, which means the function prototype is more like:

    Code:
    int __cdecl Script_UnitAffectingCombat(lua_State *)

  4. #4
    fvicaria's Avatar Active Member
    Reputation
    29
    Join Date
    Jan 2009
    Posts
    55
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by danwins View Post
    First of all, Where are you getting 0x1CC149?

    i see Script_UnitAffectingCombat @ 0x371A4B(rebased).

    secondly, this is a lua callback function, which means the function prototype is more like:

    Code:
    int __cdecl Script_UnitAffectingCombat(lua_State *)
    My idb file got messed up after the I ran patchdiff I guess...
    Can you give me an example of how you would call it please?

    Thanks a lot!

  5. #5
    WBR's Avatar Member
    Reputation
    1
    Join Date
    Dec 2014
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lua state is stack, so you should a lua_pushstring before call it

Similar Threads

  1. What am i doing wrong this time?
    By Snailz in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 01-01-2008, 10:49 AM
  2. What am I doing wrong WoW.exe does not appear on WPE.
    By Eliteplague in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 10-30-2007, 04:21 AM
  3. [Question] errr what am i doing wrong?
    By Demonshade in forum WoW ME Questions and Requests
    Replies: 9
    Last Post: 10-10-2007, 04:22 AM
  4. DynDNS help. What am I doing wrong?
    By xxtennisdudexx in forum World of Warcraft Emulator Servers
    Replies: 21
    Last Post: 09-23-2007, 05:23 PM
  5. what am i doing wrong...
    By tiliqua in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 09-16-2007, 01:18 AM
All times are GMT -5. The time now is 02:01 PM. 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