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.
|
That part isn't wrong. Test it. I have, and it works fine.
|
works fine for me too.
perl parses the $item1 into the proper number before it's processed. |
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.
:?: |
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. |
Guess I'm jsut getting my languages confused, sorry. I know 5 different programming languages and sometimes it all gets smeared together.
|
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.
|
ah crap you're right i didn't think of that...
hmm |
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.
|
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!
|
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?
|
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.
|
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.
|
Quote:
|
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. |
All times are GMT -4. The time now is 11:08 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.