DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • April 21, 2018, 09:52:07 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Title based on Alignment  (Read 2386 times)
0 Members and 1 Guest are viewing this topic.
robert
Old Dog
Mod God
*****
Offline Offline

Posts: 1047


LoGD Buff!


View Profile WWW
« on: April 07, 2006, 03:10:02 PM »

A cool module to make and use if someone did it.

Assign a title based on the players Alignment.
- granted they would require the Alignment module be installed
- of course, all titles would be admin configurable
- settings to determine what is 'positive' - 'neutral' - 'negative' alignment

Example only:

Positive Alignment:  male - GrandPrince  female - RoyalPrincess
Neutral Alignment:  male - Prince   female - Princess
Negative Alignment:  male - DarkPrince    female - DarkPrincess
Logged

Nightborn
Guest
« Reply #1 on: April 07, 2006, 03:12:24 PM »

it *could* hook into the dragonkilltext or an appropriate link and assign it there.
Logged
Iori
Mod God
*****
Offline Offline

Posts: 832


View Profile WWW
« Reply #2 on: October 06, 2006, 05:21:49 AM »

Assign a title based on the players Alignment.

He didn't mention anything about titles given out at DK, so you can simply hook it to newday. Furthermore, you can also use if statements for the number of DKs the player has and gender for different titles.

I'm actually attempting to add prefixes to titles based on alignment on my server, for example Farmgirl Iori ---> Evil Farmgirl Iori at newday if alignment <= -90 (my server uses -100 to 100). I've seen it on a server I previously played on, but I'm not sure if a publicly released module has ever had this feature, so I decided to add it. If it has been released, I would be grateful if someone directed me to the link. Smiley

Anyway, what I've come up so far, (from bits and pieces assembled together here and there) is:
Under newday hook, I have, for the Evil prefix:

         $alignment=get_module_pref("alignment","alignment");
         debug("align = $alignment");

         if($alignment<=-90){
                                require_once("lib/names.php");

            $newtitle = "`)Evil`7 ".$session['user']['title'];
            $newname = change_player_title($newtitle);
            $session['user']['title'] = $newtitle;
            $session['user']['name'] = $newname;
            $regname = get_player_basename();
            output("`)Your black heart and evil deeds have not gone unnoticed and from henceforth, you are known as %s!", $session['user']['name']);
            addnews("`&%s `\$has become evil in the hearts of people and is now known as %s!", $regname,$session['user']['name']);
            }

The problem now is, I'm not sure how to set a check so that if a player already has a prefix, she/he won't get another one at the next newday (so it becomes Evil Evil Farmgirl Iori). Any help would be gratefully accepted and graciously accepted!

*edit* I figured it out.
« Last Edit: October 07, 2006, 12:13:18 AM by Iori » Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
21 Guests, 1 User
ChesireCat
Home Forums News Downloads Login Register Advanced Search