PDA

View Full Version : I need quest help, flags and such


Astaldoath
09-25-2006, 08:03 AM
sorry bout the post, i fixed the problem, you guys can delete it

Astaldoath
10-12-2006, 04:08 AM
Ok I guess my problem isnt solved. Ive been through everything i can think of with this. People in irc tried to help but it didnt work. I was hoping someone can get this quest working for me. I have no idea what to do.

[CODE]sub EVENT_SPAWN
{
quest::setglobal(meleearmorquest,0,0,F);
}

sub EVENT_SAY
{
if ($text=~/Hail/i && $meleearmorquest == 0){quest::say("Hail $name , It seems you're new here. I am having a few problems, would you like to [help] me?");}
if ($text=~/help/i && $meleearmorquest == 0){quest::say("Good.....good, what problem would you like to help me with? [Uruk Hai Chieftan], [Quest2], [Quest3], [Quest 4], [Quest 5], [Quest 6], or [Quest 7]? If at anytime you want a [new] quest let me know");
$meleearmorquest = undef;
}
if ($text=~/new/i){
$meleearmorquest = undef;
quest::setglobal(meleearmorquest,0,0,F); quest::say("Ok just hail me when you want to pick your new quest.");
}

#Quest Select

if ($text=~/Uruk Hai Chieftan/i){
quest::setglobal(meleearmorquest,1,0,F);
quest::say("Are you [sure]?");
}

if ($text=~/Quest2/i){
quest::setglobal(meleearmorquest,2,0,F);
quest::say("Are you [sure]?");
}

if ($text=~/Quest3/i){
quest::setglobal(meleearmorquest,3,0,F);
quest::say("Are you [sure]?");
}

if ($text=~/Quest4/i){
quest::setglobal(meleearmorquest,4,0,F);
quest::say("Are you [sure]?");
}

if ($text=~/Quest5/i){
quest::setglobal(meleearmorquest,5,0,F);
quest::say("Are you [sure]?");
}

if ($text=~/Quest6/i){
quest::setglobal(meleearmorquest,6,0,F);
quest::say("Are you [sure]?");
}

if ($text=~/Quest7/i){
quest::setglobal(meleearmorquest,7,0,F);
quest::say("Are you [sure]?");
}

#Quest 1
if ($text=~/sure/i && $meleearmorquest == 1){quest::say("I need you to slay Uruk chieftan [Lurtz] and bring me back his head. If you do this for me I will reward you handsomely with new [equipment].");}
if ($text=~/equipment/i && $meleearmorquest == 1){quest::say("Yes, 12 pieces to be exact but I dont feel like telling you every piece you will get.");}
if ($text=~/Lurtz/i && $meleearmorquest == 1){quest::say("I have been told by my scouts that Lurtz is hiding near Befallen. He is being protected by 4 Uruk Hai bodyguards so it would be best to take a friend or 2 with you.");}

#Quest 2
if ($text=~/sure/i && $meleearmorquest == 2){quest::say("Hail $name, I didnt expect to see you back so soon. Don't tell me you need more [gear]?");}
if ($text=~/gear/i && $meleearmorquest == 2){quest::say("Ok, I guess I can find another [task] for you.");}
if ($text=~/task/i && $meleearmorquest == 2){quest::say("As you may have heard there have been some of Saruman

Astaldoath
10-12-2006, 04:20 AM
ok this is totally retarded, programming is supposed to be logical!

i even tried this

if ($text=~/new/i){
quest::delglobal(meleearmorquest);
quest::setglobal(meleearmorquest,0,0,F);
quest::say("Ok just hail me when you want to pick your new quest.");
}

I noticed normall when i tried to set $meleequest back to 0 it made a new variable so i figured ok Ill do $meleearmorquest = undef; and it should undefine it. Doesnt work so i tried the code above, i figured ok, ill delete the variable and make a new one and set it to 0. It does not work either, can anyone explain this to me?

Aramid
10-12-2006, 05:59 AM
I tried this and it works for me....
[code]
#Melee Armor Quest with Setglobals

sub EVENT_SAY
{
if ($text=~/Hail/i && $meleearmorquest == 0){quest::say("Hail $name , It seems you're new here. I am having a few problems, would you like to [help] me?");}
if ($text=~/help/i && $meleearmorquest == 0){quest::say("Good.....good, what problem would you like to help me with? [Uruk Hai Chieftan], [Quest2], [Quest3], [Quest4], [Quest5], [Quest6], or [Quest7]? If at anytime you want a [new] quest let me know");
}
if ($text=~/new/i){
$meleearmorquest = undef;
quest::delglobal(meleearmorquest);
quest::setglobal(meleearmorquest,0,0,F); quest::say("Ok just hail me when you want to pick your new quest.");
}

#Quest Select

if ($text=~/Uruk Hai Chieftan/i){
quest::delglobal(meleearmorquest);
quest::setglobal(meleearmorquest,1,0,F);
quest::say("Are you [sure]?");
}

if ($text=~/Quest2/i){
quest::delglobal(meleearmorquest);
quest::setglobal(meleearmorquest,2,0,F);
quest::say("Are you [sure]?");
}

if ($text=~/Quest3/i){
quest::delglobal(meleearmorquest);
quest::setglobal(meleearmorquest,3,0,F);
quest::say("Are you [sure]?");
}

if ($text=~/Quest4/i){
quest::delglobal(meleearmorquest);
quest::setglobal(meleearmorquest,4,0,F);
quest::say("Are you [sure]?");
}

if ($text=~/Quest5/i){
quest::delglobal(meleearmorquest);
quest::setglobal(meleearmorquest,5,0,F);
quest::say("Are you [sure]?");
}

if ($text=~/Quest6/i){
quest::delglobal(meleearmorquest);
quest::setglobal(meleearmorquest,6,0,F);
quest::say("Are you [sure]?");
}

if ($text=~/Quest7/i){
quest::delglobal(meleearmorquest);
quest::setglobal(meleearmorquest,7,0,F);
quest::say("Are you [sure]?");
}

#Quest 1
if ($text=~/sure/i && $meleearmorquest == 1){quest::say("I need you to slay Uruk chieftan [Lurtz] and bring me back his head. If you do this for me I will reward you handsomely with new [equipment].");}
if ($text=~/equipment/i && $meleearmorquest == 1){quest::say("Yes, 12 pieces to be exact but I dont feel like telling you every piece you will get.");}
if ($text=~/Lurtz/i && $meleearmorquest == 1){quest::say("I have been told by my scouts that Lurtz is hiding near Befallen. He is being protected by 4 Uruk Hai bodyguards so it would be best to take a friend or 2 with you.");}

#Quest 2
if ($text=~/sure/i && $meleearmorquest == 2){quest::say("Hail $name, I didnt expect to see you back so soon. Don't tell me you need more [gear]?");}
if ($text=~/gear/i && $meleearmorquest == 2){quest::say("Ok, I guess I can find another [task] for you.");}
if ($text=~/task/i && $meleearmorquest == 2){quest::say("As you may have heard there have been some of Saruman

Astaldoath
10-12-2006, 06:28 AM
[QUOTE=Aramid]I tried this and it works for me....
[code]
#Melee Armor Quest with Setglobals

sub EVENT_SAY
{
if ($text=~/Hail/i && $meleearmorquest == 0){quest::say("Hail $name , It seems you're new here. I am having a few problems, would you like to [help] me?");}
if ($text=~/help/i && $meleearmorquest == 0){quest::say("Good.....good, what problem would you like to help me with? [Uruk Hai Chieftan], [Quest2], [Quest3], [Quest4], [Quest5], [Quest6], or [Quest7]? If at anytime you want a [new] quest let me know");
}
if ($text=~/new/i){
$meleearmorquest = undef;
quest::delglobal(meleearmorquest);
quest::setglobal(meleearmorquest,0,0,F); quest::say("Ok just hail me when you want to pick your new quest.");
}

#Quest Select

if ($text=~/Uruk Hai Chieftan/i){
quest::delglobal(meleearmorquest);
quest::setglobal(meleearmorquest,1,0,F);
quest::say("Are you [sure]?");
}

if ($text=~/Quest2/i){
quest::delglobal(meleearmorquest);
quest::setglobal(meleearmorquest,2,0,F);
quest::say("Are you [sure]?");
}

if ($text=~/Quest3/i){
quest::delglobal(meleearmorquest);
quest::setglobal(meleearmorquest,3,0,F);
quest::say("Are you [sure]?");
}

if ($text=~/Quest4/i){
quest::delglobal(meleearmorquest);
quest::setglobal(meleearmorquest,4,0,F);
quest::say("Are you [sure]?");
}

if ($text=~/Quest5/i){
quest::delglobal(meleearmorquest);
quest::setglobal(meleearmorquest,5,0,F);
quest::say("Are you [sure]?");
}

if ($text=~/Quest6/i){
quest::delglobal(meleearmorquest);
quest::setglobal(meleearmorquest,6,0,F);
quest::say("Are you [sure]?");
}

if ($text=~/Quest7/i){
quest::delglobal(meleearmorquest);
quest::setglobal(meleearmorquest,7,0,F);
quest::say("Are you [sure]?");
}

#Quest 1
if ($text=~/sure/i && $meleearmorquest == 1){quest::say("I need you to slay Uruk chieftan [Lurtz] and bring me back his head. If you do this for me I will reward you handsomely with new [equipment].");}
if ($text=~/equipment/i && $meleearmorquest == 1){quest::say("Yes, 12 pieces to be exact but I dont feel like telling you every piece you will get.");}
if ($text=~/Lurtz/i && $meleearmorquest == 1){quest::say("I have been told by my scouts that Lurtz is hiding near Befallen. He is being protected by 4 Uruk Hai bodyguards so it would be best to take a friend or 2 with you.");}

#Quest 2
if ($text=~/sure/i && $meleearmorquest == 2){quest::say("Hail $name, I didnt expect to see you back so soon. Don't tell me you need more [gear]?");}
if ($text=~/gear/i && $meleearmorquest == 2){quest::say("Ok, I guess I can find another [task] for you.");}
if ($text=~/task/i && $meleearmorquest == 2){quest::say("As you may have heard there have been some of Saruman

Aramid
10-12-2006, 06:38 AM
But it DOES work for me the way I have it written. You can't SETGLOBAL if it exists, you have to DELETE it first, and because we are deleting the global when they say quest3 or quest4 etc.. it WILL change, at least on a windows box.

When you change your code, do you enter a #reloadpl in the same zone as the NPC before trying the new code?

Astaldoath
10-12-2006, 07:01 AM
But it DOES work for me the way I have it written. You can't SETGLOBAL if it exists, you have to DELETE it first, and because we are deleting the global when they say quest3 or quest4 etc.. it WILL change, at least on a windows box.

When you change your code, do you enter a #reloadpl in the same zone as the NPC before trying the new code?

yeah, i dunno, im not even gonna use qglobals, i dunno why i wanted to in the first place. I figured out i dont need em unlike i thought