PDA

View Full Version : Temporary De-Level Quest


trevius
01-16-2008, 11:48 AM
#############
#Quest Name: Temporary De-Level Quest
#Author: Trevius
#NPCs Involved: The quest giver NPC can have any name you want.
#Items Involved: 1 trinket that is exchanged to restore level to 70
#################

#Quest to de-level a character temporarily in exchange for an
#item that can be turned in at any time to return to level 70.

#You will need to create a new (not edit an existing) item to
#be the trinket. Once the item is created, simply use notepad
#to do a "replace" on the number "12941" with your new itemID.
#The item currently in this quest is an existing item in the PEQ
#database, so you can test it out without any editing to see if
#you like it before you put any further effort into it.

sub EVENT_SAY {
{
if(($text=~/hail/i)&&($ulevel <= 69)){
quest::say("Hello, $name, I have an interesting deal for you, but you must reach 70 seasons before I can make my offer. Please return to me when you reach level 70. If you are here to return my trinket, please do so and I will restore your experience.");
}
elsif(($text=~/hail/i)&&($ulevel == 70)){
quest::say("Hello, $name, I can lower your [level] temporarily if you would like. It is useful if you have friends that are lower level and would like to group with them, but don't want to make a new character and start over. If your friends are level 51+, you can group with them and work on AAs that will carry over when you return to level 70.");
}
}
if(($text=~/level/i)&&($ulevel == 70)){
quest::say("The way it works is I take your experience from you and give you a trinket in exchange. When you are ready to go back to level 70 again, simply turn in the trinket to me and I will return your experience. Would you like to know the level [ranges] I can set you to?");
}
if(($text=~/ranges/i)&&($ulevel == 70)){
quest::say("I can set you to level [65], [60], [55], [52], [51], [50], [45], [40], [35], [30], [25], [20], [15], [10], [5], or all of the way back to level [1]. Just let me know which level you would like to return to.");
}

if(($text=~/65/i)&&($ulevel == 70)){
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::level(65);
}
if(($text=~/60/i)&&($ulevel == 70)){
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::level(60);
}
if(($text=~/55/i)&&($ulevel == 70)){
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::level(55);
}
if(($text=~/52/i)&&($ulevel == 70)){
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::level(52);
}
if(($text=~/51/i)&&($ulevel == 70)){
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::level(51);
}
if(($text=~/50/i)&&($ulevel == 70)){
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::level(50);
}
if(($text=~/45/i)&&($ulevel == 70)){
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::level(45);
}
if(($text=~/40/i)&&($ulevel == 70)){
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::level(40);
}
if(($text=~/35/i)&&($ulevel == 70)){
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::level(35);
}
if(($text=~/30/i)&&($ulevel == 70)){
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::level(30);
}
if(($text=~/25/i)&&($ulevel == 70)){
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::level(25);
}
if(($text=~/20/i)&&($ulevel == 70)){
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::level(20);
}
if(($text=~/15/i)&&($ulevel == 70)){
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::level(15);
}
if(($text=~/10/i)&&($ulevel == 70)){
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::level(10);
}
if(($text=~/^5$/i)&&($ulevel == 70)){
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::level(5);
}
if(($text=~/^1$/i)&&($ulevel == 70)){
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::level(1);
}
}

sub EVENT_ITEM
{
if ($item1 == 12941){
quest::say("Looks like you took good care of it! Here are your levels back.");
quest::emote("casts a spell and you instantly feel more powerful! Like you could take on anything in battle!");
quest::level(70);
}
else {
plugin::return_items(\% itemcount);
quest::say("I have no use for this item, $name. Take it back.");
}
}

trevius
01-16-2008, 11:49 AM
My quest was so long I couldn't add any type without exceeding the 10k character limit lol. Here is more info:

This quest was designed so characters can de-level themselves to play with lower level friends or alts on other accounts. It is actually 1 of 2 de-level quests. The other is a quest to de-level a character from level 70 to 1 in exchange for a nice item of their choice. I may post that one later if anyone is interested.

I have tested this quest and it seems to be working 100% with no issues for me. Let me know what you guys think.

