Kod:
RefObjCommon
1 30000 ITEM_MALL_CHAR_RACE_SWITCHER ????? xxx SN_ITEM_MALL_CHAR_RACE_SWITCHER SN_ITEM_MALL_CHAR_RACE_SWITCHER_TT_DESC 1 0 3 3 13 1 180000 3 0 1 1 1 255 0 1 0 0 129 0 0 0 0 0 0 0 -1 0 -1 0 -1 0 -1 0 -1 0 0 0 0 0 0 0 100 0 0 0 xxx item\etc\drop_mall_scroll.bsr item\etc\char_race_switcher_scroll.ddj xxx xxx 20000
RefObjItem
20000 1 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SKILL_CHAR_RACE_CHANGER_SCROLL -1 xxx -1 xxx -1 xxx -1 xxx -1 CashRank:2 -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx 0 0 0
RefSkillGroup
1000 SKILL_CHAR_RACE_CHANGER_SCROLL
RefSkill
1 20000 1000 SKILL_CHAR_RACE_CHANGER_SCROLL ???? SKILL_CHAR_RACE_CHANGER_SCROLL 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 255 255 0 0 0 0 0 255 255 255 255 xxx xxx xxx xxx xxx 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Kod:
--AddLogItem
/* Character Race Switcher */
if (@Operation = 41 and @Slot_To = 255 and @ItemRefID = 30000)
begin
declare @isCharEU bit = 0;
declare @CharName varchar(max) = (select CharName16 from SRO_VT_SHARD.._Char where CharID = @CharID)
declare @CharRaceID int = (select RefObjID from SRO_VT_SHARD.._Char where CharID = @CharID)
declare @RaceSwitchItemCodeName varchar(max) = (select CodeName128 from SRO_VT_SHARD.._RefObjCommon where ID = @ItemRefID)
if not exists (select top 1 CharID from SRO_VT_SHARD.._Inventory where CharID = @CharID and ItemID > 0
and Slot between 0 and 12) and not exists (select top 1 CharID from SRO_VT_SHARD.._InventoryForAvatar where CharID = @CharID and ItemID > 0)
begin
if not exists (select top 1 CharID from SRO_VT_SHARD.._Friend where CharID = @CharID)
begin
if not exists (select top 1 GuildID from SRO_VT_SHARD.._Char where CharID = @CharID and GuildID > 0)
begin
if (@CharRaceID > 1932)
begin
set @isCharEU = 1
end
insert into MaxiGuard_User.._BridgeCommands values (500,'ff66ff','18','Your char race is being changed, login again and check it.',@CharName,getdate())
exec MaxiGuard_User.._AddItemToChest @CharID,'ITEM_MALL_CHAR_SKIN_CHANGE_SCROLL',1,'Race Switch System'
insert into MaxiGuard_User.._BridgeCommands values (1,'Disconnect',@CharName,NULL,NULL,GETDATE());
declare @TotalSP int;
declare @TotalSPMastery int;
select @TotalSP = sum (rs.ReqLearn_SP) from SRO_VT_SHARD.._CharSkill as cs left join SRO_VT_SHARD.._RefSkill as rs on rs.ID = cs.SkillID where cs.CharID = @CharID;
select @TotalSPMastery = sum (rl.Exp_M) from SRO_VT_SHARD.._CharSkillMastery as csm left join SRO_VT_SHARD.._RefLevel as rl on rl.Lvl<csm.Level where csm.CharID = @CharID;
update SRO_VT_SHARD.._Char set RemainSkillPoint = RemainSkillPoint + @TotalSP + @TotalSPMastery + @ExtraSP where CharID = @CharID;
if (@isCharEU = 0)
begin
update SRO_VT_SHARD.._Char set RefObjID = 14875 where CharID = @CharID /* Eu male */
end
else
begin
update SRO_VT_SHARD.._Char set RefObjID = 1907 where CharID = @CharID /* Ch male */
end
insert into SRO_VT_SHARD.._CharSkill select @CharID, SkillID, 1 from SRO_VT_SHARD.._RefCharDefault_Skill where Race = @isCharEU or Race = 3
insert into SRO_VT_SHARD.._CharSkillMastery select @CharID,MasteryID,0 from SRO_VT_SHARD.._RefCharDefault_SkillMastery where Race = @isCharEU or Race = 3
delete from SRO_VT_SHARD.._ClientConfig where CharID = @CharID exec SRO_VT_SHARD.._AddNewClientConfig @CharID
end
else
begin
insert into MaxiGuard_User.._BridgeCommands values (500,'ff66ff','18','Leave from the guild from your char before race switch!',@CharName,getdate())
exec MaxiGuard_User.._AddItemToChest @CharID,@RaceSwitchItemCodeName,1,'Race Switch System'
end
end
else
begin
insert into MaxiGuard_User.._BridgeCommands values (500,'ff66ff','18','Reset all your friend list from your char before race switch!',@CharName,getdate())
exec MaxiGuard_User.._AddItemToChest @CharID,@RaceSwitchItemCodeName,1,'Race Switch System'
end
end
else
begin
insert into MaxiGuard_User.._BridgeCommands values (500,'ff66ff','18','Unequip all your items from your char before race switch!',@CharName,getdate())
exec MaxiGuard_User.._AddItemToChest @CharID,@RaceSwitchItemCodeName,1,'Race Switch System'
end
end
Kod:
itemdata.txt
1 30000 ITEM_MALL_CHAR_RACE_SWITCHER ????? xxx SN_ITEM_MALL_CHAR_RACE_SWITCHER SN_ITEM_MALL_CHAR_RACE_SWITCHER_TT_DESC 1 0 3 3 13 1 180000 3 0 1 1 1 255 0 1 0 0 129 0 0 0 0 0 0 0 -1 0 -1 0 -1 0 -1 0 -1 0 0 0 0 0 0 0 100 0 0 0 xxx item\etc\drop_mall_scroll.bsr item\etc\char_race_switcher_scroll.ddj xxx xxx 1 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SKILL_CHAR_RACE_CHANGER_SCROLL -1 xxx -1 xxx -1 xxx -1 xxx -1 CashRank:2 -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx 0 0
textdata_object
1 SN_ITEM_MALL_CHAR_RACE_SWITCHER Character Race Switcher
1 SN_ITEM_MALL_CHAR_RACE_SWITCHER_TT_DESC <sml2>Can switch race of your character.<br><br><strong><font color="255,236,219,156">How To Use</font></strong><br>When you right click the scroll,<br>race switch system will active on your char!<br><br><strong><font color="255,236,219,156">Restriction</font></strong><br>Usable when character not have any guild.<br>Usable when character not have any friends in friend list.<br>Usable when character not have item weared.</sml2> 0 <sml2>Can switch race of your character.<br><br><strong><font color="255,236,219,156">How To Use</font></strong><br>When you right click the scroll,<br>race switch system will active on your char!<br><br><strong><font color="255,236,219,156">Restriction</font></strong><br>Usable when character not have any guild.<br>Usable when character not have any friends in friend list.<br>Usable when character not have item weared.</sml2> <sml2>Can switch race of your character.<br><br><strong><font color="255,236,219,156">How To Use</font></strong><br>When you right click the scroll,<br>race switch system will active on your char!<br><br><strong><font color="255,236,219,156">Restriction</font></strong><br>Usable when character not have any guild.<br>Usable when character not have any friends in friend list.<br>Usable when character not have item weared.</sml2> <sml2>Can switch race of your character.<br><br><strong><font color="255,236,219,156">How To Use</font></strong><br>When you right click the scroll,<br>race switch system will active on your char!<br><br><strong><font color="255,236,219,156">Restriction</font></strong><br>Usable when character not have any guild.<br>Usable when character not have any friends in friend list.<br>Usable when character not have item weared.</sml2> <sml2>Can switch race of your character.<br><br><strong><font color="255,236,219,156">How To Use</font></strong><br>When you right click the scroll,<br>race switch system will active on your char!<br><br><strong><font color="255,236,219,156">Restriction</font></strong><br>Usable when character not have any guild.<br>Usable when character not have any friends in friend list.<br>Usable when character not have item weared.</sml2> <sml2>Can switch race of your character.<br><br><strong><font color="255,236,219,156">How To Use</font></strong><br>When you right click the scroll,<br>race switch system will active on your char!<br><br><strong><font color="255,236,219,156">Restriction</font></strong><br>Usable when character not have any guild.<br>Usable when character not have any friends in friend list.<br>Usable when character not have item weared.</sml2> <sml2>Can switch race of your character.<br><br><strong><font color="255,236,219,156">How To Use</font></strong><br>When you right click the scroll,<br>race switch system will active on your char!<br><br><strong><font color="255,236,219,156">Restriction</font></strong><br>Usable when character not have any guild.<br>Usable when character not have any friends in friend list.<br>Usable when character not have item weared.</sml2> <sml2>Can switch race of your character.<br><br><strong><font color="255,236,219,156">How To Use</font></strong><br>When you right click the scroll,<br>race switch system will active on your char!<br><br><strong><font color="255,236,219,156">Restriction</font></strong><br>Usable when character not have any guild.<br>Usable when character not have any friends in friend list.<br>Usable when character not have item weared.</sml2>
skilleffect.txt
1 VSRO SKILL_CHAR_RACE_CHANGER_SCROLL FALSE 1 DEFAULT none none none none none none none none 0 0,0,0,0 ONE none none none none none none none 0 1