The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SphereServer flood control
Author Message
escribano
Journeyman
*

Posts: 170
Likes Given: 16
Likes Received: 32 in 23 posts
Joined: Nov 2012
Reputation: 2

Dragon Shard

Post: #17
RE: SphereServer flood control
This is my anti-flood i've made this to prevent the speech or command be process on sphere:

Code:
// Add next line do sphere.ini
// PACKET173=f_packet_0xad

[FUNCTION f_packet_0xad]
ref1 = <local.char>
if (<ref1.isgm> == 1)
  return 0
endif

if (<ref1.restest i_flood_protection>)
ref1.sysmessage @07a1 Shard Name anti-flood:
ref1.sysmessage @077a Wait a little longer to send message.
ref1.findid.i_flood_protection.timer 1
return 1
endif

serv.newitem i_flood_protection
new.timer = 1
new.cont  = <ref1.uid>
return 0

[ITEMDEF i_flood_protection]
NAME=Anti-Flood Protection
ID=i_memory
TYPE=t_eq_script
LAYER=layer_special

ON=@Create
more1=0
attr=attr_decay|attr_invis|attr_newbie

ON=@Timer
remove

You can change it easily to adapt to your shard... this one doesn't release the player to speech if he won't wait 1 second... so if the player tries to speak again the timer resets...
Also, you can add +1 sec if the player won't wait.... so you can punish 'em for flooding Smile

Now I've read the entire post.... I've got this problem too... someone figured out this and started to crash the server...

So I've made this script properly to fix this... also, I've noticed that if the player does it on skillmenu this behavior crashes sphere too... so I've added this to the e_player event (or any event you know that all players have):

Code:
ON=@SkillMenu
    if (<restest i_craft_delay>)
      sysmessage @077a,0,1 Anti-crash protection: wait 1 second to open the menu again
      return 1
    endif

    serv.newitem i_craft_delay
    equip <new>

    return 0

[ITEMDEF i_craft_delay]
ID=i_memory
TYPE=t_eq_script
NAME=craft timer

ON=@Equip
    timer=1

ON=@Timer
    remove
    return 1

See yah!

UltimaPHP - OpenSource Ultima Online Server v0.1-pre-alpha under development, we need help!
(This post was last modified: 06-23-2017 12:04 PM by escribano.)
06-23-2017 11:51 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes escribano's post
Post Reply 


Messages In This Thread
SphereServer flood control - massis87 - 06-20-2017, 10:57 PM
RE: SphereServer flood control - Criminal - 06-20-2017, 11:13 PM
RE: SphereServer flood control - massis87 - 06-20-2017, 11:17 PM
RE: SphereServer flood control - Criminal - 06-21-2017, 12:10 AM
RE: SphereServer flood control - rastrero - 06-21-2017, 11:59 PM
RE: SphereServer flood control - massis87 - 06-21-2017, 03:42 PM
RE: SphereServer flood control - massis87 - 06-22-2017, 02:05 AM
RE: SphereServer flood control - rastrero - 06-22-2017, 02:51 AM
RE: SphereServer flood control - massis87 - 06-22-2017, 08:07 AM
RE: SphereServer flood control - Criminal - 06-22-2017, 08:20 AM
RE: SphereServer flood control - massis87 - 06-22-2017, 08:44 AM
RE: SphereServer flood control - rastrero - 06-22-2017, 08:57 AM
RE: SphereServer flood control - massis87 - 06-22-2017, 09:04 AM
RE: SphereServer flood control - massis87 - 06-22-2017, 07:59 PM
RE: SphereServer flood control - darksun84 - 06-22-2017, 08:08 PM
RE: SphereServer flood control - massis87 - 06-23-2017, 12:53 AM
RE: SphereServer flood control - escribano - 06-23-2017 11:51 AM
RE: SphereServer flood control - darksun84 - 06-23-2017, 09:40 PM
RE: SphereServer flood control - massis87 - 06-24-2017, 12:44 AM
RE: SphereServer flood control - escribano - 07-18-2017, 01:01 AM
RE: SphereServer flood control - Heeelp - 10-03-2017, 03:51 AM

Forum Jump:


User(s) browsing this thread: 5 Guest(s)