|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Quests::Q&A This is the quest support section |

11-26-2011, 11:23 PM
|
 |
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
quest::itemlink(item_id)
I seem to be having trouble with this quest function throwing a segmentation fault.
A simple....
quest::itemlink(item_id)
quest::varlink(item id)
Either one, even just trying to do a say or shout with a cloth cap, 1001 will bring the zone down.
|

11-27-2011, 02:50 AM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,742
|
|
Both work fine for me when used like this:
Code:
sub EVENT_SAY
{
my $cookieid = quest::varlink(19732);
quest::say("Yum, [$cookieid]");
quest::itemlink(19732);
}
Hard to say why it might be crashing for you. You'll probably need to debug it to see where it crashes for anyone to help you.
|

11-27-2011, 09:12 AM
|
 |
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
Pretty easy what I was doing wrong, luckily you posted your entire subroutine and that helped me see what I was doing wrong.
I did not have mine in an EVENT_SAY routine. I was actually trying to get the npc to do random announces in the zone. If I try to put that command just anywhere, as soon as it fires the zone goes down. I guess it is crashing trying to figure out who the say is with ?
This sucks because I was trying to do an announce randomly, not just when someone hails them.
|

11-27-2011, 09:28 AM
|
 |
Developer
|
|
Join Date: Mar 2003
Posts: 1,498
|
|
You can use a timer with a random time value.
|

11-27-2011, 09:29 AM
|
 |
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
Oh, the timer is not an issue, I have that part perfected. What I am saying is if you use that item link code anywhere else, the zone goes down.
|

11-27-2011, 10:00 AM
|
 |
Developer
|
|
Join Date: Mar 2003
Posts: 1,498
|
|
I'm getting at you can call your EVENT_SAY from a timer.
|

11-27-2011, 10:02 AM
|
 |
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
I figured that would crash the zone too ? I mean it popped in my head but I figured there were special variables associated with when the say calls the command ? I am about to give it a shot, and then report back.
|

11-27-2011, 10:03 AM
|
 |
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
Yep, only took 30 seconds for the zone to crash.
I did a EVENT_SAY(); from my timer, crash.
|

11-27-2011, 10:47 AM
|
 |
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
It looks like the initiator causing the crash, i will report back when I have it fixed.
|

11-27-2011, 08:03 PM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,742
|
|
The functions that make item links require a client to do so since the generated link is different depending on the client version in use.
|

11-28-2011, 05:24 AM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Yeah, the code just needs to do an if initiator check in the source for that function. Then, if no initiator, it would have to determine which version it wants to use. I was thinking of adding it to just send it out as a SoF+ itemlink by default if no initiator, but haven't made the change yet. Simple fix though. We could add an optional field to the quest command to let the admin decide if they want a Titanium link or SoF+.
I think KLS had some code that would fix all itemlinks to be correct for any client that sees them, but I don't remember what the exact changes were. Ultimately, that would be the best solution.
|

11-28-2011, 09:19 AM
|
 |
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
Slightly off topic, but since I have you here, so to speak.
Where did you learn to code, was it formal like in College ?
I am a hardware / network tech by trade. It has taken me quite a while to get there but I can at least read the code now and make heads or tails about what I am seeing. I am also finding it easier to switch between languages now (php, vb.net, c#, Perl, etc) and other than syntax, I can seem to switch easier than before. 4 years ago there was no way I could read c++, but at least now I can read it, compile it and make changes. I have a seriously long way to go before I am good at it.
|
 |
|
 |

11-28-2011, 12:35 PM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
LOL, no, I learned the same way you are learning. I started my server 4 years ago and shortly after, I started reading the source and making small changes here and there for things I could follow when reading the code. I learned almost completely by example from our source, which is why most stuff I do is just an altered version of something else that exists in the source. Once you have read through it enough and worked on things here and there, it is easier to know what you need to look at to find an example of what you might be wanting to do.
I am certainly not at the level of skill of most of our devs like KLS, Derision, or many of the others. I just have enough time invested in it that I can normally get done with what I need without too much trouble. I think they just tolerate my lower skill level because I am willing to spend lots of time on new client compatibility and adding new features and quest commands. And, I don't break stuff too often
My first big project was definitely to get EQEmu upgraded from Titanium so it could be compatible with SoF. That took an insane amount of time since I knew almost nothing about what I was doing when I first started on it lol. A little googling here and there, and reading the EQEmu wiki helped alot. Then KLS and Derision came in and helped finish the stuff that was a bit too far out of my scope of abilities (like completely rebuilding how items are sent to the client).
|
 |
|
 |

11-28-2011, 01:43 PM
|
 |
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
That is exactly what I am wanting to do.
My motivation is to work on my server for months, or maybe a year and get it to a solo playable level, with just a small amount of people. At some point I would want to open it to the public.
|
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 06:15 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |