PHP Code:
if(@JobID=xxxx)
DECLARE [MENTION=447213]Max[/MENTION]LEVEL INT
SET [MENTION=447213]Max[/MENTION]LEVEL = 100
BEGIN
declare [MENTION=1333425592]Check[/MENTION] int
declare [MENTION=551894]Char[/MENTION]check int
IF(NOT EXSITS(SELECT * FROM _TableName where CharID = [MENTION=551894]Char[/MENTION]ID))
BEGIN
insert into _TableName (CharID, CountRespawn, LastSTR, LastINT) VALUES [MENTION=551894]Char[/MENTION]ID, 0, 20, 20)
END
select [MENTION=1333425592]Check[/MENTION] = CountRespawn from _TableName where CharID = [MENTION=551894]Char[/MENTION]ID
select [MENTION=551894]Char[/MENTION]check = count(*) from SRO_VT_SHARD.dbo._Char where CharID = [MENTION=551894]Char[/MENTION]ID and CurLevel = [MENTION=447213]Max[/MENTION]LEVEL
IF [MENTION=1333425592]Check[/MENTION] > 5
BEGIN
RETURN
END
IF [MENTION=551894]Char[/MENTION]check = 1
BEGIN
declare @str int
declare [MENTION=874269]Int[/MENTION] int
declare [MENTION=830452]plus[/MENTION]value int
/* Options Menu */
set [MENTION=830452]plus[/MENTION]value = 5 -- +5 str/int default
/* Options Menu */
update _TableName set LastSTR = LastSTR + [MENTION=830452]plus[/MENTION]value, LastINT = LastINT + [MENTION=830452]plus[/MENTION]value, countrespawn = countrespawn + 1 where CharID = [MENTION=551894]Char[/MENTION]ID
select @str = LastSTR from _TableName where CharID = [MENTION=551894]Char[/MENTION]ID
select [MENTION=874269]Int[/MENTION] = LastINT from _TableName where CharID = [MENTION=551894]Char[/MENTION]ID
update SRO_VT_SHARD.dbo._Char set CurLevel = 1, MaxLevel = 1, Strength = @str, Intellect = [MENTION=874269]Int[/MENTION] where CharID = [MENTION=551894]Char[/MENTION]ID
END
cpd