If you want to see a working version of this quest, I have it running on my test server (Trevs Test Server). But, unless you are level 70, you won't get much of a response. I can level your character to 70 there temporarily if you tell me account or character name. Either in a reply here or a PM or something.

GeorgeS
01-16-2008, 04:53 PM
Actually, this is a nice idea - never even thought of it - good script. Can I use it as an example for my script editor?

GeorgeS

trevius
01-16-2008, 05:29 PM
You certainly can! And thanks, that means a lot coming from someone as experienced as you. LOL, I just made my first server last week to develop content on. I am fairly technical and learn quick, and I have been playing different Emu servers over the past couple of years. I wanted to make a server that has new quest ideas mixed with old ones. I will post the other quests I have written so far as well. They are kinda long, so they will probably have to be spread over multiple posts heh.

Since I use your tools for my server, the least I can do is let you use my work :P

Also, I want to note that from my testing, all skill levels and AAs remain the same, so if you de-level and level back, you skills should still be there. If anyone notices other issues, let me know. The only thing you do lose is any current experience into level 70. But, I figure that isn't a bad price to pay for being able to change levels at will. Plus, it should be fun to plow through low level stuff with level 70 gear, since the gear will stay equiped until you remove it. If you do remove it, you can't put it back on until you get back to 70 again, so watch out swapping in clickies or whatever from habbit :)

trevius
02-10-2008, 01:13 PM
A minor addition to this quest for balancing reasons:

Add the line "quest::selfcast(331);" to each section of the quest that actually de-level's the character.

Example below:


if(($text=~/65/i)&&($ulevel == 70)){
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::selfcast(331);
quest::level(65);
}

Spell 331 should be "Reclaim Energy" to unsummon any pets. I tested it on Mage and Beastlord and it worked perfectly. Otherwise, a character could have a max level pet and de-level to 1 and keep the pet, which is a bad thing :P

I may rework this quest eventually when I figure out how to use globals well enough. I would like to have it so any level can use the quest and it will remember what level to set them back to when they return the item.

More details on testing de-leveling:

1. AAs all stay, but some may appear to poof until you zone. You can't use any AA's that aren't available for your current level. I am unsure about passive AAs.

2. All skills stay. I am unsure if it uses the cap skill for your current level or if it uses whatever your skill total is at. A level 1 with 300ish any skill would be pretty bad. I am thinking it should cap at (your level X 5) + 5. So, level 1 would have access to skills of (1 X 5) + 5 = 10 as is the cap per level on live.
You don't have to work your skills back up after you restore your previous higher level.

3. Spells all stay and will even stay scribed until you zone. Any spell you have scribed above your level will not allow you to cast it. Once you zone, any spell over your level will unscribe from your spell bar. You can save spell sets by right clicking the book icon on your spell bar and using the save options. Then you can save and load different sets of saved spell combos depending on your current level.

4. Confirmed that any item above your level that is still equiped will give no stats, even though the character window will show you as still getting stats from them (it is lying). If you get 1000hps from armor above your level and you have 1000hps naked, normally you would have 2000hps, but since items above your level don't actually give stats, you only have 1000hps even though the char screen still shows 2000hps. And any weapons over your level will give the "Invulnerable" message when trying to attack with them. So, if you plan to de-level, make sure to keep an alternate set of gear usable for that level.

5. Pets stay, but if you use the selfcast above to have the player cast Reclaim Energy on themselves, the pets will be gone.

That is all of the testing I have done for now.

Sophoket
10-20-2008, 02:31 AM
Would it not be easier to just let the player be set to any level instead of having a really long list of if statements for a range of levels?

For example:


sub EVENT_SAY {

if(($text=~/hail/i)&&($ulevel == 70)){
quest::say("I can set you to any level you like, just let me know.");
}

if($text!= "Hail, $mName") {
$levelVar = $text;
quest::say("Ok, You are now level $levelVar");
quest::summonitem(12941);
quest::level($levelVar);
}
}

