• 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!

I just have a nice idea!!! but need help!

sebas182

New Member
Joined
Aug 10, 2008
Messages
121
Reaction score
1
A talk action of GMs to identify the boters (Auto Spell)

I do not acept any type of bot in my server and i need help with this script...

The script does:

-Get the mana of the player.
-Add 99999 mana to player.
-Wait two seconds and half.
-back the mana to mana geted in start

Comments:
-The add 99999 mana will just recover and not set max.
-must be talk action like: bottest "player name



PLEASE SOME ONE HELP ME =D
 
A talk action of GMs to identify the boters (Auto Spell)

I do not acept any type of bot in my server and i need help with this script...

The script does:

-Get the mana of the player.
-Add 99999 mana to player.
-Wait two seconds and half.
-back the mana to mana geted in start

Comments:
-The add 99999 mana will just recover and not set max.
-must be talk action like: bottest "player name



PLEASE SOME ONE HELP ME =D

And in which way would it identify wether the player is botting or not? :huh:
 
Untested
Lua:
function onSay(cid, words, param, channel)

local target = getPlayerByNameWildcard(param)
local storCurrent, storMax = 65534, 65535 --to save the current max mana
local maxMana = 9999
local time = 2500 --2.5 seconds

	if(target == nil) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "" .. param .. " isn't online.")
		return TRUE
	end

	setPlayerStorageValue(target, storCurrent, getCreatureMana(target))
	setPlayerStorageValue(target, sotrMax, getCreatureMaxMana(target))
	setCreatureMaxMana(target, maxMana)
	doCreatureAddMana(target, maxMana)
	addEvent(resetMana, time, target)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have changed the mana points of " .. param .. ".")
	return TRUE
end

local function resetMana(cid)
	doCreatureAddMana(cid, - getCreatureMana(cid) + getPlayerStorageValue(cid, storCurrent))
	setCreatureMaxMana(cid, getPlayerStorageValue(cid, storMax)
	setPlayerStorageValue(target, storCurrent, 0)
	setPlayerStorageValue(target, sotrMax, 0)
	return TRUE
end

...talkactions.xml
Lua:
	<talkaction filter="quotation" words="!botter" script="SCRIPT_NAME.lua"/>

filter="quotation" = !botter "player_name
filter="word" = !botter player_name
 
Error at line 24

setCreatureMaxMana(cid, getPlayerStorageValue(cid, storMax))

You miss it.

EDIT!

LOL, the max mana have been seted to 9999 =P
 
Last edited:
Spelling Error:

Change-
Lua:
setPlayerStorageValue(target, sotrMax, 0)
To-
Lua:
setPlayerStorageValue(target, storMax, 0)
 
ok, some one can test? i'm waiting the new TFS, then i just modify many things as spells and others, and now i can't do nothing =\
 
Back
Top