Release Rebirth Script.

smoochy boys on tour

MrsMir

Dedicated Member
Dedicated Member
Mar 17, 2009
80
0
33
¿
Qfunction script.

[@login]
#IF
CHECK [25] 1
CHECKJOB Warrior
#ACT
SETRANKLEVELNAME %s\RebornWarrior
#IF
CHECK [25] 1
CHECKJOB Wizard
#ACT
SETRANKLEVELNAME %s\RebornWizard
#IF
CHECK [25] 1
CHECKJOB Taoist
#ACT
SETRANKLEVELNAME %s\RebornTaoist

Go to m2server > Envir > QuestDiary.

Make a folder and name it 'Rebirth' and inside that create .txt document and name that 'NewRebirth.txt'.


Merchant.
Open your Merchant.txt in your QuestDiary folder to add the NPC. If your unsure how to add it just copy of a NPC above and changing the name and coords. Name would be Rebirth-0.

Creating the NPC.
Marker_Def and NPC_Def
These are the two locations that you need to create your NPC.
Exactly the same in both make a new .txt and name them Rebirth-X (X been the number of your map). Its important that you have the correct map number in order for the whole thing to work. Once you have these done you can paste this into the Rebirth-X .txt
Save and exit.


; ===================================
; Npc Def NPC File : Rebirth-0
; Rebirth npc in BichonProvince
; -----------------------------------
; Name: Rebirth
; Job:
; Map No: 0
; Pos X
; Pos Y
; File name: *removed*
; Comment: Rebirth npc in BichonProvince

;================================================= =
;
[@main]
#IF
CHECKNAMELIST ..\QuestDiary\Rebirth\NewRebirth.txt
#SAY
Sorry you have already been reborn.\
<No problem/@exit>
#ELSEACT
goto @main1

[@main1]
#IF
checklevel 100
#SAY
Hey there would you like to Rebirth?\
Quick and easy with no messing about.\
All you need is to be level 100\
You will be deleveled to 60 and gain some nice kit.\
Yes or no?\
<Yes Please/@yes> <No Thank You/@exit>

[@yes]
#IF
CHECKJOB Warrior
#ACT
goto @warriorrebirth
break
#IF
CHECKJOB Wizard
#ACT
goto @wizardrebirth
break
#IF
CHECKJOB Taoist
#ACT
goto @taoistrebirth
break

[@warriorrebirth]
#ACT
RENEWLEVEL 1 60 100
SENDMSG 0 "<$USERNAME> has been Reborn"
SETRANKLEVELNAME %s\RebornWarrior
ADDNAMELIST ..\QuestDiary\Rebirth\NewRebirth.txt
GIVE rebirthWeapon 1
GIVE RebirthRobe(M) 1
GIVE RebirthRobe(F) 1
GIVE RebirthHelmet 1
GIVE RebirthNecklace 1
GIVE Rebirthbrace 2
GIVE RebirthRing 2
GIVE Rebirthbelt 1
set [25] 1
break

[@wizardrebirth]
#ACT
RENEWLEVEL 1 60 100
SENDMSG 0 "<$USERNAME> has been Reborn"
SETRANKLEVELNAME %s\RebornWizard
ADDNAMELIST ..\QuestDiary\Rebirth\NewRebirth.txt
GIVE rebirthWeapon 1
GIVE RebirthRobe(M) 1
GIVE RebirthRobe(F) 1
GIVE RebirthHelmet 1
GIVE RebirthNecklace 1
GIVE Rebirthbrace 2
GIVE RebirthRing 2
GIVE Rebirthbelt 1
set [25] 1
break

[@taoistrebirth]
#ACT
RENEWLEVEL 1 60 100
SENDMSG 0 "<$USERNAME> has been Reborn"
SETRANKLEVELNAME %s\RebornTaoist
ADDNAMELIST ..\QuestDiary\Rebirth\NewRebirth.txt
GIVE rebirthWeapon 1
GIVE RebirthRobe(M) 1
GIVE RebirthRobe(F) 1
GIVE RebirthHelmet 1
GIVE RebirthNecklace 1
GIVE Rebirthbrace 2
GIVE RebirthRing 2
GIVE Rebirthbelt 1
set [25] 1
break

SQL

