Jump to content
Leeg

Quests, Games: Tic Tac Toe Minigame Script and Map

Recommended Posts

Okay. This is the third time I get a PM telling me to "fix" my script. Therefore I'm going to give you some sound advice:

UPDATE YOUR EMULATOR

Some people are sending me private messages with their consoles filled with bugs. Do you know why is it happening?

Because you haven't updated your emulator since 2012.

Don't believe me? Look at this:
https://github.com/rathena/rathena/commit/c3193f3106bb52a0aae956a771ed6a209f0a2a36

This is the commit where rAthena started to allow assigning variables without the use of 'set'. It was a great addition because most programming languages don't need a command to assign variables. Therefore, it's normal that we, scripters, make use of this functionality. This script, and all the scripts I make, don't use the 'set' command because we are in 2017.

 

HOWEVER...

If you are a naughty person who doesn't want to update his emulator. You can "fix" my script easily by following these simple steps:

Every time you see an equal sign (=) you have to replace it with the set command and a comma.

For example:

variable = 100;

Should be:

set variable, 100;

 

And with += or -=;

variable +=100;

Should be:

set variable, variable + 100;

 

And that's all folks.

Sorry for the rant. ;)

 

Edited by Leeg
  • Upvote 1
  • MVP 1
Link to comment
Share on other sites

Can this be made so that there are three rooms instead of one? Just in case the wait is too long. And have a command to disable rooms if demand for the game is low.

Please advise. Thanks.

Link to comment
Share on other sites

You would have to instance everything in the script or duplicate the NPCs as well as the map. The script uses global and global temporary variables, so you would have to rename those too so that there is no conflict.

Matches don't last longer than 1 minute, I don't know if it's worth the trouble...

Edited by Leeg
Link to comment
Share on other sites

21 hours ago, zecabaleiro said:

support eAmod @Leeg?

This script doesn't require any custom source modification. However, this script doesn't use "set" to assign variables because rAthena doesn't need that since 2012. If rAmod doesn't support assigning variables without "set", you would have to modify all the variables being assigned in the script.

It's mentioned in the first post of this page.

(https://rathena.org/board/topic/110377-quests-games-tic-tac-toe-minigame-script-and-map/?do=findComment&comment=332625)

Link to comment
Share on other sites

2 hours ago, spinzaku said:

nice script. Is there any plans for ranking system?  nice to see who keeps winning haha

It's not hard to implement, but I discarded that idea because preventing abuse is hard.

Link to comment
Share on other sites

 

On 9/7/2019 at 11:45 PM, zecabaleiro said:

@Leeg Does rAmod support this event?

It should be supported, as it doesn't depend on any source modifications.

Edited by Leeg
Link to comment
Share on other sites

On 4/6/2017 at 10:10 PM, Leeg said:

Tic Tac Toe Minigame Script and Map


 O  Tic·Tac·Toe miniGAME O 

 

 

Features:

· 2 player based minigame
· Fully automated
· Free map included! (tictactoe.rsw)
· Detects tied game
· 1st turn selection is randomised
· Very easy to install: Just copy the map files to your GRF and the script files to your custom NPC folder.
· Lots of fun for your players!

Buy once and have access to future updates!
 

[ ! ] If you have any questions or you need to contact me for support, you can reach me at @Leeg or you can post a comment here and I will receive a notification. 
You can also send me an email at:

  Reveal hidden contents

 

By buying this script, you agree to these terms:
    - You are not allowed to redistribute this script in any way, shape, or form.
    - Chargeback scams are not tolerated and will get you punished on rAthena.
    - I (Leeg) still retain all rights to this script.
    - Terms above may be changed or adjusted without prior notification.


 

We are having a problem with the  script.

We are using the latest rathena

 

Npc_Event System#main not found! (source: atcmd_tictactoe)


and changed variables from
from: variable = #; to set variable, #; and set variable, variable + #;

 

but the script cant detect
system#main::Onstarttimer

@leeg

Edited by sootil
tagging the OP
  • Upvote 1
Link to comment
Share on other sites

@sootil was using a rAthena version that didn't support convertpcinfo. Therefore, I told him to use the 1.2.2 version of the script and that one worked for him.

Link to comment
Share on other sites

(12/18/2020 00:34:28) [ Error ] : npc_enable: Attempted to hide a non-existing NPC 'ticO1' (flag=4).
(12/18/2020 00:34:28) [ Error ] : npc_enable: Attempted to hide a non-existing NPC 'ticX1' (flag=4).
(12/18/2020 00:35:28) [ Error ] : Server received crash signal! Attempting to save all online characters!

 

Link to comment
Share on other sites

@Break Which emulator are you using and which version? This script has been online for more than 3 years and no one has reported a server crash before.

Judging by the two errors preceding the crash signal, what I can infer is that the script was not loaded properly, or it has been partially reloaded.

Edited by Leeg
Link to comment
Share on other sites

On 12/18/2020 at 10:09 PM, Leeg said:

@Break Which emulator are you using and which version? This script has been online for more than 3 years and no one has reported a server crash before.

Judging by the two errors preceding the crash signal, what I can infer is that the script was not loaded properly, or it has been partially reloaded.

 

I do not know my version of rathena, I downloaded it in an archive in December 2018 and I still make all the changes myself.

Server crashed due to getmapxy script command. Need to replace BL_PC on UNITTYPE_PC. And remove lines from convertpcinfo

After these manipulations, the event works.

Edited by Break
  • Upvote 1
Link to comment
Share on other sites

Hi Leeg , can you add another line for this script? In my server the players doesn't use this anymore because they can always have a draw , unless they intentionally want to lose. 

Link to comment
Share on other sites

Just now, scathachshishou said:

Hi Leeg , can you add another line for this script? In my server the players doesn't use this anymore because they can always have a draw , unless they intentionally want to lose. 

Another Line or more for tictactoe

Link to comment
Share on other sites

2 hours ago, scathachshishou said:

Hi Leeg , can you add another line for this script? In my server the players doesn't use this anymore because they can always have a draw , unless they intentionally want to lose. 

I'm afraid that would turn the game into a different thing (connect four?). Furthermore, modifying the game like that would imply remaking the map and other additional work.

Link to comment
Share on other sites

On 2/8/2021 at 1:28 AM, Leeg said:

I'm afraid that would turn the game into a different thing (connect four?). Furthermore, modifying the game like that would imply remaking the map and other additional work.

There are four lines but the mechanics is still the same (connect three) . It will become more competitive .

Link to comment
Share on other sites

 

Hi Leeg, how are you? Excuse my English but I speak Spanish but hopefully I can make myself understood. I have tested the version of this script from 1.2.2 to 1.2.4 but I always stay here, it indicates who starts but nothing happens. The console does not throw me any error or alert but it does not let me touch the porings. Note: I don't know the version of my emulator.

 

error.PNG.716dab508408d93631f212ec7bbb4fbd.PNG

 

Edited by AlvaroNiel
Link to comment
Share on other sites

Posted (edited)
On 8/11/2021 at 7:54 AM, AlvaroNiel said:

 

Hi Leeg, how are you? Excuse my English but I speak Spanish but hopefully I can make myself understood. I have tested the version of this script from 1.2.2 to 1.2.4 but I always stay here, it indicates who starts but nothing happens. The console does not throw me any error or alert but it does not let me touch the porings. Note: I don't know the version of my emulator.

Hi AlvaroNiel,

If you don't know the version of your emulator and there are no errors or warning I'm afraid I can't provide much help.

Please use an updated rAthena emulator.

Regards.

 

Edited by Leeg
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.