PDA

View Full Version : NPC Scripting Error - is it just me?


mByte
04-03-2002, 08:47 AM
I get this when ever I try to use my scripting. This also crashes the zonent.exe file and boots my characters in the zone to character select.

http://66.12.139.58/images/qsterror.gif

my script is simple

NPC_SCRIPT 2006{
TRIGGER_TEXT:Hail:{
SAY:Hiya
}
}

N E ideas?

mByte
04-03-2002, 12:06 PM
it works in the zone9x.exe fyi

Lurker_005
04-03-2002, 12:30 PM
Just a wild guess, is there extra charage returns after the last }

I have no idea if it matters, just a thought.

strychn
04-03-2002, 04:34 PM
only problem i've had with the scripting was that TRIGGER_ITEM doesn't seem to work.

Lyenu X`Arie
04-04-2002, 06:30 PM
Originally posted by mByte
NPC_SCRIPT 2006{
TRIGGER_TEXT:Hail:{
SAY:Hiya
}
}


Here is the fix:

NPC_SCRIPT 2006{
TRIGGER_TEXT:Hail:{
SAY:Hiya
}


You just had 1 to many ending spaghetti lines ;-)

strychn
04-08-2002, 06:44 PM
fixed trigger item...
changed:

CheckQuests(zone->GetShortName(), "%%item%%", tmp->GetID(), TradeList[0]);

to:

if (tmp->IsNPC()) { CheckQuests(zone->GetShortName(), "%%item%%", tmp->CastToNPC()->GetNPCTypeID(), TradeList[0]);
}}

in client_process.cpp.

this way it passes the correct ID to checkquests.
:)