Player Buffer Scripts

Discipline Trainer

This script will allow an NPC to train all available disciplines up to the player's current level.
Dave_the_Disciplinarian.pl
1
sub EVENT_SAY {
2
#:: Match text for "hail", case insensitive
3
if ($text=~/hail/i) {
4
#:: Send a message that only the client can see, in yellow (15) text
5
$client->Message(15, "With just one look, I can see that you have forgotten the finer points of combat, $name. Would you like me to [" . quest::saylink("teach") . "] you how to perform the skills that require more discipline than the basics?");
6
}
7
#:: Match text for "teach", case insensitive
8
elsif ($text=~/teach/i) {
9
#:: Clear out any existing disciplines (optional)
10
quest::untraindiscs();
11
#:: Train all disciplines up to the user's level
12
quest::traindiscs($ulevel, 0);
13
#:: Send a message that only the client can see, in yellow (15) text
14
$client->Message(15, "You look like a more fierce combatant already! Go out and test your new abilities!");
15
#:: Play a Ding! sound
16
quest::ding();
17
}
18
}
19
20
sub EVENT_ITEM {
21
#:: Return unused items since we don't expect any handins
22
plugin::returnUnusedItems();
23
}
Copied!
If you would prefer that your players do not have to interact with an NPC, it is quite simple to add all new disciplines each time a player levels using a script. You would simply add this snippet to your global quest script file.
This script will train all new disciplines when a player levels up:
Perl
Lua
global/global_player.pl
1
sub EVENT_LEVEL_UP {
2
#:: Train all disciplines, maximum set to player's level, minimum set to the level prior
3
quest::traindiscs($ulevel,$ulevel - 1);
4
}
Copied!
1
function event_level_up(e)
2
-- Train all disciplines up to current level
3
eq.train_discs(e.self:GetLevel());
4
end
Copied!

Spell Scriber

This script will scribe all available spells (or songs) up to the player's current level.
Skippy_the_Scribe.pl
1
sub EVENT_SAY {
2
#:: Match text for "hail", case insensitive
3
if ($text=~/hail/i) {
4
#:: Separate response for melee classes--match classes using a string comparison (eq)
5
if ($class eq 'Berserker' || $class eq 'Monk' || $class eq 'Rogue' || $class eq 'Warrior') {
6
#:: Send a message that only the client can see, in yellow (15) text
7
$client->Message(15, "Young fighter, I am the greatest spell scribe Norrath has ever seen--I do not waste my time on brutes like you!");
8
}
9
#:: Separate response for bards, who are always special
10
elsif ($class eq 'Bard') {
11
#:: Send a message that only the client can see, in yellow (15) text
12
$client->Message(15, "With just one look, I can see that your songbook is lacking, $name. Would you like me to [" . quest::saylink("scribe") . "] all of the known $class songs for you?");
13
}
14
#:: Separate response for casting classes
15
elsif ($class eq 'Beastlord' || $class eq 'Cleric' || $class eq 'Druid' || $class eq 'Enchanter' || $class eq 'Magician' || $class eq 'Necromancer' || $class eq 'Paladin' || $class eq 'Ranger' || $class eq 'Shadowknight' || $class eq 'Shaman' || $class eq 'Wizard') {
16
#:: Send a message that only the client can see, in yellow (15) text
17
$client->Message(15, "With just one look, I can see that your spellbook is lacking, $name. Would you like me to [" . quest::saylink("scribe") . "] all of the known $class spells for you?");
18
}
19
}
20
#:: Match text for "scribe", case insensitive
21
elsif ($text=~/scribe/i) {
22
if ($class eq 'Bard' || $class eq 'Beastlord' || $class eq 'Cleric' || $class eq 'Druid' || $class eq 'Enchanter' || $class eq 'Magician' || $class eq 'Necromancer' || $class eq 'Paladin' || $class eq 'Ranger' || $class eq 'Shadowknight' || $class eq 'Shaman' || $class eq 'Wizard') {
23
#:: Clear out any existing spells
24
quest::unscribespells();
25
#:: Scribe all spells up to the user's level
26
quest::scribespells($ulevel, 0);
27
#:: Send a message that only the client can see, in yellow (15) text
28
$client->Message(15, "You look like a more powerful caster already! Go out and test your new spells!");
29
#:: Play a Ding! sound
30
quest::ding();
31
}
32
elsif ($class eq 'Berserker' || $class eq 'Monk' || $class eq 'Rogue' || $class eq 'Warrior') {
33
$client->Message(15, "Begone, $class--lest I turn you into froglok tad!");
34
}
35
}
36
}
37
38
sub EVENT_ITEM {
39
#:: Return unused items since we don't expect any handins
40
plugin::returnUnusedItems();
41
}
Copied!
As with disciplines, if you would prefer that your players do not have to interact with an NPC, it is quite simple to add all new spells/songs each time a player levels adding a snippet to your global quest file.
This script will scribe all new spells/songs when a player levels up.
Perl
Lua
global/global_player.pl
1
sub EVENT_LEVEL_UP {
2
#:: Scribe all spells/songs, maximum set to player's level, minimum set to the level prior
3
quest::scribespells($ulevel,$ulevel - 1);
4
}
Copied!
1
function event_level_up(e)
2
-- Scribe all spells up to current level
3
eq.scribe_spells(e.self:GetLevel());
4
end
Copied!

