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

Help with monster

Seumion

★ Spell Maker & Mapper ★
Joined
Feb 24, 2015
Messages
172
Reaction score
2
how to make monster heal like this @heba
rdGyAll.jpg
 
1 momment

<talkaction log="yes" words="/Freeze" access="4" event="script" value="Frozen.lua" />
 
Last edited by a moderator:
hey @Seumion
You can use /freeze script so u can freeze a players like evolera here u are the script !!

Code:
local function repeatAnimated(cid, on, off)
local repeatEvent = 0
doSendAnimatedText(getThingPos(cid), "Frozen!", math.random(1, 254))
if on then
repeatEvent = addEvent(repeatAnimated, math.random(1, 4) * 1000, cid)
elseif off then
stopEvent(repeatEvent)
end
end
function onSay(cid, words, param, channel)
local t = string.explode(param, ",")
local player = getPlayerByNameWildCard(t[2])
if t[1] == "freeze" then
if isPlayer(player) then
doCreatureSetNoMove(cid, true)
repeatAnimated(cid, on)
else
doPlayerSendTextMessage(cid, 27, "Player " .. t[2] .. " not found.")
end
elseif t[2] == "unfreeze" then
if isPlayer(player) then
doCreatureSetNoMove(cid, false)
repeatAnimated(cid, off)
else
doPlayerSendTextMessage(cid, 27, "Player " .. t[2] .. " not found.")
end
else
doPlayerSendTextMessage(cid, 27, "not enough params.")
end
return true
end
[14/03/2015 23:41:02] [Warning - TalkAction::loadFunction] Function "admin freeze" does not exist.

[14/03/2015 23:42:41] data/talkactions/scripts/Frozen.lua:12: in function <data/talkactions/scripts/Frozen.lua:10>
 
Last edited by a moderator:
after edit
[14/03/2015 23:45:28] [Error - TalkAction Interface]
[14/03/2015 23:45:28] data/talkactions/scripts/frozen.lua:eek:nSay
[14/03/2015 23:45:28] Description:
[14/03/2015 23:45:28] data/talkactions/scripts/frozen.lua:12: attempt to call global 'getPlayerByNameWildCard' (a nil value)
[14/03/2015 23:45:28] stack traceback:
[14/03/2015 23:45:28] data/talkactions/scripts/frozen.lua:12: in function <data/talkactions/scripts/frozen.lua:10>
 
New script :)

Code:
local condition1 = createConditionObject(CONDITION_INFIGHT)
local condition2 = createConditionObject(CONDITION_EXHAUST)
local condition3 = createConditionObject(CONDITION_MUTED)
setConditionParam(condition1, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition2, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition3, CONDITION_PARAM_TICKS, -1)

function onSay(cid, words, param)
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Name required.")
return TRUE
end

local player = getPlayerByNameWildcard(param)
local pos = getCreaturePosition(player)

