Author: agentorangeguy (---.localdomain)
Date: 10-03-09 16:54
Ok I'm still having a bit of trouble with the flags going off. At first they were just spouting off the initial argument conversation and not going any further. Then, it wasn't going on at all when I tweaked it. Here is an example I made, see if I did this right. it compiles and you can talk to them, but the argument won't trigger:
//testnpc1.uc
void Iolo object# (0x401) ()
{
//Back and forth convo should be triggered when asked about Dupre
if (event == DOUBLECLICK)
{
if (!gflags[FLAG1])
{
gflags[FLAG1] = true;
item.say("@Oh yeah? Tell him he's just a drunk@");
return;
}
if (gflags[FLAG2] && !gflags[FLAG3])
{
gflags[FLAG3] = true;
item.say("AARP? Tell Dupre he probably caught an STD from that tavern wench!@");
return;
}
if (gflags[FLAG4] && !gflags[FLAG5])
{
gflags[FLAG5] = true;
item.say("@It works perfectly fine! I do not need venom to cure that! Tell him that his alchohol breath is nauseating!@");
return;
}
if (gflags[FLAG6] && !gflags[FLAG7])
{
gflags[FLAG7] = true;
item.say("@Nursing home? I'm not that old! Wait, what were we talking about again?@");
}
if (gflags[GLENMOLE8] || gflags[GLENMOLE1])
{
}
else
if (!UI_get_item_flag(item, MET))
{
UI_set_item_flag(item, MET);
item.say("You see an old fart.");
}
else
item.say("@Hello.@");
var options = ["name", "job", "bye", "Dupre"];
converse(options)
{
case "name":
say("@Iolo.@");
case "job":
say("@Walmart greeter.@");
case "Dupre"(remove):
if (!gflags[FLAG1])
{
say("@Perhaps you should enroll him in Alcoholics Anonymous.@");
gflags[FLAG1] = true;
}
else
say("@Whatever.@");
case "bye":
say("@When are we going to stop at Denny's, Avatar?.@");
break;
}
}
}
//testnpc2.uc
void Dupre object# (0x404) ()
{
if (event == DOUBLECLICK)
{
if (gflags[FLAG1] && !gflags[FLAG2])
{
item.say("@Alcholics Anonymous? Tell Iolo to fill out his AARP membership!@");
gflags[FLAG2] = true;
return;
}
if (gflags[FLAG3] && !gflags[FLAG4])
{
gflags[FLAG4] = true;
item.say("@Hey, I was cured after taking a red potion. Perhaps he should take some silver serpent venom for a certain problem he has, if you know what I mean.@");
return;
}
if (gflags[FLAG5] && !gflags[FLAG6])
{
gflags[FLAG6] = true;
item.say("@Avatar, perhaps we should just stick him in a nursing home. Besides, he eats too much.@");
return;
}
if (gflags[FLAG7] && !gflags[FLAG8])
{
gflags[FLAG8] = true;
item.say("@I suppose I should respect my elders...@");
}
else
if (!UI_get_item_flag(item, MET))
{
UI_set_item_flag(item, MET);
item.say("You see a slightly drunken Dupre.");
}
else
item.say("@BUUUUUURP!.@");
var options = ["name", "job", "bye"];
converse(options)
{
case "name":
say("@I am Dupre@");
case "job":
say("@To drink as much alchohol as possible@");
case "bye":
say("@I'm going to throw up, Avatar!@.");
break;
}
}
}
|
|