|
|
![](/forums/images/Darkness/misc/spacer.gif) |
![](/forums/images/Darkness/misc/spacer.gif) |
![](/forums/images/Darkness/misc/spacer.gif) |
![](/forums/images/Darkness/misc/q1.jpg) |
|
![](/forums/images/Darkness/misc/q1-1.jpg) |
![](/forums/images/Darkness/misc/q4.jpg) |
|
![](/forums/images/Darkness/misc/q4-1.jpg) |
![](/forums/images/Darkness/misc/a1.jpg) |
|
![](/forums/images/Darkness/misc/a1-1.jpg) |
|
Quests::Custom Custom Quests here |
![Old](/forums/images/Darkness/statusicon/post_old.gif)
02-25-2015, 01:34 AM
|
Sarnak
|
|
Join Date: May 2011
Posts: 53
|
|
Any way to make this so that it does not train trade skills?
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
02-25-2015, 02:16 AM
|
![ghanja's Avatar](image.php?s=c0bfed934bc5e3cc4f24d5ad0a9e94af&u=183697&dateline=1414682103) |
Dragon
|
|
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
|
|
Code:
sub EVENT_LEVEL_UP {
AutoTrain(1); ## if 1 is passed it will train trade skills
AutoTrain(); ## will not train trade skills (
}
sub AutoTrain {
$client->Message( 15, "Your experiences across the realm have infused you with increased power and knowledge..." );
# set all available skills to maximum for race/class at current level
if ($_[0]) {my @skillsarray = [0..74];}
else {my @skillsarray = [0..54,62,66,67,70..74];}
foreach my $skill (@skillsarray) {
next unless $client->CanHaveSkill($skill);
my $maxSkill = $client->MaxSkill( $skill, $client->GetClass(), $ulevel );
next unless $maxSkill > $client->GetRawSkill($skill);
$client->SetSkill( $skill, $maxSkill );
}
# scribe all spells for current level
quest::scribespells( $ulevel, $ulevel - 1 );
# train all discs for current level
quest::traindiscs( $ulevel, $ulevel - 1 );
}
untested
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
02-25-2015, 11:35 AM
|
Sarnak
|
|
Join Date: May 2011
Posts: 53
|
|
Ill give it a try later today thank you
|
![](/forums/images/Darkness/misc/a4.gif) |
|
![](/forums/images/Darkness/misc/a6.gif) |
![Old](/forums/images/Darkness/statusicon/post_old.gif)
06-07-2015, 03:45 PM
|
Sarnak
|
|
Join Date: Feb 2008
Posts: 80
|
|
Quote:
Originally Posted by Kingly_Krab
Go in to your server folder, quests, templates, find global_player.pl and add these lines to the script and save it, enter the game, and type #reloadworld to repop all zones and reload scripts world-wide.
|
I know this is an old post and it may not apply to the current build so if that is the case, please let me know.
I just built a private local server to play on and learn how to use MQemulator.
Is there still a global_player.pl file somewhere because I can't find it in my server. I went into the server folder, quests, but there is no template folder there and a search of my pc only finds a reference to global_player.pl in a SQL update and a changelog.txt
Is there a way to still accomplish this on the current windows server build?
Just curious because I like the idea of this!
__________________
I know we just met and this is crazy but, here's my server, play on it, maybe?
Adventure Unlimted - Underfoot!
|
![](/forums/images/Darkness/misc/a1.gif) |
|
![](/forums/images/Darkness/misc/a3.gif) |
![Old](/forums/images/Darkness/statusicon/post_old.gif)
06-07-2015, 04:17 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,590
|
|
The 'templates' folder was renamed to 'global'.
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
06-07-2015, 06:26 PM
|
Sarnak
|
|
Join Date: Feb 2008
Posts: 80
|
|
Quote:
Originally Posted by Kingly_Krab
The 'templates' folder was renamed to 'global'.
|
OK, I can see that. There is no global_player.pl but there is a global_player.lua, is that the same thing?
__________________
I know we just met and this is crazy but, here's my server, play on it, maybe?
Adventure Unlimted - Underfoot!
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
06-07-2015, 06:30 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,590
|
|
If you're not compiling Lua, the .lua file will not work, also, the code in this thread is Perl, so you'll have to use a global_player.pl file, which may require you deleting the global_player.lua file, as Lua has precedence.
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
10-25-2015, 10:07 PM
|
![jpyou127's Avatar](image.php?s=c0bfed934bc5e3cc4f24d5ad0a9e94af&u=61981&dateline=1490293856) |
Discordant
|
|
Join Date: Nov 2005
Posts: 270
|
|
How hard would this be to add to LUA?
Celestial
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
10-26-2015, 01:21 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,590
|
|
Very simple, it's already enabled on the CMake by default. So unless you turn it off, it should be enabled already.
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
10-26-2015, 06:55 PM
|
![NatedogEZ's Avatar](image.php?s=c0bfed934bc5e3cc4f24d5ad0a9e94af&u=188577&dateline=1407793266) |
Developer
|
|
Join Date: Dec 2012
Posts: 515
|
|
Quote:
Originally Posted by jpyou127
How hard would this be to add to LUA?
Celestial
|
Try this... (might want to test it.. lol I r bad at lua)
This will train all skills except tradeskills
Code:
function event_level_up(e)
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 };
for i, curskill in ipairs(skills) do
local maxskill = e.self:MaxSkill(curskill);
if (e.self:CanHaveSkill(curskill) == false) then
--Do nothing...
elseif (maxskill <= e.self:GetRawSkill(curskill)) then
--Do nothing...
else
--Train!
e.self:SetSkill(curskill, maxskill);
end
end
end
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
10-28-2015, 08:47 AM
|
![jpyou127's Avatar](image.php?s=c0bfed934bc5e3cc4f24d5ad0a9e94af&u=61981&dateline=1490293856) |
Discordant
|
|
Join Date: Nov 2005
Posts: 270
|
|
Thanks Natedog will give this a try!
Celestial
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
11-05-2015, 12:29 AM
|
Sarnak
|
|
Join Date: May 2011
Posts: 53
|
|
If anyone is interested this will train everything but trade skills and spell specializations.
Code:
sub EVENT_LEVEL_UP {
AutoTrain();
}
sub AutoTrain {
$client->Message( 15, "Your experiences across the realm have infused you with increased power and knowledge..." );
# set all available skills to maximum for race/class at current level
foreach my $skill ( 0 .. 42, 48 .. 54, 70 .. 74 ) {
next unless $client->CanHaveSkill($skill);
my $maxSkill = $client->MaxSkill( $skill, $client->GetClass(), $ulevel );
next unless $maxSkill > $client->GetRawSkill($skill);
$client->SetSkill( $skill, $maxSkill );
}
# scribe all spells for current level
quest::scribespells( $ulevel, $ulevel - 1 );
# train all discs for current level
quest::traindiscs( $ulevel, $ulevel - 1 );
}
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
11-05-2015, 12:33 PM
|
Dragon
|
|
Join Date: Apr 2009
Location: California
Posts: 814
|
|
Wow. That foreach iteration specification is beautiful.
Several people have been wondering about the cleanest way to iterate through numbers while skipping some, without nested ifs or multiple fors.
That's just gorgeous!
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
11-05-2015, 03:55 PM
|
![NatedogEZ's Avatar](image.php?s=c0bfed934bc5e3cc4f24d5ad0a9e94af&u=188577&dateline=1407793266) |
Developer
|
|
Join Date: Dec 2012
Posts: 515
|
|
Quote:
Originally Posted by Shendare
Wow. That foreach iteration specification is beautiful.
Several people have been wondering about the cleanest way to iterate through numbers while skipping some, without nested ifs or multiple fors.
That's just gorgeous!
|
Its easy in perl.. I have no clue how to do it in lua though :p
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
11-05-2015, 05:02 PM
|
![Akkadius's Avatar](image.php?s=c0bfed934bc5e3cc4f24d5ad0a9e94af&u=100179&dateline=1673514719) |
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
I feel like Shendare is kind of like this guy right now.
|
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 09:58 PM.
|
|
![](/forums/images/Darkness/misc/s1.jpg) |
|
![](/forums/images/Darkness/misc/s1-1.jpg) |
|
|
|
![](/forums/images/Darkness/misc/z1.jpg) |
|
![](/forums/images/Darkness/misc/z1-1.jpg) |
|
![](/forums/images/Darkness/misc/side3.jpg) |