local nha = {x = pos.x, y = pos.y - 3, z = pos.z, stackpos = 255}
local sha = {x = pos.x, y = pos.y + 3, z = pos.z, stackpos = 255}
local wha = {x = pos.x - 3, y = pos.y, z = pos.z, stackpos = 255}
local eha = {x = pos.x + 3, y = pos.y, z = pos.z, stackpos = 255}
local nwa = {x = pos.x - 2, y = pos.y - 2, z = pos.z, stackpos = 255}
local nea = {x = pos.x + 2, y = pos.y - 2, z = pos.z, stackpos = 255}
local sea = {x = pos.x + 2, y = pos.y + 2, z = pos.z, stackpos = 255}
local swa = {x = pos.x - 2, y = pos.y + 2, z = pos.z, stackpos = 255}
if getPlayerGroupId(cid) >= getPlayerGroupId(player) then
if getPlayerStorageValue(player, 12346) < 0 then
if((doCreatureSetNoMove(player, 1))== LUA_ERROR) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Error.")
end
setPlayerStorageValue(player, 12346, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player can now not move.")
doSendAnimatedText(getCreaturePosition(player), "Frozen", 64)
return TRUE
doSendDistanceShoot(nha, pos, 28)
doSendDistanceShoot(sha, pos, 28)
doSendDistanceShoot(wha, pos, 28)
doSendDistanceShoot(eha, pos, 28)
doSendDistanceShoot(nwa, pos, 28)
doSendDistanceShoot(nea, pos, 28)
doSendDistanceShoot(sea, pos, 28)
doSendDistanceShoot(swa, pos, 28)
doSendMagicEffect(pos, 52)
doAddCondition(player, condition1)
doAddCondition(player, condition2)
doAddCondition(player, condition3)
elseif getPlayerStorageValue(player, 12346) >= 0 then
if((doCreatureSetNoMove(player, 0))== LUA_ERROR) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Error.")
end
setPlayerStorageValue(player, 12346, -1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player can now move again.")
doSendAnimatedText(getCreaturePosition(player), "Can Move", 168)
doSendDistanceShoot(pos, nha, 37)
doSendDistanceShoot(pos, sha, 37)
doSendDistanceShoot(pos, wha, 37)
doSendDistanceShoot(pos, eha, 37)
doSendDistanceShoot(pos, nwa, 37)
doSendDistanceShoot(pos, nea, 37)
doSendDistanceShoot(pos, sea, 37)
doSendDistanceShoot(pos, swa, 37)
doSendMagicEffect(pos, 49)
doRemoveCondition(cid, CONDITION_INFIGHT)
doRemoveCondition(cid, CONDITION_EXHAUST)
doRemoveCondition(cid, CONDITION_MUTED)
end
end
return TRUE
end
 
New script :)

Code:
local condition1 = createConditionObject(CONDITION_INFIGHT)
local condition2 = createConditionObject(CONDITION_EXHAUST)
local condition3 = createConditionObject(CONDITION_MUTED)
setConditionParam(condition1, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition2, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition3, CONDITION_PARAM_TICKS, -1)

function onSay(cid, words, param)
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Name required.")
return TRUE
end

local player = getPlayerByNameWildcard(param)
local pos = getCreaturePosition(player)

local nha = {x = pos.x, y = pos.y - 3, z = pos.z, stackpos = 255}
local sha = {x = pos.x, y = pos.y + 3, z = pos.z, stackpos = 255}
local wha = {x = pos.x - 3, y = pos.y, z = pos.z, stackpos = 255}
local eha = {x = pos.x + 3, y = pos.y, z = pos.z, stackpos = 255}
local nwa = {x = pos.x - 2, y = pos.y - 2, z = pos.z, stackpos = 255}
local nea = {x = pos.x + 2, y = pos.y - 2, z = pos.z, stackpos = 255}
local sea = {x = pos.x + 2, y = pos.y + 2, z = pos.z, stackpos = 255}
local swa = {x = pos.x - 2, y = pos.y + 2, z = pos.z, stackpos = 255}
if getPlayerGroupId(cid) >= getPlayerGroupId(player) then
if getPlayerStorageValue(player, 12346) < 0 then
if((doCreatureSetNoMove(player, 1))== LUA_ERROR) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Error.")
end
setPlayerStorageValue(player, 12346, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player can now not move.")
doSendAnimatedText(getCreaturePosition(player), "Frozen", 64)
return TRUE
doSendDistanceShoot(nha, pos, 28)
doSendDistanceShoot(sha, pos, 28)
doSendDistanceShoot(wha, pos, 28)
doSendDistanceShoot(eha, pos, 28)
doSendDistanceShoot(nwa, pos, 28)
doSendDistanceShoot(nea, pos, 28)
doSendDistanceShoot(sea, pos, 28)
doSendDistanceShoot(swa, pos, 28)
doSendMagicEffect(pos, 52)
doAddCondition(player, condition1)
doAddCondition(player, condition2)
doAddCondition(player, condition3)
elseif getPlayerStorageValue(player, 12346) >= 0 then
if((doCreatureSetNoMove(player, 0))== LUA_ERROR) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Error.")
end
setPlayerStorageValue(player, 12346, -1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player can now move again.")
doSendAnimatedText(getCreaturePosition(player), "Can Move", 168)
doSendDistanceShoot(pos, nha, 37)
doSendDistanceShoot(pos, sha, 37)
doSendDistanceShoot(pos, wha, 37)
doSendDistanceShoot(pos, eha, 37)
doSendDistanceShoot(pos, nwa, 37)
doSendDistanceShoot(pos, nea, 37)
doSendDistanceShoot(pos, sea, 37)
doSendDistanceShoot(pos, swa, 37)
doSendMagicEffect(pos, 49)
doRemoveCondition(cid, CONDITION_INFIGHT)
doRemoveCondition(cid, CONDITION_EXHAUST)
doRemoveCondition(cid, CONDITION_MUTED)
end
end
return TRUE
end
didn't work you sure that in talkations?
 
Yes lol

try the last script :(

Code:
local function repeatAnimated(cid, on, off)
local repeatEvent = 0
doSendAnimatedText(getThingPos(cid), "Frozen!", math.random(1, 254))
if on then
repeatEvent = addEvent(repeatAnimated, math.random(1, 4) * 1000, cid)
elseif off then
stopEvent(repeatEvent)
end
end
function onSay(cid, words, param, channel)
local t = string.explode(param, ",")
local player = getPlayerByNameWildcard(t[2])
if t[1] == "freeze" then
if isPlayer(player) then
doCreatureSetNoMove(cid, true)
repeatAnimated(cid, on)
else
doPlayerSendTextMessage(cid, 27, "Player " .. t[2] .. " not found.")
end
elseif t[2] == "unfreeze" then
if isPlayer(player) then
doCreatureSetNoMove(cid, false)
repeatAnimated(cid, off)
else
doPlayerSendTextMessage(cid, 27, "Player " .. t[2] .. " not found.")
end
else
doPlayerSendTextMessage(cid, 27, "not enough params.")
end
return true

Then u have to ask @Limos
 
Last edited by a moderator:
[14/03/2015 23:54:07] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/frozen.lua:30: 'end' expected (to close 'function' at line 10) near '<eof>'
[14/03/2015 23:54:07] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/frozen.lua)
 
i fined other one

Code:
function onSay(cid, words, param)
local player = getPlayerByNameWildcard(param)
if not isPlayer(player) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'blahblabhlah.')
return true
end
local b = not getCreatureNoMove(player)
doCreatureSetNoMove(player, b)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, b and 'blahblabhlah.' or 'blahblabhlah.')
doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, b and 'blahblabhlah.' or 'blahblabhlah.')
doSendAnimatedText(getThingPos(player), b and 'Frozen' or 'Can Move', b and 64 or 168)
doSendMagicEffect(getThingPos(player), b and CONST_ME_GIANTICE or CONST_ME_HOLYAREA)
return true
end

I think that's will work 100% now :)
 
doSendMagicEffect(getThingPos(player), b and CONST_ME_GIANTICE or CONST_ME_HOLYAREA)

TO

doSendMagicEffect(teleportpos1, math.random(6, 6))

you can change The Id :)
 
[15/03/2015 00:17:11] [C]: in function 'doSendMagicEffect'
[15/03/2015 00:17:11] data/talkactions/scripts/frozen.lua:12: in function <data/talkactions/scripts/frozen.lua:1>
 
didn't work but is there any script when i make /m gm name i will res gm monster with his outfit?
 
Back
Top