Open SQL and open your database and open your tables. Look for TBL_NPC and open that. Now we need to add the NPC with locations etc.
Go to the bottom of your table and put in the next number that follows. eg, 230, 231, 232 so next would be 233. Then enter that name of your NPC which in most Rebirth cases is called Rebirth. Now the type which would be 0. Now the map number. Followed by the coords you want the NPC. Flag is also 0. Appearance is the look of your NPC. Finally you need to enable your NPC so stick a 1 in this column.


Screenshot example.

npcexample.png


This should help some people adding a Rebirth system to there server as it helped me. Also you can edit it to your liking this is just an example of adding it to your server. Hope you like it.
 
Last edited by a moderator:

twigletuk

Golden Oldie
Golden Oldie
Oct 17, 2005
586
7
125
Crewe Cheshire
ive added this scirpt t my server bt when u get 100 n rebirth n get 100 again u can rebirth again how can i stop it doing that?

/Clipper
 

MrsMir

Dedicated Member
Dedicated Member
Mar 17, 2009
80
0
33
¿
Have you edited any of the SETRANKLEVELNAME's? If you added it all like its shows it should appear as RebornWarrior/Wizard/Taoist. As for keep rebirthing i'll add a fix to it soon.
 

twigletuk

Golden Oldie
Golden Oldie
Oct 17, 2005
586
7
125
Crewe Cheshire
anyone no how to do this wen u Rebirth and u get rebirth rings for 1st then u wanted to go on 2nd page how do u do that? this all i got atm


; ===================================
; Npc Def NPC File : Rebirth-HZ05
; Rebirth npc in HomeZone
; -----------------------------------
; Name: Rebirth
; Job:
; Map No: HZ05
; Pos X
; Pos Y
; File name: *removed*
; Comment: Rebirth npc in HomeZone
;================================================= =
;
[@main]
#IF
checklevel 75
#say
Hey there, welcome to the <$SERVERNAME> rebirth system\
would you like to be rebirthed 1st as you have done a good\
job at reaching level 75\ \
<Yes Please/@yes> <No Thank You/@exit>
#ELSESAY
Sorry you need to be level 75 to be rebirthed.
[@yes]
#IF
checkrenewlevel = 0
#ACT
renewlevel 1 45 3
GIVE RebirthRing
GIVE RebirthRing
SETRANKLEVELNAME %s\=-Rebirth1st-=
ADDNAMELIST ..\QuestDiary\Rebirth\NewRebirth.txt
set [50] 1
#SAY
enjoy your new life
#elseSAY
you already have been reborn or incorrect level.\\
#ACT
GOTO @main1

[@main1]
#IF
checklevel 85
#say
Hey there, welcome to the <$SERVERNAME> rebirth system\
would you like to be rebirthed 1st as you have done a good\
job at reaching level 85\ \
<Yes Please/@yes> <No Thank You/@exit>
#ELSESAY
Sorry you need to be level 85 to be rebirthed.
[@yes]
#IF
checkrenewlevel = 0
#ACT
renewlevel 1 50 25
GIVE RebirthWheel
GIVE RebirthWheel
SETRANKLEVELNAME %s\=-Rebirth2nd-=
set [50] 1
#SAY
enjoy your new life
#elseSAY
you already have been reborn or incorrect level.\\
[@main2]

Any help plz?=)

\DarkLord
 

twigletuk

Golden Oldie
Golden Oldie
Oct 17, 2005
586
7
125
Crewe Cheshire
Have you edited any of the SETRANKLEVELNAME's? If you added it all like its shows it should appear as RebornWarrior/Wizard/Taoist. As for keep rebirthing i'll add a fix to it soon.


ive sorted the name thnx.

and ty for sorteing the keep rebirthin thing.

can u post when its done

/Clipper
 

MrsMir

Dedicated Member
Dedicated Member
Mar 17, 2009
80
0
33
¿
Think that might fix it not 100% just recopy and paste again into NPC .txt
 

twigletuk

Golden Oldie
Golden Oldie
Oct 17, 2005
586
7
125
Crewe Cheshire
when i click on the npc now it doesnt do nothing.

at the start of it i changed the #if to #act n it works but i can rebirth at 100 over n over again

/Clipper
 

MrsMir

Dedicated Member
Dedicated Member
Mar 17, 2009
80
0
33
¿
Sorry. This is only my 1st script I wrote. Maybe a Mod will edit it who know what there doing more then me. ;)
 

