escribano 
Journeyman

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

|
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
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 |
|
The following 1 user Likes escribano's post:1 user Likes escribano's post
fabiohvp (07-22-2018)
|