PDA

View Full Version : Kings and Bandits Source / Windows Compiles


image
03-17-2012, 10:49 PM
I have the source and compiled exes for Windows available for Kings and Bandits. You may have interest in this if you are looking to add new items in during gameplay, team-based pvp systems, generating random names for items/npcs, or pvp leaderboards for certain pvp/pve designs. There is also a dual login server feature that allows you to sync accounts in game.

I will try to add more details as time goes on for now I am releasing the links (plus there are some additional notes included in the zip).

I broke it down into multiple files due to some being large (Such as maps).

Source + Compiled Exes (Build dir) + Quests (http://auth.emagiware.com/KaBSource.zip)


Kings Server Database (Includes the custom tables and also some random items already generated) (http://auth.emagiware.com/kingsreleasedb.zip)

Item Editor (Support for creating Random Item Templates (min/max) against existing items, also random names used in random items or npc names)
Event Viewer (Updated to work a bit better, was used for showing pop counts in eventlog as well)
KBTools (C# Tools) (http://auth.emagiware.com/KBTools.zip)


EQ Maps (http://auth.emagiware.com/maps.zip)

Secrets
03-18-2012, 03:50 AM
I have the source and compiled exes for Windows available for Kings and Bandits. You may have interest in this if you are looking to add new items in during gameplay, team-based pvp systems, generating random names for items/npcs, or pvp leaderboards for certain pvp/pve designs. There is also a dual login server feature that allows you to sync accounts in game.

I will try to add more details as time goes on for now I am releasing the links (plus there are some additional notes included in the zip).

I broke it down into multiple files due to some being large (Such as maps).

Source + Compiled Exes (Build dir) + Quests (http://auth.emagiware.com/KaBSource.zip)


Kings Server Database (Includes the custom tables and also some random items already generated) (http://auth.emagiware.com/kingsreleasedb.zip)

Item Editor (Support for creating Random Item Templates (min/max) against existing items, also random names used in random items or npc names)
Event Viewer (Updated to work a bit better, was used for showing pop counts in eventlog as well)
KBTools (C# Tools) (http://auth.emagiware.com/KBTools.zip)

EQ Maps (http://auth.emagiware.com/maps.zip)

Might merge support for the random item feature into SVN if it's good enough. Do you remember what EQEmu revision this was made against?

image
03-18-2012, 12:42 PM
The last changelog entry was feb 24 2011 so I am guessing r1873. I did include some additional fixes that were added later on. Most changes for the random items should be within EmuShareMem and in the SharedDatabase class.

Just to add if anyone has any code questions please feel free to ask. I know there are a lot of side implementations that may interest some (like the ones mentioned above, there are more such as character achievements for PVP, eg. reaching certain kills/deaths and you get some coin and recognition in-game, just hard to remember each implementation).

image
03-18-2012, 02:03 PM
I pulled the code changelog from the db, there are three revisions that were added, 1882, 1883 and 1890.

KaB/red69 changelog (http://auth.emagiware.com/changelog.html)

image
03-28-2012, 09:22 PM
Basic Quest Examples for the KaB extensions available thus far

Create loot for NPC after spawn
The sub EVENT_SPAWN is called before we can properly instantiate random loot - it is important that you have a timer call and in the EVENT_TIMER

check and call AddLootGroup(rndlootgroupid) against the $npc pointer.
Try to use unique timer names for each quest file.

sub EVENT_SPAWN {
quest::settimer("createboneloot",1);
}

sub EVENT_TIMER {
if ( $timer eq "createboneloot" ) { quest::stoptimer("createboneloot");

$npc->AddLootGroup(16); }
}


Create a team-based guard
Quest scripts should always be created at the zone level, the name or npc id will work.

Team guards must be set on spawn and if you wish to reset any guard card statistics given to the NPC they must be reset on death. The statistics are saved in the team_guards table in the database.

an example script would include:


sub EVENT_SPAWN
{
#teamid represents any of the created team id's (1-4 by default).
#each npc should be unique in-game that attributes an npcid
#any duplicate npc's in the world will conflict with each other.
#each team can use the npcid once and provide unique stats.

quest::loadguardtype(teamid, npcid);
}



sub EVENT_DEATH
{
#if you wish to remove any guard card stats given by players
#issue the quest command below
quest::resetguardfields(teamid, npcid);
}


Get a guard's current bonus statistic value


sub SUB_WHATEVER
{
#quest::getguardfield(teamid, npcid, fieldname)
#fieldname options: hp, mana, hpregen, manaregen, level, ac
$value = quest::getguardfield(1, 2093, "*fieldname*");

quest::say("I have $value of something!");
}



Check player's PVP value


sub SUB_WHATEVER
{
#GetPVPFlag returns a value of their team id, typically 1-4
#0 is returned if they are neutral
if ($client->GetPVPFlag() > 0) #check if they are pvp enabled
{
quest::say("Go find a fight!");
}
else
{
quest::say("You are neutral..");
}

}



Check if player is king of a team


sub SUB_WHATEVER
{
#IsKing returns a value of 1 if they are a king, 0 if not.
if ($client->IsKing() > 0) #check if they are pvp enabled
{
quest::say("You are a king!");
}
else
{
quest::say("You are peasant!");
}

}



Set player's PVP flag


sub SUB_WHATEVER
{
#0 is for neutral
#1-4 is for teams, 5 is for bandits (ffa)
quest::pvpvalue("5");
}




Get team statistics


sub SUB_WHATEVER
{
#0 is for neutral
#1-4 is for teams, 5 is for bandits (ffa)

my $qeynosBonus = quest::getteamexpbonus(1);
#team xp bonus returns a 1-100% otherwise
#0 is returned when the city npc is killed (until respawn)

my $qeynosUpkeepPaid = quest::getisupkeeppaid(1);
#returns 0 if upkeep has not been paid, 1 otherwise.

#tax rate (merchants) for visitors to the city
my $qeynosNewbTaxes = quest::getcitynewbietaxrate(1);

#citizen tax rate
my $qeynosCitTaxes = quest::getcitycitizentaxrate(1);

#get cost in copper of upkeep/day
my $qeynosUpkeepCost = quest::getcityupkeepcost(1);
}

image
10-20-2012, 04:22 PM
Not to necro a post or anything but since I got a PM about asking for this source I have put it back up at www.eqpvp.com/archive -- the old site isn't available at this time. Also there are a lot of fixes I have applied since then, eventually I will get to packing it all up again, but likely won't be soon.