Jump to content


Photo

All Bets are off


  • Please log in to reply
5 replies to this topic

#1 Hendryk

Hendryk
  • Member
  • 873 posts

Posted 17 November 2002 - 08:52 AM

I would like to script a bet between two NPCs about which of them accounts for more enemies in an upcoming dungeon. I'd also like to enable them to settle the bet afterwards without forcing the player to manually compare "enemies killed" totals and then reply in the voice of the PC. My idea for handling this was to set each NPC's "enemies killed - chapter" total to zero and then compare totals at the end of the dungeon. Trouble is, I can't find a scripting command which seems able to modify these totals nor an object reference for the specific lines I'd like to modify. Any thoughts anyone?
Ready. Fire. Aim.

#2 -Sim-

-Sim-
  • Guest

Posted 17 November 2002 - 10:38 AM

I would use have a global set to 1 while in the dungeon. Then, in DPLAYER2 and DPLAYER3:

IF
Global("indungeon","GLOBAL",1)
Killed([ANYONE])
OR(2)
Name(Myself,"npc1")
Name(Myself,"npc2")
THEN
RESPONSE #100
IncrementGlobal("killcount","LOCALS",1)
END

You the have two kill counts. However, to compare them, it might be easier to use two separate variables, and make them GLOBAL.

So:

IF
Global("indungeon","GLOBAL",1)
Killed([ANYONE])
Name(Myself,"npc1")
THEN
RESPONSE #100
IncrementGlobal("npc1killcount","LOCALS",1)
END

IF
Global("indungeon","GLOBAL",1)
Killed([ANYONE])
Name(Myself,"npc2")
THEN
RESPONSE #100
IncrementGlobal("npc2killcount","LOCALS",1)
END

#3 -Sim-

-Sim-
  • Guest

Posted 17 November 2002 - 10:50 AM

Sorry, in the last two blocks, npc#killcount would be "GLOBAL". Forgot to change it when I pasted :P

#4 Hendryk

Hendryk
  • Member
  • 873 posts

Posted 17 November 2002 - 11:37 AM

I would use have a global set to 1 while in the dungeon. Then, in DPLAYER2 and DPLAYER3:

IF
Global("indungeon","GLOBAL",1)
Killed([ANYONE])
OR(2)
Name(Myself,"npc1")
Name(Myself,"npc2")
THEN
RESPONSE #100
IncrementGlobal("killcount","LOCALS",1)
END

You the have two kill counts. However, to compare them, it might be easier to use two separate variables, and make them GLOBAL.

So:

IF
Global("indungeon","GLOBAL",1)
Killed([ANYONE])
Name(Myself,"npc1")
THEN
RESPONSE #100
IncrementGlobal("npc1killcount","LOCALS",1)
END

IF
Global("indungeon","GLOBAL",1)
Killed([ANYONE])
Name(Myself,"npc2")
THEN
RESPONSE #100
IncrementGlobal("npc2killcount","LOCALS",1)
END

Thanks. It seems like this should work but I do have one question. Is "KILLED([ANYONE])" a reference the EXE will accept? I can't find references to it or another script where it is used.
Ready. Fire. Aim.

#5 -Sim-

-Sim-
  • Guest

Posted 17 November 2002 - 12:08 PM

Killed() is a valid trigger, and [ANYONE] is a valid object mask. It should be quite acceptable.
Don't rely on existing scripts for what will work. There are many useful things that were never used in any original script.

#6 Hendryk

Hendryk
  • Member
  • 873 posts

Posted 17 November 2002 - 12:11 PM

Killed() is a valid trigger, and [ANYONE] is a valid object mask. It should be quite acceptable.
Don't rely on existing scripts for what will work. There are many useful things that were never used in any original script.

In that case, thank you twice!
Ready. Fire. Aim.