sub EVENT_ITEM
{
if ($item1 == 12941){
quest::say("Looks like you took good care of it! Here are your levels back.");
quest::emote("casts a spell and you instantly feel more powerful! Like you could take on anything in battle!");
quest::level(70);
}
else {
plugin::return_items(\% itemcount);
quest::say("I have no use for this item, $name. Take it back.");
}
}

AndMetal
10-20-2008, 12:39 PM
Would it not be easier to just let the player be set to any level instead of having a really long list of if statements for a range of levels?

I agree (more flexibility!)

I think it would be better to test for a specific regexp though, maybe something like this:

if ($text~=/^[1-7]?[0-9]$/) { #1st number optional, but if there, will be 1-7 (10-70), has to be the only thing in the text (^ and $)
my $maxLevel = 75;
if ($text <= $maxLevel)
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::selfcast(331);
quest::level($level);
}


Now, I know Trev uses a quest global in his to remember the max level you obtained over & above 70, since you can only get them through a quest, so he might have to add checks in & others may need to modify $maxLevel based on their server, but this wouldn't limit you to just specific levels (which is why I hope Trev updates to this :D )

trevius
10-20-2008, 03:51 PM
LOL, ya, since I submitted the original script here, my delevel scripts have gotten much more complex. But, I haven't really messed with the basic stuff in this submission yet. I have been thinking of rewriting this quest in a pretty major way to make it more flexible and more simple. My Perl knowledge has grown alot since this submission lol. Still not an expert, but getting better :)

I am actually waiting to maybe add in a new field to the _character table that will track the maximum level a character has reached. That field will be used for skill points so players can't de-level and re-level to get unlimited unearned skill points for training at GMs. But, the good part about that field is that I can make a command to get the data in it for a character and use that instead of quest globals. So, I can easily let people de-level at any time to any level without risking any odd issues. I am sure that I could figure out how to do that with globals, but it will be alot cleaner with the new field if it gets added.

If I get it rewritten, I will definitely submit it.

trevius
07-21-2009, 09:23 PM
I finally got around to updating this script as well as my permanent de-leveling script. They still could be written in a much cleaner way, but since they do what I want them to do, I probably won't bother with them any further unless issues pop up.

I will post the exact scripts I run on Storm Haven below, but before them, I just want to post a generic De-Leveling script that any server can use if they wish. Note that for these updated scripts to work, you must be running at least R803 of the google SVN source code or later.

Some notable changes and updates for these scripts:
1. They make full use of Saylinks. All Saylinks are currently set to be Silent.
2. Players can now De-Level at any time from any level to any level as long as the level they want to go to is below the highest level they have ever reached.
3. Messages are now only sent to the client and are color coded in Tan to be easy to read, but still easy to tell that that they aren't seen by other players.
4. Spacer added between each text message to make them easier to read since the saylinks are silent.
5. Because of note 3 and 4, these quests are 100% spam free not counting the initial hail!


Generic Temporary De-Leveling Script:
#Quest to de-level a character temporarily

