PDA

View Full Version : Different Items


Monrezz
03-29-2003, 10:01 PM
Okay...I'm making a quest in The Arena (I have custom mobs there) in which you have to rescue King Zaixelek. You have to get 4 bits of armour from "God_of_War", who drops about 1 or 2 different pieces of loot per kill. When you give him the 4 bits of armour, he will give you a new item and make you level 65. So far I have this:

/* Zone:arena ID:178204 -- King_Zaixelek */
EVENT_SAY {
if ($1- =~ "Hail") { say("Hail $name . Please, you must rescue me from the God of War. I have been imprisoned here for over 2000 years. He has been keeping me alive...but why? Will you [rescue] me please!") }
if ($1- =~ "rescue") { say("Oh thank you thank you thank you! I must warn you. He is not like any other Gods I know of. He appears to be invincible; his health regenerates at an amazing rate and no other God has managed to get his health down noticeably. Many guilds and coordinated raids have been attempted on him. None have been sucessful! But you must please try...you don't know what it's like! I will give you a very hansom [reward] for his sucessful downfall.") }
if ($1- =~ "reward") { say("I will give you armour you have never seen before. Not normal armour but armour even the Gods themselves would like. It will protect you from anything that tries to attack you. Do NOT become careless though...only 2 mortals have ever worn this. I am one, the other...you will find out in time. Heed my advice when wearing it - be careful. I must of course have proof that he is slain however; I am no fool. Bring me 4 pieces of his armour and I shall give you one piece of mine. Return to me with this for your prize.") }
}
EVENT_ITEM {
if ($item0 == "1001" && $item1 == "1002" && $item2 == "1003" && $item3 == "1004") { say("Praise you $name - I knew that you would be victorious. I reward you with this armour and pray that it will help you in your fight against the unholy forces of Norrath.")
spawnitem(1016)
level($userid,65) }
}
EVENT_DIE {
say("Why...*cough*...why did you kill me...?..*cough*...")
shout("Finally...freedom. Thank you $name . I pray you good luck in your adventuring.")
me("King Zaixeleks spirit rises up into the air and disapears.")
level($userid,60)
}
EVENT_SPAWN {
shout("Please somebody help me! I have been imprisoned by the God of War for over 2000 years. Somebody, please rescuse me. You shall be rewarded!")
}

/*END of FILE*/

The only thing is I want you to be able to hand in any 4 items out of this list:

1001,1002,1003,1004,1005,1006,1007,1008,1009,1010, 1011,1012.

So for $item0 I want you to be able to hand in item's 1001-1012, and the same for slot 2, 3 and 4.

How would I do this, please...?

just_add_water
03-30-2003, 06:45 AM
Heres a fixed up version, you might have to wait for CVS to be updated to get it to work tho..



EVENT_SAY {
if ($1- =~ "Hail") { say("Hail $name . Please, you must rescue me from the God of War. I have been imprisoned here for over 2000 years. He has been keeping me alive...but why? Will you [rescue] me please!") }
if ($1- =~ "rescue") { say("Oh thank you thank you thank you! I must warn you. He is not like any other Gods I know of. He appears to be invincible; his health regenerates at an amazing rate and no other God has managed to get his health down noticeably. Many guilds and coordinated raids have been attempted on him. None have been sucessful! But you must please try...you don't know what it's like! I will give you a very hansom [reward] for his sucessful downfall.") }
if ($1- =~ "reward") { say("I will give you armour you have never seen before. Not normal armour but armour even the Gods themselves would like. It will protect you from anything that tries to attack you. Do NOT become careless though...only 2 mortals have ever worn this. I am one, the other...you will find out in time. Heed my advice when wearing it - be careful. I must of course have proof that he is slain however; I am no fool. Bring me 4 pieces of his armour and I shall give you one piece of mine. Return to me with this for your prize.") }
}
EVENT_ITEM {
if ($itemcount(1001) == 1 && $itemcount(1002) == 1 && $itemcount(1003) == 1 && $itemcount(1004) == 1) { say("Praise you $name - I knew that you would be victorious. I reward you with this armour and pray that it will help you in your fight against the unholy forces of Norrath.")
summonitem("1016")
level("$userid","65") }
}
EVENT_DIE {
say("Why...*cough*...why did you kill me...?..*cough*...")
shout("Finally...freedom. Thank you $name . I pray you good luck in your adventuring.")
me("King Zaixeleks spirit rises up into the air and disapears.")
level("$userid","60")
}
EVENT_SPAWN {
shout("Please somebody help me! I have been imprisoned by the God of War for over 2000 years. Somebody, please rescuse me. You shall be rewarded!")
}
/* Zone:arena ID:178204 -- King_Zaixelek */
/*END of FILE*/

