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
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.
[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.