Possibly a few questions.
I am in the middle of working on a quest, but the only thing that I cannot seem to get working are the skills section. Everything else is working just fine. (I tested each piece as I was writing it to insure it's working state.)
Here is what I have so far: Code:
Does the command no longer work, or am I simply using it in the wrong manner? I followed the usage from here. Also, I was wondering about something else. On the plugin::check_handin*** I have it set right now as: Code:
if(plugin::check_handin(\%itemcount, 9989 => 1)) Code:
if(plugin::check_handin(\%itemcount, 9989 => 1, 9990 => 1)) Thanks, Kingmen |
have you tried a number other than 250 to see if that works?
i've never used quest::setallskill() as i'm not a fan of setting all skills to the same number, especially if the character isn't supposed to be able to use a certain skill or have it go over a certain level due to race or class limitations. you can use something like this to limit skills by race, class, and level: Code:
foreach my $skill ( 0 .. 74 ) { yes, that's the correct way to use check_handin() |
someone needs to export the routine used by #maxskills that one is useful.
the max is 4 as prior to RoF the system was never designed for stacked items to be turned in. |
yeah, limiting spell casting specializations to 50 is a good idea. i hadn't considered that.
|
Thanks.
I am in the middle of working on repopulating a zone (corathus) with some custom mobs/content, but one of the things that I am having issues with is when I create the NPC, and I try to set the race to one of the ones that was currently being used, the mobs stay a human. However, I can use #race # to make them look like the race that I want, and I am not sure how to set up a perl file to allow me to make them cast it on themselves when spawned. Thanks, Kingmen |
if you can set the correct race via in-game command, i'd recommend looking at the related entries for that npc your database instead of putting a perl band-aid on the issue.
|
Quote:
Thanks for all your help though, it is greatly appreciated, and you have been really helpful and quick to respond to me c0ncrete. Thanks. |
this should take care of spell casting specialization skills correctly.
i haven't tested it yet, but the syntax is correct and the logic looks sound. Code:
use List::Util qw(first); |
I don't know if the emulator supports all the same features as live as far as specialization goes, but there is an AA to allow a second specialization that caps a bit higher, and the specialization caps rise as you level.
So, as an example the caps for first, second, and the rest are 256, 155, 105 at level 81. |
challenge accepted!
|
Quote:
What I am really wanting to do is make it a quest in the end. For the lower levels, you can just hail him, and he will set your skills to around 50 or so to start off with. Later, if you want, then you can do a quest and make them max level. I don't really care if the person is using skills not normally aquired by that class, but I am just wanting it to where thier skills can be maxed outside of skilling it up, like Meditate, or Specializations or something of that caliber. Here is my quest file so far. The only thing missing from it is where I would appoint skills. Code:
########## As I said, I was really hoping to do a quest to max out all the skills later without having to write out each skill code. Example Code:
$client->SetSkill(#,#); Kingmen |
commented, to hopefully help you sort out exactly what it is you want to remove/change.
Code:
# do this for skill number 0 through 74 |
Quote:
Here is the modified script: Code:
########## If I leave the $max = $client-> .... where you have it in the original, NPC still will not talk to me. I don't know what I am doing wrong to be honest. Sorry for the annoyance with this, I truly am trying to learn this the best that I can. I can do everything else just fine, spawn mobs, create tasks, etc, etc... but it just seems that any of the skill commands I get from here just either don't work, or don't wanna work. Which I am not sure. Thanks, Kingmen ===EDIT=== I have found a temporary work around for the skill trainer, but I am going to mess with it some more until I find a more workable command/script for it. Here is what I have: Code:
########## After messing with it some more, here is what I have come up with so far that will work for what I am trying to do... It is VERY sloppy, but I am hoping that I can alter this through Hashes? Code:
########## Thanks, Kingmen30264 |
in Perl, every time you use the my keyword, you are declaring (creating) the variable that follows within the scope you are in. additionally, every time you use =, you are assigning a value to the left operand.
i don't mean this as an insult, but i would suggest you spend a little time learning some basic programming concepts before continuing further. it will likely be immensely helpful to you to be able to write and run Perl scripts outside of the emulator environment so you can test ideas or debug issues that you may have without having to launch the server or the client whatsoever. there is some very good material freely available here to get you started: http://www.perl.org/books/library.html |
Quote:
Since you have showed me that, I have been reading up on Perl and researching various commands to learn a little more in each "area" and in doing so, I was able to learn a few more "tricks of the trade", if you wanna call it that. Here is what I got: Code:
foreach my $skill (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, Code:
perl -wc script.pl Thanks for the link(s) to perl, they are extremely helpful. ~Kingmen P.S. I know you know the command(s) to perl and whatnot, but I am adding this in here in case someone like myself who is new to this can see what I did, and implement it themselves. A lot of the time when I go to search for something, someone will find the answer and not post it. They will only say, "I solved it, thanks!" and not post what they did to solve it. |
|
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 09:38 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.