Lurker_005
03-30-2003, 06:52 AM
Well JAW beat me to part of it :)


Havn't tried this, but this is the idea. Change
if ($itemcount(1001) == 1 && $itemcount(1002) == 1 && $itemcount(1003) == 1 && $itemcount(1004) == 1)
to
if ((itemcount(1001) == 1 || itemcount(1002) == 1 || itemcount(1003) == 1 || itemcount(1004) == 1 || itemcount(1005) == 1 || itemcount(1006) == 1 || itemcount(1007) == 1 || itemcount(1008) == 1 || itemcount(1009) == 1 || itemcount(1010) == 1 || itemcount(1011) == 1 || itemcount(1012) == 1) && $itemcount(1002) == 1 && $itemcount(1003) == 1 && $itemcount(1004) == 1)

Kinda long, and that may be a problem... give it a try
You could also split it up and make up to 12 seperate quests with the same result...

just_add_water
03-30-2003, 06:59 AM
LOL lurker, sorry didn't read whole post. This might work too

EVENT_ITEM {
if( if( $itemcount(1001) == 1 || $itemcount(1002) == 1)) && if( $itemcount(1003) == 1 || $itemcount(1004) == 1)) && if( $itemcount(1005) == 1 || $itemcount(1006) == 1)) && if( $itemcount(1007) == 1 || $itemcount(1008) == 1)) )

Monrezz
03-30-2003, 07:46 AM
Thanks!

Okay now I have this (Have changed it a bit) :

EVENT_SAY {
if ($1- =~ "Hail") { say("Hail $name . Please, you must rescue me from the God of War. I have been imprisoned here for over 2000 years. He has been keeping me alive...but why? Will you [rescue] me please!") }
if ($1- =~ "rescue") { say("Oh thank you thank you thank you! I must warn you. He is not like any other Gods I know of. He appears to be invincible; his health regenerates at an amazing rate and no other God has managed to get his health down noticeably. Many guilds and coordinated raids have been attempted on him. None have been sucessful! But you must please try...you don't know what it's like! I will give you a very handsome [reward] for his sucessful downfall.") }
if ($1- =~ "reward") { say("I will give you armour you have never seen before. Not normal armour but armour even the Gods themselves would like. It will protect you from anything that tries to attack you. Do NOT become careless though...only 2 mortals have ever worn this. I am one, the other...you will find out in time. Heed my advice when wearing it - be careful. I must of course have proof that he is slain however; I am no fool. Bring me 4 pieces of his armour and I shall give you one piece of mine. Return to me with this for your prize.") }
}
EVENT_ITEM {
if ((itemcount(1001) == 1 || itemcount(1002) == 1 || itemcount(1003) == 1 || itemcount(1004) == 1 || itemcount(1005) == 1 || itemcount(1006) == 1 || itemcount(1007) == 1 || itemcount(1008) == 1 || itemcount(1009) == 1 || itemcount(1010) == 1 || itemcount(1011) == 1 || itemcount(1012) == 1) && $itemcount(1002) == 1 && $itemcount(1003) == 1 && $itemcount(1004) == 1) { say("Praise you $name - I knew that you would be victorious. I reward you with this armour and pray that it will help you in your fight against the unholy forces of Norrath.")
summonitem("1016")
level("$userid","65") }
}
EVENT_DIE {
say("Noooooo, fool! That will not free me, I will simply resurrected by The God of War, and trapped again!")
me("King Zaixeleks spirit rises up into the air and is consumed by the spirit of war.")
level("$userid","60")
}
EVENT_SPAWN {
shout("Please somebody rescue me! I beg of you! You shall be greatly rewarded!")
}
/* Zone:arena ID:178204 -- King_Zaixelek */
/*END of FILE*/

