[dascript]
const int HERO_STAT_ARENA_WINS = 2040;
const int HERO_STAT_ARENA_LOSES = 2041;
////////////////////////////////////////////////////////////////////////////////
// ARENA WINS AND LOSES
////////////////////////////////////////////////////////////////////////////////
// Handles number of arena wins
void STATS_HandleArenaWins(object oHero, object oTarget);
void STATS_HandleArenaWins(object oHero, object oTarget)
{
float fOld = GetCreatureProperty(oHero, HERO_STAT_ARENA_WINS);
float fNew = fOld + 1.0;
SetCreatureProperty(oHero, HERO_STAT_ARENA_WINS, fNew);
}
// Handles number of arena loses
void STATS_HandleArenaLoses(object oHero, object oTarget);
void STATS_HandleArenaLoses(object oHero, object oTarget)
{
float fOld = GetCreatureProperty(oHero, HERO_STAT_ARENA_LOSES);
float fNew = fOld + 1.0;
SetCreatureProperty(oHero, HERO_STAT_ARENA_LOSES, fNew);
}
[/dascript]
I have 2 ways I can think of to get the win or lose information, I just need to know how to get it relayed to the stats script to have it update the GUI like it does for kills and damage. I'll post my losing event from my module script, then my winning event sent from the area scripts. Any helping plugging this together would be greatly appreciated, thanks.
[dascript]
case EVENT_TYPE_SET_GAME_MODE:
{
int nGameMode = GetEventInteger(ev, 0);
if ( nGameMode == GM_DEAD )
{
DoAreaTransition("arena", "respawn");
nEventHandled = TRUE;
}
break;
}
[/dascript]
[dascript]
case EVENT_TYPE_TEAM_DESTROYED:
{
if (WR_GetPlotFlag(PLT_WARDENS_REWARDS, WIN_HOC) == FALSE)
{
WR_SetPlotFlag(PLT_WARDENS_REWARDS, WIN_HOC, TRUE);
}
DoAreaTransition("arena", "arena_select");
break;
}
[/dascript]
Modifié par jsd313, 18 avril 2010 - 12:52 .





Retour en haut






