• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Too low level, force say spell

ExibeR

Lua/C++/PHP Programmer
Joined
Aug 15, 2007
Messages
986
Reaction score
8
Location
Tromso/Norway
Greetings,

on my server I currently have a problem of 5-10 low levels spamming spells with a higher level requirement, causing the server to crash.

So I'm requesting a script that will make players say the spell, instead of the poof and message "You are too low level to use this spell."
So they instead say: "Utani gran hur" and eventually get muted.

Scenario:
A level 8 spamming Hells Core: Force to Default Chat/Say, resulting in mute.
A level 120 spamming Hells Core: Just like normal, but not giving mute when spammed.

Something like this, if spell level req is 60.

if getPlayerLevel(cid) < 60 then

local commapos = string.find(param,",")
local name = string.sub(param,1,commapos-1)
local text = string.sub(param,commapos+1,string.len(param))
local player = getPlayerByName(name)
doCreatureSay(player,text,TALKTYPE_SAY)
else
"perform spell"
 
Last edited:
if getPlayerLevel(cid) < 60 then

local commapos = string.find(param,",")
local name = string.sub(param,1,commapos-1)
local text = string.sub(param,commapos+1,string.len(param))
local player = getPlayerByName(name)
doCreatureSay(player,text,TALKTYPE_SAY)
else
"perform spell"


This work?
 
Back
Top