I have it here:

"C:\EQEmu\quests\arena\178204.qst"

Yet when I am in the game, Hailing him has no effect, killing him has no effect, spawning him has no effect, giving him the items has no effect...any ideas?

Lurker_005
03-30-2003, 02:08 PM
break up the EVENT_SAY { }

Make one for each if statment, that is what seems to happen if any EVENT_ section is too big :/ Should be fixed in 4.4 I believe.

killspree
03-30-2003, 08:08 PM
Yeah looks like it's fixed on CVS now, but I can't get the latest CVS to compile to test it. :/

Monrezz
03-31-2003, 05:36 AM
Okay...now I have this:

EVENT_SAY {
if ($1- =~ "Hail") { say("Hail $name . Please, you must rescue me from the God of War. I have been imprisoned here for over 2000 years. He has been keeping me alive...but why? Will you [rescue] me please!") }
}
EVENT_SAY {
if ($1- =~ "rescue") { say("Oh thank you thank you thank you! I must warn you. He is not like any other Gods I know of. He has only ever been killed once; his health regenerates at an amazing rate and no other God has managed to get his health down noticeably. I have collected his [stats] from the one sucessful attempt on his life. I will give you a very handsome [reward] for his sucessful downfall.") }
}
EVENT_SAY {
if ($1- =~ "stats") { say("It appears that he has health somewhere in the region of 1000000000 hitpoints. He has a regeneration rate of about 15000 health points a second. He has hit raiding parties for anything up to 10000 points of damage. He can Rampage and Flurry and Enrage and Summon. He is a God. He cannot be killed indefinately yet he can be killed. Once killed he will disapear for about two minutes while his soul creates a new body. In that time you will have access to his corpse. His corpse will have the armour I require on it. Remove it and bring it to me! [How do I know this]? Ask.") }
}
EVENT_SAY {
if ($1- =~ "How do you know this") { say("One raiding party managed to take him down. There were 50 of them altogether. 10 Warriors. 10 Clerics. 5 Enchanters. 5 Bards. 5 Necromancers. 5 Wizards. 5 Monks. 5 Shaman. The fight lastest hour after hour. Warriors and Clerics were constantly changed. A well organized raid lead by Monrezz. He calculated his stats while the fight wore on. I do not know where this brave sole is now...if only. Anyway back to your [reward].") }
}
EVENT_SAY {
if ($1- =~ "reward") { say("I will give you armour you have never seen before. Not normal armour but armour even the Gods themselves would like. It will protect you from anything that tries to attack you. Do NOT become careless though...only 2 mortals have ever worn this. I am one, the other...you will find out in time. Heed my advice when wearing it - be careful. I must of course have proof that he is slain however; I am no fool. Bring me 4 pieces of his armour and I shall give you one piece of mine. Return to me with this for your prize.") }
}
EVENT_ITEM {
if ((itemcount(1001) == 1 || itemcount(1002) == 1 || itemcount(1003) == 1 || itemcount(1004) == 1 || itemcount(1005) == 1 || itemcount(1006) == 1 || itemcount(1007) == 1 || itemcount(1008) == 1 || itemcount(1009) == 1 || itemcount(1010) == 1 || itemcount(1011) == 1 || itemcount(1012) == 1) && $itemcount(1002) == 1 && $itemcount(1003) == 1 && $itemcount(1004) == 1) { say("Praise you $name - I knew that you would be victorious. I reward you with this armour and pray that it will help you in your fight against the unholy forces of Norrath.")
summonitem("1016")
level("$userid","65") }
}
EVENT_DIE {
say("Noooooo, fool! That will not free me, I will simply resurrected by The God of War, and trapped again!")
me("King Zaixeleks spirit rises up into the air and is consumed by the spirit of war.")
level("$userid","60")
}
EVENT_SPAWN {
shout("Please somebody rescue me! I beg of you! You shall be greatly rewarded!")
}
/* Zone:arena ID:178204 -- King_Zaixelek */
/*END of FILE*/

Everything appears to be fine there. The only thing is...still no response from Kinggy when he's hailed. I have the file stored in:
C:\EQEmu\quests\arena
with the file name
178204.qst
(Both there are correct for location / spawnID thing)

