A little more progress on the pet thing.
The entire delete/save process (creating a new blank entry in table `character_pet_info`) for the DB in one spot. This eliminates running a couple unneeded queries from using the <SavePetInfo> function. The pet window still appears on client. I don't know if this is avoidable by doing the norent check somewhere earlier in the process. It's not a big deal unless there is a cleaner/more efficient way to do this. \client_process.cpp Code:
bool deletenorent = database.NoRentExpired(GetName()); Code:
void ZoneDatabase::DeletePetInfo(Client *client) I understand my tinkering may have caused some of this but, I'm curious to know the purpose of this. Thanks EDIT: Not sure if I mentioned this before. I had to add the line below when I created the item in \zonedb.cpp. Can't take it for granted. \zonedb.h Code:
void DeletePetInfo(Client *c); |
Good day.
I created a rule to force training of certain melee skills. The intention is to only force training if the skill is acquired after level 1. For Riposte below, \zone\attack.cpp(412) Code:
if (IsClient()) { This question applies to several similar issues I had concern about. Thanks |
If there's nothing left to process in the function after your 'else if' and the exclusion can be caught with an 'else' or another 'else if' statement, you can simply handle it with a 'return' statement.
Otherwise, you might consider putting your post-con check code inside of a single con check that meets all of the requirements for that code to be processed. |
Thank you sir.
Quote:
Quote:
I can't find it but I thought I saw an instance where <else> was used with nothing between { } except spaces. EDIT: Here but this may not apply to my issue. Code:
else { |
Just wasted code space..though it may be there, with a remark, to indicate what is happening to arrive there or an area for future implementations.
The compiler will probably optimize out that particular else clause since there is nothing being processed. |
Gotcha, thanks.
|
I've tried a different approach with no success, so I try here:
I'm trying to come up with a script which, I hope, will summon a corpse using the necro spell, id = 3 (summon corpse). I've looked at the Dragons of Norrath and the guild lobby quests and they will no do what I want them to do. I want to summon a corpse with the same behavior as the NEC spell "summon corpse". Everything appears to work except self targeting. Since the npc is targeted at the end of the script and the spell is self (player) cast, the text stating "Your target must be a group member for this spell." appears. I've also tried to change the actual spell effect code. Below is what I have so far with <location of target code> to indicate where I think it should belong. Code:
-- global\a_dungeon_necromancer.lua NPCID If anyone knows how to accomplish what I am trying to do, please share. Thanks |
I do not even know why I am trying to help you at this point, but whatever.
You never explained WHY the guild summoner scripts could not be modified to do what you want. I mean they summon all of the players corpses. How does that not work? |
Quote:
If I knew how to alter <EVENT_SUMMON();> to only work in specific zones or with specific corpses, I would not be asking the question. Maybe it's clarification I need. I don't have much knowledge of scripts and this is why I asked the question to begin with, hoping, someone could clarify this. |
$client->SetTarget($client);
That's all that was needed in the .pl file. Code:
# global\a_dungeon_necromancer.pl NPCID PS. Could use a writer. |
Feel free to try this have no idea where npc location or for what zone i had no way to test this perl script.
a_dungeon_necromancer.pl Code:
EVENT_SAY { |
Thank you Noport.
|
I added a mechanic to <channelchance> and am wondering if it looks right or if it could be done better. It may be a little confusing but the purpose was learning as much as adding this code. It's an exercise in futility trying to channel at lower levels and the added mechanic mitigates this a bit. It also reinforces those who practice skills when they level, like the old days.
Also, the <distance_moved> and <distancemod> formulas do not do as advertised. The idea seems proper but the implementation is off. I will add to this my results when I get to it. The big thing I am wondering is if the code in the header is returning the value for the previous level max skill. This mechanic seems to work upon initial testing. \zone\client.h(695) Code:
inline uint16 PrevMaxSkill(SkillUseTypes skillid) const { return MaxSkill(skillid, GetClass(), GetLevel()-1); } Code:
// max 93% chance at 252 skill EDIT: here is a visualization of the behavior http://prnt.sc/8s311y The blue line is the current, unadjusted channelchance. The lower red function is the formula I added. The upper red function is max skill channelchance after adding the the formula. |
Quote:
|
All times are GMT -4. The time now is 11:55 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.