Jump to content
Mesut

rb 2 script

Recommended Posts

Quotation

-------------------------
-- Second rebirth --
-------------------------


--Rebirth of the
Warrior function GetChaName1_born2 ( role,npc )
local cha_type = GetChaTypeID ( role
) if cha_type~=1 and
cha_type~=3 then SystemNotice( role ,"Only

Lance or Phyllis can become Warriors ") return end
local check=GetChaName_born2 ( role )
if check==0 then then
SystemNotice( role ,"Rebirth Requirements
Are

Not Met") return end
--Addition of Skill Rebirth Local cha_job = GetChaAttr( role , ATTR_JOB
) SetChaAttr(role, ATTR_JOB ,9 )
GiveItem_chibang2
( role )
--Issuance of



reincarnation wings GiveItem_zsbook2
( role ) RefreshCha ( role ) end - --Rebirth of the Champion function GetChaName2_born2 ( role,npc
) local cha_type = GetChaTypeID
( role ) if
cha_type~=2 then SystemNotice( role ,"Only Kartziz can become a Champion ")
return
end
local check=GetChaName_born2 ( role )
if check==0 then
SystemNotice(
role ,"Unreleased requirements ") return
end
--addition of Skill rebirth
local cha_job = GetChaAttr( role , ATTR_JOB
) SetChaAttr(role, ATTR_JOB ,8
) GiveItem_chibang2 ( role ) --Issuance
of reincarnation
wings GiveItem_zsbook2

(
role ) RefreshCha (
role ) end --Rebirth
of the Conqueror of the
Seas function GetChaName3_born2 ( role,npc ) local cha_type = GetChaTypeID
( role ) if cha_type~=1 and cha_type~=3 and cha_type~=4 then then SystemNotice( role ,"Only Lance, Phyllis or Ami

can
become Conquerors of the
Seas ") return
end local check=GetChaName_born2 ( role )
if

check==0 then SystemNotice( role ,"Rebirth requirements are not met ") return end --addition of Skill of rebirth
local cha_job = GetChaAttr( role , ATTR_JOB )
SetChaAttr(role, ATTR_JOB ,16 )
GiveItem_chibang2 ( role ) --Issuing the
wings of the rebirth GiveItem_zsbook2 (



role
)




RefreshCha ( role ) end --Rebirth Shooter function GetChaName4_born2 ( role, npc ) local cha_type = GetChaTypeID ( role ) if cha_type~=1 and cha_type~=3

then SystemNotice ( role ,"Only Lance or Phyllis can become Arrows ") return end local check=GetChaName_born2 ( role
) if check==0 then
SystemNotice( role ,"Rebirth
requirements are not met")

return
end --addition of Skill of rebirth
local cha_job = GetChaAttr( role ,
ATTR_JOB ) SetChaAttr(role, ATTR_JOB
,12 )
GiveItem_chibang2 (

role ) --Issuance of wings of rebirth GiveItem_zsbook2 ( role ) RefreshCha ( role ) end

--Rebirth Cylither
function GetChaName5_born2 ( role,npc
) local cha_type = GetChaTypeID ( role )
if cha_type~=3 and cha_type~=4 then
SystemNotice( role ,"Only Phyllis or Ami can Become Fleatels ")

return
end
local check=GetChaName_born2 ( role )
if check==0 then SystemNotice( role ,"Not met Rebirth requirements ")
return

end
--add Skill rebirth local cha_job = GetChaAttr( role ,
ATTR_JOB ) SetChaAttr(role, ATTR_JOB
,13 ) GiveItem_chibang2 ( role ) --Issuance of reincarnation
wings GiveItem_zsbook2 ( role )
RefreshCha ( role )

end

--Rebirth of the Witch
function GetChaName6_born2 ( role,npc )
local cha_type = GetChaTypeID (
role ) if cha_type~=3 and cha_type~=4
then SystemNotice( role ,"Only Phyllis or

Ami can become Witches
")
return end local
check=GetChaName_born2 ( role ) if check==0 then SystemNotice ( role ,"Unreleased Rebirth
Requirements ")
return end
--Addition of Skill Rebirth
local cha_job = GetChaAttr( role , ATTR_JOB
) SetChaAttr(role, ATTR_JOB ,14
) GiveItem_chibang2 ( role ) --Issuance
of reincarnation
wings GiveItem_zsbook2

(

role ) RefreshCha (
role ) end -- issuance of wings of the second reincarnation function GiveItem_chibang2 ( role )
local cha_type = GetChaTypeID ( role )
if cha_type==1 then then
GiveItem( role , 0 , 136 , 1
, 4
)--Lens elseif cha_type==2 then GiveItem( role , 0 , 139 , 1 , 4 )--Kartziz
elseif cha_type==3 then
GiveItem( role , 0 , 129 , 1 , 4 )--Phyllis
elseif cha_type==4 then
GiveItem( role , 0 , 132 , 1 , 4 )--Ami
end
end

--issuance of the second rebirth
book function GiveItem_zsbook2 ( role )
local cha_job = GetChaAttr(role, ATTR_JOB)
--SystemNotice( role ,"".. cha_job )
if cha_job == 8 then
GiveItem( role , 0 , 6014 , 1 , 4
)--book of the second
rebirth of the champion elseif cha_job == 9 then GiveItem( role
, 0 , 6013
, 1 , 4 )--book of the second rebirth of the warrior
elseif cha_job == 12
then GiveItem( role , 0 , 6018 , 1 , 4 )--book of the second rebirth of the arrow elseif cha_job == 13 then GiveItem( role , 0 , 6016 , 1 , 4 )--the book of the second
rebirth
of the inhabitant elseif cha_job == 14 then GiveItem( role , 0
, 6015 ,
1 , 4 )--book of the second rebirth of the witch elseif cha_job

== 16 then GiveItem( role , 0 , 6017 , 1 , 4 )--book of the second rebirth of the conqueror of the seas end end function

GetChaName_born2 (role )

local cha_name = GetChaDefaultName (
role ) local cha_lv = GetChaAttr(role,
ATTR_LV)
local cha_job = GetChaAttr(role, ATTR_JOB) local i = CheckBagItem( role, 5765 )--Stone ID
(worth the Second Rebirth Stone ID) if i < 1
then
SystemNotice( role ,"Please show proof of your Rebirth
") return 0 end

local item_empty=IsEquip(role)

if item_empty==LUA_TRUE then SystemNotice(role,"Please remove all your gear, including rings
and costume


jewelry") return 0 end local Item_CanGet =
GetChaFreeBagGridNum ( role ) if Item_CanGet <
5 then SystemNotice(role
,"You don't have
enough
space in your inventory, need 5 free slots") UseItemFailed ( role ) return 0 end
local zs1 = TakeItem( role, 0,5765, 1 )--Stone ID
(worth second Rebirth Stone
ID) if zs1==0 then
SystemNotice


( role ,"You don't have a Rebirth
Stone ") return 0 end
local Zs_Exp = GetChaAttr (
role ,

ATTR_CSAILEXP ) if Zs_Exp > 10000 then SystemNotice(role ,"You are already reborn ") return 0 end
local QLZX = GetSkillLv ( role, SK_QLZX )
local cha_skill_num=GetChaAttr(role, ATTR_TP )
local clear_skill_num=ClearFightSkill(role)
cha_skill_num=cha_skill_num+clear_skill_num

if QLZX == 1 then
cha_skill_num = cha_skill_num - 1
AddChaSkill ( role , SK_QLZX , 2 , 2 , 0 )
end

SetChaAttr(role, ATTR_TP ,cha_skill_num )

local ap = GetChaAttr( role , ATTR_AP )

local cha_str = GetChaAttr(role, ATTR_BSTR )
local cha_dex = GetChaAttr(role, ATTR_BDEX )
local cha_agi = GetChaAttr(role, ATTR_BAGI )
local cha_con = GetChaAttr(role, ATTR_BCON )
local cha_sta = GetChaAttr(role, ATTR_BSTA )
ap=ap+cha_str+cha_dex+cha_agi+cha_con+cha_sta-25
SetChaAttr(role, ATTR_BSTR , 5 )
SyncChar(role,4)
SetChaAttr(role, ATTR_BDEX ,5 )
SyncChar(role,4)
SetChaAttr(role, ATTR_BAGI ,5 )
SyncChar(role,4)
SetChaAttr(role, ATTR_BCON ,5 )
SyncChar(role,4)
SetChaAttr(role, ATTR_BSTA ,5 )
SyncChar(role,4)
SetChaAttr(role , ATTR_AP,ap )
SyncChar(role,4)
AddSailExp(role, npc , 1 , 1 )
local sk_add =
SK_ZSSL AddChaSkill ( role , sk_add , 2 , 2

, 0 ) PlayEffect(
npc, 361 ) Notice("Goddess reports that [".). cha_name.."] With successfully passed on the path of the Second Rebirth! [".. cha_name.."], be happy, and good luck to you!")
ScrollNotice("Congratulations to character [".. cha_name.."] Happy Second Rebirth! [".. cha_name.."], be happy, and good luck to you!", 3 )
return 1

end

 

 

 

hey i have issue to issue to add this on server file is there anything missing or the script is useless!!

Edited by Mesut

Share this post


Link to post
Share on other sites
On 12/28/2021 at 11:23 AM, Mesut said:

hey i have issue to issue to add this on server file is there anything missing or the script is useless!!

hello merry christmas add these 2 functions in functions if you use 1.38 Files Addons by Danny Vang (GOAT)

 

function Checksailexpless ( role , value )
    local sail_role = GetChaAttr ( role , ATTR_CSAILEXP )
    if sail_role < value then
        return LUA_TRUE
    end
end

function Checksailexpmore ( role , value )
    local sail_role = GetChaAttr ( role , ATTR_CSAILEXP )
    if sail_role >= value then
        return LUA_TRUE
    end
end
 

Share this post


Link to post
Share on other sites

i have question about the status point where do i add status pts pls anyone knows tell me!! here is script i add more stat but my stat go down i mean status point go down when i get rb2 and rb3..

 

Цитата

function GetChaName1_born2 ( role,npc )
    ---------------------------Crusader Born
        local cha_type = GetChaTypeID ( role )
    if cha_type~=1 and cha_type~=2 and cha_type~=3 then
              SystemNotice( role ,"Only Lance,Phyllis,Carsise Can Become Crusader")
             return
    end
    local check=GetChaName_born2 ( role )
    if check==0 then
        SystemNotice( role ,"Rebirth requirements not met")
        return
    end
    ----------------Skill Add
    local cha_job = GetChaAttr( role , ATTR_JOB )
    SetChaAttr(role, ATTR_JOB ,9 )     
    GiveItem_chibang2 ( role  )                --2nd RB Wings Add
    local sk_add = SK_WYZ
     AddChaSkill ( role , sk_add , 2 , 2 , 0 )
       SetChaAttrI(role, ATTR_CSAILEXP , 9000)
      RefreshCha ( role )        
end
---------------------------------------Start Champion
function GetChaName2_born2 ( role,npc )
    ----------------------------------------Champion Born
        local cha_type = GetChaTypeID ( role )
    if cha_type~=2 then
        SystemNotice( role ,"Only Carsise can become Champion")
        return
    end
    local check=GetChaName_born2 ( role )
    if check==0 then
        SystemNotice( role ,"Rebirth requirements not met")
        return
    end
    -----------------Skill Add
    local cha_job = GetChaAttr( role , ATTR_JOB )
    SetChaAttr(role, ATTR_JOB ,8 )
    GiveItem_chibang2 ( role  )                --2nd RB Wings Add
    local sk_add = SK_BSJ
       AddChaSkill ( role , sk_add , 2 , 2 , 0 )
       SetChaAttrI(role, ATTR_CSAILEXP , 9000)
       RefreshCha ( role )
end
-----------------------------------------Start Voyager
function GetChaName3_born2 ( role,npc )
    -----------------------------------------Voyager Reborn
        local cha_type = GetChaTypeID ( role )
    if cha_type~=1 and cha_type~=3 and cha_type~=4 then
        SystemNotice( role ,"Only Lance, Phyllis or Ami can be voyager")
        return
    end
    local check=GetChaName_born2 ( role )
    if check==0 then
        SystemNotice( role ,"Rebirth requirements not met")
        return
    end
    ----------------------------Skill Add
    local cha_job = GetChaAttr( role , ATTR_JOB )
    SetChaAttr(role, ATTR_JOB ,16 )
    GiveItem_chibang2 ( role  )                --2nd RB Wings Add
    local sk_add = SK_CYN
       AddChaSkill ( role , sk_add , 2 , 2 , 0 )
       SetChaAttrI(role, ATTR_CSAILEXP , 9000)
      RefreshCha ( role )
end
-----------------------------------------Start SharpShooter
function GetChaName4_born2 ( role , npc )
      ---------------------------------------Sharpshooter Reborn
        local cha_type = GetChaTypeID ( role )
    if cha_type~=1 and cha_type~=3 then
        SystemNotice( role ,"Only Lance, Phyllis can become SharpShooter")
        return
    end
    local check=GetChaName_born2 ( role )
    if check==0 then
        SystemNotice( role ,"Rebirth requirements not met")
        return
    end
    -----------------------------Skill Add
    local cha_job = GetChaAttr( role , ATTR_JOB )
    SetChaAttr(role, ATTR_JOB ,12 )     
    GiveItem_chibang2 ( role  )                --2nd RB Wings Add
    local sk_add = SK_HLP
      AddChaSkill ( role , sk_add , 2 , 2 , 0 )
       SetChaAttrI(role, ATTR_CSAILEXP , 9000)
       RefreshCha ( role )
end
-----------------------------------------Start Cleric
function GetChaName5_born2 ( role,npc )
    -----------------------------------------Cleric Reborn
        local cha_type = GetChaTypeID ( role )
    if cha_type~=3 and cha_type~=4 then
        SystemNotice( role ,"Only Phyllis and Ami can become Cleric")
        return
    end
    local check=GetChaName_born2 ( role )
    if check==0 then
        SystemNotice( role ,"Rebirth requirements not met")
        return
    end
    ------------------------------SKill Add
    local cha_job = GetChaAttr( role , ATTR_JOB )
    SetChaAttr(role, ATTR_JOB ,13 )     
    GiveItem_chibang2 ( role  )                --2nd RB Wings Add
    local sk_add = SK_SSSP
       AddChaSkill ( role , sk_add , 2 , 2 , 0 )
       SetChaAttrI(role, ATTR_CSAILEXP , 9000)
       RefreshCha ( role )
end

----------------------------------------- Start SealMaster
function GetChaName6_born2 ( role,npc )
    ------------------------------------------Sealmaster Reborn
        local cha_type = GetChaTypeID ( role )
    if cha_type~=3 and cha_type~=4 then
        SystemNotice( role ,"Only Phyllis and Ami can become SealMaster")
        return
    end
    local check=GetChaName_born2 ( role )
    if check==0 then
        SystemNotice( role ,"Rebirth requirements not met")
        return
    end
    ------------------------Skill Add
    local cha_job = GetChaAttr( role , ATTR_JOB )
    SetChaAttr(role, ATTR_JOB ,14 )     
    GiveItem_chibang2 ( role  )                --2nd RB Wings Add
    local sk_add = SK_SSSP
       AddChaSkill ( role , sk_add , 2 , 2 , 0 )
       SetChaAttrI(role, ATTR_CSAILEXP , 9000)
      RefreshCha ( role )
end

-------------------------------------------------------
function GiveItem_chibang2 ( role  )
        local cha_type = GetChaTypeID ( role )    
    if cha_type==1 then
        GiveItem( role , 0 , 136  , 1 , 4 )
    elseif cha_type==2 then
        GiveItem( role , 0 , 139  , 1 , 4 )
    elseif cha_type==3 then
        GiveItem( role , 0 , 129  , 1 , 4 )
    elseif cha_type==4 then
        GiveItem( role , 0 , 132  , 1 , 4 )
    end
end

------------------------------------Check Lv2 RB
function GetChaName_born2 ( role )
    ------------------------------------
    local cha_name = GetChaDefaultName ( role )
    -------------------------------------------
    local cha_lv = GetChaAttr(role, ATTR_LV) 
    -------------------------------------------
    local cha_job = GetChaAttr(role, ATTR_JOB)
    -------------------------------------------
    local i = CheckBagItem( role, 5896 )         ------  RB2 STONE Code from iteminfo
    if i < 1 then
        SystemNotice( role ,"Please Give me Your Lv2 Rebirth Stone")
        return 0
    end
    ----------------
    local item_empty=IsEquip(role)
    if item_empty==LUA_TRUE then
        SystemNotice(role,"Please place the item from character's equipment slot into the inventory")
        return 0    
    end
    -----------------
    local Item_CanGet = GetChaFreeBagGridNum ( role )    
    if Item_CanGet < 1 then
        SystemNotice(role ,"Inventory needs to have at least 1 Free slot")
        UseItemFailed ( role )
        return 0
    end
    local zs1 =TakeItem( role, 0,5896, 1 )        ------  RB2 STONE Code from iteminfo.txt
    if zs1==0 then
        SystemNotice ( role ,"Gather 2nd Rebirth Stone failed")
        return 0
    end
    --------------------------
    local Zs_Exp = GetChaAttr ( role , ATTR_CSAILEXP )
    if Zs_Exp >= 9000 then
        SystemNotice(role ,"You've already 2nd rebirth")
        return 0
    end
    local cha_skill_num=GetChaAttr(role, ATTR_TP  )

    local clear_skill_num=ClearFightSkill(role)

    cha_skill_num=cha_skill_num+clear_skill_num
    SetChaAttr(role, ATTR_TP ,cha_skill_num ) 

    local ap = GetChaAttr( role , ATTR_AP )

    local cha_str = GetChaAttr(role, ATTR_BSTR  ) 
    local cha_dex = GetChaAttr(role, ATTR_BDEX  ) 
    local cha_agi = GetChaAttr(role, ATTR_BAGI  ) 
    local cha_con = GetChaAttr(role, ATTR_BCON ) 
    local cha_sta = GetChaAttr(role, ATTR_BSTA )
    ap=ap+cha_str+cha_dex+cha_agi+cha_con+cha_sta-75
    SetChaAttr(role, ATTR_BSTR ,15 ) 
    SyncChar(role,12)
    SetChaAttr(role, ATTR_BDEX ,15 ) 
    SyncChar(role,12)
    SetChaAttr(role, ATTR_BAGI ,15 ) 
    SyncChar(role,12)
    SetChaAttr(role, ATTR_BCON,15 ) 
    SyncChar(role,12)
    SetChaAttr(role, ATTR_BSTA,15 ) 
    SyncChar(role,12)
    SetChaAttr(role , ATTR_AP,ap  )
    SyncChar(role,12)
    AddSailExp(role, npc , 1 , 1 )
    local sk_add = SK_ZSSL
    AddChaSkill ( role , sk_add , 2 , 2 , 0 )

    PlayEffect( npc, 361 )
    Notice("Extreme celebration "..cha_name.." 2nd Rebirth successful. Blessing from the whole server "..cha_name.." Hope you have a safe journey and everything goes your way!")
    return 1

end


------------------------------Azure Epix Lv3 Rebirth
-------------------------------Start Crusader
function GetChaName1_born3 ( role,npc )
   -----------------Crusader Born
        local cha_type = GetChaTypeID ( role )
   if cha_type~=1 and cha_type~=2 and cha_type~=3 then
      SystemNotice( role ,"Only Lance,Phyllis,Carsise Can Become Crusader")
      return
   end
   local check=GetChaName_born3 ( role )
   if check==0 then
      SystemNotice( role ,"Requirements Do Not Meet")
      return
   end
   -----------------Skill Add
   local cha_job = GetChaAttr( role , ATTR_JOB )
   SetChaAttr(role, ATTR_JOB ,9 )    
   GiveItem_chibang3 ( role  )            --Wings Add
   local sk_add = SK_WYZ
   AddChaSkill ( role , sk_add , 3 , 3 , 0 )
   SetChaAttrI(role, ATTR_CSAILEXP , 12000)
   RefreshCha ( role )
end
-------------------------------Champ
function GetChaName2_born3 ( role,npc )
   -----------------Champ Born
        local cha_type = GetChaTypeID ( role )
   if cha_type~=2 then
      SystemNotice( role ,"Only Carsise Can become Champion")
      return
   end
   local check=GetChaName_born3 ( role )
   if check==0 then
      SystemNotice( role ,"Requirements Do Not Meet")
      return
   end
   -----------------Skill Add
   local cha_job = GetChaAttr( role , ATTR_JOB )
   SetChaAttr(role, ATTR_JOB ,8 )
   GiveItem_chibang3 ( role  )            --Wings Add
   local sk_add = SK_BSJ
   AddChaSkill ( role , sk_add , 3 , 3 , 0 )
   SetChaAttrI(role, ATTR_CSAILEXP , 12000)
   RefreshCha ( role )
end
-------------------------------Voyager
function GetChaName3_born3 ( role,npc )
   -----------------?Voyager Born
        local cha_type = GetChaTypeID ( role )
   if cha_type~=1 and cha_type~=3 and cha_type~=4 then
      SystemNotice( role ,"Only Lance,Phyllis,Ami Can Become Voyager")
      return
   end
   local check=GetChaName_born3 ( role )
   if check==0 then
      SystemNotice( role ,"Requirements Do Not Meet")
      return
   end
   -----------------GiveSkill
   local cha_job = GetChaAttr( role , ATTR_JOB )
   SetChaAttr(role, ATTR_JOB ,16 )    
   GiveItem_chibang3 ( role  )            --Wings Add
   local sk_add = SK_CYN
   AddChaSkill ( role , sk_add , 3 , 3 , 0 )
   SetChaAttrI(role, ATTR_CSAILEXP , 12000)
   RefreshCha ( role )
end
-------------------------------SharpShooter
function GetChaName4_born3 ( role,npc )
   -----------------?Sharpshooter Born
        local cha_type = GetChaTypeID ( role )
   if cha_type~=1 and cha_type~=3 then
      SystemNotice( role ,"Only Lance,Phyllis Can Become Sharpshooter")
      return
   end
   local check=GetChaName_born3 ( role )
   if check==0 then
      SystemNotice( role ,"Requirements Do Not Meet")
      return
   end
   -----------------Skill Add
   local cha_job = GetChaAttr( role , ATTR_JOB )
   SetChaAttr(role, ATTR_JOB ,12 )    
   GiveItem_chibang3 ( role  )            --Wings Add
   local sk_add = SK_HLP
   AddChaSkill ( role , sk_add , 3 , 3 , 0 )
   SetChaAttrI(role, ATTR_CSAILEXP , 12000)
   RefreshCha ( role )
end
-------------------------------Cleric
function GetChaName5_born3 ( role,npc )
   -----------------Cleric Born
        local cha_type = GetChaTypeID ( role )
   if cha_type~=3 and cha_type~=4 then
      SystemNotice( role ,"Only Phyllis,Ami Can Become Cleric")
      return
   end
   local check=GetChaName_born3 ( role )
   if check==0 then
      SystemNotice( role ,"Requirements Do Not Meet")
      return
   end
   -----------------Skill Add
   local cha_job = GetChaAttr( role , ATTR_JOB )
   SetChaAttr(role, ATTR_JOB ,13 )    
   GiveItem_chibang3 ( role  )            --Rebirth Wings Add
   local sk_add = SK_SSSP
   AddChaSkill ( role , sk_add , 3 , 3 , 0 )
   SetChaAttrI(role, ATTR_CSAILEXP , 12000)
   RefreshCha ( role )
end
-------------------------------Seal Master
function GetChaName6_born3 ( role,npc )
   -----------------?Seal Master Born
        local cha_type = GetChaTypeID ( role )
   if cha_type~=3 and cha_type~=4 then
      SystemNotice( role ,"Only Phyllis,Ami Can Become Seal Master")
      return
   end
   local check=GetChaName_born3 ( role )
   if check==0 then
      SystemNotice( role ,"Requirements Do Not Meet")
      return
   end
   -----------------SkillAdd
   local cha_job = GetChaAttr( role , ATTR_JOB )
   SetChaAttr(role, ATTR_JOB ,14 )    
   GiveItem_chibang3 ( role  )            --Rebirth Wings Add
   local sk_add = SK_SSSP
   AddChaSkill ( role , sk_add , 3 , 3 , 0 )
   SetChaAttrI(role, ATTR_CSAILEXP , 12000)
   RefreshCha ( role )
end

function GiveItem_chibang3 ( role  )
        local cha_type = GetChaTypeID ( role )   
   if cha_type==1 then
      GiveItem( role , 0 , 137  , 1 , 4 )
   elseif cha_type==2 then
      GiveItem( role , 0 , 140  , 1 , 4 )
   elseif cha_type==3 then
      GiveItem( role , 0 , 130  , 1 , 4 )
   elseif cha_type==4 then
      GiveItem( role , 0 , 133  , 1 , 4 )
   end
end

-------------------------------Check Lv3 RB
function GetChaName_born3 ( role )
   -----------------???
   local cha_name = GetChaDefaultName ( role )
   -----------------???
   local cha_lv = GetChaAttr(role, ATTR_LV)
   -----------------???
   local cha_job = GetChaAttr(role, ATTR_JOB)
   -----------------???
   local i = CheckBagItem( role, 5897 )    
   if i < 1 then
      SystemNotice( role ,"Please Give Me Ur Lv3 Rebirth Stone")
      return 0
   end
   -----------------???
   local item_empty=IsEquip(role)
   if item_empty==LUA_TRUE then
      SystemNotice(role,"Please place the item from character's equipment slot into the inventory")
      return 0   
   end
   -----------------???
   local Item_CanGet = GetChaFreeBagGridNum ( role )   
   if Item_CanGet < 1 then
      SystemNotice(role ,"Inventory Needs Atleast 1 Free Slot")
      UseItemFailed ( role )
      return 0
   end
   local zs1 =TakeItem( role, 0,5897, 1 )
   if zs1==0 then
      SystemNotice ( role ,"Gather Lv3 Rebirth Stone Failed")
      return 0
   end
   ------------------??
   local Zs_Exp = GetChaAttr ( role , ATTR_CSAILEXP )
   if Zs_Exp >=12000 then
      SystemNotice(role ,"U have Already Done 3rd Rebirth")
      return 0
   end
   local cha_skill_num=GetChaAttr(role, ATTR_TP  )

   local clear_skill_num=ClearFightSkill(role)

   cha_skill_num=cha_skill_num+clear_skill_num
   SetChaAttr(role, ATTR_TP ,cha_skill_num ) 

   local ap = GetChaAttr( role , ATTR_AP )

   local cha_str = GetChaAttr(role, ATTR_BSTR  ) 
   local cha_dex = GetChaAttr(role, ATTR_BDEX  ) 
   local cha_agi = GetChaAttr(role, ATTR_BAGI  ) 
   local cha_con = GetChaAttr(role, ATTR_BCON ) 
   local cha_sta = GetChaAttr(role, ATTR_BSTA )
   ap=ap+cha_str+cha_dex+cha_agi+cha_con+cha_sta-100
   SetChaAttr(role, ATTR_BSTR ,20 ) 
   SyncChar(role,16)
   SetChaAttr(role, ATTR_BDEX ,20 ) 
   SyncChar(role,16)
   SetChaAttr(role, ATTR_BAGI ,20 ) 
   SyncChar(role,16)
   SetChaAttr(role, ATTR_BCON,20 ) 
   SyncChar(role,16)
   SetChaAttr(role, ATTR_BSTA,20 ) 
   SyncChar(role,16)
   SetChaAttr(role , ATTR_AP,ap  )
   SyncChar(role,16)
   AddSailExp(role, npc , 1 , 1 )
   local sk_add = SK_ZSSL
   AddChaSkill ( role , sk_add , 3 , 3 , 0 )

   PlayEffect( npc, 361 )
   Notice("Extreme celebration "..cha_name.." 3rd Rebirth successful. Blessing from the whole server "..cha_name.." Hope you have a safe journey and everything goes your way! Now Guys Lets Dance !!")
   return 1
end

 

Share this post


Link to post
Share on other sites
On 1/9/2022 at 7:45 PM, Mesut said:

i can also add some picture so u can see what im talking about!!!

 

Its all about these lines [Source of RB2]
 


    local cha_skill_num=GetChaAttr(role, ATTR_TP  )

    local clear_skill_num=ClearFightSkill(role)

    cha_skill_num=cha_skill_num+clear_skill_num
    SetChaAttr(role, ATTR_TP ,cha_skill_num ) 

    local ap = GetChaAttr( role , ATTR_AP )

    local cha_str = GetChaAttr(role, ATTR_BSTR  ) 
    local cha_dex = GetChaAttr(role, ATTR_BDEX  ) 
    local cha_agi = GetChaAttr(role, ATTR_BAGI  ) 
    local cha_con = GetChaAttr(role, ATTR_BCON ) 
    local cha_sta = GetChaAttr(role, ATTR_BSTA )
    ap=ap+cha_str+cha_dex+cha_agi+cha_con+cha_sta-75
    SetChaAttr(role, ATTR_BSTR ,15 ) 
    SyncChar(role,12)
    SetChaAttr(role, ATTR_BDEX ,15 ) 
    SyncChar(role,12)
    SetChaAttr(role, ATTR_BAGI ,15 ) 
    SyncChar(role,12)
    SetChaAttr(role, ATTR_BCON,15 ) 
    SyncChar(role,12)
    SetChaAttr(role, ATTR_BSTA,15 ) 
    SyncChar(role,12)
    SetChaAttr(role , ATTR_AP,ap  )
    SyncChar(role,12)
    AddSailExp(role, npc , 1 , 1 )
    local sk_add = SK_ZSSL
    AddChaSkill ( role , sk_add , 2 , 2 , 0 )

    PlayEffect( npc, 361 )
    Notice("Extreme celebration "..cha_name.." 2nd Rebirth successful. Blessing from the whole server "..cha_name.." Hope you have a safe journey and everything goes your way!")
    return 1

end

I guess this line steals your stats points:

    ap=ap+cha_str+cha_dex+cha_agi+cha_con+cha_sta-75

Share this post


Link to post
Share on other sites

Theres a problem, you delete all the skills, so also the rebirth skills.
I updated your list with lv 2 rebirth skills for rebirth 2 (I have no rebirth 3 in my scripts yet)


 

function GetChaName1_born2 ( role,npc )

        local cha_type = GetChaTypeID ( role )
    if cha_type~=1 then
        SystemNotice( role ,"Only Lance Can Become Crusader")
        return
    end
    local check=GetChaName_born2 ( role )
    if check==0 then
        SystemNotice( role ,"Requirements Do Not Meet")
        return
    end

    local cha_job = GetChaAttr( role , ATTR_JOB )
    --SetChaAttr(role, ATTR_JOB ,9 )     
    GiveItem_chibang2 ( role  )                --翅膀
    local sk_add = SK_WYZ
    AddChaSkill ( role , sk_add , 2 , 1 , 0 )
    SetChaAttrI(role, ATTR_CSAILEXP , 10000)
    RefreshCha ( role )
end
-------------------------------重生为巨剑
function GetChaName2_born2 ( role,npc )

        local cha_type = GetChaTypeID ( role )
    if cha_type~=2 then
        SystemNotice( role ,"Only Carsise Can Become Champion")
        return
    end
    local check=GetChaName_born2 ( role )
    if check==0 then
        SystemNotice( role ,"Requirements Do Not Meet")
        return
    end

    local cha_job = GetChaAttr( role , ATTR_JOB )
    --SetChaAttr(role, ATTR_JOB ,8 )
    GiveItem_chibang2 ( role  )                --翅膀
    local sk_add = SK_BSJ
    AddChaSkill ( role , sk_add , 2 , 1 , 0 )
    SetChaAttrI(role, ATTR_CSAILEXP , 10000)
    RefreshCha ( role )
end
-------------------------------重生为航海士
function GetChaName3_born2 ( role,npc )

        local cha_type = GetChaTypeID ( role )
    if cha_type~=1 and cha_type~=3 and cha_type~=4 then
        SystemNotice( role ,"Only Lance, Phyllis and Ami Can Become Voyager")
        return
    end
    local check=GetChaName_born2 ( role )
    if check==0 then
        SystemNotice( role ,"Requirements Do Not Meet")
        return
    end

    local cha_job = GetChaAttr( role , ATTR_JOB )
    --SetChaAttr(role, ATTR_JOB ,16 )     
    GiveItem_chibang2 ( role  )                --翅膀
    local sk_add = SK_CYN
    AddChaSkill ( role , sk_add , 2 , 1 , 0 )
    SetChaAttrI(role, ATTR_CSAILEXP , 10000)
    RefreshCha ( role )
end
-------------------------------重生为狙击手
function GetChaName4_born2 ( role,npc )

        local cha_type = GetChaTypeID ( role )
    if cha_type~=1 and cha_type~=3 then
        SystemNotice( role ,"Only Lance and Phyllis Can Become Sharpshooter")
        return
    end
    local check=GetChaName_born2 ( role )
    if check==0 then
        SystemNotice( role ,"Requirements Do Not Meet")
        return
    end

    local cha_job = GetChaAttr( role , ATTR_JOB )
    --SetChaAttr(role, ATTR_JOB ,12 )     
    GiveItem_chibang2 ( role  )                --翅膀
    local sk_add = SK_HLP
    AddChaSkill ( role , sk_add , 2 , 1 , 0 )
    SetChaAttrI(role, ATTR_CSAILEXP , 10000)
    RefreshCha ( role )
end
-------------------------------重生为圣职者
function GetChaName5_born2 ( role,npc )

        local cha_type = GetChaTypeID ( role )
    if cha_type~=3 and cha_type~=4 then
        SystemNotice( role ,"Only Phyllis and Ami Can Become Cleric")
        return
    end
    local check=GetChaName_born2 ( role )
    if check==0 then
        SystemNotice( role ,"Requirements Do Not Meet")
        return
    end

    local cha_job = GetChaAttr( role , ATTR_JOB )
    --SetChaAttr(role, ATTR_JOB ,13 )     
    GiveItem_chibang2 ( role  )                --翅膀
    local sk_add = SK_SSSP
    AddChaSkill ( role , sk_add , 2 , 1 , 0 )
    SetChaAttrI(role, ATTR_CSAILEXP , 10000)
    RefreshCha ( role )
end
-------------------------------重生为封印师
function GetChaName6_born2 ( role,npc )

        local cha_type = GetChaTypeID ( role )
    if cha_type~=3 and cha_type~=4 then
        SystemNotice( role ,"Only Phyllis and Ami Can Become Seal Master")
        return
    end
    local check=GetChaName_born2 ( role )
    if check==0 then
        SystemNotice( role ,"Requirements Do Not Meet")
        return
    end

    local cha_job = GetChaAttr( role , ATTR_JOB )
    --SetChaAttr(role, ATTR_JOB ,14 )     
    GiveItem_chibang2 ( role  )                --翅膀
    local sk_add = SK_SSSP
    AddChaSkill ( role , sk_add , 2 , 1 , 0 )
    SetChaAttrI(role, ATTR_CSAILEXP , 10000)
    RefreshCha ( role )
end

function GiveItem_chibang2 ( role  )
        local cha_type = GetChaTypeID ( role )    
    if cha_type==1 then
        GiveItem( role , 0 , 136  , 1 , 4 )
    elseif cha_type==2 then
        GiveItem( role , 0 , 139  , 1 , 4 )
    elseif cha_type==3 then
        GiveItem( role , 0 , 129  , 1 , 4 )
    elseif cha_type==4 then
        GiveItem( role , 0 , 132  , 1 , 4 )
    end
end


 

Edited by Dan
Inserted into Lua.

Share this post


Link to post
Share on other sites
11 часов назад, Brothers сказал:

Theres a problem, you delete all the skills, so also the rebirth skills.
I updated your list with lv 2 rebirth skills for rebirth 2 (I have no rebirth 3 in my scripts yet)

 


function GetChaName1_born2 ( role,npc )

        local cha_type = GetChaTypeID ( role )
    if cha_type~=1 then
        SystemNotice( role ,"Only Lance Can Become Crusader")
        return
    end
    local check=GetChaName_born2 ( role )
    if check==0 then
        SystemNotice( role ,"Requirements Do Not Meet")
        return
    end

    local cha_job = GetChaAttr( role , ATTR_JOB )
    --SetChaAttr(role, ATTR_JOB ,9 )     
    GiveItem_chibang2 ( role  )                --翅膀
    local sk_add = SK_WYZ
    AddChaSkill ( role , sk_add , 2 , 1 , 0 )
    SetChaAttrI(role, ATTR_CSAILEXP , 10000)
    RefreshCha ( role )
end
-------------------------------重生为巨剑
function GetChaName2_born2 ( role,npc )

        local cha_type = GetChaTypeID ( role )
    if cha_type~=2 then
        SystemNotice( role ,"Only Carsise Can Become Champion")
        return
    end
    local check=GetChaName_born2 ( role )
    if check==0 then
        SystemNotice( role ,"Requirements Do Not Meet")
        return
    end

    local cha_job = GetChaAttr( role , ATTR_JOB )
    --SetChaAttr(role, ATTR_JOB ,8 )
    GiveItem_chibang2 ( role  )                --翅膀
    local sk_add = SK_BSJ
    AddChaSkill ( role , sk_add , 2 , 1 , 0 )
    SetChaAttrI(role, ATTR_CSAILEXP , 10000)
    RefreshCha ( role )
end
-------------------------------重生为航海士
function GetChaName3_born2 ( role,npc )

        local cha_type = GetChaTypeID ( role )
    if cha_type~=1 and cha_type~=3 and cha_type~=4 then
        SystemNotice( role ,"Only Lance, Phyllis and Ami Can Become Voyager")
        return
    end
    local check=GetChaName_born2 ( role )
    if check==0 then
        SystemNotice( role ,"Requirements Do Not Meet")
        return
    end

    local cha_job = GetChaAttr( role , ATTR_JOB )
    --SetChaAttr(role, ATTR_JOB ,16 )     
    GiveItem_chibang2 ( role  )                --翅膀
    local sk_add = SK_CYN
    AddChaSkill ( role , sk_add , 2 , 1 , 0 )
    SetChaAttrI(role, ATTR_CSAILEXP , 10000)
    RefreshCha ( role )
end
-------------------------------重生为狙击手
function GetChaName4_born2 ( role,npc )

        local cha_type = GetChaTypeID ( role )
    if cha_type~=1 and cha_type~=3 then
        SystemNotice( role ,"Only Lance and Phyllis Can Become Sharpshooter")
        return
    end
    local check=GetChaName_born2 ( role )
    if check==0 then
        SystemNotice( role ,"Requirements Do Not Meet")
        return
    end

    local cha_job = GetChaAttr( role , ATTR_JOB )
    --SetChaAttr(role, ATTR_JOB ,12 )     
    GiveItem_chibang2 ( role  )                --翅膀
    local sk_add = SK_HLP
    AddChaSkill ( role , sk_add , 2 , 1 , 0 )
    SetChaAttrI(role, ATTR_CSAILEXP , 10000)
    RefreshCha ( role )
end
-------------------------------重生为圣职者
function GetChaName5_born2 ( role,npc )

        local cha_type = GetChaTypeID ( role )
    if cha_type~=3 and cha_type~=4 then
        SystemNotice( role ,"Only Phyllis and Ami Can Become Cleric")
        return
    end
    local check=GetChaName_born2 ( role )
    if check==0 then
        SystemNotice( role ,"Requirements Do Not Meet")
        return
    end

    local cha_job = GetChaAttr( role , ATTR_JOB )
    --SetChaAttr(role, ATTR_JOB ,13 )     
    GiveItem_chibang2 ( role  )                --翅膀
    local sk_add = SK_SSSP
    AddChaSkill ( role , sk_add , 2 , 1 , 0 )
    SetChaAttrI(role, ATTR_CSAILEXP , 10000)
    RefreshCha ( role )
end
-------------------------------重生为封印师
function GetChaName6_born2 ( role,npc )

        local cha_type = GetChaTypeID ( role )
    if cha_type~=3 and cha_type~=4 then
        SystemNotice( role ,"Only Phyllis and Ami Can Become Seal Master")
        return
    end
    local check=GetChaName_born2 ( role )
    if check==0 then
        SystemNotice( role ,"Requirements Do Not Meet")
        return
    end

    local cha_job = GetChaAttr( role , ATTR_JOB )
    --SetChaAttr(role, ATTR_JOB ,14 )     
    GiveItem_chibang2 ( role  )                --翅膀
    local sk_add = SK_SSSP
    AddChaSkill ( role , sk_add , 2 , 1 , 0 )
    SetChaAttrI(role, ATTR_CSAILEXP , 10000)
    RefreshCha ( role )
end

function GiveItem_chibang2 ( role  )
        local cha_type = GetChaTypeID ( role )    
    if cha_type==1 then
        GiveItem( role , 0 , 136  , 1 , 4 )
    elseif cha_type==2 then
        GiveItem( role , 0 , 139  , 1 , 4 )
    elseif cha_type==3 then
        GiveItem( role , 0 , 129  , 1 , 4 )
    elseif cha_type==4 then
        GiveItem( role , 0 , 132  , 1 , 4 )
    end
end
 

this is the correct one?

 

Share this post


Link to post
Share on other sites
On 10/13/2022 at 10:16 AM, Mesut said:

this is the correct one?

 

Have you tried it?
If not, i rather recommend you to try first. I dont have too much experience, so i cant read errors quickly. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...