Event::Attach (eventClientMessage, PCRPG::onClientMessage, %client, %msg);
function PCRPG::onClientMessage (%client, %msg){
if(String::findSubStr(%msg, "has died")!=-1)
{GetRegEXP(%msg);}
if(String::findSubStr(%msg, "party experience!")!=-1)
{SayPartyEXP(%msg);}
}
function GetRegEXP(%msg){
$deadguy=getword(%msg, 0);
$regexp=getword(%msg, 6);
echo($deadguy);
echo($regexp);
schedule("say(0, \"#savecharacter\");" ,2);
}
function SayPartyEXP(%msg){
%partyexp = getword(%msg, 3);
%totalexp = $regexp+%partyexp;
%LvL = DeusRPG::FetchData("LVL");
%EXP = DeusRPG::FetchData("EXP");
%Bottom = %LvL * (200 + 50 * (%LvL - 1));
%TNL = Floor(%Bottom) - Floor(%EXP);
%newtnl = (%tnl - %totalexp);
EZAnimate::Animation(2);
say(1, $deadguy @" died and I gained " @ $regexp @" and " @ %partyexp @ " exp for a total of "@ %totalexp @"...(" @ %newtnl @ " tnl)");
}
$QuickSay::Team2 = "false";
$QuickSay::Sound2 = "0";
$EZAnimate::Sound2 = "88";
$EZAnimate::Animation2 = "9";
^ requires OMEGA thing