Neverwinter Nights > Script Request

420's Duel Management System

<< < (5/5)

Tea-cup:

--- Quote ---ok it works now thx a lot mel!!

next problem :P  :

the script name is manager and the duell manager system works.

but i also have a boot and kill item for admins that has to be in the onactivateitem part.

but the kill and boot items both act like the duel manager now...

this is the script:




void bootkill()
{
object oCaller = GetItemActivator();
object oTarget = GetItemActivatedTarget();
object oItem = GetItemActivated();
string sTag = GetTag(oItem);

if (sTag == "bootcodem1")//YOU CAN CHANCE THIS TAGG OF A ANOTER.
{

DelayCommand(0.5,BootPC(oTarget));

}
if (sTag == "killcodem1")//YOU CAN CHANCE THIS TAGG OF A ANOTER.
{

effect eDeath= EffectDeath(TRUE);

DelayCommand(0.5,ApplyEffectToObject(DURATION_TYPE_INSTANT,eDeath,oTarget));

}

}

void main()

duel manager script...
[snapback]11583[/snapback]
--- End quote ---
First, you're sure the tag of the item to boot whit is 'bootcodem1' and to kill whit is 'killcodem1'? Second, you run the duel manager in void main(). This is the place the script starts and ends. If you didn't add somthing in void main() to say to run the duel manager when the tag is 'manager' or to run boot when the tag is 'bootcodem1' it will alwyas run the duel manager.

I would do it like this, add this in the onactivate event of the module:
--- Code: ---void main()
{
    ExecuteScript(GetTag(GetItemActivated()), GetItemActivator());
}
--- End code ---
Then name the duel manager script exactly the same as the tag it has. Same for the kill/boot items. It should know what script to run then.

-Mel

Pazuul:
y the tags were correct but i raplaced the onactive script by the thing to get the tag and script name... now it works

Fury:
cant DL the file doesnt work :S

Navigation

[0] Message Index

[*] Previous page

Go to full version