lozmuir

Former Moderator
VIP
Apr 17, 2003
805
1
215
Congleton, Cheshire.
Had a quick look and noticed something wrong.

[@main]
#IF
CHECKNAMELIST ..\QuestDiary\Rebirth\NewRebirth.txt
#SAY
Sorry you have already been reborn.\
<No problem/@exit>
#ELSEACT
goto @main1 ----------------- Forgot this


[@main1] ------------ Added this.
#IF
checklevel 100
#SAY
Hey there would you like to Rebirth?\
Quick and easy with no messing about.\
All you need is to be level 100\
You will be deleveled to 60 and gain some nice kit.\
Yes or no?\
<Yes Please/@yes> <No Thank You/@exit>

Edited quickly, anymore problems and i'll give it another look.. a bit busy atm.

Should of fixed your issue.
 
Last edited:

kingnooby

LOMCN n00bie
Aug 18, 2008
5
0
32
i fixed the script so it dosent stick on the screen and get rebirth over and over

; ===================================
; Npc Def NPC File : Rebirth-0
; Rebirth npc in BichonProvince
; -----------------------------------
; Name: Rebirth
; Job:
; Map No: 0
; Pos X
; Pos Y
; File name: *removed*
; Comment: Rebirth npc in BichonProvince

;================================================= =
;
[@main]
#IF
CHECKNAMELIST ..\QuestDiary\Rebirth\NewRebirth.txt
#SAY
Sorry you have already been reborn.\
<No problem/@exit>
#ELSEACT
goto @main1

[@main1]
#IF
checklevel 100
#SAY
Hey there would you like to Rebirth?\
Quick and easy with no messing about.\
All you need is to be level 100\
You will be deleveled to 60 and gain some nice kit.\
Yes or no?\
<Yes Please/@yes> <No Thank You/@exit>

[@yes]
#IF
CHECKJOB Warrior
#ACT
goto [MENTION=589]Warrior[/MENTION]rebirth
break
#IF
CHECKJOB Wizard
#ACT
goto [MENTION=4428]Wizard[/MENTION]rebirth
break
#IF
CHECKJOB Taoist
#ACT
goto [MENTION=7419]Taoist[/MENTION]rebirth
break

[[MENTION=589]Warrior[/MENTION]rebirth]
#ACT
RENEWLEVEL 1 60 100
SENDMSG 0 "<$USERNAME> has been Reborn"
SETRANKLEVELNAME %s\RebornWarrior
ADDNAMELIST ..\QuestDiary\Rebirth\NewRebirth.txt
GIVE rebirthWeapon 1
GIVE RebirthRobe(M) 1
GIVE RebirthRobe(F) 1
GIVE RebirthHelmet 1
GIVE RebirthNecklace 1
GIVE Rebirthbrace 2
GIVE RebirthRing 2
GIVE Rebirthbelt 1
set [25] 1
break
close

[[MENTION=4428]Wizard[/MENTION]rebirth]
#ACT
RENEWLEVEL 1 60 100
SENDMSG 0 "<$USERNAME> has been Reborn"
SETRANKLEVELNAME %s\RebornWizard
ADDNAMELIST ..\QuestDiary\Rebirth\NewRebirth.txt
GIVE rebirthWeapon 1
GIVE RebirthRobe(M) 1
GIVE RebirthRobe(F) 1
GIVE RebirthHelmet 1
GIVE RebirthNecklace 1
GIVE Rebirthbrace 2
GIVE RebirthRing 2
GIVE Rebirthbelt 1
set [25] 1
break
close

[[MENTION=7419]Taoist[/MENTION]rebirth]
#ACT
RENEWLEVEL 1 60 100
SENDMSG 0 "<$USERNAME> has been Reborn"
SETRANKLEVELNAME %s\RebornTaoist
ADDNAMELIST ..\QuestDiary\Rebirth\NewRebirth.txt
GIVE rebirthWeapon 1
GIVE RebirthRobe(M) 1
GIVE RebirthRobe(F) 1
GIVE RebirthHelmet 1
GIVE RebirthNecklace 1
GIVE Rebirthbrace 2
GIVE RebirthRing 2
GIVE Rebirthbelt 1
set [25] 1
break
close