PcPocket
-
Content Count
12 -
Joined
-
Last visited
Posts posted by PcPocket
-
-
Oh, never noticed that, thanks
Anyway, is there a way to filter from all categories at the same time?
If not, it would be nice, but nothing mandatory, just have to open a few tabs haha
Thanks! -
Title says it all, able a option to find topics by it's tag on Bug Tracker, so we can see all confirmed/fixed bugs.
-
Yes, Shell Script + Crontab
-
Yeah.. the system I'm working is a BG system too.
I use queueremove on everybody on the queue when it is full enough to start the match.
And queueopt to call a function that will remove the player from the queue ( on the 3 options, move from map, die or logout ).
After I player 2 modules, the queue gets to -1. I will do some tests to figure out whats the reason. If I don't find out, I will patch in the source to never get it below 0 haha.By the way, queue check command:
bool script_hqueue_check(int idx, int var) { if( idx < 0 || idx >= script->hqs || script->hq[idx].size == -1 ) { ShowWarning("script_hqueue_add: unknown queue id %dn",idx); return false; } else { int i; for (i = 0; i < script->hq[idx].size; i++) { if (script->hq[idx].item[i] == var) { return true; } } return false; }}BUILDIN(queuecheck) { int idx = script_getnum(st, 2); int var = script_getnum(st, 3); script_pushint(st,script->queue_check(idx,var)?1:0); return true;}
They may want to invert the 'true' and 'false' returns, as all queue commands return 0 upon success ( why? I don't know )
And of course, the rest.
BUILDIN_DEF(queuecheck,"ii"),
script->queue_check = script_hqueue_check;
script.h
bool (*queue_check) (int idx, int var);
@Edit
I found out the piece of code causing it.function Players2BG { .@queue01 = queueiterator(getarg(0)); for (.@elem = qiget(.@queue01); qicheck(.@queue01); .@elem = qiget(.@queue01)) { announce "Adding player"+.@elem+" from queue"+getarg(0)+" to BG Team "+getarg(1),8; player2bg(getarg(1),.@elem,$@BG_Status); queueremove(getarg(0),.@elem); // Removes from the queue } return;}
Then, the second time I go to the battleground ( the first one works fine ):
(
( the announce is in portuguese in the picture )
getarg(0) = Queue ID
getarg(1) = BG Team ID
I'm almost sure that I'm missing a qiclear in the end of the function, will test it now, must solve it.
But.. I still think that the number of elements in the queue shouldn't be able to be lower than 0.
@edit2
Yeah.. qiclear didn't solve the problem.
I tested something new, I put 'queueremove($bgTeamQueue01,-1);' in the top of npc script, so everytime I click on it, it attempts to remove a non-existant value from the queue.
Result: After I played one match, every queueremove, lowered the queuecount by 1. So if I click 10 times, npc show that queue has -10 members..
This just works after I play once ( so Players2BG gets called ).
Trying to figure out why.
@edit3
Yeah, there is a bug in queueremove command, trying to fix, post here soon.
@edit4
Aparently, queueremove isn't actually removing a value from the queue, but changing it value to -1? -
Sorry for the wrong area haha anyway, how does this work? Somebody from developer team visit this area?
Well, another thing..
I just finished my system, and I noticed that my queuesize is return -1 after some actions. I use queueremove when player die/change map/logout, maybe this is causing the queue counting to be reduced twice.I don't know, I just know that a queue can't ever have a size smaller than 0.
-
1)
*qicheck(<queue_iterator_id>);
checks whether there is a next member in the iterator's queue, 1 when
it does, 0 otherwise.
It's a command for the iterator, not to check if a value is in the queue.
2) Yeah, I tested it now. There is no need for "queuevalues", I mean.. it would be nice, but you can do it with queueiterator.
I remain with my main suggestion -
A very simple command for the queue system, very easy to do, but it isn't available
queuecheck( queue_id, value );
return 1 if the value is found in the queue, 0 if not.
queueremove and queueadd does this checks, but you don't have the option to do the check without actually add / remove the value from the queue.
Other thing that would be very usefull.queuevalues( queue_id );
returns all the values from the queue as an array. I haven't tested queue iterator yet so I don't know it's behavior, but from what I read I read from the docs, I can't do something like 'setarray .@list,queueiterator(queue_id);', if I can, than do not consider this suggestion, just the above one. -
Suggestion: Make it for item / mob database as well. Thanks
Server side's item DB has no text for the items other than a name that goes unused client side. All seeable item information via the client (except its bonuses) are managed on the client side DB. And why translate mob db?
Suggestion: Make it for item / mob database as well. Thanks
Server side's item DB has no text for the items other than a name that goes unused client side. All seeable item information via the client (except its bonuses) are managed on the client side DB. And why translate mob db?
when spawning a monster via command it will be translated
So you can use @mobsearch, @monsterinfo, @iteminfo, using their names in your language.
-
Suggestion: Make it for item / mob database as well. Thanks
-
You can do it by inserting a new row in the 'mail' database table.
Anti WPE - Packet Obfuscation
in General Server Support
Posted
dat frog looks suspicious