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 archive_postsperpage - assumed 'archive_postsperpage' (this will throw an Error in a future version of PHP) in ..../archive/index.php on line 456
Exp ToNextLvl and LvlSpy,NameSpy: questions [Archive] - Forums

PDA

View Full Version : Exp ToNextLvl and LvlSpy,NameSpy: questions



Bruno
07-17-2007, 06:58 PM
There is any logic to calculate exp for next level or you have to store all the exp for each level in you program? Like make an enum with:

lvl 1 - 0
lvl 2- 100
lvl 3-....

And how to make a lvl spy? You need just to change the adresses?



' level spy
LEVELSPY_NOP = &H4C4320

LEVELSPY_ABOVE = &H4C431C
LEVELSPY_BELOW = &H4C4324


What you need to do?

What NameSpy does? Its for seeing invisible monsters?

Ty for reading! Bye!

zionz
07-17-2007, 07:08 PM
The formula for exp lvl is:
exp needed = ((50*lvl*lvl*lvl - 150*lvl*lvl + 400 *lvl) / 3)

lvl is the desired level-1, so for lets say lvl 20 it will be:

((50*19*19*19 - 150*19*19 + 400 *19) / 3) = 98800

Bruno
07-17-2007, 08:56 PM
Ty for the first answer! Now anybody could help me on the LevelSpy and NameSpy questions?

Ty a lot!

zionz
07-17-2007, 09:05 PM
Im not sure about the level spy, i've never done it before but i assume you have to write some values in that memory addresses, in LEVELSPY_NOP im sure you have to write a 0x90 (hex), thats the asm NOP instruction, but in the other 2 im not sure.

Have you tried reading whats in the ABOVE/BELOW addresses? i think its a single byte.

Bruno
07-18-2007, 12:08 AM
I think i got it, now about containers:

There are the container star and end, i can get there the itens id and count, but how to get the spot anc container id? Like container 1, spot 1, i cant find them in bethween the adress of Container start and end!

The adresses are on:

http://www.xcreations.net/~tpforums/forum/showthread.php?t=547

Ty for helping! Cya!

zionz
07-18-2007, 01:09 AM
There are 16 containers, each have 36 items max (i think), so to read all you need to do something like this:

C++ code:


int mem_addr=0x617000;
int cont_size=492;
int i,t;
int ID,SlotCount,ItemCount,ItemID,ItemCount
string Name;

for(i=0; i<16; i++){
IsOpen=ReadLong(mem_addr + (i*cont_size));

//If its open read the contents
if(IsOpen){
ID=ReadLong(mem_addr + (i*cont_size) +4); //ID of the container
Name = ReadString(mem_addr + (i*cont_size) +16); //Name of the container
SlotCount = ReadLong(mem_addr + (i*cont_size) +48); //Max capacity
ItemsInContainer = ReadLong(mem_addr + (i*cont_size) +56); //Amount of items

//Read items in this container
for(t=0; t<ItemsInContainer; t++){
ItemID=ReadLong(mem_addr + (i*cont_size) + (t*12) +60); //Item ID
ItemCount=ReadLong(mem_addr + (i*cont_size) + (t*12) +64); //Item amount
}
}
}


I extracted this piece of code from a test program, if you want it i can give the full source.

Bruno
07-18-2007, 04:05 PM
Ty, but the IsOpen method to see if the container is openned is not working, all the containers are oppened using this code :/, could you help? TY!

zionz
07-18-2007, 07:28 PM
I copy the address from the list, make sure that it starts from the first open bp, if you read the mem_adress with no open containers at all you should see a 0 in the address 0x617000. if not then the address may start from another offset.

Try this, first close ALL the containers, then open your BP, and read:
IsOpen=ReadLong(0x617000);

IsOpen should be 1, then close all and read again, it should change to 0

Bruno
07-18-2007, 10:36 PM
Oh ty, it was a code error that i didnt saw ;p
So, supose i want to make an Auto-Grouping, i will pick 1 gp and get togheter with other gps, thats ok, but how to know if item is countable? I mean, you cant get ropes togheter, fishing rods, runes, backpacks....

Ty for helping!

zionz
07-18-2007, 11:41 PM
Well thats a problem, you will need to read Tibia.Dat file that contains description of all the items and map tiles, also you can look at TibiaAuto in sourceforge tiles.xml or something like that, it's like an extracted tibia.dat but its outdated i think and its missing some items.