Thread: Title Giver!
View Single Post
  #12  
Old 04-04-2010, 11:23 PM
Capheus
Hill Giant
 
Join Date: Apr 2008
Location: Milwaukee
Posts: 141
Default

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.

Code:
###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");
}
}
Code:
###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");
}
}
Reply With Quote