Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Bug Report (https://forums.graalonline.com/forums/forumdisplay.php?f=193)
-   -   onPlayerChats() serverside (https://forums.graalonline.com/forums/showthread.php?t=134264488)

Mark Sir Link 09-05-2011 11:43 PM

onPlayerChats() serverside
 
it appears that something is causing onPlayerChats to execute multiple times on the serverside since a recent update. I am not able to duplicate often the behavior on demand but have noticed it on Unholy Nation since the latest server and client updates, where scripts in events that award EP are being invoked 4 times in a row

NPC Code:
Buy a PC don't buy a Mac (Server): KaidaChan gave 1 EP to the team that won TeamSlashRace.
Buy a PC don't buy a Mac (Server): KaidaChan gave 1 EP to the team that won TeamSlashRace.
Buy a PC don't buy a Mac (Server): KaidaChan gave 1 EP to the team that won TeamSlashRace.
Buy a PC don't buy a Mac (Server): KaidaChan gave 1 EP to the team that won TeamSlashRace.



There are also cases where NPCs are invoking onPlayerChats 4-5+ in a row, I tried attaching a few echos/sendtorcs in places where players were now having problems with text commands and got results like this

NPC Code:
Buy a PC don't buy a Mac (Server): annulment attempted
Buy a PC don't buy a Mac (Server): annulment attempted
Buy a PC don't buy a Mac (Server): annulment attempted
Buy a PC don't buy a Mac (Server): annulment attempted
Buy a PC don't buy a Mac (Server): annulment attempted


Emera 09-05-2011 11:45 PM

This is as annoying as hell.

kingcj 09-06-2011 04:02 AM

I got this as well in a shop script I've been using.

Mark Sir Link 09-06-2011 04:29 AM

Example of this happening can be found in liquidicechurch.nw on Unholy Nation, specifically in DB NPC "PriestNPC"

If you say
"get married to accountname" the event will invoke 5 times, causing the say2 to read "I am helping (your account name here)", even though it should be attached to you

I know this example is in GS1 but it is happening in the case of GS2 scripts as well.

If you give yourself an Events Team tag and go to unevent_tagteamp.nw, start the game, then use the command "/give ep 2", it will invoke 4 times from the same NPC (a level NPC joined to class unevent_pong"). I also added an echo for the npc.id to make sure it was the same NPC invoking it repeatedly.

Emera 09-06-2011 11:15 AM

Also mark, there has been a lot of problems on UN's RC with suspicion that ET's are giving players more EP that is needed, hopefully they will see this and it will clear things up a bit :3

Admins 09-06-2011 12:32 PM

Will check this.
In general it's good to put a player.chat = ""; in the script to avoid such cases, and also to give a feedback to the player that the chat command has been accepted.

Update: Ok fixed, restart your npcserver (/npcshutdown, /npcstart) to fix it.

Mark Sir Link 09-06-2011 10:32 PM

Thank you :)


All times are GMT +2. The time now is 12:26 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.