Aller au contenu

Photo

Need to get EXP on kill


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
Asmius

Asmius
  • Members
  • 9 messages
I need the command to give experience on death. Anyone know what it is?

#2
mwplayer

mwplayer
  • Members
  • 19 messages
The command (function) is RewardPartyXP (#include "nw_i0_tool") and GiveXPToCreature.

That's what you were looking for, right? Or did you want to give xp on the OnDeath of some creature?

#3
Asmius

Asmius
  • Members
  • 9 messages
hrm..

I was using RewardPartyXP(1, oPC, TRUE); but it siad that 'RewardPartyXP' was invalid.

#4
Asmius

Asmius
  • Members
  • 9 messages
I want the experience to go to the kilelr, btw.

#5
Xardex

Xardex
  • Members
  • 217 messages
RewardPartyXP is not a default function, and as mwplayer said, you must include a script so you can use it.
( #include "nw_i0_tool" )
Put that before void main()
This command gives XP to a whole party.

GiveXPToCreature is a default function, and thus you need not include anything. It only gives XP to a single creature at a time though.

Modifié par Xardex, 01 juillet 2011 - 09:20 .


#6
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
Something like this in the creatures OnDeath:

void main()
{
    object oPC = GetLastKiller();
    if (GetIsObjectValid(GetMaster(oPC)))
    {
        oPC = GetMaster(oPC);
    }
    GiveXPToCreature(oPC, 100);
}

#7
La Rose Noire

La Rose Noire
  • Members
  • 25 messages
But take care, if your xp rate is not at 0, it will give extra xp to the killer and normal xp to the group.