PDA

View Full Version : Title Giver!


Bristlebane[nj]
03-02-2009, 10:55 PM
Well, thanks to Trevius I have successfully made a NPC that will give the player a Title infront of their name , this is only the start of the script. I will be adding more to it to allow players to get Titles for killing bosses or doing quests! Thanks Trevius for the command!
sub EVENT_SAY
{
if ($text =~/hail/i)
{
quest::say("Hail, I am the Title Giver, if you wish to have a title that is in my list, please let me know. Special Titles will be rewarded for killing bosses.");
$client->Message(13,"[Newbie] - [Reaver] - [Healer] - [Warlord] - [Summoner] - [Buffer] - [Spirit] - [Auger] - [Hunter]");
$client->Message(14,"You may have to relog or rezone for the Title to take affect!");
}
if ($text =~/newbie/i)
{
quest::say("You're title has been changed please zone for it to take effect");
$client->SetAATitle("Newbie");
}
if ($text =~/reaver/i)
{
quest::say("You're title has been changed please zone for it to take effect");
$client->SetAATitle("Reaver");
}
if ($text =~/healer/i)
{
quest::say("You're title has been changed please zone for it to take effect");
$client->SetAATitle("Healer");
}
if ($text =~/warlord/i)
{
quest::say("You're title has been changed please zone for it to take effect");
$client->SetAATitle("Warlord");
}
if ($text =~/summoner/i)
{
quest::say("You're title has been changed please zone for it to take effect");
$client->SetAATitle("Summoner");
}
if ($text =~/buffer/i)
{
quest::say("You're title has been changed please zone for it to take effect");
$client->SetAATitle("Buffer");
}
if ($text =~/spirit/i)
{
quest::say("You're title has been changed please zone for it to take effect");
$client->SetAATitle("Spirit");
}
if ($text =~/auger/i)
{
quest::say("You're title has been changed please zone for it to take effect");
$client->SetAATitle("Auger");
}
if ($text =~/hunter/i)
{
quest::say("You're title has been changed please zone for it to take effect");
$client->SetAATitle("Hunter");
}
}

trevius
03-02-2009, 11:03 PM
Good to know the prefix title command works :) Now, we just need to see if the suffix stuff works. Glad I could be of some help to you.

Ultimately, it would be best for eqemu to implement the Title window at some point that would let players earn Titles and select them at any point from the window. Until then, quests like this should help fill that need some.

Bristlebane[nj]
03-02-2009, 11:36 PM
Yep, it requires the player to zone for it to work, but it can be good for turn in titles, or even kill titles. EX: Kill mob, when mob dies spawn a npc that rewards title to players who hail before a period of time, as in about 15seconds to hail before he disappears.. or have an NPC that checks for a global quest from a boss kill to let you have a specific title... guess there could be a lot of ideas done with this, hope some people find this useful though :D

Bristlebane[nj]
03-03-2009, 03:55 PM
Well Trevius, #titlesuffix works well, but so far I don't have any idea how to set it into a command.

Rezbee
03-16-2009, 11:44 PM
Isn't there a way to ....

if (count($client->AAtotal) >= 60 && $class == "Wizard")
{
$client->SetAATitle("Sorcerer");
}

or something? That would be pretty awesome and would let us actually hail a npc and get your aa titles.

Bristlebane[nj]
03-20-2009, 12:21 AM
Hmm, sounds like it may work. Tested it?

dreamseer
04-03-2010, 11:37 AM
I'm struggling here a little due to my lack of knowledge:

I've created aan npc give him a quest to set the players title which works great
using the line $client->SetAATitle("Newbie");

what I would like to do is set the suffix and the surname in the same quest.

I can set suffix in game with #titlesuffix "whatever" but I can't guess the command in the quest code - I've tried
$client->SetAATitleSuffix ("something");
$client->SetAASuffix ("something");
$client->SetSurname ("something");


Neither worked

