Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Release] Rebirth Level 2 Script, HAVE FUN!

Junior Spellweaver
Joined
Oct 16, 2008
Messages
197
Reaction score
1
credits go for BamBam (NpcScript), badeed (defining) and also masterartie (function).
here is the NPC koordinate rebirth level 2 :

Code:
31	2nd Rebirth Angel	1	774	0	159920,90975	159920,90975	269	Heaven	103	0	dina_talk11	0

here is the NPCscript rebirth level 2 :

Code:
function dina_talk11()

	Talk( 1, "2nd Rebirth Angel: I see you've gone through the 2nd Rebirth quests, This is where your prize is given to you for establishing peace through out the world and finding it's most preacius treasures." )
	Text( 1, "I wish to Reincarnate", JumpPage, 2)
	Text( 1, "I wish to know more", JumpPage, 3)
	Text( 1, "I am having problems on 2nd Rebirth", JumpPage, 5 )
	Text( 1, "I have not done this task.", CloseTalk)
	
	Talk( 2, "2nd Rebirth Angel: So you have done the task? Select the best option for you." )
	Text( 2, "Become a Crusader to uphold justice and peace",  GetChaName1_born2, 1)
	Text( 2, "Become a Champion to protect companion",  GetChaName2_born2, 1)
	Text( 2, "Become a voyager to sail the seas",  GetChaName5_born2, 1)
	Text( 2, "Become a Sharpshooter to vanquish your enemies",  GetChaName3_born2, 1)
	Text( 2, "Become a Cleric to heal the sick", GetChaName4_born2, 1)
	Text( 2, "Become a Cleric to heal the sick", GetChaName_born2, 1)	
	Text( 2, "Become a Seal Master to do anything", GetChaName6_born2, 1)
	Text( 2, "I do not wish to do 2nd Rebirth right now", CloseTalk)
	
	Talk( 3, "What do you wish to know more about?" )
	Text( 3, "Classes after 2nd Rebirth", JumpPage, 4 )
	
	Talk( 5, "Whats wrong?" )
	Text( 5, "I have the 2nd Rebirth stone, but it wont let me!", JumpPage, 6)
	Text( 5, "I don't know where to do the quests!", JumpPage, 7)
	Text( 5, "The High Priest will not hand me any quests!", JumpPage, 8)
	
	Talk( 6, "Take off all your equips, including rings and necklesses. Make sure you are choosing your new class according to race.") 
	Text( 6, "Let me try once again!", JumpPage, 1)
	
	Talk( 7, "We have not done/translated all the quests. Please wait untill we can get all the according files and have these quests translated")
    Text( 7, "I understand", CloseTalk )
	
	Talk( 8, "Have you done Rebirth task? It is required to stand the 2nd Rebirth quests." )
	Text( 8, "YES! I have done it", JumpPage, 9 )
	Text( 8, "I have not", JumpPage, 10 )
	
	Talk( 9, "If you have done it, nothing is wrong, try checking if you have already done the quest and/or a GM set you a quest record")
	Text( 9, "I will check", CloseTalk )
	
	Talk( 10, "Then why are you here? You cannot start 2nd Rebirth until you have completed your 1st Rebirth.")
	Text( 10, "Sorry for my lack of inteligence", CloseTalk )

end

and this is function of rebirth level 2 :

Code:
------------------------------Dina Rebirth
------------------------------
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 ,"Requirements Do Not Meet")
		return
	end
	-----------------Skill Add
	local cha_job = GetChaAttr( role , ATTR_JOB )
	SetChaAttr(role, ATTR_JOB ,9 ) 	
	GiveItem_chibang2 ( role  )				--Wings Add
	local sk_add = SK_WYZ
	AddChaSkill ( role , sk_add , 2 , 2 , 0 )
	SetChaAttrI(role, ATTR_CSAILEXP , 10000)
	RefreshCha ( role )
end
-------------------------------Champ
function GetChaName2_born2 ( 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_born2 ( 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_chibang2 ( role  )				--Wings Add
	local sk_add = SK_BSJ
	AddChaSkill ( role , sk_add , 2 , 2 , 0 )
	SetChaAttrI(role, ATTR_CSAILEXP , 10000)
	RefreshCha ( role )
end
-------------------------------Voyager
function GetChaName3_born2 ( 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_born2 ( 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_chibang2 ( role  )				--Wings Add
	local sk_add = SK_CYN
	AddChaSkill ( role , sk_add , 2 , 2 , 0 )
	SetChaAttrI(role, ATTR_CSAILEXP , 10000)
	RefreshCha ( role )
end
-------------------------------SharpShooter
function GetChaName4_born2 ( 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_born2 ( 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_chibang2 ( role  )				--Wings Add
	local sk_add = SK_HLP
	AddChaSkill ( role , sk_add , 2 , 2 , 0 )
	SetChaAttrI(role, ATTR_CSAILEXP , 10000)
	RefreshCha ( role )
end
-------------------------------Cleric
function GetChaName5_born2 ( 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_born2 ( 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_chibang2 ( role  )				--Rebirth Wings Add
	local sk_add = SK_SSSP
	AddChaSkill ( role , sk_add , 2 , 2 , 0 )
	SetChaAttrI(role, ATTR_CSAILEXP , 10000)
	RefreshCha ( role )
end
-------------------------------Seal Master
function GetChaName6_born2 ( 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_born2 ( 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_chibang2 ( role  )				--Rebirth Wings Add
	local sk_add = SK_SSSP
	AddChaSkill ( role , sk_add , 2 , 2 , 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

-------------------------------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, 5765 )    -- look your iteminfo for item rebirth stone level 2
	if i < 1 then
		SystemNotice( role ,"Please Give Me Ur 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 Atleast 1 Free Slot")
		UseItemFailed ( role )
		return 0
	end
	local zs1 =TakeItem( role, 0,5765, 1 )   -- look your iteminfo for item rebirth stone level 2
	if zs1==0 then
		SystemNotice ( role ,"Gather Lv2 Rebirth Stone Failed")
		return 0
	end
	------------------瓚剿褒伎岆瘁眒冪笭汜徹
	local Zs_Exp = GetChaAttr ( role , ATTR_CSAILEXP )
	if Zs_Exp >=10000 then
		SystemNotice(role ,"U have Already Done Lv2 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-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 )
                     AddChaSkill ( role , sk_add , 2 , 1 , 0 )  --badeed add this

	PlayEffect( npc, 361 )
	Notice("put something here to congratz the players that finished it >.>")
	return 1

end

NOTE : Please see the inside text i see for changing code iteminfo of rebirth stone level 2
HAVE FUN!
 
Skilled Illusionist
Joined
Jun 23, 2008
Messages
319
Reaction score
10
Try 2nd and 3rd Rebith

u can use this Atachment.
Just Copt and Try there.
I had try remake over the 2nd rebith script to 3rd rabith script.
u must make new NPC first because i not include there.

And also add new item on u iteminfo.txt
 

Attachments

You must be registered for see attachments list
Last edited:
Junior Spellweaver
Joined
Oct 16, 2008
Messages
197
Reaction score
1
Re: Rebirth Level 2 Script, HAVE FUN!

make sure also the rebirth stone must inside your iteminfo (aspecially 2nd rebirth stone and 3rd rebirth stone)
 
Newbie Spellweaver
Joined
Jan 21, 2009
Messages
16
Reaction score
0
i laready make new npc for 2nd rebirth, but i cant Reincarnate 2nd rebirth
 
Junior Spellweaver
Joined
Oct 16, 2008
Messages
197
Reaction score
1
ok for those who still cannot reincarnate into lvl2 rebirth you need to add this into your NpcSdk lua file :
Code:
elseif item.func == GetChaName1_born2 then
			return GetChaName1_born2(character,npc )
		elseif item.func == GetChaName2_born2 then
			return GetChaName2_born2(character,npc )
		elseif item.func == GetChaName3_born2 then
			return GetChaName3_born2(character,npc )
		elseif item.func == GetChaName4_born2 then
			return GetChaName4_born2(character,npc )
		elseif item.func == GetChaName5_born2 then
			return GetChaName5_born2(character,npc )
		elseif item.func == GetChaName6_born2 then
			return GetChaName6_born2(character,npc )

step how to add it, use search in notepad, add this :
Code:
elseif item.func == GetChaName6_born then

after you find it, add function/code above after it....
now you will able to reincarnate
 
Newbie Spellweaver
Joined
Jan 4, 2009
Messages
6
Reaction score
0
Please give me urs Lv2 Rebirth Stone
Requirement do not meet.

I follow exactly the instruction and also i check the Item ID in function.
It still cannot work. Can send me your script and function.
 
Newbie Spellweaver
Joined
Jun 12, 2009
Messages
5
Reaction score
0
I tried to add 2nd/3rd rebirth yesterday but didn't work. And after I read this thread, I realised I didn't have the 2nd and 3rd rebirth stones. Can someone send me the script pls, and also show me where to add them? Thx =)

Btw, my first rebirth is also not working. I have the rebirth card in inventory and go to RB angel "I wish to rebirth" then nothing happened. I tried looking at the script but then I don't know what to look for @_@
 
Newbie Spellweaver
Joined
Jul 4, 2009
Messages
14
Reaction score
0
darnals Thx much for ur folder :)
 
Last edited:
Back
Top