Let's say u want to block scroll of rebirth in castle (castle war).
We cant do this in standard way, so we have to change revival function. Idea: add function which will be called from revival function that control Player's X,Y and compare them with coordinates of forbidden area.
Symbols in this guide:
-PX,PY - player's X, player's Y
-X1,Y1 - south-west left corner of area where u cant use rebirth
-X2,Y2 - north-east corner of area where u cant user rebirth
Function:
if PX<X1 -> rebirth works
if PX>X2 -> rebirth works
if PY<Y1-> rebirth works
if PY>Y2 ->rebirth works
else rebirth doesn't work (PX and PY is in our area)
Ok, let's start modifications - everything is in MainSvrT.exe
1) Open it in hexeditor, (for ex. xvi32)
-Make bypass of revival function - (On start function jmp to our procedrue) - Go to offset 1FFA3 and replace bytes to:
E9 B8 AA 0B 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90
-Make our function. Goto offset daa60 (empty area) and change bytes (overwrite) to:
8B 45 08 81 B8 4C 01 00 00 C0 C1 03 00 72 29 81 B8 4C 01 00 00 80 DE 03 00 77 1D 81 B8 50 01 00 00 00 E1 03 00 72 11 81 B8 50 01 00 00 C0 0D 04 00 77 05 E9 1E 55 F4 FF 51 89 4D FC 8B 45 FC 8B 48 04 51 8B 4D 08 E8 A5 9E F8 FF E9 06 55 F4 FF
This is our function. It looks like:
mov eax,[ebp+08]
cmp [eax+14c], X1 <- check PX with X1
jb out_of_area <- jump if below
cmp [eax+14c],X2 <-check PX with X2
ja out_of_area <- jump if above
cmp [eax+150], Y1 <- check PY with Y1
jb out_of_area
cmp [eax+150],Y2 <-check PY with Y2
ja out_of_area
return from function (we are in area, jump back into end of revival function)
out_of_area: commands from orginal revival function.
2) Save, close. It's done![]()



Reply With Quote![[Tutorial] How to block rebirth on some area](http://ragezone.com/hyper728.png)



