RichardoX
12-22-2004, 01:20 PM
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/tutorial/faction_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/tutorial/npc_faction_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.
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
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);)
}
}
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. :)
(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/tutorial/faction_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/tutorial/npc_faction_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.
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
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);)
}
}
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. :)