|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Custom Custom Quests here |
|
|
|
11-29-2011, 07:49 AM
|
Sarnak
|
|
Join Date: Sep 2011
Posts: 70
|
|
High Lvl Character Resurrection / Rebirth
Hey i dont like the idea of you hit high lvl nd thats it no more progression really...
So heres a simple addon NPC Script that can be attached to a quest or however you like..
Has been tested and works However i would not use it with any code that uses setstat code otherwise it overrides your resurrection bonus.
I would advise changing setstat code in other scripts to use incstat + or -
Code:
sub EVENT_SAY {
my $Ressurection = quest::saylink ("Ressurection", 1);
if ($text=~/Hail/i){
$client->Message(14,"Hello, $name!");
if ($ulevel=>60){
$client->Message(14,"Hello, $name! What an amazing world we live in. You have reached amazing Power. But there is more to learn for us all. [$Ressurection] Is possible now. ");
}
}
my $rebirth = quest::saylink ("rebirth", 1);
if ($text =~/Ressurection/i){
$client->Message(14,"You may choose to be reborn as a new class. You will return to a state of a new life. You may remember some of your past life feats. And with your [$rebirth] you will be stronger than before.");
}
my $Bard = quest::saylink ("Bard", 1);
my $Beastlord = quest::saylink ("Beastlord", 1);
my $Berserker = quest::saylink ("Berserker", 1);
my $Cleric = quest::saylink ("Cleric", 1);
my $Druid = quest::saylink ("Druid", 1);
my $Enchanter = quest::saylink ("Enchanter", 1);
my $Necromancer = quest::saylink ("Necromancer", 1);
my $Magician = quest::saylink ("Magician", 1);
my $Monk = quest::saylink ("Monk", 1);
my $Paladin = quest::saylink ("Paladin", 1);
my $Ranger = quest::saylink ("Ranger", 1);
my $Rogue = quest::saylink ("Rogue", 1);
my $Shadowknight = quest::saylink ("Shadowknight", 1);
my $Shaman = quest::saylink ("Shaman", 1);
my $Warrior = quest::saylink ("Warrior", 1);
my $Wizard = quest::saylink ("Wizard", 1);
if ($text =~/rebirth/i){
quest::say ("What would you like to become?");
$client->Message(14,"Your Rebirth will cause you to leave this world for a moment.");
quest::say ("[$Bard]");
quest::say ("[$Beastlord]");
quest::say ("[$Berserker]");
quest::say ("[$Cleric]");
quest::say ("[$Druid]");
quest::say ("[$Enchanter]");
quest::say ("[$Necromancer]");
quest::say ("[$Magician]");
quest::say ("[$Monk]");
quest::say ("[$Paladin]");
quest::say ("[$Ranger]");
quest::say ("[$Rogue]");
quest::say ("[$Shadowknight]");
quest::say ("[$Shaman]");
quest::say ("[$Warrior]");
quest::say ("[$Wizard]");
}
if ($text =~/Bard/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(3, +1);
quest::incstat(6, +2);
quest::permaclass(8);
}
if ($text =~/Beastlord/i){
quest::level(1);
quest::incstat(1, +1);
quest::incstat(2, +2);
quest::incstat(4, +1);
quest::permaclass(15);
}
if ($text =~/Berserker/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +2);
quest::incstat(3, +1);
quest::permaclass(16);
}
if ($text =~/Cleric/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +1);
quest::incstat(4, +2);
quest::permaclass(2);
}
if ($text =~/Druid/i){
quest::level(1);
quest::incstat(1, +2);
quest::incstat(4, +2);
quest::permaclass(6);
}
if ($text =~/Enchanter/i){
quest::level(1);
quest::incstat(5, +2);
quest::incstat(6, +2);
quest::permaclass(14);
}
if ($text =~/Magician/i){
quest::level(1);
quest::incstat(1, +2);
quest::incstat(5, +2);
quest::permaclass(13);
}
if ($text =~/Monk/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +1);
quest::incstat(2, +1);
quest::incstat(3, +1);
quest::permaclass(7);
}
if ($text =~/Necromancer/i){
quest::level(1);
quest::incstat(3, +2);
quest::incstat(5, +2);
quest::permaclass(11);
}
if ($text =~/Paladin/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +1);
quest::incstat(4, +1);
quest::incstat(6, +1);
quest::permaclass(3);
}
if ($text =~/Ranger/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +1);
quest::incstat(2, +1);
quest::incstat(4, +1);
quest::permaclass(4);
}
if ($text =~/Rogue/i){
quest::level(1);
quest::incstat(2, +2);
quest::incstat(3, +2);
quest::permaclass(9);
}
if ($text =~/Shadowknight/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +1);
quest::incstat(5, +1);
quest::incstat(6, +1);
quest::permaclass(5);
}
if ($text =~/Shaman/i){
quest::level(1);
quest::incstat(1, +1);
quest::incstat(4, +2);
quest::incstat(6, +1);
quest::permaclass(10);
}
if ($text =~/Warrior/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +2);
quest::incstat(2, +1);
quest::permaclass(1);
}
if ($text =~/Wizard/i){
quest::level(1);
quest::incstat(1, +2);
quest::incstat(5, +2);
quest::permaclass(12);
}
}
|
|
|
|
12-07-2011, 05:08 AM
|
Sarnak
|
|
Join Date: Sep 2011
Posts: 70
|
|
I found out i have the int and wisdom stats reversed
other than that its still cool to play with
__________________
--Any Code by me is considered open source Beta--
Not a DEV not a Coder
Just a person....
|
|
|
|
02-07-2012, 06:43 AM
|
|
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
FYI, you didn't do a level check for any responses other than the hail, so a level 1 could repeatedly tell that NPC any class name and it would just keep adding stats.
I would suggest you add the level check around the whole thing other than the hail response for people lower than 60.
It would be something like this:
Code:
sub EVENT_SAY {
my $Ressurection = quest::saylink ("Ressurection", 1);
if ($ulevel < 60)
{
if ($text=~/Hail/i){
$client->Message(14,"Hello, $name!");
}
}
else
{
if ($text=~/Hail/i){
$client->Message(14,"Hello, $name! What an amazing world we live in. You have reached amazing Power. But there is more to learn for us all. [$Ressurection] Is possible now. ");
}
my $rebirth = quest::saylink ("rebirth", 1);
if ($text =~/Ressurection/i){
$client->Message(14,"You may choose to be reborn as a new class. You will return to a state of a new life. You may remember some of your past life feats. And with your [$rebirth] you will be stronger than before.");
}
my $Bard = quest::saylink ("Bard", 1);
my $Beastlord = quest::saylink ("Beastlord", 1);
my $Berserker = quest::saylink ("Berserker", 1);
my $Cleric = quest::saylink ("Cleric", 1);
my $Druid = quest::saylink ("Druid", 1);
my $Enchanter = quest::saylink ("Enchanter", 1);
my $Necromancer = quest::saylink ("Necromancer", 1);
my $Magician = quest::saylink ("Magician", 1);
my $Monk = quest::saylink ("Monk", 1);
my $Paladin = quest::saylink ("Paladin", 1);
my $Ranger = quest::saylink ("Ranger", 1);
my $Rogue = quest::saylink ("Rogue", 1);
my $Shadowknight = quest::saylink ("Shadowknight", 1);
my $Shaman = quest::saylink ("Shaman", 1);
my $Warrior = quest::saylink ("Warrior", 1);
my $Wizard = quest::saylink ("Wizard", 1);
if ($text =~/rebirth/i){
quest::say ("What would you like to become?");
$client->Message(14,"Your Rebirth will cause you to leave this world for a moment.");
quest::say ("[$Bard]");
quest::say ("[$Beastlord]");
quest::say ("[$Berserker]");
quest::say ("[$Cleric]");
quest::say ("[$Druid]");
quest::say ("[$Enchanter]");
quest::say ("[$Necromancer]");
quest::say ("[$Magician]");
quest::say ("[$Monk]");
quest::say ("[$Paladin]");
quest::say ("[$Ranger]");
quest::say ("[$Rogue]");
quest::say ("[$Shadowknight]");
quest::say ("[$Shaman]");
quest::say ("[$Warrior]");
quest::say ("[$Wizard]");
}
if ($text =~/Bard/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(3, +1);
quest::incstat(6, +2);
quest::permaclass(8);
}
if ($text =~/Beastlord/i){
quest::level(1);
quest::incstat(1, +1);
quest::incstat(2, +2);
quest::incstat(4, +1);
quest::permaclass(15);
}
if ($text =~/Berserker/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +2);
quest::incstat(3, +1);
quest::permaclass(16);
}
if ($text =~/Cleric/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +1);
quest::incstat(4, +2);
quest::permaclass(2);
}
if ($text =~/Druid/i){
quest::level(1);
quest::incstat(1, +2);
quest::incstat(4, +2);
quest::permaclass(6);
}
if ($text =~/Enchanter/i){
quest::level(1);
quest::incstat(5, +2);
quest::incstat(6, +2);
quest::permaclass(14);
}
if ($text =~/Magician/i){
quest::level(1);
quest::incstat(1, +2);
quest::incstat(5, +2);
quest::permaclass(13);
}
if ($text =~/Monk/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +1);
quest::incstat(2, +1);
quest::incstat(3, +1);
quest::permaclass(7);
}
if ($text =~/Necromancer/i){
quest::level(1);
quest::incstat(3, +2);
quest::incstat(5, +2);
quest::permaclass(11);
}
if ($text =~/Paladin/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +1);
quest::incstat(4, +1);
quest::incstat(6, +1);
quest::permaclass(3);
}
if ($text =~/Ranger/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +1);
quest::incstat(2, +1);
quest::incstat(4, +1);
quest::permaclass(4);
}
if ($text =~/Rogue/i){
quest::level(1);
quest::incstat(2, +2);
quest::incstat(3, +2);
quest::permaclass(9);
}
if ($text =~/Shadowknight/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +1);
quest::incstat(5, +1);
quest::incstat(6, +1);
quest::permaclass(5);
}
if ($text =~/Shaman/i){
quest::level(1);
quest::incstat(1, +1);
quest::incstat(4, +2);
quest::incstat(6, +1);
quest::permaclass(10);
}
if ($text =~/Warrior/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +2);
quest::incstat(2, +1);
quest::permaclass(1);
}
if ($text =~/Wizard/i){
quest::level(1);
quest::incstat(1, +2);
quest::incstat(5, +2);
quest::permaclass(12);
}
}
}
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 07:05 PM.
|
|
|
|
|
|
|
|
|
|
|
|
|