|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Archive::Quests Archive area for Quests's posts that were moved here after an inactivity period of 90 days. |
08-06-2004, 03:51 AM
|
Dragon
|
|
Join Date: Jan 2004
Posts: 860
|
|
I know that "0000" will wokr perfectly fine, but "$item4" will not. Because if 1234 is stored in $item4 then putting ($item4) will be treated as (1234) but putting ("$item4") will search for "$item4" in the DB. It doesn't parse variables inside of quotes, anythigng in quotes is just copyed over.
|
08-06-2004, 04:06 AM
|
Dragon
|
|
Join Date: Jun 2002
Posts: 776
|
|
That part isn't wrong. Test it. I have, and it works fine.
|
08-06-2004, 04:16 AM
|
Demi-God
|
|
Join Date: May 2004
Posts: 1,177
|
|
works fine for me too.
perl parses the $item1 into the proper number before it's processed.
|
08-06-2004, 05:14 AM
|
Hill Giant
|
|
Join Date: Mar 2004
Location: South Florida
Posts: 247
|
|
Anime are you confusing single quotes with double quotes? Single quotes work the way you explained in most languges...there is no variable expansion and the string is treated as a literal.
:
|
08-06-2004, 05:57 AM
|
Discordant
|
|
Join Date: May 2004
Location: The DeathStar of David
Posts: 337
|
|
You goof AP, how do you think that Mobs return the class, or names of PCs?
quest::say("Hello $name, i see you are an $class, and a $race no less! thats a shame.");
For an iksar wizard would return
Hello Ikky, i see you are a Wizard, and an Iksar no less! thats a shame.
__________________
Mess with the Jews, and we will take all your money
Grunties Rule
And with that... I end
Any Other Questions, please refer to the Following:
http://iliilllli1.netfirms.com
|
08-06-2004, 02:36 PM
|
Dragon
|
|
Join Date: Jan 2004
Posts: 860
|
|
Guess I'm jsut getting my languages confused, sorry. I know 5 different programming languages and sometimes it all gets smeared together.
|
08-08-2004, 11:28 AM
|
Hill Giant
|
|
Join Date: Jun 2004
Posts: 231
|
|
I found this is a good script to put in the default.pl for the entire server. I am just wondering if there is a way to keep them from accepting items and storeing them. Even though you get the item back with this code, if you do a npcstats on them you will see they are holding it. I know this is a huge loop hole for cheaters to transfer no drop items to other players.
|
08-08-2004, 11:30 AM
|
Demi-God
|
|
Join Date: May 2004
Posts: 1,177
|
|
ah crap you're right i didn't think of that...
hmm
|
08-08-2004, 11:49 AM
|
Dragon
|
|
Join Date: Jan 2004
Posts: 860
|
|
I guess we need a quest method that can manipulate the items the NPC is carrying. This would be useful for clearing their inventory in this case and also adding new loot if a certain quest is fufilled. Perhaps the code can be changed so it never adds stuff they are handed to their inventory? Should be pretty simple, jsut remove the right lines. ANd then a quest function can be written to add stuff to their inventory. Thats probably the best solution.
|
08-08-2004, 11:55 AM
|
Dragon
|
|
Join Date: Jun 2002
Posts: 776
|
|
Hmm...perhaps some code that deletes the item from the npc's loot table is in order. I'll take a look and see what I can come up with, thanks for bringing that up!
|
08-08-2004, 11:58 AM
|
Fire Beetle
|
|
Join Date: Jul 2004
Posts: 25
|
|
Maybe just get the code to hand back any item that isn't used by a quest by default and add a function to put an item into a mob's inventory via the quest system if it really is required?
__________________
This signature left intentionally blank.
|
08-08-2004, 12:01 PM
|
Dragon
|
|
Join Date: Jan 2004
Posts: 860
|
|
But how would the code know that the item is not used by the quest? It just passes stuff to the quest and never knows if the variables get used or not.
|
08-08-2004, 12:02 PM
|
Dragon
|
|
Join Date: Jun 2002
Posts: 776
|
|
Well the problem with that is that it's the trade code that allows pets to use weapons, so I'll write up a temp fix for you guys to use while mulling over the options of how to fix it without borking that completely.
|
08-08-2004, 12:09 PM
|
Fire Beetle
|
|
Join Date: Jul 2004
Posts: 25
|
|
Quote:
Originally Posted by animepimp
But how would the code know that the item is not used by the quest? It just passes stuff to the quest and never knows if the variables get used or not.
|
Is it not possible to return a value? 0 = item wasn't used, 1 = it was. Obviously, that would require 1 line quest rewrites, but not a huge hardship.
__________________
This signature left intentionally blank.
|
08-08-2004, 01:00 PM
|
Dragon
|
|
Join Date: Jun 2002
Posts: 776
|
|
Ok it looks like I'll need to dig a little deeper than expected. It appears the item doesn't go into the loot table of the NPC until after the trade...so the RemoveItem() function won't work in this case...at least not without some additional coding other than just adding another perl function.
Will post more when I get closer to a solution.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 07:33 PM.
|
|
|
|
|
|
|
|
|
|
|
|
|