president vankk
Web Developer & AuraOT Owner
- Joined
- Jul 10, 2009
- Messages
- 5,719
- Solutions
- 9
- Reaction score
- 339
Hiho, i have 2 script and have bug :x
temple.lua
thx all
temple.lua
LUA:
function onSay(cid, words, param)
ppos = getPlayerPosition(cid)
temple = getPlayerMasterPos(cid)
if ((getplayerlevel(cid) <= 30) and (getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE)) then
doTeleportThing(cid, temple, TRUE)
doSendMagicEffect(ppos,66)
doSendAnimatedText(frompos,'Temple!',16)
else
doPlayerSendCancel(cid,"You can't teleport immediately after fight.")
doSendMagicEffect(ppos,2)
end
end
return 1
end
LUA:
--Config--
local lenght = 70 -- Max number of characters to contair the menssage
local messagesort = MESSAGE_STATUS_WARNING -- can be "MESSAGE_STATUS_WARNING" or "TALKTYPE_ORANGE_1" check your global.lua for more...
local exhaustTime = 4 * 60 * 1000 -- time exausted bettewen message (4 = min)
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, exhaustTime)
--End of config--
function onSay(cid, words, param)
if getCreatureCondition(cid, CONDITION_EXHAUST) == TRUE then
doPlayerSendCancel(cid, "Sorry, not posible")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return TRUE
end
local name = getPlayerName(cid)
local level = getPlayerLevel(cid)
-- Here you add staff
local staff = {}
staff[1] =
{
Sgz,
nwtr,
Robson,
Acordion,
Nyd Mort
}
-- Staff end
if isCreature(cid) == TRUE then
if param ~= nil then
if string.len(param) < lenght then
for i = 1, table.maxn(staff[1]) do
doPlayerSendTextMessage(staff[1][i], messagesort, ''..name..' ['..level..'] report: ' .. param .. '')
doPlayerSendCancel(cid, Your report will be send)
--exhaustion.set(cid, storageValue,exhaustTime)
doAddCondition(cid, exhaust)
end
return TRUE
else
doPlayerSendCancel(cid, 'Sorry, Just ' .. lenght .. ' caracteres')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return TRUE
end
else
doPlayerSendCancel(cid, 'Sorry, You Need to write something')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return TRUE
end
else
doPlayerSendCancel(cid, 'You haven\'t a target')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return TRUE
end
return TRUE
end
thx all