Get joined users in waitingroom by using ‘getwaitingroomstate’ – Free Code!

My ragnarok friend had a question Is it possible to get player info of players as they enter waitingroom?. A simple answer, “possible, but I didn’t see any current script commands can be used for it”. Current possibility maybe when waiting room triggers the attached event when specified player is joined.

*waitingroom “<chatroom name>”,<limit>{,”<event label>”{,<trigger>{,<required zeny>{,<min lvl>{,<max lvl>}}}}};

Currently only 1 available command to get waiting room info, it’s getwaitingroomstate. But, there’s no type to get joined user in the waiting room, type 0 only tells us how many user joined.

A simple source modification for your ragnarok server! A modified script command -getwaitingroomstate- with custom type value will gives list of joined users! Well, before that I just don’t know why the current types are random, 0, 1, 2, 3, 4, 5, then 16, 32, and 33. It makes me also add random type value, it’s 99!

Type 99 of getwaitingroomstate will return joined user -just like type 0- and also arrays of AID, CID, and names of joined players. The arrays are

.@waitingroomuser_aid[] – Player’s account id
.@waitingroomuser_cid[] – Player’s character id
.@waitingroomuser_name$[] – Player’s name

It can be used such

.@joined = getwaitingroomstate(99);
if (.@joined) {
// Listings the user here
} else {
mes “No one joined yet.”;

Simple? I hope so.

If there’s question, why don’t just expand the type 0 to gives joined user list, just because I won’t disturb the previous script command, just don’t give it extra work for nothing.

Some screen shots of getwaitingroomstate type 99

Get joined users in waitingroom by using getwaitingroomstate – Free Code!

Download “getwaitingroomstate for joined user” .patch file for eAthena

Download “getwaitingroomstate for joined user” .diff file for rAthena

Download “getwaitingroomstate for joined user” .patch file for 3CeAM

Download “getwaitingroomstate for joined user” .patch file for Hercules

*Above are Mediafire links*

Tell your friends

Leave a Reply