[REQUEST] Trigger that define level max

04/26/2015 20:13 Trayne01#1
I have made this trigger:

PHP Code:
USE [PS_GameData]
GO
/****** Object:  Trigger [dbo].[LevelMax]    Script Date: 26/04/2015 20:11:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO




ALTER trigger 
[dbo].[LevelMax]
on [PS_GameData].[dbo].[Chars]
after UPDATE
as
IF (
UPDATE (Level) and UPDATE (StatPoint) and UPDATE (SkillPoint))
begin
declare @oldLevel int
declare @newLevel int
declare @oldStatPoint int
declare @newStatPoint int
declare @oldSkillPoint int
declare @newSkillPoint int
set 
@oldLevel = (select Level from deleted)
set @newLevel = (select Level from inserted)
set @oldStatPoint = (select StatPoint from deleted)
set @newStatPoint = (select StatPoint from inserted)
set @oldSkillPoint = (select SkillPoint from deleted)
set @newSkillPoint = (select SkillPoint from inserted)
if @
newLevel>60
    begin
        SET 
@newLevel=60
        SET 
@newStatPoint=@oldStatPoint
        SET 
@newSkillPoint=@oldSkillPoint
end

end 
But it seem don't work, but no error message... could someone help me? Pleaaase. I use 5.4 PS_Game, and it's moleboxed with level 70 max, so i made this... Thanks for reading
04/26/2015 20:24 nick4ever#2
This trigger apply on what?????
04/26/2015 20:35 Trayne01#3
This trigger set level max to 60, and if someone level up, he come back to 60lvl
04/26/2015 20:41 Cansas59#4
you will level up to level you want?
04/26/2015 21:24 Trayne01#5
No, if some reach level 61, i wants him to come back at level 60
04/26/2015 21:50 nubness#6
Why don't you do it directly in the ps_game ?

Pretty straightforward method without any pain:
1) Find the offset of your level.
2) Make sure you're not lv70.
3) Kill a mob that supposedly gives exp and see what function is executed when the mob dies.
4) Check the code around that area and if you see 70 (0x46) anywhere, change it to 60 (0x3C).
5) I suggest trying the same with killing an opposite faction player, it's most likely a different function.
04/26/2015 22:17 Trayne01#7
Quote:
Originally Posted by nubness
Why don't you do it directly in the ps_game
Beacause if i'm not wrong it is moleboxed, and my assembly knowedge are very weak, but I will take a look, i didn't try yet. Thank you
04/26/2015 22:25 SkuulCandy#8
Quote:
Originally Posted by Trayne01 View Post
Beacause if i'm not wrong it is moleboxed, and my assembly knowedge are very weak, but I will take a look, i didn't try yet. Thank you
You don't can "unmoleboxe" your ps-game?
04/26/2015 22:27 Trayne01#9
No i can't, or i don't know how to, but theyre is still a lot of possibilities to edit its
04/26/2015 23:10 nubness#10
Yes, the ps_game is packed and you cannot touch the file itself, but you can easily do any modifications to the running process, using Cheat Engine and OllyDBG.
04/27/2015 05:39 nick4ever#11
It's such a long time to see nubness online :)

@Trayne: You can use these ways:
1. Edit ps_game to limit max level
2. Edit sp logout, when player logout, get his level then update to level you want
3. Write a trigger monitor PS_GameLog.dbo.ActionLogs, if there is a player up, then kick him first, and update his level

The question is, if you have a boss level 63, then player try to get up 62 without log out, so he kill that boss so easy, I prefer step 3
04/27/2015 07:58 SkuulCandy#12
Quote:
Originally Posted by nubness View Post
Yes, the ps_game is packed and you cannot touch the file itself, but you can easily do any modifications to the running process, using Cheat Engine and OllyDBG.
There are many tuto on youtube "how to unpack" with ollydbg or CE / use PEiD etc
04/27/2015 09:57 JuuF#13
You can also search for the Easy Mode level restriction, there are 4 checks, 2 for easy mode and 2 for other modes.
One of those checks for your mode and 2nd one checks for your level. Simply edit it like nubness said.
05/10/2015 01:41 Mark.Teal1982#14
the reason its not working is because the game saved all the data each time you quit or log out if you change the level of the char in the database when a char is login it will then change back when the person logs out that is why its not working for you to add a level cap it has to be added in the ps_game.exe like nubness said if im not mistaken I think level, current stat points and skills are saved everytime a logout is done so any changes made to those things in the database while a char is login will be resaved to what the game.exe sends to the ps_game.exe

example is say the play lvls to 61 and you only want lvl 60s your trigger changes 61 to 60 but when the player logs out the game.exe sends the info to the ps_game.exe saying your current lvl is 61 it then saves that data in the database which in turns over writes your trigger