AnnieRuru Posted October 23, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted October 23, 2012 while I was stumbling some of my old topics regarding advance SQL commands I accidentally found 1 of the most interesting script that I discontinued http://www.eathena.ws/board/index.php?s=&showtopic=271842&view=findpost&p=1490082 in post#21, got an attachment name guess_me.txt well that time it was unfinished script, and so do now however I search on this board, and haven't found any related topics or maybe someone else already release ? if nobody haven't did this, I might continue and finish it for more information, it is a feature of eamod and I wanted to write my own version Quote Link to comment Share on other sites More sharing options...
java Posted October 23, 2012 Group: Members Topic Count: 25 Topics Per Day: 0.01 Content Count: 251 Reputation: 20 Joined: 12/22/11 Last Seen: July 23, 2023 Share Posted October 23, 2012 yes , u right that chanel system is eamod feature , will u continue ur work ? i think that will be great Quote Link to comment Share on other sites More sharing options...
lakasmonk Posted October 23, 2012 Group: Members Topic Count: 33 Topics Per Day: 0.01 Content Count: 231 Reputation: 24 Joined: 12/18/11 Last Seen: March 16 Share Posted October 23, 2012 i cant wait Quote Link to comment Share on other sites More sharing options...
GmOcean Posted October 23, 2012 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 666 Reputation: 93 Joined: 04/27/12 Last Seen: August 17, 2015 Share Posted October 23, 2012 i remember that topic... i was still a bit noob with sql so, you posted solutions before i could LOL. Even still, you write up scripts far faster than i can D: I say go for it, there have been more topics in regards to Support & Requests for scripts, than there have been for released scripts in recent times. The same may have held true in eAthena, but atleast then there was about 10scripts released daily (despite duplicates). So it'd be nice to see some fresh 'meat' so to speak being put out on the market. Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted October 23, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Author Share Posted October 23, 2012 okies, but I cannot guarantee I can even start this right now my priority seems to gear towards battleground related scripts 1st <-- pls stop buying ... then I'll update all my old scripts from eathena forum to compatible with rathena ... this one might come very late Quote Link to comment Share on other sites More sharing options...
Emistry Posted November 18, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 1 minute ago Share Posted November 18, 2012 Since my test has finished last week...and no assignment task to do....while browsing the forum.....and i saw this topic again..xD so i would like to give this a try haha ~ Script : http://pastebin.com/raw.php?i=0CiT9zY3 TODO : // ==== TO-DO ==== NPC Dialog Lists Add Block User Features ? Add Password Protected Features ? Add Auto Reject Invitation ? Clean the Scripts ..... Preview : Create Room : Join an IRC Room IRC Chit Chat : [MOD] : Able to Invite / Kick users in his IRC Channel. ( Only the 1st User in this IRC Channel will be a [MOD] ) 2 Quote Link to comment Share on other sites More sharing options...
Ryokem Posted November 18, 2012 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 205 Reputation: 19 Joined: 10/12/12 Last Seen: November 7, 2013 Share Posted November 18, 2012 Yeah, I even helped someone doing the "Guild Alliance Chat" somewhere in eA old forum... looks really similar to my script I guess it would be a nice feature to work on, even if already released, so if you have time to spare, you should give it a try Annie. Quote Link to comment Share on other sites More sharing options...
stydianx Posted November 18, 2012 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 390 Reputation: 27 Joined: 07/12/12 Last Seen: October 24, 2022 Share Posted November 18, 2012 (edited) i didn't quite get how to create the room XD i got i now XD Edited November 18, 2012 by stydianx Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted November 18, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Author Share Posted November 18, 2012 WTH !!! you and @GmOcean has already improved so much and started to challenge level2 type event script and algorithm script already ok then ... I think I can safely transfer this script for you to do ... ( but in turn I want to challenge back your party vs party script ... hohoho ... ) well, I still can't comment much on the functionality, because your script also not finish just 1 thing here inside IRC_Broadcast function announce ( ( .DisplayTime )?"[ "+gettime(3)+":"+gettime(2)+" ] ":"" ) + getarg(1),bc_self,getarg(2); better change into announce ( ( .DisplayTime )?"[ "+gettimestr("%H:%M",7)+" ] ":"" ) + getarg(1),bc_self,getarg(2); http://www.eathena.ws/board/index.php?s=&showtopic=181741&view=findpost&p=1329705 Quote Link to comment Share on other sites More sharing options...
GmOcean Posted November 18, 2012 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 666 Reputation: 93 Joined: 04/27/12 Last Seen: August 17, 2015 Share Posted November 18, 2012 Well, Emistry seems to have this down, as all great things, it takes time. Quote Link to comment Share on other sites More sharing options...
Euphy Posted November 18, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted November 18, 2012 Emistry, that looks good! :3 I included a similar messaging system inside my way-overcomplicated Queue System, but it's probably more work to edit that than to write the channels from scratch... Quote Link to comment Share on other sites More sharing options...
Emistry Posted November 18, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 1 minute ago Share Posted November 18, 2012 (edited) @Annie thx for the tips.. for the gettimestr() .... i just dunno what's the usage of the integer inside the gettimestr() ... >.< ( 1 of the reason i didnt choose to use it... another reason is....i forget that it can be use in a way like this.. LOL ) @GMOcean & Euphy thx.... actually i believe i almost done the script already ~ and..agree with Euphy xD ...write from scratch is easier than edit the original script ... use the original script as references and write a new one haha ~ Script : http://pastebin.com/raw.php?i=JgBxTudV TO-DO : // ==== TO-DO ==== // - NPC Dialog Lists // - Add Block User Features ? // - Clean the Scripts ..... // ==== Layout made by AnnieRuru ========== // join [DONE] // leave [DONE] // list players [DONE] // announce in color [DONE] // invite player [DONE] // kick player [DONE] // reject invitation [DONE] // block player/guild // create [DONE] // more channel [DONE] // list channel [DONE] // password [DONE] // timeout [DONE] left the Users Blocking part ...[acronym=LOL...the Idea...somehow....GONE.... ......]i already got some idea to do it[/acronym]...most probably will try finish all features by tonite if i have some free time... i guess.. the only things i dont know is the 'timeout' part ... i dont know what it's.... O.O i dont understand what it's.. >.< EDIT : hurmm....still got some time before my class start...so...continue this..xD Thx GMOcean ..... EDIT2: Done the 'timeout' .... but somehow...feel like....the script....getting messy and messy ... LOL ... gonna clean the script hardly and further optimise it .... Edited November 19, 2012 by Emistry Updated again....finished 'timeout' .. Quote Link to comment Share on other sites More sharing options...
GmOcean Posted November 19, 2012 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 666 Reputation: 93 Joined: 04/27/12 Last Seen: August 17, 2015 Share Posted November 19, 2012 Timeout is like inactivity. If they are inactive in the IRC for X amount of minutes, kick them from the channel so that there is free space for future people. Since In some IRC channels they limit the number of people who can enter. Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted November 19, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Author Share Posted November 19, 2012 Timeout is like inactivity. If they are inactive in the IRC for X amount of minutes, kick them from the channel so that there is free space for future people. Since In some IRC channels they limit the number of people who can enter. lol wrongduring woe, supposedly only guild master or only officers to give commands, normal players should keep silent if you do it that way, soon all normal players will auto-kick 1 by 1 lol my idea about timeout is to prevent some noobish players abusing the limit of channel room due to script engine limitation // Max IRC Room .MaxRoom = 10; which emistry did that already I can join in a channel and then use @autotrade to hit the limit of channel room by my own timeout check is like AFK script supposedly, not by kicking out silent players about blocking party/guild the idea is like set the channel room to public, but there're some antagonist guild, that you don't want them to join it just like creating a banlist Quote Link to comment Share on other sites More sharing options...
Emistry Posted November 19, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 1 minute ago Share Posted November 19, 2012 about the blocking.....player might no need this..because they can make use of the Password Protected features.. where they create a IRC Room with password protected ...and only allow member of the same guild who enter by telling them the password... but still a good idea for block specific guild ... but not party ...since they can alway re-create a new party in short times... and..nowaday...not really much player who can stay silent for such long time in game..xD Quote Link to comment Share on other sites More sharing options...
KeyWorld Posted November 19, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 379 Reputation: 304 Joined: 11/10/11 Last Seen: December 2, 2014 Share Posted November 19, 2012 Good to see scripts like this ! Some little tips for your future optimization, since it's an intensive script: Don't use getarraysize() in a for loop when it can be cache in a variable (resource friendly), you already do it on some functions Avoid using "for(;", it's slower than goto/do/while (ugly parsing in src), it will allow you to remove the freeloop() things Avoid using getarg() in a loop, cache the variable too. Nice work Quote Link to comment Share on other sites More sharing options...
Ryokem Posted November 19, 2012 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 205 Reputation: 19 Joined: 10/12/12 Last Seen: November 7, 2013 Share Posted November 19, 2012 Good to see scripts like this ! Avoid using "for(; ", it's slower than goto/do/while (ugly parsing in src), it will allow you to remove the freeloop() things lol, I loved the times on eA where people thought they were pro scripters just by using a for( ; ; ) loop.. That time was pretty funny Useless command anyway, there are tons of better ways to make an infinite loop, I totally agree with Key. Quote Link to comment Share on other sites More sharing options...
GmOcean Posted November 19, 2012 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 666 Reputation: 93 Joined: 04/27/12 Last Seen: August 17, 2015 Share Posted November 19, 2012 Ahh I see, well. What I suggested is still a timeout lol. But I guess in this case, yeah it wouldn't really work. Quote Link to comment Share on other sites More sharing options...
Emistry Posted November 19, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 1 minute ago Share Posted November 19, 2012 (edited) Thx for the advises Keyworld..xD i alway used FOR-LOOP because it look shorter..xD and it's already a habits for me.. ( i guess i should change my habits now xD ) even in my college ...my lecturers alway ask me to use FOR-LOOP instead of WHILE-LOOP ... >.< Script : http://pastebin.com/raw.php?i=zQJnCx9j TO-DO : NPC Dialog Lists Add Block User Features ? Clean the Scripts ..... Added a new function to allow IRC MOD to edit IRC Name or IRC Password anytime ..... Optimised the script as mentioned by KeyWorld ... How To Use : Haha..feel like this topic has become another 'Scripting Tutorial Topic' xD Edited November 20, 2012 by Emistry Removed some variables. Quote Link to comment Share on other sites More sharing options...
KeyWorld Posted November 19, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 379 Reputation: 304 Joined: 11/10/11 Last Seen: December 2, 2014 Share Posted November 19, 2012 About the for-loop, it's slow only in rathena/frathena, not in others A thing to know: you don't need to initialized some .@var to 0 if this variable is not used before. So you don't need to set .@i to 0 each time since it's already 0. Quote Link to comment Share on other sites More sharing options...
Yoga Posted November 20, 2012 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 66 Reputation: 1 Joined: 06/06/12 Last Seen: November 8, 2016 Share Posted November 20, 2012 @emistry how to remove broadcast? example; npc:IRC : testing Only show in chat massage not broadcast Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted November 20, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Author Share Posted November 20, 2012 (edited) @emistry yeah, you can use for-loop in any other kind of scripts but for algorithm scripts which usually process high amount of loops, its better to use while-loop instead EDIT: you can see that my script also uses while-loop, at the end of the file @LopakTikey impossible with our current script engine though, its possible to change its font size smaller *announce "<text>",<flag>{,<fontColor>{,<fontType>{,<fontSize>{,<fontAlign>{,<fontY>}}}}}; eamod uses source modification, but this script uses script engine to simulate Edited November 20, 2012 by AnnieRuru Quote Link to comment Share on other sites More sharing options...
nanakiwurtz Posted November 20, 2012 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Share Posted November 20, 2012 Only show in chat massage not broadcast Hmm if I'm not mistaken, it's just a self boradcast, so other people around you can't read it (if other people can read it, then what's the point of joining an IRC room?) announce ( ( .DisplayTime )?"[ "+gettimestr("%H:%M",7)+" ] ":"" ) + .@message$,[u][b]bc_self[/b][/u],.@colour$; Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted November 20, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Author Share Posted November 20, 2012 event script and algorithm type script is quite high level scripting ( that's why emistry is currently challenging this ) this is an algorithm type script you can't just simply look at a few lines and you think the script is work like script_commands.txt said you have to look at the whole script to understand the tricks and the mechanics behind it the mechanics behind this script is to whenever a player join a channel -> 1. produce add into a list of .IRC_Room_1$[ getarraysize( .IRC_Room_1$ ) ]; 2. the script produce a @IRC temporary player variable 1. when a player say something with npc:IRC on (read whisper system) it will loop through all players with .IRC_Room_1$ array with announce "", bc_self;, with attachrid while( .@i < .@size ){ if( attachrid( getcharid( 3,getd( ".IRC_Room_"+.@channel+"$["+.@i+"]" ) ) ) ) announce ( ( .DisplayTime )?"[ "+gettimestr("%H:%M",7)+" ] ":"" ) + .@message$,bc_self,.@colour$; .@i++; } 2. the purpose of @IRC player variable is to double check the player is already inside a channel room or not so if someone send an invitation, the script checks for @IRC player variable with attachrid if @IRC is 0, means the player is free to join in a channel room if @IRC is not 0, means the player is already joined an existing channel well ... the rest are custom features ... and emistry is exactly following my script format, I can read this script like someone else doing this for me XD Quote Link to comment Share on other sites More sharing options...
Emistry Posted November 20, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 1 minute ago Share Posted November 20, 2012 @LopakTikey perhap the reason we use announce because it can show in different colours.... dispbottom cant archive this... if you want..you still can change it to dispbottom i believe it will still work.. but then ....all your messages that sent to other player...all will look in the same colour with the 'system' message.. it doesnt look nice... Quote Link to comment Share on other sites More sharing options...
Limestone Posted November 24, 2012 Group: Members Topic Count: 155 Topics Per Day: 0.03 Content Count: 647 Reputation: 16 Joined: 11/21/11 Last Seen: December 28, 2022 Share Posted November 24, 2012 emistry? is this normal? when all of the players(including me) relog, our irc channel gone, and recreate a new one. Quote Link to comment Share on other sites More sharing options...
Question
AnnieRuru
while I was stumbling some of my old topics regarding advance SQL commands
I accidentally found 1 of the most interesting script that I discontinued
http://www.eathena.ws/board/index.php?s=&showtopic=271842&view=findpost&p=1490082
in post#21, got an attachment name guess_me.txt
well that time it was unfinished script, and so do now
however I search on this board, and haven't found any related topics
or maybe someone else already release ?
if nobody haven't did this, I might continue and finish it
for more information, it is a feature of eamod
and I wanted to write my own version
Link to comment
Share on other sites
30 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.