Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Support > Archive::Tutorials/Howto's > Tutorials--Outdated Use the Wiki > Tutorials::Submissions

Tutorials::Submissions Submit your tutorials here to be reviewed

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-22-2004, 01:20 PM
RichardoX
Hill Giant
 
Join Date: Dec 2004
Location: in your closet....
Posts: 169
Default Database/Perl Faction System

DATABASE VALUES AND DEFINITIONS
(note: I'm no master at this so I may be wrong on a few things)

Faction_List: (This Holds the names of the factions and ID Numbers along with the faction everyone STARTS with on that faction)

Http://www.worldofalkora.com/tutorial/faction_list.bmp

Faction_Values: (This holds the values of how NPC's respond to each other as you see in the picture.)

Http://www.worldofalkora.com/tutoria...ion_values.bmp

Npc_Faction: (This is where the server checks the names of the faction for whenever you slay a NPC with a certain faction and gives you the... You have gained faction with Qeynos!....Also When creating these, make sure they are same ID on both sides, on ID and Primary Faction.)

Http://www.worldofalkora.com/tutorial/npc_faction.bmp

Npc_Faction_Entries: (Npc_Faction_Entries is what the server checks to see how much faction you gain or lose when you slay a NPC with a set faction. NOTE, if you set these factions too high you can allow people to get ally faction or KoS faction very quickly. Also, - behind a number means lose faction, no negetive sign means gain faction.)

Http://www.worldofalkora.com/tutoria...on_entries.bmp

Notice in this picture I have qeynos twice, I did that so that if you kill a freeport NPC, you gain faction with Qeynos along with negetive faction with freeport.

Quote:
FACTION VALUE LIST: (There are few because I have'nt tested all factions yet)
-1500: Scowl Ready to Attack
-1000: Threateningly
-200: Dubiously
0: Indifferently
1500: Ally
PERL

When writing a quest, you sometimes want people to earn their rights to be able to do such a quest and you see quest::faction there but have no idea how to use it, here ya go...

$faction - Returns the faction level number of the user with the mob.
1: Ally
2: Kindly
3: Warmly
4: Amiably
5: Indifferent
6: Apprehensive

< less than
> greater than
>= greater or equal than
<= less or equal than
== equal
!= Not equal

------------------------------------------------------------------------------------

Example
Code:
sub EVENT_SAY
{
if($faction == 1)
{
if($text=~/hail/i)
{
quest::say("hi");
}
}
elsif($faction != 1)
{
quest::say("umm dont talk to me?");
}
}
-------------------------------------------------------------------------------------

Also to give/take away faction


sub EVENT_SAY
{
if ($text =~/Hail/i)
{
quest::say("Do you want faction with Qeynos?");
}
if ($text =~/yes/i)
{
quest::faction(7,5)
}
}

Quote:
quest::faction(7(factionID), 5(how much faction it gives you, -5 would give negetive faction)
------------------------------------------------------------------------------------

I hope this helps, I do not take credit for Perl Section since its already explained somewhere else.
__________________
a hill giant slashes YOU for 25 points of damage!
You have been slain!
LOADING, PLEASE WAIT...
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:36 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3