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

sayajin script

Sir MoX

New Member
Joined
Jan 14, 2009
Messages
285
Reaction score
1
hello, I have a script that when a player says the command the player transform in to sayajin that gives power for 10 seconds and change his hair to yellow and appear waves near him.
When I load it in the server appear this problem:

[03/03/2009 15:33:06] Warning: [Event::loadScript] Can not load script. data/talkactions/scripts/sayajin.lua
[03/03/2009 15:33:06] data/talkactions/scripts/sayajin.lua:2: function arguments expected near 'Sayajin'

here's the script if someone could fix it:

Code:
Name: 
Super Sayajin V. 0.0.1
]]--

--[[ Config ]] --
configSayajin = {
    ['Value'] = {outfit = 29000, time = 10}, -- First Value for a storage, second value is the time thats get the sayajin transformation.
    ['NeedLearn'] = {yesOrno = 'no', value = 1000, value2 = 1, cancel = 'You need learn this spell.'}, -- Need Learn this spell? , If answer is 'yes' put the storage to can cast cand cancel message.
    ['NeedLevel'] = {value = 10, cancel = 'You dont have the level requiered.'}, -- Level to caste the spell and cancel message,
    ['NeedMana'] = {value = 2, cancel = 'You dont have mana.'} -- Mana need it to cast spell and cancel message.
}
--[[ /Config ]] --





--[[ Library ]]--
local superSayajin = {}


superSayajin.CheckOldOutfit = function(cid, checkorset, value, time)



    if checkorset == 'check' and time == nil then

setPlayerStorageValue(cid, value, getCreatureOutfit(cid).lookType)
setPlayerStorageValue(cid, value+1, getCreatureOutfit(cid).lookHead)
setPlayerStorageValue(cid, value+2, getCreatureOutfit(cid).lookBody)
setPlayerStorageValue(cid, value+3, getCreatureOutfit(cid).lookLegs)
setPlayerStorageValue(cid, value+4, getCreatureOutfit(cid).lookFeet)
setPlayerStorageValue(cid, value+5, getCreatureOutfit(cid).lookAddons) 

    elseif checkorset == 'set_yellow_hair' then

    local OldOutfit = {lookType = getPlayerStorageValue(cid, value), lookHead = 79, 
lookBody = getPlayerStorageValue(cid, value+2), lookLegs = getPlayerStorageValue(cid, value+3), 
lookFeet = getPlayerStorageValue(cid, value+4), lookAddons = getPlayerStorageValue(cid, value+5)}
    doSetCreatureOutfit(cid, OldOutfit, time)
    end
end

superSayajin.SetVocation = function(cid)
    if getPlayerVocation(cid) <= 4 then
doPlayerSetVocation(cid,getPlayerVocation(cid)+8)
    elseif getPlayerVocation(cid) >=5 then
doPlayerSetVocation(cid,getPlayerVocation(cid)+4)
    end
end


superSayajin.SendEffect = function(cid)
ppos = getPlayerPosition(cid)
    doSendMagicEffect({x = ppos.x-1, y = ppos.y, z=ppos.z},48)
    doSendMagicEffect({x = ppos.x+1, y = ppos.y, z=ppos.z},48)
    doSendMagicEffect({x = ppos.x, y = ppos.y+1, z=ppos.z},48)
    doSendMagicEffect({x = ppos.x, y = ppos.y-1, z=ppos.z},48)
    doSendMagicEffect(getPlayerPosition(cid),29)
end

superSayajin.ReturnNormal = function(cid)
doPlayerSetVocation(cid,getPlayerVocation(cid)-4)
end
--[[ /Library ]] --



function onSay(cid, words, param)

    if configSayajin['NeedLearn'].yesOrno == 'yes' then

if getPlayerStorageValue(cid,configSayajin['NeedLearn'].value) == configSayajin['NeedLearn'].value2 then
if getPlayerLevel(cid) >= configSayajin['NeedLevel'].value then
if getPlayerMana(cid) >= configSayajin['NeedMana'].value then
doPlayerAddMana(cid,-configSayajin['NeedMana'].value)
superSayajin.CheckOldOutfit(cid, 'check', configSayajin['Value'].outfit)
superSayajin.CheckOldOutfit(cid, 'set_yellow_hair', configSayajin['Value'].outfit, 1000*configSayajin['Value'].time)
superSayajin.SetVocation(cid)
    doSendAnimatedText(getPlayerPosition(cid),'Sayajin',250)
for x = 1, configSayajin['Value'].time do
addEvent(superSayajin.SendEffect, 1000*x, cid)
end
addEvent(superSayajin.ReturnNormal, 1000*configSayajin['Value'].time, cid)
else
doPlayerSendCancel(cid,configSayajin['NeedMana'].cancel)
end
    
else
doPlayerSendCancel(cid,configSayajin['NeedLevel'].cancel)
end

else
doPlayerSendCancel(cid,configSayajin['NeedLearn'].cancel)
end



    elseif configSayajin['NeedLearn'].yesOrno ~= 'yes' then
if getPlayerLevel(cid) >= configSayajin['NeedLevel'].value then
if getPlayerMana(cid) >= configSayajin['NeedMana'].value then

doPlayerAddMana(cid,-configSayajin['NeedMana'].value)
superSayajin.CheckOldOutfit(cid, 'check', configSayajin['Value'].outfit)
superSayajin.CheckOldOutfit(cid, 'set_yellow_hair', configSayajin['Value'].outfit, 1000*configSayajin['Value'].time)
superSayajin.SetVocation(cid)
doSendAnimatedText(getPlayerPosition(cid),'Sayajin',250)
for x = 1, configSayajin['Value'].time do
addEvent(superSayajin.SendEffect, 1000*x, cid)
end
addEvent(superSayajin.ReturnNormal, 1000*configSayajin['Value'].time, cid)
else
doPlayerSendCancel(cid,configSayajin['NeedMana'].cancel)
end
    
