- Joined
- Jan 28, 2009
- Messages
- 1,320
- Reaction score
- 616
Write Field is a function that helps with adding and editing maps in PristonTale client and server.
Write Field by Vormav is licensed under a
You are free:
to Share — to copy, distribute and transmit the work
to Remix — to adapt the work
to make commercial use of the work
writeField versions:
1.18.7
1.17.6
1.17.4
1.17.2
1.16.1
1.0.0
PRE AoR/Morion PristonTale maps:
new fixed names with prefix old_
writeField tutorial:
LINK
0) Download:
- Newest version of writeField
-
-
-
1) Open writeClientField.cbp (Code::Blocks). In writeClientField.h you will find those addresses and small tutorial how to find them:
- find this code in your game.exe and put those addresses in you writeClientField.h file
- if build target is not set to Release than change it. Rebuild (ctrl + F11) your .dll and copy it (bin\Release) to PristonTale main folder.
- you might need to do same thing for writeServerField.h if for some reason your addresses are different
2) Open game.exe with CFF explorer, in CFF Explorer go to import adder, check Create New Section and press Add. Select writeClientField.dll and press Open. Select function:
- writeClientField
and press Import By Name, press Rebuild Import Table. Save your changes.
- do same thing in server but use writeServerField.dll
3) Open game.exe with OllyDbg, find code posted in .h file. Select top of code (00432DE0 /$ 51 PUSH ECX) and press ctrl + R.
- select CALL and press ENTER
- change this CALL to "CALL writeClientField"
- if there is more than one CALL than change them too
- do same thing in server but use "CALL writeServerField"
4) This point is optional, you can remove (NOP) function that where creating field in PT (and some sub functions that are called only by this function) it will give you some space to assemble other things.
Congratulations you added Write Field to your client and server!
___________________________________________________________________________________
Some things that you should know but you are afraid to ask:
Here is quick functions overview:
- field function:
First and always needed, look at comments to understand parameters, nothing more to say about it.
- animation function:
This function is loading your animated parts of map.
- field cmd fnction:
Admin cmd function, to understand how XYZ in PT works look at tutorial, for PristonTale Z is Y in admin HUD.
- respawn function
Location of your respawn after you die or login to game. If there is no respawn function than fieldCmd function take respawn place.
- teleport function:
Function making filed that will teleport you to desired location on map. This function is always followed by teleportTo function.
- teleportTo function:
Function is creating exit location.
- fieldLoad function:
This function will load field that is near.
- sounds function:
This will put sound on map. Pay attention to XYZ, this is only function that have this order, look at tutorial to understand XYZ of PristonTale
- environment function:
This function control environment on map.
//----- changeLog.txt:
1.18.7
- added new map "sod-2"
- remodeled "Fall_Game" code for new version of "Fall_Game"
1.17.6
- fixed problem with placing NPC on field
- names of old pre AoR fields have old_ prefix
1.17.4
- license changed to Creative Commons Attribution 3.0 Unported License
- IDE changed to Code::Blocks
- C code compile as C++
1.17.2
- added "changeLog.txt" file to source
- added new map "mine-1"
1.16.1
- added 16 new maps from PRE AoR/Morion PristonTale
- bit more clear license statement
1.0.0
- server version created and merged with client version
- fixed missing music in some places
- fixed some sounds
- added new comments
Special thanks for bobsobol.
HAVE FUN WITH IT!!
Write Field by Vormav is licensed under a
You must be registered to see links
.You are free:
to Share — to copy, distribute and transmit the work
to Remix — to adapt the work
to make commercial use of the work
writeField versions:
1.18.7
1.17.6
1.17.4
1.17.2
1.16.1
1.0.0
PRE AoR/Morion PristonTale maps:
new fixed names with prefix old_
You must be registered to see links
writeField tutorial:
LINK
0) Download:
- Newest version of writeField
-
You must be registered to see links
-
You must be registered to see links
-
You must be registered to see links
1) Open writeClientField.cbp (Code::Blocks). In writeClientField.h you will find those addresses and small tutorial how to find them:
Code:
//----- Those addresses change with each version of Priston Tale
LPSTR fieldField = (LPSTR)[COLOR=Magenta]0x007CFFF8[/COLOR];
LPSTR fieldMap = (LPSTR)[COLOR=Magenta]0x007D0078[/COLOR];
LPSTR fieldTitle = (LPSTR)[COLOR=Magenta]0x007D0038[/COLOR];
void *firstFieldPointer = (void *)[COLOR=Magenta]0x007D00B8[/COLOR];
PBYTE firstField = (PBYTE)[COLOR=Magenta]0x007D00B8[/COLOR];
PBYTE lastField = (PBYTE)[COLOR=Magenta]0x009190D4[/COLOR];
/* Example from kPT version 1.98.9
*
* [...]
*
* 00432DE0 /$ 51 PUSH ECX
* 00432DE1 |. 53 PUSH EBX
* 00432DE2 |. 56 PUSH ESI
* 00432DE3 |. 8B35 34825C00 MOV ESI,DWORD PTR DS:[<&KERNEL32.lstrcpyA>] ; kernel32.lstrcpyA
* 00432DE9 |. 57 PUSH EDI
* 00432DEA |. 68 90CC5C00 PUSH game.005CCC90 ; /String2 = "field\"
* 00432DEF |. 68 18F17A00 PUSH game.007AF118 [B]<---[/B] [COLOR=Magenta]fieldField[/COLOR] ; |String1 = game.007AF118
* 00432DF4 |. FFD6 CALL ESI ; \lstrcpyA
* 00432DF6 |. 68 84CC5C00 PUSH game.005CCC84 ; /String2 = "field\map\"
* 00432DFB |. 68 98F17A00 PUSH game.007AF198 [B]<---[/B] [COLOR=Magenta]fieldMap[/COLOR] ; |String1 = game.007AF198
* 00432E00 |. FFD6 CALL ESI ; \lstrcpyA
* 00432E02 |. 68 74CC5C00 PUSH game.005CCC74 ; /String2 = "field\title\"
* 00432E07 |. 68 58F17A00 PUSH game.007AF158 [B]<---[/B] [COLOR=Magenta]fieldTitle[/COLOR] ; |String1 = game.007AF158
* 00432E0C |. FFD6 CALL ESI ; \lstrcpyA
* 00432E0E |. 33C0 XOR EAX,EAX
* 00432E10 |. B9 001F0500 MOV ECX,51F00
* 00432E15 |. BF D8F17A00 MOV EDI,game.007AF1D8 [B]<---[/B] [COLOR=Magenta]firstField[/COLOR] [B]/[/B] [COLOR=Magenta]*firstFieldPointer[/COLOR]
* 00432E1A |. F3:AB REP STOS DWORD PTR ES:[EDI]
* 00432E1C |. 33DB XOR EBX,EBX
* 00432E1E |. 33C9 XOR ECX,ECX
* 00432E20 |. B8 F4057B00 MOV EAX,game.007B05F4
* 00432E25 |> 8908 /MOV DWORD PTR DS:[EAX],ECX
* 00432E27 |. 05 7C140000 |ADD EAX,147C
* 00432E2C |. 41 |INC ECX
* 00432E2D |. 3D F4818F00 |CMP EAX,game.008F81F4 [B]<---[/B] [COLOR=Magenta]lastField[/COLOR]
* 00432E32 |.^7C F1 \JL SHORT game.00432E25
*
* [...]
*
*/
- find this code in your game.exe and put those addresses in you writeClientField.h file
- if build target is not set to Release than change it. Rebuild (ctrl + F11) your .dll and copy it (bin\Release) to PristonTale main folder.
- you might need to do same thing for writeServerField.h if for some reason your addresses are different
2) Open game.exe with CFF explorer, in CFF Explorer go to import adder, check Create New Section and press Add. Select writeClientField.dll and press Open. Select function:
- writeClientField
and press Import By Name, press Rebuild Import Table. Save your changes.
- do same thing in server but use writeServerField.dll
3) Open game.exe with OllyDbg, find code posted in .h file. Select top of code (00432DE0 /$ 51 PUSH ECX) and press ctrl + R.
- select CALL and press ENTER
- change this CALL to "CALL writeClientField"
- if there is more than one CALL than change them too
- do same thing in server but use "CALL writeServerField"
4) This point is optional, you can remove (NOP) function that where creating field in PT (and some sub functions that are called only by this function) it will give you some space to assemble other things.
Congratulations you added Write Field to your client and server!
___________________________________________________________________________________
Some things that you should know but you are afraid to ask:
Here is quick functions overview:
- field function:
Code:
// field function
field((char *)fore_3, // field start
"forest\\fore-3.ase", // file_path\\file_name.ase
(char *)"fore-3"); // short title name, 0 = no title
First and always needed, look at comments to understand parameters, nothing more to say about it.
- animation function:
Code:
// animation function
animation((char *)fore_3, // field start
(char *)"forest\\3ani-01.ASE", // file_path\\file_name.ase
0); // 0 = ON, 1 = OFF
This function is loading your animated parts of map.
- field cmd fnction:
Code:
// /field <field_number> command function
fieldCmd((char *)fore_3, // field start
-16419, // X
-7054); // Z
Admin cmd function, to understand how XYZ in PT works look at tutorial, for PristonTale Z is Y in admin HUD.
- respawn function
Code:
// respawn function, if don't exist than fieldCmd is a respawn
respawn((char *)fore_3, // field start
-10585, // X
-11810); // Z
Location of your respawn after you die or login to game. If there is no respawn function than fieldCmd function take respawn place.
- teleport function:
Code:
// teleport function
teleport((char *)fore_3, // field start
-16638, // X
-6737, // Z
267, // Y
64, // length
32, // width
55, // teleport level, if player level >= teleport level than player can us it
0); // 0 = no animation, 1 = teleport animation, 2 = teleport list
Function making filed that will teleport you to desired location on map. This function is always followed by teleportTo function.
- teleportTo function:
Code:
// teleportation to X Z Y coordinates function
teleportTo((char *)fore_3, // field start
(char *)tcave, // tcave field
119112, // X
26028, // Z
510); // Y
Function is creating exit location.
- fieldLoad function:
Code:
// Load next field function
fieldLoad((char *)fore_3, // field start
(char *)fore_2, // fore-2 field
-8508, // X
-10576, // Z
0); // Y
This function will load field that is near.
- sounds function:
Code:
// sounds on field function
sound((char *)fore_3, // field start
-13819, // X
226, // Y
-8950, // Z
100, // range
sndT_watermill_1); // sound type (use name or number from 0 to 29)
This will put sound on map. Pay attention to XYZ, this is only function that have this order, look at tutorial to understand XYZ of PristonTale
- environment function:
Code:
// environment function
environment((char *)fore_3, // field start
fldT_forest, // field type (use name or number, fT_forest = 512)
skyT_forest_day_4, // day sky (use name or number, skyT_forest_day_4 = 2)
skyT_forest_evening_5, // evening sky (use name or number, skyT_forest_evening_5 = 3)
skyT_forest_night_6, // night sky (use name or number, skyT_forest_night_6 = 1)
bgmT_forest_darkwood, // background music (use name or number from -1 to 12)
0, // 0 = monsters spawn all the time, 1 = monsters spawn only at night
1, // field lvl
1); // skills block
This function control environment on map.
//----- changeLog.txt:
1.18.7
- added new map "sod-2"
- remodeled "Fall_Game" code for new version of "Fall_Game"
1.17.6
- fixed problem with placing NPC on field
- names of old pre AoR fields have old_ prefix
1.17.4
- license changed to Creative Commons Attribution 3.0 Unported License
- IDE changed to Code::Blocks
- C code compile as C++
1.17.2
- added "changeLog.txt" file to source
- added new map "mine-1"
1.16.1
- added 16 new maps from PRE AoR/Morion PristonTale
- bit more clear license statement
1.0.0
- server version created and merged with client version
- fixed missing music in some places
- fixed some sounds
- added new comments
Special thanks for bobsobol.
HAVE FUN WITH IT!!
Attachments
You must be registered for see attachments list
Last edited: