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

TalkAction Berserker mode!

Mock

Mock the bear (MTB)
Joined
Jul 29, 2008
Messages
619
Reaction score
106
Location
Brazil

  • [*]Author: Mock
    [*]Tested on: TFS 0.3.6pl1

What this script does?
Well this script raise HP MP and all skills in 50% (more or less, you config).
But it spent soul when you use :peace:

Look this script in action:
http://www.youtube.com/watch?v=xBvQD5nO02E

Wll add this tag on talkactions.xml:
Code:
<talkaction words="!berserk" event="script" value="berserk.lua"/>
On berserk.lua:
Lua:
--[[
Script By mock the bear
Config
]]
function choose(...)
   local arg = {...}
   return arg[math.random(1,#arg)]
end
local conf = {
	effectlist = {12,13,14,3,28,29,30,39,68},
	soulPerSec=1,
	soulToStart=25,
	allPercent=50,
}
---Load combat
local combat  = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition, CONDITION_PARAM_SUBID, 49)
local cond = {
	CONDITION_PARAM_STAT_MAXHEALTHPERCENT = 31,
	CONDITION_PARAM_STAT_MAXMANAPERCENT = 32,
	CONDITION_PARAM_STAT_MAGICLEVELPERCENT = 34,
	CONDITION_PARAM_SKILL_MELEEPERCENT = 35,
	CONDITION_PARAM_SKILL_FISTPERCENT = 36,
	CONDITION_PARAM_SKILL_CLUBPERCENT = 37,
	CONDITION_PARAM_SKILL_SWORDPERCENT = 38,
	CONDITION_PARAM_SKILL_AXEPERCENT = 39,
	CONDITION_PARAM_SKILL_DISTANCEPERCENT = 40,
	CONDITION_PARAM_SKILL_SHIELDPERCENT = 41,
}
for i,b in pairs(cond) do
	setConditionParam(condition, b, 100+conf.allPercent)
end
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)
local function rot(cid,n) --- Script by mock
   local tb_rot = {{0,2},{6,5},{1,3},{7,4},false}
   if not isPlayer(cid) or tb_rot[n] == nil or getPlayerSoul(cid) == 0 or getPlayerStorageValue(cid,32481) == -1 then
      return false
   end
   if tb_rot[n] == false then
      doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[1][1]) , choose(unpack(conf.effectlist)))
      doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[1][2]) ,choose(unpack(conf.effectlist)))
      addEvent(rot, 200,cid,2)
      return false
   end
   doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[n][1]) , choose(unpack(conf.effectlist)))
   doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[n][2]) , choose(unpack(conf.effectlist)))
   n = n+1
   addEvent(rot, 200,cid,n)
end
function checkBuff(cid)
	if not isPlayer(cid) then return end
	if getPlayerSoul(cid) > 0 and getPlayerStorageValue(cid,32481) == 1 then
		doPlayerAddSoul(cid,-conf.soulPerSec)
		doSendMagicEffect(getCreaturePosition(cid) , 49)
		addEvent(checkBuff,1000,cid)
	else
		doRemoveCondition(cid, CONDITION_ATTRIBUTES,49)
		setPlayerStorageValue(cid,32481,-1)
		return false
	end
end
function onSay(cid, words, param, channel) --- Script by mock
	if getPlayerStorageValue(cid,32481) == 1 then
		setPlayerStorageValue(cid,32481,-1)
		doCreatureSay(cid,'BERSERK MODE OFF!',19)
		return true
	end
	if getPlayerSoul(cid) >= conf.soulToStart then
		doPlayerAddSoul(cid,-conf.soulToStart)
		setPlayerStorageValue(cid,32481,1)
		checkBuff(cid)
		rot(cid,1)
		doCreatureSay(cid,'BERSERK MODE ON!',19)
		doCombat(cid, combat, numberToVariant(cid))
	else
		doPlayerSendTextMessage(cid,25,'You need more than 25 soul!')
	end
	return true
end
(like cabal)
:peace: Enjoy

IT SPENT SOUL!!! 1 SOUL PER SECOND
 
Last edited:
make it a spell, spend mana
 
@Cybershot
better no ^^
i can use mana potions and be strong 4 ever.
better use soul. it take long time to get full
 
mock your script's is very seexy ...
waiting for the video
:p
 
@Beon
90% upload on youtube
--edit
Video is done
 
Last edited:
i make this spell long time ago... with more limitations :) and spend mana and soul!
 
I think it should be a spell, so you could buy the spell or do a quest to learn it.
 
Mock Ur my idol! I can't bealive you make those DAMN cool scripts!
 
[18/07/2010 01:53:08] [Error - TalkAction Interface]
[18/07/2010 01:53:08] data/talkactions/scripts/berserk.lua:eek:nSay
[18/07/2010 01:53:08] Description:
[18/07/2010 01:53:08] data/talkactions/scripts/berserk.lua:46: attempt to call global 'choose' (a nil value)
[18/07/2010 01:53:08] stack traceback:
[18/07/2010 01:53:08] data/talkactions/scripts/berserk.lua:46: in function 'rot'
[18/07/2010 01:53:08] data/talkactions/scripts/berserk.lua:73: in function <data/talkactions/scripts/berserk.lua:63>


what do i do wrong? and how i solve it :p?
 
Mock! help me!
[18/07/2010 01:53:08] [Error - TalkAction Interface]
[18/07/2010 01:53:08] data/talkactions/scripts/berserk.luanSay
[18/07/2010 01:53:08] Description:
[18/07/2010 01:53:08] data/talkactions/scripts/berserk.lua:46: attempt to call global 'choose' (a nil value)
[18/07/2010 01:53:08] stack traceback:
[18/07/2010 01:53:08] data/talkactions/scripts/berserk.lua:46: in function 'rot'
[18/07/2010 01:53:08] data/talkactions/scripts/berserk.lua:73: in function <data/talkactions/scripts/berserk.lua:63>

anyone else?
 
Back
Top