Initial upload
Initial upload.
This commit is contained in:
92
_module/nss/takemarkzool.nss
Normal file
92
_module/nss/takemarkzool.nss
Normal file
@@ -0,0 +1,92 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: FileName takemarkfalse
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Script Wizard
|
||||
//:: Created On: 9/30/2002 1:32:55 AM
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "nw_i0_tool"
|
||||
#include "marktools"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
object oTalkingPC = GetPCSpeaker();
|
||||
object oInvItem;
|
||||
int nTeam = GetLocalInt(oTalkingPC, "m_nTeam");
|
||||
int nScore, nNumber, nHasMark;
|
||||
|
||||
if(nTeam < 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(nTeam == 1) {
|
||||
nScore = GetLocalInt(OBJECT_SELF, "m_nGoodScore");
|
||||
}
|
||||
|
||||
if(nTeam == 2) {
|
||||
nScore = GetLocalInt(OBJECT_SELF, "m_nEvilScore");
|
||||
}
|
||||
|
||||
int nPreviousScore = nScore;
|
||||
|
||||
oInvItem = GetFirstItemInInventory(oTalkingPC);
|
||||
|
||||
// while (oInvItem != OBJECT_INVALID)
|
||||
|
||||
|
||||
while (GetIsObjectValid(oInvItem) != 0)
|
||||
{
|
||||
if (GetTag(oInvItem) == "MarkofZool") {
|
||||
|
||||
DestroyObject(oInvItem);
|
||||
nScore = nScore + 10;
|
||||
nNumber = nNumber + 1;
|
||||
|
||||
if(nTeam == 1) {
|
||||
SetLocalInt(OBJECT_SELF, "m_nGoodScore", nScore);
|
||||
} else {
|
||||
SetLocalInt(OBJECT_SELF, "m_nEvilScore", nScore);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
oInvItem = GetNextItemInInventory(oTalkingPC);
|
||||
|
||||
}
|
||||
|
||||
if(HasItem(oTalkingPC, "FalseMark"))
|
||||
nHasMark = 1;
|
||||
if(HasItem(oTalkingPC, "MarkofOron"))
|
||||
nHasMark = 1;
|
||||
if(HasItem(oTalkingPC, "MarkofMaro"))
|
||||
nHasMark = 1;
|
||||
if(HasItem(oTalkingPC, "MarkofGamlee"))
|
||||
nHasMark = 1;
|
||||
|
||||
if(nHasMark == 0) {
|
||||
RemoveAllEffects(oTalkingPC);
|
||||
}
|
||||
|
||||
string sPlayerName = GetName(oTalkingPC);
|
||||
string sTeam;
|
||||
string sNumber = IntToString(nNumber);
|
||||
string sScore = IntToString(nScore);
|
||||
|
||||
if(nTeam == 1) {
|
||||
sTeam = "Good";
|
||||
} else {
|
||||
sTeam = "Evil";
|
||||
}
|
||||
|
||||
string sSpeakScore =
|
||||
sPlayerName + " just turned in " + sNumber +
|
||||
" Marks of Zool, increasing the " + sTeam +
|
||||
" team's score to " + sScore + ".";
|
||||
|
||||
|
||||
ActionSpeakString(sSpeakScore, TALKVOLUME_SHOUT);
|
||||
CheckScoreForEvents(nScore, nPreviousScore, nTeam, sTeam);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user