else
doPlayerSendCancel(cid,configSayajin['NeedLevel'].cancel)
end

    end

end
 
Last edited by a moderator:
Code:
--[[
Name:
Super Sayajin V. 0.0.1
]] --

--[[ Config ]] --
configSayajin = {
['Value'] = {outfit = 29000, time = 10}, -- First Value for a storage, second value is the time thats get the sayajin transformation.
['NeedLearn'] = {yesOrno = 'no', value = 1000, value2 = 1, cancel = 'You need learn this spell.'}, -- Need Learn this spell? , If answer is 'yes' put the storage to can cast cand cancel message.
['NeedLevel'] = {value = 10, cancel = 'You dont have the level requiered.'}, -- Level to caste the spell and cancel message,
['NeedMana'] = {value = 2, cancel = 'You dont have mana.'} -- Mana need it to cast spell and cancel message.
}
--[[ /Config ]] --





--[[ Library ]]--
local superSayajin = {}


superSayajin.CheckOldOutfit = function(cid, checkorset, value, time)



if checkorset == 'check' and time == nil then

setPlayerStorageValue(cid, value, getCreatureOutfit(cid).lookType)
setPlayerStorageValue(cid, value+1, getCreatureOutfit(cid).lookHead)
setPlayerStorageValue(cid, value+2, getCreatureOutfit(cid).lookBody)
setPlayerStorageValue(cid, value+3, getCreatureOutfit(cid).lookLegs)
setPlayerStorageValue(cid, value+4, getCreatureOutfit(cid).lookFeet)
setPlayerStorageValue(cid, value+5, getCreatureOutfit(cid).lookAddons)

elseif checkorset == 'set_yellow_hair' then

local OldOutfit = {lookType = getPlayerStorageValue(cid, value), lookHead = 79,
lookBody = getPlayerStorageValue(cid, value+2), lookLegs = getPlayerStorageValue(cid, value+3),
lookFeet = getPlayerStorageValue(cid, value+4), lookAddons = getPlayerStorageValue(cid, value+5)}
doSetCreatureOutfit(cid, OldOutfit, time)
end
end

superSayajin.SetVocation = function(cid)
if getPlayerVocation(cid) <= 4 then
doPlayerSetVocation(cid,getPlayerVocation(cid)+8)
elseif getPlayerVocation(cid) >=5 then
doPlayerSetVocation(cid,getPlayerVocation(cid)+4)
end
end


superSayajin.SendEffect = function(cid)
ppos = getPlayerPosition(cid)
doSendMagicEffect({x = ppos.x-1, y = ppos.y, z=ppos.z},48)
doSendMagicEffect({x = ppos.x+1, y = ppos.y, z=ppos.z},48)
doSendMagicEffect({x = ppos.x, y = ppos.y+1, z=ppos.z},48)
doSendMagicEffect({x = ppos.x, y = ppos.y-1, z=ppos.z},48)
doSendMagicEffect(getPlayerPosition(cid),29)
end

superSayajin.ReturnNormal = function(cid)
doPlayerSetVocation(cid,getPlayerVocation(cid)-4)
end
--[[ /Library ]] --



function onSay(cid, words, param)

if configSayajin['NeedLearn'].yesOrno == 'yes' then

if getPlayerStorageValue(cid,configSayajin['NeedLearn'].value) == configSayajin['NeedLearn'].value2 then
if getPlayerLevel(cid) >= configSayajin['NeedLevel'].value then
if getPlayerMana(cid) >= configSayajin['NeedMana'].value then
doPlayerAddMana(cid,-configSayajin['NeedMana'].value)
superSayajin.CheckOldOutfit(cid, 'check', configSayajin['Value'].outfit)
superSayajin.CheckOldOutfit(cid, 'set_yellow_hair', configSayajin['Value'].outfit, 1000*configSayajin['Value'].time)
superSayajin.SetVocation(cid)
doSendAnimatedText(getPlayerPosition(cid),'Sayajin ',250)
for x = 1, configSayajin['Value'].time do
addEvent(superSayajin.SendEffect, 1000*x, cid)
end
addEvent(superSayajin.ReturnNormal, 1000*configSayajin['Value'].time, cid)
else
doPlayerSendCancel(cid,configSayajin['NeedMana'].cancel)
end

else
doPlayerSendCancel(cid,configSayajin['NeedLevel'].cancel)
end

else
doPlayerSendCancel(cid,configSayajin['NeedLearn'].cancel)
end



elseif configSayajin['NeedLearn'].yesOrno ~= 'yes' then
if getPlayerLevel(cid) >= configSayajin['NeedLevel'].value then
if getPlayerMana(cid) >= configSayajin['NeedMana'].value then

doPlayerAddMana(cid,-configSayajin['NeedMana'].value)
superSayajin.CheckOldOutfit(cid, 'check', configSayajin['Value'].outfit)
superSayajin.CheckOldOutfit(cid, 'set_yellow_hair', configSayajin['Value'].outfit, 1000*configSayajin['Value'].time)
superSayajin.SetVocation(cid)
doSendAnimatedText(getPlayerPosition(cid),'Sayajin ',250)
for x = 1, configSayajin['Value'].time do
addEvent(superSayajin.SendEffect, 1000*x, cid)
end
addEvent(superSayajin.ReturnNormal, 1000*configSayajin['Value'].time, cid)
else
doPlayerSendCancel(cid,configSayajin['NeedMana'].cancel)
end

else
doPlayerSendCancel(cid,configSayajin['NeedLevel'].cancel)
end

end

end
try now
 
Back
Top