I guess what I really don't know is how SetAATitle works or where it is stored.

Derision
04-03-2010, 12:35 PM
It should be $client->SetTitleSuffix("something");

The list here should be up to date:

http://www.eqemulator.net/wiki/wikka.php?wakka=QuestObjects

cavedude
04-03-2010, 01:05 PM
You can also insert the title into the database, give it a titleset higher than 0, and enable it in Perl using quest::enabletitle(titleset). quest::checktitle(titleset) and quest::removetitle(titleset) are also valid. You can give a player a suffix or prefix using this method.

dreamseer
04-03-2010, 01:10 PM
OMG that must have been the only combination I didn't try..
and that link is a goldmine for me thanks Derision..

is there any way to put a line break in like it does when you give an npc a second name it appears on a second line under their their name in brackets like
Soulbinder Grunson
(Soulbinder)


$client->SetAATitle("Countess");
$client->SetTitleSuffix("the Cruel");
$client->ChangeLastName("Butcher of Qeynos")


hoping to make names like
Countess playername the Cruel
Butcher of Qeynos

but it came out as
"Countess playername Butcher of Qeynos the Cruel"

all on one line.

your help has been invaluable so far and if it always stays on one line I can work around it.

dreamseer
04-03-2010, 01:45 PM
I got it I got it never mind the old backslash n works a treat
$client->SetAATitle("Countess");
$client->SetTitleSuffix("\n (The Butcher of Blackburrow)");


come sout as
Countess playername
(The Butcher of Blackburrow)

I'm sorted thanks again.

I'm going to create a massive list of Titles Suffix and Last names that work together
then give them to players when they do stuff

off the top of my head:
on the death of certain mobs or npc's
paying an npc for random title

I might seed the random number on base stats.. playername the weak or wreched or ugly if their CHR is low..

I love playing with this stuff

Capheus
04-04-2010, 11:23 PM
Back in June when I actually had time run a server, I made two scripts for players to make thier own tiltles and suffixes. I believe these still work.

###NPC Name: Curre

my $thetitle = 0;

sub EVENT_SAY {
if ($text=~/Hail, Curre/){
$client->Message(14, "Hello $name. If you wish to have a title, target me and say your title aloud. If you wish to delete your current title then tell me to [clearitout] in all lowercase letters.");
}
if ($text=~/clearitout/i){
quest::popup("Title", "Do you wish to delete your current title?", 2, 1);
}
if (($text ne "Hail, Curre") && ($text ne "clearitout")) {
$thetitle = $text;
quest::popup("Title", "Do you wish to have the title: $thetitle ?", 1, 1);

}
}

sub EVENT_POPUPRESPONSE {

if ($popupid == 1) {
$client->SetAATitle("$thetitle");
$client->Message(13, "You must zone for your new title to take effect");
}
if ($popupid == 2) {
$client->SetAATitle("");
$client->Message(13, "You must zone for your title to clear");
}
}


###NPC Name: Kurre

my $thesuffix = 0;

sub EVENT_SAY {
if ($text=~/Hail, Kurre/){
$client->Message(14, "Hello $name. If you wish to have a suffix, target me and say your suffix aloud. If you wish to delete your current suffix then tell me to [clearitout] in all lowercase letters.");
}
if ($text=~/clearitout/i){
quest::popup("Suffix", "Do you wish to delete your current suffix?", 2, 1);
}
if (($text ne "Hail, Kurre") && ($text ne "clearitout")) {
$thesuffix = $text;
quest::popup("Suffix", "Do you wish to have the suffix: $thesuffix ?", 1, 1);

}
}

sub EVENT_POPUPRESPONSE {

if ($popupid == 1) {
$client->SetTitleSuffix("$thesuffix");
$client->Message(13, "You must zone for your new suffix to take effect");
}
if ($popupid == 2) {
$client->SetTitleSuffix("");
$client->Message(13, "You must zone for your suffix to clear");
}
}