PDA

View Full Version : New quest format


Bigpull
03-02-2003, 01:58 PM
It doesn't sem to like me =(

If i hail the npc ones i get

Parser::Event(1, 119963, 'Hail, Iala Lenard', mob=1, client=1)
Parser::LoadScript(119963, 'qeynos') LoadAttempted(): 1


The second time i get
[code]
About to parse: if($1==Hail&&$2==Iala)say(Hail there $name, how may I assist you
?)

just_add_water
03-02-2003, 06:10 PM
.. well it would help if you posted the quests, cause it looks like your missing a bunch of stuff.

(best shot)

EVENT_SAY {
if($1 == "Hail") { say("Hail there $user, how may I assist you?") }
}

ElNounch
03-03-2003, 03:35 AM
Try to compare to "Hail," not just "Hail" (the comma does count here), and I found commas in Say() are to avoid as of now.

killspree
03-03-2003, 08:34 AM
Nm I see what you mean. I have problems with commas in say as well.

Bigpull
03-04-2003, 03:14 AM
Ok everyone is missing the point i think.

I shouldn't have to hail the npc twice for it to attempt to parse the script/quest. There shouldn't be an Umlauted Y tacked onto the end, it's not in the file, so it must be reading more than is there.

I also know $1 is "Hail," when you (H) someone, it's also not at all relevent When i'm manualy typeing "Hail Iala". Does it matter what the client said when the NPC isn't parseing the script right, didn't think so.

What ya should have said was Gee i dunno Big they work just fine here.

Edgar1898
03-04-2003, 05:35 AM
the y is just a special character that Wes used in his code.

a_Guest03
03-04-2003, 06:25 AM
You said hail npc ones, not once. The wording was misleading.

Bigpull
03-04-2003, 10:42 AM
Linux output Parser_DEBUG 10
[code]
Parser::LoadScript(121108, 'qeynos2') Loaded: quests/all/121108.qst
New Event: EVENT_SAY - Index: 0
New Command: if($2-=~$npc)shout(Hail $user got any thing for a noobie?)

just_add_water
03-04-2003, 10:51 AM
Try

EVENT_SAY {
if($1- =~ "Hail") { say("yo") }
}

Bigpull
03-04-2003, 11:15 AM
Quit looking at me like that!
Ok i got my script fixed now he shouts in both windows and linux, in windows he even shouts what he's supposed to, but linux he shouts '' =(

killspree
03-04-2003, 11:19 AM
What's the reason for the npc returning NULL instead of the username or zonename when using those commands? Anyone know?

Bigpull
03-04-2003, 03:45 PM
Well because there is no $npc or $user, it's all god 'cept the linux issues hope to hammer thoe out tomarrow.

TheOne
03-04-2003, 08:48 PM
the NPC will return NULL if you type in $user because for some reason the variable $user doesn't exist , if you search in parser.cpp you can see that $name = client->GetName(). try $name instead of $user ;)


if (client) AddVar("userid", itoa(client->GetID(),temp,10));
if (client) AddVar("ulevel", itoa(client->GetLevel(),temp,10));
if (client) AddVar("name", client->GetName());
if (client) AddVar("race", GetRaceName(client->GetRace()));
if (client) AddVar("class", GetEQClassName(client->GetClass()));
if (client) AddVar("mobid", itoa(mob->GetNPCTypeID(),temp,10));
if (client) AddVar("mlevel", itoa(mob->GetLevel(),temp,10));
if (client) gClient = client;
if (client) fac = client->GetFactionLevel(client->GetID(), mob->GetID(), client->GetRace(), client->GetClass(), DEITY_AGNOSTIC, mob->CastToNPC()->GetFactionID(), mob);
if (fac) AddVar("faction", itoa(fac,temp,10));
if (zone) AddVar("zonesn",zone->GetShortName());
if (zone) AddVar("zoneln",zone->GetLongName());