Skill Maxer

This script will set all available skills to their maximum amount at the player's current level.
Scotty_the_Skilled.pl
1
sub EVENT_SAY {
2
#:: Match text for "hail", case insensitive
3
if ($text=~/hail/i) {
4
#:: Send a message that only the client can see, in yellow (15) text
5
$client->Message(15, "Hello, $name! It appears you could use some help with your [" . quest::saylink("skills") . "]. Would you like me to teach you?");
6
}
7
#:: Match text for "skills", case insensitive
8
elsif ($text=~/skills/i) {
9
#:: Set available (non-trade, non-casting specialization) skills to maximum for race/class at current level
10
foreach my $skill ( 0 .. 42, 48 .. 54, 70 .. 74 ) {
11
next unless $client->CanHaveSkill($skill);
12
#:: Create a scalar variable to store each skill's maximum skill level at the player's current level
13
my $maxSkill = $client->MaxSkill($skill, $client->GetClass(), $ulevel);
14
#:: Check that the player's skill does not already exceed the maximum skill based on level
15
next unless $maxSkill > $client->GetRawSkill($skill);
16
#:: Set the skill to the maximum
17
$client->SetSkill($skill, $maxSkill);
18
}
19
#:: Send a message that only the client can see, in yellow (15) text
20
$client->Message(15, "You look like a more capable $class already! Go out and test your new skills!");
21
#:: Play a Ding! sound
22
quest::ding();
23
}
24
}
25
26
sub EVENT_ITEM {
27
#:: Return unused items since we don't expect any handins
28
plugin::returnUnusedItems();
29
}
Copied!
As with spells and disciplines, if you would prefer that your players do not have to interact with an NPC, it is quite simple to max all skills each time a player levels by adding a snippet to your global quest file.
This script will max all skills when a player levels up.
Perl
Lua
global/global_player.pl
1
sub EVENT_LEVEL_UP {
2
#:: Set available (non-trade, non-casting specialization) skills to maximum for race/class at current level
3
foreach my $skill ( 0 .. 42, 48 .. 54, 70 .. 74 ) {
4
next unless $client->CanHaveSkill($skill);
5
#:: Create a scalar variable to store each skill's maximum skill level at the player's current level
6
my $maxSkill = $client->MaxSkill($skill, $client->GetClass(), $ulevel);
7
#:: Check that the player's skill does not already exceed the maximum skill based on level
8
next unless $maxSkill > $client->GetRawSkill($skill);
9
#:: Set the skill to the maximum
10
$client->SetSkill($skill, $maxSkill);
11
}
12
}
Copied!
1
function event_level_up(e)
2
local skills = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 48, 49, 50, 51, 52, 53, 54, 56, 62, 66, 67, 70, 71, 72, 73, 74 };
3
for i, curskill in ipairs(skills) do
4
local maxskill = e.self:MaxSkill(curskill);
5
if (e.self:CanHaveSkill(curskill) == false) then
6
--Do nothing
7
elseif (maxskill <= e.self:GetRawSkill(curskill)) then
8
--Do nothing
9
else
10
--Do Training
11
e.self:SetSkill(curskill, maxskill);
12
end
13
end
14
end
Copied!

