Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
internal functions
Results 1 to 4 of 4

Thread: internal functions

  1. #1
    Super Moderator klusbert's Avatar
    Join Date
    Dec 2007
    Posts
    1,201

    internal functions

    Hello I started to learn about intermodular calls. I have already manage make this function work.

    Attack
    Say
    Turn
    ItemUse(only on map)
    CloseContainer
    Logout.

    So now I try to use items in containers and in slots but I can not make it work. Hope some one can help me.

    [code=vbnet]
    Dim func As New InternalFunction
    func.Caller = caller
    func.Address = ItemUseadr
    func.CallingConvention = CallConvention.Cdecl
    Dim l As Location = client.PlayerLocation
    l.Y -= 1
    func.Call(l.X, l.Y, l.Z, 1948, 0, &HF)
    [/code]

    This working for use a ladder.
    [code=vbnet]
    Dim func As New InternalFunction
    func.Caller = caller
    func.Address = ItemUseadr
    func.CallingConvention = CallConvention.Cdecl
    Dim i As Item = client.Inventory.GetItem(ItemLocation.FromContaine r(0, 0))
    Dim l1 As Location = i.Location.ToLocation
    func.Call(l1.X, l1.Y, l1.Z, i.Id, CInt(i.Location.StackOrder), &HF)
    [/code]

    This do not work. I haveing problem with getting arguments from olly. So if someone can help me with that I will be great full.

  2. #2
    Super Moderator klusbert's Avatar
    Join Date
    Dec 2007
    Posts
    1,201

    RE: internal functions

    Correct arguments For Slot

    [code=vbnet]
    func.Call(&HFFFF, SlotNumber, 0, ItemId, 0, Index) 'index = zero if its not a container.
    [/code]
    Correct arguments For container
    [code=vbnet]
    func.Call(&HFFFF, ContainerNumber +40, ContainerSlot, ItemId, containerSlot, Index) 'index = zero if its not a container.
    [/code]

    Correct arguments for MapItems.

    [code=vbnet]
    func.Call(l.X, l.Y, l.Z, ItemId, Stack, Index) 'index = zero if its not a container.
    [/code]

    I learned how to get arguments for tibias Function so that's why I found this. And big thanks to blaster_89

    And I was changed in TibiaApi so itemuse function should only be used for eat food use ladders etc, and not for open containers. For open containers use OpenAsContainer instead.

  3. #3
    is there anyway to make a combobot with internal functions, grab another players target and when he is shootin?

  4. #4
    Also, strangely I can move an item from hand to bp, but not the other way around, just says Sorry not possible

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •