[1.298, 1.310] Fixing the Moradon spawn location
This one got lost, couldn't restore it from the cache... so here goes a fresh guide. Hopefully I don't forget to leave anything out! ;)The reason it resets you back to 311,351/(351,311?) is because it's hardcoded to return there. That is, apart from /town'ing - you can change those in your START_POSITION table.
Firstly, Aujard resets the coordinates when you select your character, so we'll want to skip that check and tell LOAD_USER_DATA (the procedure called when you select a character) to set them instead (otherwise you'll be able to relog anywhere in Moradon and be where you were when you logged out):
So, skip the check by opening up Aujard and patching:
1.2980042555C EB 1E JMP SHORT 0042557C1.310004252F3 EB 52 JMP SHORT 00425347Remember to right-click in the code window, and go "Copy to executable" -> "All modifications" -> "Copy all", then right-click in the (new) code window and finally select "Save file" to save changes.
Now open up your LOAD_USER_DATA stored procedure and replace: SELECT Nation, Race, Class, HairColor, Rank, Title, , , Loyalty, Face, City, Knights, Fame, Hp, Mp, Sp, Strong, Sta, Dex, Intel, Cha, Authority, Points, Gold, , Bind, PX, PZ, PY, dwTime, strSkill, strItem,strSerial, sQuestCount, strQuest, MannerPoint, LoyaltyMonthly FROM USERDATA WHERE strUserId = @idWith: DECLARE @Zone tinyint, @PX int, @PZ int
SELECT @Zone = , @PX = PX, @PZ = PZ FROM USERDATA WHERE strUserId = @id
IF (@Zone = 21)
BEGIN
SET @PX = 817 * 100
SET @PZ = 423 * 100
END
SELECT Nation, Race, Class, HairColor, Rank, Title, , , Loyalty, Face, City, Knights, Fame, Hp, Mp, Sp, Strong, Sta, Dex, Intel, Cha, Authority, Points, Gold, @Zone, Bind, @PX, @PZ, PY, dwTime, strSkill, strItem,strSerial, sQuestCount, strQuest, MannerPoint, LoyaltyMonthly FROM USERDATA WHERE strUserId = @idNow, to fix up any remaining issues, we'll fix up the hardcoded coordinate referenced in Ebenezer. I will set them to 817,423 but for reference, you can change them to whatever you like (an easy way to do this is via the Decimal to Hexadecimal floating point calculator and the Hexadecimal to Decimal floating point calculator, but you can also learn how to do this manually here should you wish to!).
1.298
0049AA24 C745 0C 00404C44 MOV DWORD PTR SS:,444C4000
0049AA2B C745 10 0080D343 MOV DWORD PTR SS:,43D38000
1.310
00480920 C745 0C 00404C44 MOV DWORD PTR SS:,444C4000
00480927 C745 0C 0080D343 MOV DWORD PTR SS:,43D38000And you should be done. :)
页:
[1]