Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Quests

Archive::Quests Archive area for Quests's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-30-2003, 07:27 AM
Fyrre
Sarnak
 
Join Date: Jan 2003
Posts: 33
Default Help with multiple item turnins / triggered spawn

ok, first of all, I need help with multiple item turn ins. Lets say I have item IDs 195, 196, 197, and 198 and I want the NPC to respond only if all 4 are handed in. How do I accomplish this?

second of all, what does guildwarset and grid on this npcspawn trigger mean? I know that npc_type means the ID of the mob in the database and that x y and z is the location of the mob.

spawn(npc_type,grid,guildwarset,x,y,z) - Spawn "npc_type" on "grid" with "guildwarset" at "x","y","z".
Reply With Quote
  #2  
Old 06-30-2003, 08:22 AM
IANumtin
Hill Giant
 
Join Date: Apr 2003
Location: EQEmu
Posts: 121
Default

http://forums.eqemu.net/viewtopic.php?t=5719

That'll answer your questions about multiple item turn in. As far as the guildwar set I'm not to sure about, I've never messed with it.
__________________
They say baldness is in the genes but I have hair in my jeans :>)
Reply With Quote
  #3  
Old 06-30-2003, 08:39 AM
Fyrre
Sarnak
 
Join Date: Jan 2003
Posts: 33
Default

Right, I've looked at that topic at least 100 times. I want someone to provide an example on how to use $item1, $item2, and so on.
Reply With Quote
  #4  
Old 06-30-2003, 12:37 PM
IANumtin
Hill Giant
 
Join Date: Apr 2003
Location: EQEmu
Posts: 121
Default

$item1, $item2, etc is just a way of telling the quest npc to look for x amount of items. the "="1001" after is the item it looks for.

Here's an example. It's one I wrote a while ago.

EVENT_SAY {
if ($1- =~ "Hail") { say("Hail $name . I am skilled in the arts of smithing. I would be more than willing to make you some [armor] if you wish.") }
if ($1- =~ "armor") { say("I can craft a nice [helm] [vambraces] [greaves] [breastplate] [boots] [gauntlets] or [bracer].") }
if ($1- =~ "helm") { say("I can make you a fine helm. Bring me a lambent stone and a water flask. Don't forget the Full Plate Helm Mold.") }
if ($1- =~ "vambraces") { say("I can make you a fine set of vambraces. Bring me a lambent stone and a water flask. Don't forget the Full Plate Vambrace Mold.") }
if ($1- =~ "greaves") { say("I can make you a fine set of greaves. Bring me a lambent stone and a water flask. Don't forget the Full Plate Greaves Mold.") }
if ($1- =~ "breastplate") { say("I can make you a fine Breastplate. Bring me a lambent stone and a water flask. Don't forget the Full Breastplate Mold.") }
if ($1- =~ "boots") { say("I can make you a fine pair of boots. Bring me a lambent stone and a water flask. Don't forget the Full Plate Boot Mold.") }
if ($1- =~ "gauntlets") { say("I can make you a fine set of gauntlets. Bring me a lambent stone and a water flask. Don't forget the Full Plate Gauntlet Mold.") }
if ($1- =~ "bracer") { say("I can make you a fine bracer. Bring me a lambent stone and a water flask. Don't forget the Full Plate Bracer Mold.") }
}
EVENT_ITEM {
if ($item1 == "10000" && $item2 == "13006" && $item3 == "22047") { say("Excellent Work. Here is your Helm") summonitem("4153") }
if ($item1 == "10000" && $item2 == "13006" && $item3 == "22051") { say("Excellent Work. Here is your Vambraces") summonitem("4155") }
if ($item1 == "10000" && $item2 == "13006" && $item3 == "22052") { say("Excellent Work. Here is your Greaves") summonitem("4158") }
if ($item1 == "10000" && $item2 == "13006" && $item3 == "22053") { say("Excellent Work. Here is your Breastplate") summonitem("4154") }
if ($item1 == "10000" && $item2 == "13006" && $item3 == "22046") { say("Excellent Work. Here is your Boots") summonitem("4159") }
if ($item1 == "10000" && $item2 == "13006" && $item3 == "22054") { say("Excellent Work. Here is your Gauntlets") summonitem("4157") }
if ($item1 == "10000" && $item2 == "13006" && $item3 == "22045") { say("Excellent Work. Here is your Bracer") summonitem("4156") }
}


Notice how the NPC asks for three things. The quest needs to know a way to identify the three things you're turning in to get such and such item in return. The $item1 and $item2, etc just tells the NPC how many items need to be turned in to hand out the reward.

EDIT: Btw, that's a ready made quest, feel free to use it if you wish. Just place it in the correct quest folder for whatever zone you want and save with an NPC id with .qst as an extension.
__________________
They say baldness is in the genes but I have hair in my jeans :>)
Reply With Quote
  #5  
Old 06-30-2003, 05:40 PM
Bigpull
Discordant
 
Join Date: Feb 2003
Posts: 305
Default

Quote:
Originally Posted by Numtin
EVENT_SAY {
if ($1- =~ "Hail") { say("Hail $name . I am skilled in the arts of smithing. I would be more than willing to make you some [armor] if you wish.") }
if ($1- =~ "armor") { say("I can craft a nice [helm] [vambraces] [greaves] [breastplate] [boots] [gauntlets] or [bracer].") }
if ($1- =~ "helm") { say("I can make you a fine helm. Bring me a lambent stone and a water flask. Don't forget the Full Plate Helm Mold.") }
if ($1- =~ "vambraces") { say("I can make you a fine set of vambraces. Bring me a lambent stone and a water flask. Don't forget the Full Plate Vambrace Mold.") }
if ($1- =~ "greaves") { say("I can make you a fine set of greaves. Bring me a lambent stone and a water flask. Don't forget the Full Plate Greaves Mold.") }
if ($1- =~ "breastplate") { say("I can make you a fine Breastplate. Bring me a lambent stone and a water flask. Don't forget the Full Breastplate Mold.") }
if ($1- =~ "boots") { say("I can make you a fine pair of boots. Bring me a lambent stone and a water flask. Don't forget the Full Plate Boot Mold.") }
if ($1- =~ "gauntlets") { say("I can make you a fine set of gauntlets. Bring me a lambent stone and a water flask. Don't forget the Full Plate Gauntlet Mold.") }
if ($1- =~ "bracer") { say("I can make you a fine bracer. Bring me a lambent stone and a water flask. Don't forget the Full Plate Bracer Mold.") }
}
EVENT_ITEM {
if ($item1 == "10000" && $item2 == "13006" && $item3 == "22047") { say("Excellent Work. Here is your Helm") summonitem("4153") }
if ($item1 == "10000" && $item2 == "13006" && $item3 == "22051") { say("Excellent Work. Here is your Vambraces") summonitem("4155") }
if ($item1 == "10000" && $item2 == "13006" && $item3 == "22052") { say("Excellent Work. Here is your Greaves") summonitem("4158") }
if ($item1 == "10000" && $item2 == "13006" && $item3 == "22053") { say("Excellent Work. Here is your Breastplate") summonitem("4154") }
if ($item1 == "10000" && $item2 == "13006" && $item3 == "22046") { say("Excellent Work. Here is your Boots") summonitem("4159") }
if ($item1 == "10000" && $item2 == "13006" && $item3 == "22054") { say("Excellent Work. Here is your Gauntlets") summonitem("4157") }
if ($item1 == "10000" && $item2 == "13006" && $item3 == "22045") { say("Excellent Work. Here is your Bracer") summonitem("4156") }
}
that should read more like


if ($item0 == "10000" && $item0 == "13006" && $item2== "22047") { say("Excellent Work. Here is your Helm") summonitem("4153") }

Items start at $item0

Lets say we have an npc that turns cloth caps(1001) in to cloth veils (1002)

EVENT_ITEM {
if ($item0 == "1001" ) {
say("Well done here is your veil")
summonitem("1002")
}
if ($item1 == "1001" ) {
say("Well done here is your veil")
summonitem("1002")
}
if ($item2 == "1001" ) {
say("Well done here is your veil")
summonitem("1002")
}
if ($item3 == "1001" ) {
say("Well done here is your veil")
summonitem("1002")
}
if ($item0 != "1001") {
say("Sorry i have no need of this you may have it back.")
summonitem("$item0")
}
if ($item1 != "1001") {
say("Sorry i have no need of this you may have it back.")
summonitem("$item1")
}
if ($item2 != "1001") {
say("Sorry i have no need of this you may have it back.")
summonitem("$item1")
}
if ($item3 != "1001") {
say("Sorry i have no need of this you may have it back.")
summonitem("$item1")
}
}


or using $itemcount()

EVENT_ITEM {
if ($itemcount("1001")){
say("Well done!")
summonitem("1002")
break()
}
if ($item0){
summonitem("$item0")
summonitem("$item1")
summonitem("$item2")
summonitem("$item3")
say("Say sorry I do not need those.")
}
}
Reply With Quote
  #6  
Old 06-30-2003, 06:12 PM
Fyrre
Sarnak
 
Join Date: Jan 2003
Posts: 33
Default

I figured it out shortly before you guys posted some help. Thanks anyways.
Reply With Quote
  #7  
Old 06-30-2003, 10:37 PM
IANumtin
Hill Giant
 
Join Date: Apr 2003
Location: EQEmu
Posts: 121
Default

Actually Bigpull, I did try it starting with $item0 and it kept giving me an unknown item error (or something like that, it's been a while). Could be that they fixed it in 4.4 I wrote that quest when I was using 4.3
__________________
They say baldness is in the genes but I have hair in my jeans :>)
Reply With Quote
  #8  
Old 07-01-2003, 06:42 AM
mamba666
Sarnak
 
Join Date: Apr 2003
Posts: 41
Default

In my quests I cannot use $Item(0) with 4.4 exe's I had to start with $item(1)

I hope this helps.
Reply With Quote
  #9  
Old 07-01-2003, 10:06 AM
Bigpull
Discordant
 
Join Date: Feb 2003
Posts: 305
Default

Teach me to read the source not the docs =P

Correct dunno when or why, but it is $item1-4
Reply With Quote
  #10  
Old 07-01-2003, 11:05 PM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default

It was originally 0-3, wes fixed it to check for 1-4 a month or two ago.
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
Reply With Quote
  #11  
Old 07-02-2003, 04:44 AM
Edgar1898
Senior Member
Former EQEmu Developer
Current EQ2Emu Lead Developer
 
Join Date: Dec 2002
Posts: 1,065
Default

forgot all those $item# variables, just use $itemcount. Ex:

Code:
if($itemcount(101)==1 && $itemcount(102)==1 && $itemcount(103)==1 && $itemcount(104)==1) { say("Ha! pwned.") }
oh and btw, depending on what system your compiling on, you might or might not have to put quotes around the item numbers.
__________________
Lethal Encounter
Reply With Quote
  #12  
Old 07-04-2003, 10:44 AM
Bigpull
Discordant
 
Join Date: Feb 2003
Posts: 305
Default

Bah I showed an itemcount example too. And uhm no quotes are fucking mandatory untill A) someone merges the quote snarfer, or B) wes commits his new parser, which he says quotes won't matter one way or another

For you techincal minded it's MS's non ansi complient implmentation of some basic c lib functions that are at fault, which no one really noticed till we started using it on compliant systems eg linux & bsd.

If I hear one more person say thier optional i'm apt to club you with your own leg, If your using an old parser.cpp (mid aprilish to mid mayish) you really should upgrade it and port you .qst's it's best everyones on the same page when it comes tto writing quests or we get Joeblow whineing in irc because quests JoeSmoe posted don't work on his system.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 02:26 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3