|
I have been reading the perl book and I got to the part of Hashes, Arrays, Scalars etc and after reading about it I decided to give it a shot.
I have it working, but I just have one issue with it... It makes it into a paragraph format. I am wanting have it in a list format, and it seems the \n doesn't work within an array. Here is my quest file: Code:
############ http://img833.imageshack.us/img833/1086/arrayp.jpg http://img833.imageshack.us/img833/1086/arrayp.jpg I am still reading the Perl book, but I was trying to implement what was shown in real-time vs practice exercises so it would stick a little more. I understand the concept of everything so far, but like I said, I am trying to figure out how to make it list format. I have tried the following methods so far: Code:
CHARM => quest::varlink("1118") Code:
CHARM => quest::varlink("1118" Code:
CHARM => quest::varlink("1118 Also if I do the following, it returns "syntax OK", but it shows no results in EQ. Code:
CHARM => quest::varlink("1118"), Thanks for any responses. ~Kingmen |
The client won't allow you to start a new line in the same message (it won't even display multiple spaces next to each other). You just need to do a for each loop through your array and send a message for each entry in the array.
|
Dang. Alright, well I was hoping that I wouldn't have to do that. I suppose that I am going to have to hold off till I get to the part about foreach as I don't want to confuse myself. ~_~
Thanks for the answer Trev. ~Kingmen |
GetItemInInventory
I was going through the possible $client commands located here, and I noticed one that I was really interested in:
Code:
$client -> GetItemInInventory When using google to search for any reference to this (eqemu getitemininventory), it returns with the changelog.txt file which I saw the following: Code:
KLS: Added ability to retrieve items from the inventory in perl with $client->GetItemInInventory(slot_id); Here is my script I am working on right now. The entire script works except for the part in black. Code:
###### Thanks for any replies, ~Kingmen |
your arrays don't make any sense. what exactly is it you are trying to do there?the method you are trying to use takes a slotID as an argument.
http://www.eqemulator.net/wiki/wikka...InventorySlots |
Right, that is what I was saying. I am looking for a command that will allow me to automatically search the players inventory and then get that item from them without the use of them manually turning in said items.
My arrays I have set up I could probably clean them up a bit more as I have read a bit more on Perl and could maybe make it look more like: Code:
@diamond ( Basically what I am wanting to do is on my server create another form of currency and assign it to an NPC with classid=70 (Alternate Currency Merchant). By doing so it will allow me to place items throughout my server that other players will be able to collect, speak to the npc and in turn automatically claim whatever items match that of the list I have composed, thus either returning an item to show their progress, or simply updating thier "credit" with the npc. I could use the credit system that Akkadius has composed, but I would rather limit the use of it to NPCs that I am going to use to charge players for certain items, or buffs. But to make a long story short, I am looking for a command that I can use to just take the items from the players' inventory without having them manually turn in say, 100 items, 4 at a time. Thanks, ~Kingmen |
you're wanting to use something more like this, where @findThese is a list of itemIDs you are looking for and @lookIn is a lost of slotIDs you want to look in.
Code:
foreach my $findThis (@findThese) { |
Quote:
|
i'm not sure how how you would determine the stack size of the item in the current slot. i know how you can find charges, but i'm not entirely certain that is the same thing.
|
Quote:
When I first started this, I had my custom Food and Drink items set at 1 charge each and when I created a character, it only showed 1 of each item. I later changed the stacksize of the item within the database and then changed the charges in start_items table to reflect the new stacksize which upon creating a new character revealed the appropriate stacksize I was intending from the start. I might have it wrong, I don't know. I am still learning the "ropes" of Perl and database editing, but I am going to try and pair table_names/columns with certain variables till I get one that works. Thanks c0ncrete, ~Kingmen |
Stack size and charges are the same thing. Just depends on is the item is marked as stackable or not whether it shows as charges or increases the stack.
|
Quote:
The NPC will delete the items, but they aren't removed. In fact what happens is when I go to pick up the stack of items, I get the following: http://img15.imageshack.us/img15/9199/errortakeitem.pngHere is my script so you can look at it yourself and tell me if I did something wrong. This also happens on single items as well. Code:
###### Thanks, ~Kingmen |
http://www.eqemulator.net/wiki/wikka...a=QuestObjects
these are all of the available parameters Code:
$client->DeleteItemInInventory($slotID, $quantity, $updateClient) you probably want to change client_update to true (1). Code:
$client->GetItemAt(slotid)->GetCharges() |
Almost Working
I have been working on this script on and off for a bit now when I am not doing something else on my server, however, it appears that I cannot get ONE thing to work in the script that I am wanting.
Here is the script: Code:
####### As I stated above, all else in the script works fine (See picture below) except for the item link. I was originally against posting this for help, but I know that I am missing something stupid, and as I am still learning perl and all of her commands, I figured I would post it for someone to tell me where I am going wrong. http://i215.photobucket.com/albums/c...emiworking.png http://i215.photobucket.com/albums/c...emiworking.png A pre-thanks to those that reply. ~Kingmen |
All times are GMT -4. The time now is 06:20 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.