sub EVENT_SAY {

#Get the Maximum Level this character has ever reached
my $MaxLevel = quest::getlevel(4);

#Max Level Cap of the server should be set here
my $LevelCap = 75;

#Don't let players restore Levels to higher than the Level Cap of the server
if ($MaxLevel > $LevelCap)
{
$MaxLevel = $LevelCap;
}

#Create Silent Saylinks so this NPC can be interacted with and not show spam for other players
my $level_link = quest::saylink("level", 1);
my $restore = quest::saylink("restore", 1);
my $issues = quest::saylink("issues", 1);

#Spacer between all Text messages to make them easier to read
$client->Message(7, "-");

#get the clean NPC name for the message texts
$NPCName = $npc->GetCleanName();

if($text=~/hail/i && $ulevel < $MaxLevel)
{
$client->Message(315, "$NPCName whispers to you, 'Hello again, $name. Perhaps you are here to [$restore] your previous level? Or, if you like, you can change your level to any other you wish and still return to your maximum level at any time.'");
}

if($text=~/hail/i && $ulevel >= $MaxLevel)
{
$client->Message(315, "$NPCName whispers to you, 'Hello, $name, I can lower your [$level_link] temporarily if you would like. It is useful if you have friends that are lower level and would like to group with them, but don't want to make a new character and start over. If your friends are level 51+, you can group with them and work on AAs that will carry over when you return to normal Level.'");
}

if($text=~/level/i)
{
$client->Message(315, "$NPCName whispers to you, 'The way it works is you simply tell me the level you would like to become and as long as it is lower than the highest level you have reached so far, I will set it for you. Then just speak with me again when you are ready to return to your previous level. I can also tell you about some [$issues] you may encounter when you lower your level.'");
}

if($text >= 1 && $text <= $LevelCap && $text < $MaxLevel)
{
$client->Message(315, "$NPCName whispers to you, 'Simply return to me when you wish to restore your previous level.'");
$client->Message(6, "$NPCName casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
#Change the Character's level to the level requested
quest::level($text);
#Use a few techiques to ensure that the player isn't trying to exploit by casting a high level pet before De-Leveling, and remove any existing pets
quest::selfcast(1285);
quest::selfcast(331);
$client->Duck();
$client->Stand();
}

if($text =~/restore/i || $text == $MaxLevel)
{
$client->Message(315, "$NPCName whispers to you, 'You are now restored to your previous maximum level reached so far.'");
$client->Message(6, "$NPCName casts a spell and you instantly feel more powerful! The rush makes you feel like you could take on anything in battle!");
quest::level($MaxLevel);
}

if($text=~/issues/i)
{
$client->Message(315, "$NPCName whispers to you, 'The main issue is that any item above your level will show you as giving the proper stats, but they are lying. You gain no stats from items above your level and monsters are invulnerable to all attacks by weapons above your level. So, you will want to use a set of equipment and weapons that are useable at the level you currently are.'");
}

}

I haven't tried that exact version of the script, but it should work just fine. If there are any issues with it, please let me know and I will correct them.

In order for the ones from Storm Haven below to work properly, they must be used together. You can adjust where needed for max level or whatever, though.

Storm Haven Temporary De-Leveling Script:
#Rayna Levya - Nexus
#Quest to de-level a character temporarily in exchange for an item
#that can be turned in to return to level 70

sub EVENT_SAY {

my $MaxLevel = quest::getlevel(4);
if ($MaxLevel > 75)
{
$MaxLevel = 75;
}
my $level_link = quest::saylink("level", 1);
my $restore = quest::saylink("restore", 1);
my $dragons = quest::saylink("dragons", 1);
my $banish = quest::saylink("banish", 1);
my $dungeons = quest::saylink("dungeons", 1);
my $issues = quest::saylink("issues", 1);
my $fire = quest::saylink("fire", 1);
my $ice = quest::saylink("ice", 1);
my $fiftytwo = quest::saylink("52");

#Spacer between Text messages to make them easier to read
$client->Message(7, "-");

if($text=~/colors/i && $status > 20)
{
quest::echo(257, "Echoing Color 257"); #slightly brighter than /tell purple
quest::echo(281, "Echoing Color 281"); #/tell purple
quest::echo(18, "Echoing Color 18"); #/tell purple
quest::echo(263, "Echoing Color 263"); #Blue Grey
quest::echo(315, "Echoing Color 315"); #Chat Channel Tan
quest::echo(341, "Echoing Color 341"); #Light Pink
}

if($qglobals{temp_level} == 3 && $ulevel < 70)
{
$client->Message(315, "Rayna Levya whispers to you, 'Hello again, $name. Unfortunately, there is nothing I can do for you until you reach level 70 again.'");
}

if($text=~/hail/i && $ulevel < $MaxLevel && ($qglobals{temp_level} != 3 || $ulevel >= 70))
{
$client->Message(315, "Rayna Levya whispers to you, 'Hello again, $name. Perhaps you are here to [$restore] your previous level? Or, if you like, you can change your level to any other you wish and still return to your maximum level at any time.'");
}

if($text=~/hail/i && $ulevel == $MaxLevel)
{
$client->Message(315, "Rayna Levya whispers to you, 'Hello, $name, I can lower your [$level_link] temporarily if you would like. It is useful if you have friends that are lower level and would like to group with them, but don't want to make a new character and start over. If your friends are level 51+, you can group with them and work on AAs that will carry over when you return to level 70.'");
}

if($text=~/level/i && $ulevel >= 70)
{
$client->Message(315, "Rayna Levya whispers to you, 'The way it works is you simply tell me the level you would like to become and as long as it is lower than the highest level you have reached so far, I will set it for you. Then just speak with me again when you are ready to return to your previous level. I can also tell you about some [$issues] you may encounter when you lower your level.'");
}

if($text >= 1 && $text <= 75 && $text < $MaxLevel && ($qglobals{temp_level} != 3 || $ulevel >= 70))
{
$client->Message(315, "Rayna Levya whispers to you, 'Simply return to me when you wish to restore your previous level.'");
$client->Message(6, "Rayna Levya casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::level($text);
quest::selfcast(1285);
quest::selfcast(331);
$client->Duck();
quest::setglobal("temp_level", 1, 5, "F");
$client->Stand();
}

if($text >= 1 && $text <= 75 && $text == $MaxLevel && ($qglobals{temp_level} != 3 || $ulevel >= 70))
{
$client->Message(315, "Rayna Levya whispers to you, 'You are now restored to your previous maximum level reached so far.'");
$client->Message(6, "Rayna Levya casts a spell and you instantly feel more powerful! The rush makes you feel like you could take on anything in battle!");
quest::level($MaxLevel);
quest::setglobal("temp_level", 2, 5, "F");
}

if ($text =~/restore/i && ($qglobals{temp_level} != 3 || $ulevel >= 70))
{
$client->Message(315, "Rayna Levya whispers to you, 'You are now restored to your previous maximum level reached so far.'");
$client->Message(6, "Rayna Levya casts a spell and you instantly feel more powerful! The rush makes you feel like you could take on anything in battle!");
quest::level($MaxLevel);
quest::setglobal("temp_level", 2, 5, "F");
}

if($text=~/dragons/i && $ulevel >= 53)
{
$client->Message(315, "Rayna Levya whispers to you, 'Oh, so it is the great dragons you seek? Well, you can't likely fight them like that! They refuse to fight anyone who is too much of a threat and will [$banish] you if you try.'");
}

if($text=~/banish/i)
{
$client->Message(315, "Rayna Levya whispers to you, 'If you absolutely must battle the dragons, I can assist you by stealing your experience and returning you to level [$fiftytwo]. You can get the experience back from me whenever you like by returning the item I give you. Ask about the dragons again when you are the right level.'");
}

if($text=~/dragons/i && $ulevel <= 52)
{
$client->Message(315, "Rayna Levya whispers to you, 'There! Now you are ready to travel to their [$dungeons] whenever you wish. I can also tell you more about some [$issues] with your new level as well.'");
}

if($text=~/dungeons/i && $ulevel <= 52)
{
$client->Message(315, "Rayna Levya whispers to you, 'There are 2 great dragons that you should seek in this epic quest, and when you are ready, just ask to be sent to either the dungeon of [$fire] or the dungeon of [$ice].'");
}

if($text=~/issues/i)
{
$client->Message(315, "Rayna Levya whispers to you, 'The main issue is that any item above your level will show you as giving the proper stats, but they are lying. You gain no stats from items above your level and monsters are invulnerable to all attacks by weapons above your level. So, you will want to use a set of equipment and weapons that are useable at the level you currently are.'");
}

if ($text =~/fire/i && $ulevel <= 52)
{
$client->Message(315, "Rayna Levya whispers to you, 'Good luck on your fight!'");
$client->Message(6, "Rayna Levya creates a small ball of fire in her hands and you can feel your temperature rise as everything fades to black.");
quest::movepc(32, -824.1,-1273.2,86.2);
}

if ($text =~/ice/i && $ulevel <= 52)
{
$client->Message(315, "Rayna Levya whispers to you, 'Off ya go!'");
$client->Message(6, "Rayna Levya starts breathing heavily and you begin to see the frost of her breath and then only darkness.");
quest::movepc(73, -32.1,1019,3.1);
}

}


Storm Haven Permanent De-Leveling Script:
#Hena Levya - Nexus
#Permanent De-level Quest for access to PoTimeA

sub EVENT_SAY {

$timestamp = localtime(time);

my $price = quest::saylink("price", 1);
my $more = quest::saylink("more", 1);
my $why = quest::saylink("why", 1);
my $another = quest::saylink("another", 1);
my $sacrifice = quest::saylink("sacrifice", 1);
my $sacrificeagain = quest::saylink("sacrifice again", 1);
my $time = quest::saylink("time", 1, "Plane of Time A");

#Spacer between Text messages to make them easier to read
$client->Message(7, "-");

if ($text=~/hail/i && $ulevel <= 69 && $qglobals{level_quest} == undef)
{
$client->Message(315, "Hena Levya whispers to you, 'Hello, $name, if you are here to give me a Golden Ticket, please do. Otherwise scram and don't come back until you reach level 70.'");
}

if ($text=~/hail/i && $ulevel >= 70 && $qglobals{level_quest} == undef)
{
$client->Message(315, "Hena Levya whispers to you, 'Hello, $name, I have a type of quest for you that you have most likely never heard of before. Let's just say it doesn't come without a heavy [$price].'");
}

if ($text=~/hail/i && $qglobals{level_quest} == 1)
{
$client->Message(315, "Hena Levya whispers to you, 'Hello again, $name! Anytime you wish to travel to the [$time], I will send you straight there. If you want to know [$more] about this part of Time, just ask. If you wish to make [$another] sacrifice, I can tell you what the rewards are for doing it again.'");
}

if ($text=~/price/i && $ulevel >= 70 && $qglobals{level_quest} == undef)
{
$client->Message(315, "Hena Levya whispers to you, 'If you are willing to give up your seasoned level 70+ experience to me and return to level 1 permanently, I can give you access to a place that normal adventures are unable to get to. There are treasures to be found there that cannot be found anywhere else. Would you like to hear [$more]?'");
}

if ($text=~/more/i && $ulevel >= 70 && $qglobals{level_quest} == undef && $qglobals{max_level} == undef)
{
$client->Message(315, "Hena Levya whispers to you, 'If you are ready to make this great [$sacrifice], just say the word and I will take your experience right now! If you would like to know more reasons of [$why] you might want to de-level, I can tell you. Be warned that this [$sacrifice] is permanent and you will have to gain all of your experience again on your own. You will also get a Golden Ticket that will allow you to bring 1 person of any level with you.'");
}

if ($text=~/more/i && $ulevel >= 70 && $qglobals{level_quest} == undef && $qglobals{max_level} >= 71)
{
$client->Message(315, "Hena Levya whispers to you, 'If you are ready to make this great [$sacrifice], just say the word and I will take your experience right now! If you would like to know more reasons of [$why] you might want to de-level, I can tell you. Be warned that this [$sacrifice] is permanent and you will have to gain all of your experience again on your own. You will also get a Golden Ticket that will allow you to bring 1 person of any level with you.'");
$client->Message(315, "Hena Levya whispers to you, 'If you are over level 70, you can return to your max level again by speaking to my sister, Rayna, once you have leveled back up to 70 again.'");
}

if ($text=~/more/i && $qglobals{level_quest} == 1)
{
$client->Message(315, "Hena Levya whispers to you, 'This part of time has 5 different sections to it. Each section is a different level of challenge. The Timekeepers in front of the bridges will tell you how hard each section is.'");
}

if ($text=~/why/i && $ulevel >= 70 && $qglobals{level_quest} == undef)
{
$client->Message(315, "Hena Levya whispers to you, 'De-leveling is mainly for players who like to solo often, or who prefer to level instead of raiding. If you find yourself getting bored here, you may want to give it a try. You won't be able to gain items that are the quality of raid items, but you can get fun things that may make you more efficient at soloing. Also, if you are planning to help level a friend or alt, de-leveling is a great way to do so, as it allows you to bring 1 friend with you.'");
}

if ($text=~/another/i && $qglobals{level_quest} == 1 && $qglobals{max_level} == undef)
{
$client->Message(315, "Hena Levya whispers to you, 'If you are willing to make the [$sacrificeagain], I am always willing to take your experience for myself right now when you say the words. After the first initial sacrifice, the reward is 2 Golden Tickets to Time for any further sacrifices. This will allow you to bring 2 extra adventurers with you if you wish.'");
}

if ($text=~/another/i && $qglobals{level_quest} == 1 && $qglobals{max_level} >= 71)
{
$client->Message(315, "Hena Levya whispers to you, 'If you are willing to make the [$sacrificeagain], I am always willing to take your experience for myself right now when you say the words. After the first initial sacrifice, the reward is 2 Golden Tickets to Time for any further sacrifices. This will allow you to bring 2 extra adventurers with you if you wish.'");
$client->Message(315, "Hena Levya whispers to you, 'If you are over level 70, you can return to your max level again by speaking to my sister, Rayna, once you have leveled back up to 70 again.'");
}

if ($text=~/sacrifice/i && $ulevel <= 69)
{
$client->Message(315, "Hena Levya whispers to you, 'You must reach level 70 before your experience is worth the sacrifice to me.'");
}

if ($text=~/sacrifice/i && $ulevel >= 70 && $qglobals{temp_level} == 1)
{
$client->Message(315, "Hena Levya whispers to you, 'You must speak with my sister, Rayna, to restore your level before I can allow you to make any sacrifices.'");
}

if ($text=~/sacrifice/i && $ulevel >= 70 && $qglobals{level_quest} == undef && $qglobals{temp_level} == undef)
{
$client->Message(315, "Hena Levya whispers to you, 'You have made a great sacrifice! Hopefully the rewards prove to be well worth it.'");
$client->Message(15, "You have received a flag to access the Plane of Time A");
quest::write("text_files/sacrifice.txt","[$timestamp]:$name, the $class, sacrificed for the first time.");
quest::setglobal("level_quest", 1, 5, "F");
quest::setglobal("temp_level", 3, 5, "F");
quest::summonitem(2422);
quest::selfcast(1285);
quest::selfcast(331);
quest::movepc(152, 28,350,-44);
quest::level(1);
}

if ($text=~/sacrifice/i && $ulevel >= 70 && $qglobals{level_quest} == undef && $qglobals{temp_level} == 2)
{
$client->Message(315, "Hena Levya whispers to you, 'You have made a great sacrifice! Hopefully the rewards prove to be well worth it.'");
$client->Message(15, "You have received a flag to access the Plane of Time A");
quest::write("text_files/sacrifice.txt","[$timestamp]:$name, the $class, sacrificed for the first time.");
quest::setglobal("level_quest", 1, 5, "F");
quest::setglobal("temp_level", 3, 5, "F");
quest::summonitem(2422);
quest::selfcast(1285);
quest::selfcast(331);
quest::movepc(152, 28,350,-44);
quest::level(1);
}

if ($text=~/sacrifice again/i && $ulevel >= 70 && $qglobals{level_quest} == 1 && $qglobals{temp_level} == undef)
{
$client->Message(315, "Hena Levya whispers to you, 'You have made another great sacrifice! I grow more in power with each one!'");
quest::write("text_files/sacrifice.txt","[$timestamp]:$name, the $class, sacrificed again!~~~");
quest::setglobal("temp_level", 3, 5, "F");
quest::summonitem(2422);
quest::summonitem(2422);
quest::selfcast(1285);
quest::selfcast(331);
quest::movepc(152, 28,350,-44);
quest::level(1);
}

if ($text=~/sacrifice again/i && $ulevel >= 70 && $qglobals{level_quest} == 1 && $qglobals{temp_level} == 2)
{
$client->Message(315, "Hena Levya whispers to you, 'You have made another great sacrifice! I grow more in power with each one!'");
quest::write("text_files/sacrifice.txt","[$timestamp]:$name, the $class, sacrificed again!~~~");
quest::setglobal("temp_level", 3, 5, "F");
quest::summonitem(2422);
quest::summonitem(2422);
quest::selfcast(1285);
quest::selfcast(331);
quest::movepc(152, 28,350,-44);
quest::level(1);
}

if ($text =~/time/i && $qglobals{level_quest} == 1)
{
$client->Message(315, "Hena Levya whispers to you, 'Few journey to the Plane of Time, but even fewer return. So be careful!'");
$client->Message(6, "A beam of light surrounds your body, and particle by particle your entire being is relocated.");
quest::movepc(219, 300,-150,8.3);
}

}


sub EVENT_ITEM {
if(plugin::check_handin(\%itemcount, 2422 => 1) && ($qglobals{level_quest} == undef))
{
quest::say("The person who gave this to you has made a great sacrifice to get this item for you.");
$client->Message(15, "You have received a flag to access the Plane of Time A");
quest::setglobal("level_quest", 1, 5, "F");
}
else
{
plugin::return_items(\%itemcount);
quest::say("I have no use for this item from you, $name. Take it back.");
}

}

Enjoy :)

lich2594
10-24-2010, 08:21 PM
I thought that I would share my delevel script, as it does not require the person to be a set level, or an item to turn back in... If you want to modify it, you can allow this to be purchased or.. whatever you can imagine. I just thought I would share it, since not everyone wants to have to carry around an item that could be lost, duped, ect.


sub EVENT_SAY {

my $delevel = quest::saylink("delevel", 1);
my $ready = quest::saylink("ready", 1);
my $a = quest::saylink("1", 1);
my $b = quest::saylink("25", 1);
my $c = quest::saylink("50", 1);
my $d = quest::saylink("70", 1);
my $e = quest::saylink("85", 1);

my $plvl = $qglobals{"delevel"};

$client->Message(7, " ");
my $NPCName = $npc->GetCleanName();

if ($text=~/hail/i) {
if ($qglobals{"delevel"} < 1) {
$client->Message(315, "Larren says to you: 'Hello $name, would you like to [$delevel]? You can return to level $ulevel at any time!'");
} else {
$client->Message(315, "Larren says to you: 'Are you [$ready] to come back to level $plvl?");
}
}


if ($text eq "delevel") {
$client->Message(315, "Larren says to you: 'What level would you like to delevel to?");
if ($ulevel > 1) {$client->Message(315, "Level: $a");}
if ($ulevel > 25) {$client->Message(315, "Level: $b");}
if ($ulevel > 50) {$client->Message(315, "Level: $c");}
if ($ulevel > 70) {$client->Message(315, "Level: $d");}
if ($ulevel > 85) {$client->Message(315, "Level: $e");}
}
if ($text eq "1") {
if ($ulevel > 1) {
quest::setglobal("delevel",$ulevel,5,"F");
quest::level(1);
} else {
#obviously this can't happen...
}
}
if ($text eq "25") {
if ($ulevel > 25) {
quest::setglobal("delevel",$ulevel,5,"F");
quest::level(25);
} else {
$client->Message(315, "Larren says to you: 'Nice try, but no.");
}
}
if ($text eq "50") {
if ($ulevel > 50) {
quest::setglobal("delevel",$ulevel,5,"F");
quest::level(50);
} else {
$client->Message(315, "Larren says to you: 'Nice try, but no.");
}
}
if ($text eq "70") {
if ($ulevel > 70) {
quest::setglobal("delevel",$ulevel,5,"F");
quest::level(70);
} else {
$client->Message(315, "Larren says to you: 'Nice try, but no.");
}
}
if ($text eq "85") {
if ($ulevel > 85) {
quest::setglobal("delevel",$ulevel,5,"F");
quest::level(85);
} else {
$client->Message(315, "Larren says to you: 'Nice try, but no.");
}
}
if ($text eq "ready") {
$client->Message(315, "Larren says to you: 'Let me know if you need me again!");
quest::level($plvl);
quest::setglobal("delevel",0,5,"F");
}
}

scarboni
03-17-2011, 05:07 PM
How do you avoid people to have level 70+ buffs on them befor they delvel?

Caryatis
03-17-2011, 07:03 PM
Debuff them...