No response! Is it something to do with the database...do I need to download something and source it in? Do I need to put anything in the quests folder...?

Thankie again, Monny.

killspree
03-31-2003, 08:50 AM
You have commas in your dialogue, if you aren't using the latest CVS then it will NOT work.

Monrezz
04-02-2003, 04:16 AM
Okay, removed all commas and it works now! (Yey - thanks all!). But...


The item turn in is a little iffy. When you go to Kinggy and Hail him, and give him the 4 bits of armour you get the reward (Item 1016). But you also get the reward if you hand him 3, 2 or even 1 bit(s) of armour. I'm not sure why. It may be because I have all the armour on me, because of this bit here:
if ((itemcount(1001) == 1 || itemcount(1002) == 1 || itemcount(1003) == 1 || itemcount(1004) == 1 || itemcount(1005) == 1 || itemcount(1006) == 1 || itemcount(1007) == 1 || itemcount(1008) == 1 || itemcount(1009) == 1 || itemcount(1010) == 1 || itemcount(1011) == 1 || itemcount(1012) == 1) && $itemcount(1002) == 1 && $itemcount(1003) == 1 && $itemcount(1004) == 1)
I presume "if (itemcount(1001) == 1)" only checks to see if the hailer has the item, not if it has been used in the turn-in? If so, someone who has managed to kill The God of War, and has got pieces of armour off him could just hand in one item and get back the breastplate? (1016). This kinda defies the whole point of handing in 4 pieces of armour hehe...so how would I make it ANY 4 pieces of armour (1001-1012) in ANY slot (1,2,3 or 4) will return 1016. e.g.

Handing in item 1014 in slot 1, 1012 in slot 2, 1010 in slot 3 and 1009 in slot 4 works.

Handing in item 1001 in slot 1, 1002 in slot 2, 1005 in slot 3 and 1010 in slot 4 works.

But...

Handing in item 1014 in slot 1 does NOT work.


Thank you (yet again :P ),

Lurker_005
04-02-2003, 04:54 PM
noticed 1 bug, the items in the inner () with || should not also be outside that section 1002 1003 1004 are listed twice.

if ((itemcount(1001) == 1 || itemcount(1002) == 1 || itemcount(1003) == 1 || itemcount(1004) == 1 || itemcount(1005) == 1 || itemcount(1006) == 1 || itemcount(1007) == 1 || itemcount(1008) == 1 || itemcount(1009) == 1 || itemcount(1010) == 1 || itemcount(1011) == 1 || itemcount(1012) == 1) && $itemcount(1013) == 1 && $itemcount(1014) == 1 && $itemcount(1015) == 1)
so 1013, 1014, and 1015 should always be needed along with ANY one of 1001-1012


The length could be throwing it off, try testing with just 2 items in the || section
if ((itemcount(1001) == 1 || itemcount(1002) == 1) && $itemcount(1013) == 1 && $itemcount(1014) == 1 && $itemcount(1015) == 1)

see if 1001, 1013, 1014, 1015
or 1002, 1013, 1014, 1015 work in any order
But nothing else should

killspree
04-06-2003, 06:04 PM
If commas don't work for your server, most likely neither will $itemcount - so if possible, try to get the latest CVS...commas work and you can use $itemcount.

Monrezz
04-07-2003, 03:31 AM
Where could I find the latest CVS?

EQEmu @ Sourceforge?

Which page please :D

killspree
04-07-2003, 03:54 AM
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/eqemu/

NOTE: This is the source - you'll have to compile yourself.

Monrezz
04-08-2003, 03:28 AM
How would I go about doing that :D

zephyr
05-10-2003, 11:11 AM
What does itemcount DO exactly? what does it return? and what does $itemcount return?

Warlon
05-16-2003, 09:57 AM
hey morezz since you retired, can I have yer stuff?
lol I want it badly too

xelnagan
05-16-2003, 08:48 PM
He probably cancelled his account Warlon.

- Xelnagan

Monrezz
05-17-2003, 12:15 AM
Sorry, I cancelled my account :wink: .

I haven't retired, just I gave up hosting my own server (Can't do a lot on 56k :evil: ).

I'm playing on Killspree's server now, great fun.

What do you mean by stuff? The database? I put that up for download. Everything else came with the 4.3 release of Emu.