Player Buffer

This script will provide buffs and cures to the player and/or the player's pet, or the player's group and their pets, and will bind the player to the area. The NPC will charge the player for the good buffs.
Credit to Maze who created the original version of this script, which has been adapted for use on this wiki.
Canary_Morris.pl
1
#:: Create a scalar vaiable to store the maximum level of buffs
2
$maxlevelbuffs = 70;
3
#:: Create a hash to define spells cast at each 10 levels, and their cost
4
#:: Keys are by each 10 levels, with differentiation for spells ranked as generic vs. advanced
5
#:: Values are each spell, by id, and the cost in platinum for each rank
6
%buffshash = (
7
#:: Hash for Warriors
8
1 =>
9
{
10
level10generic => [276,278,219,368,146,148,279,129],
11
level10costgeneric => 0,
12
level10costadvanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
13
level10costadvanced => 100,
14
level20generic => [276,278,219,368,146,148,279,129],
15
level20costgeneric => 0,
16
level20advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
17
level20costadvanced => 100,
18
level30generic => [276,278,219,368,146,148,279,129],
19
level30costgeneric => 0,
20
level30advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
21
level30costadvanced => 100,
22
level40generic => [276,278,219,368,146,148,279,129],
23
level40costgeneric => 0,
24
level40advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
25
level40costadvanced => 100,
26
level50generic => [276,278,219,368,146,148,279,129],
27
level50costgeneric => 0,
28
level50advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
29
level50costadvanced => 100,
30
level60generic => [276,278,219,368,146,148,279,129],
31
level60costgeneric => 0,
32
level60advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
33
level60costadvanced => 100,
34
level70generic => [276,278,219,368,146,148,279,129],
35
level70costgeneric => 0,
36
level70advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
37
level70costadvanced => 100,
38
},
39
#:: Hash for Clerics
40
2 =>
41
{
42
level10generic => [276,278,219,368,146,148,279,129],
43
level10costgeneric => 0,
44
level10advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
45
level10costadvanced => 100,
46
level20generic => [276,278,219,368,146,148,279,129],
47
level20costgeneric => 0,
48
level20advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
49
level20costadvanced => 100,
50
level30generic => [276,278,219,368,146,148,279,129],
51
level30costgeneric => 0,
52
level30advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
53
level30costadvanced => 100,
54
level40generic => [276,278,219,368,146,148,279,129],
55
level40costgeneric => 0,
56
level40advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
57
level40costadvanced => 100,
58
level50generic => [276,278,219,368,146,148,279,129],
59
level50costgeneric => 0,
60
level50advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
61
level50costadvanced => 100,
62
level60generic => [276,278,219,368,146,148,279,129],
63
level60costgeneric => 0,
64
level60advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
65
level60costadvanced => 100,
66
level70generic => [276,278,219,368,146,148,279,129],
67
level70costgeneric => 0,
68
level70advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
69
level70costadvanced => 100,
70
},
71
#:: Hash for Paladins
72
3 =>
73
{
74
level10generic => [276,278,219,368,146,148,279,129],
75
level10costgeneric => 0,
76
level10advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
77
level10costadvanced => 100,
78
level20generic => [276,278,219,368,146,148,279,129],
79
level20costgeneric => 0,
80
level20advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
81
level20costadvanced => 100,
82
level30generic => [276,278,219,368,146,148,279,129],
83
level30costgeneric => 0,
84
level30advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
85
level30costadvanced => 100,
86
level40generic => [276,278,219,368,146,148,279,129],
87
level40costgeneric => 0,
88
level40advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
89
level40costadvanced => 100,
90
level50generic => [276,278,219,368,146,148,279,129],
91
level50costgeneric => 0,
92
level50advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
93
level50costadvanced => 100,
94
level60generic => [276,278,219,368,146,148,279,129],
95
level60costgeneric => 0,
96
level60advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
97
level60costadvanced => 100,
98
level70generic => [276,278,219,368,146,148,279,129],
99
level70costgeneric => 0,
100
level70advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
101
level70costadvanced => 100,
102
},
103
#:: Hash for Ranger
104
4 =>
105
{
106
level10generic => [276,278,219,368,146,148,279,129],
107
level10costgeneric => 0,
108
level10advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
109
level10costadvanced => 100,
110
level20generic => [276,278,219,368,146,148,279,129],
111
level20costgeneric => 0,
112
level20advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
113
level20costadvanced => 100,
114
level30generic => [276,278,219,368,146,148,279,129],
115
level30costgeneric => 0,
116
level30advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
117
level30costadvanced => 100,
118
level40generic => [276,278,219,368,146,148,279,129],
119
level40costgeneric => 0,
120
level40advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
121
level40costadvanced => 100,
122
level50generic => [276,278,219,368,146,148,279,129],
123
level50costgeneric => 0,
124
level50advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
125
level50costadvanced => 100,
126
level60generic => [276,278,219,368,146,148,279,129],
127
level60costgeneric => 0,
128
level60advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
129
level60costadvanced => 100,
130
level70generic => [276,278,219,368,146,148,279,129],
131
level70costgeneric => 0,
132
level70advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
133
level70costadvanced => 100,
134
},
135
#:: Hash for Shadow Knight
136
5 =>
137
{
138
level10generic => [276,278,219,368,146,148,279,129],
139
level10costgeneric => 0,
140
level10advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
141
level10costadvanced => 100,
142
level20generic => [276,278,219,368,146,148,279,129],
143
level20costgeneric => 0,
144
level20advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
145
level20costadvanced => 100,
146
level30generic => [276,278,219,368,146,148,279,129],
147
level30costgeneric => 0,
148
level30advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
149
level30costadvanced => 100,
150
level40generic => [276,278,219,368,146,148,279,129],
151
level40costgeneric => 0,
152
level40advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
153
level40costadvanced => 100,
154
level50generic => [276,278,219,368,146,148,279,129],
155
level50costgeneric => 0,
156
level50advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
157
level50costadvanced => 100,
158
level60generic => [276,278,219,368,146,148,279,129],
159
level60costgeneric => 0,
160
level60advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
161
level60costadvanced => 100,
162
level70generic => [276,278,219,368,146,148,279,129],
163
level70costgeneric => 0,
164
level70advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
165
level70costadvanced => 100,
166
},
167
#:: Hash for Druid
168
6 =>
169
{
170
level10generic => [276,278,219,368,146,148,279,129],
171
level10costgeneric => 0,
172
level10advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
173
level10costadvanced => 100,
174
level20generic => [276,278,219,368,146,148,279,129],
175
level20costgeneric => 0,
176
level20advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
177
level20costadvanced => 100,
178
level30generic => [276,278,219,368,146,148,279,129],
179
level30costgeneric => 0,
180
level30advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
181
level30costadvanced => 100,
182
level40generic => [276,278,219,368,146,148,279,129],
183
level40costgeneric => 0,
184
level40advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
185
level40costadvanced => 100,
186
level50generic => [276,278,219,368,146,148,279,129],
187
level50costgeneric => 0,
188
level50advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
189
level50costadvanced => 100,
190
level60generic => [276,278,219,368,146,148,279,129],
191
level60costgeneric => 0,
192
level60advanced => [3692,2505,423,356,172,64,145,1693,15,60,61,46,2524],
193
level60costadvanced => 100,
194
level70generic => [276,278,219,368,146,148,279,129