When it comes to c++, i'm still at the "what if" stage; you know, "what if i took this line here, and put it there ...", "ooops! doesnt work now" . Ok then, "What if ...", or "what if ...".
This can go on for days, and is an indicates i don't know a rat's-ass of what I'm doing :). Probably, it's sort of a "romantic" era of programing, when something actually works , it feels like a child finding the prized easter-egg in a Easter-hunt. Eventually, all the pieces of C might begin to fall in place, then I'll move into the "What does this mean?" stage, which can be very annoying to some people. Anyways, I hope you all figure it out. I must have made 50+ pl's that use quest_globals. |
This maybe off base, but I think the reason that the items are getting deleted is because the expdate field should be set to the current time, in UNIX_TIMESTAMP format, + the number of seconds you want to retain it. Setting it to 0, as in the examples, will result in the code deleting the rows because of the condition.
Are you trying to create infinite timeouts ? If so then this would be a simple fix to the SQL, just with an expansion on the condition so that it read; where (expdate < UNIX_TIMESTAMP() and expdate != 0) This would allow for expdate=0 to be inifinite, assuming its just the timeout that is at fault. |
I made these changes in questmgr.cpp and compiled/tested
Code:
"DELETE FROM quest_globals WHERE expdate < UNIX_TIMESTAMP() and expdate != 0) || (name='%s' && npcid=%i && charid=%i && zoneid=%i))" Code:
"DELETE FROM quest_globals WHERE expdate < UNIX_TIMESTAMP() and expdate != 0) || (name='%s' && npcid=%i && charid=%i && zoneid=%i))" |
Quote:
|
Quote:
Believe me, my time is *much* better spent with MySql database and Perl quests. |
Angelox I regret to inform you that I've destroyed your quests for the tutorial :p
I'm in the process of re-writing them to flow like the live server does.. if you're around... im gonna be playing with them on the Allendium EQ server here as soon as i boot it back up :) |
Quote:
And, I hope you feel inclined to become more of a "public servant" and post for all. EqEmu is in desperate need of programmers, zone-spawners, perl-questors , in a "public" manner. |
Unfortunately i had to write all but 1 of them from scratch. I built the quest globals into them this time around. So now you have to speak to arias, then absor, then vahlara etc etc till you have finished the orientation... then you speak to arias again and get the kobold charm just like on the live servers. :)
once i have all the other quests finished i'll release them in a zip pack |
Quote:
|
I sympathize, eq4me. We had so many v1's out the door the last month, and my own product I am the lead on (just shipped last Fri), I barely had time to harass the noobs here lately. I think we're clear to have a life until Jan 2nd, to start meeting the unrealistic Q1 sales goals.
|
I'll take a look at it again later today, been called into work to fix a mail server issue even though I was on holiday. So I know exactly what you guys are on about. :)
|
Ok, there were three places that deleted from global_quests by time, there are others which don't use time and don't seem to be relevant in this situation. Using your test data Angelox, and assuming you were trying to get an infinite timeout, then I believe I have achived the objective with the patch which can be found at;
http://www.totalcynic.plus.com/globa...o-expire.patch This requires patch -p1 to be used, but what doesn't :) Give this a try, and if all is well and no one objects, then I will submit it into the development area for inclusion in a future release. It just makes the expdate of 0 never timeout, and also includes the SQL fixup for MySQL 5.1 with the items query. I would, though, recommend using a timeout as this allows for the code to automatically manage the data set, and helps keep the number of rows in the table down, which helps to speed up look ups. If your doing a direct insert into global_quests have you tried using something like "UNIX_TIMESTAMP(date_add(now(), INTERVAL 7 DAY))" for the value of expdate, which sets it to 7 days into the future. Hope this helps. |
Quote:
|
Sorry to be late on this-
I have patch, but I guess I don't know what I'm doing (common coming from me), as It doesn'y work, I did look at the patch file and changed the lines I saw there. Maybe in the future (if you still want to do this) compress/post the changed files and Ill replace here. I've tested as best I could, and here's the results; when i first logged in the zone, The table held out, intact. Then I went to an Npc that use QGlobals, and hailed; just a snip; Code:
sub EVENT_SAY{ one of the two; Code:
sub EVENT_SPAWN It worked a little with your fixes, but is still broken. this works one time; Code:
if (($text=~/hail/i)&&(${$name}!=2)){ this works; quest::delglobal("amote"); this doesn't quest::setglobal("amote","2","3","F"); And even with the global set it goes to a flag where you keep getting duped with charms. Here's the full pl so you understand the globals I did there; http://www.nahunta.org/~angelox/files/Vahlara.pl |
Ax, let me chime in for a moment. I ran the Wizard Epic quest, Camin NPC in Erudnext to be exact. He sets a quest global when you hand him 1000pp. Before my test, I had no records in the table. After handing him the 1kpp, a record was inserted:
Code:
id 1 Code:
quest::setglobal("wizepic",1,0,"D30"); To delete the global, you hand him Ro's Breath (item 14330): Code:
#Ro's Breath handin I removed that check, and the script (including the delglobal) works perfectly. So, this worked: Code:
#Ro's Breath handin I also turned on #mlog setcat QUESTS on to see what shows up. I am getting feedback in eqemu_quest_zone.log that looks like this: Code:
5685 [12.28. - 21:50:08] Use of uninitialized value in numeric eq (==) at quests/erudnext/Camin.pl line 14. Not completely sure what that means. I'm a bit sleepy, so the test on int($wizepic) is the only thing I find that's failing right now. Does this jive with what you're finding? |
All times are GMT -4. The time now is 03:23 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.