Xarly
Member
- Joined
- Mar 9, 2015
- Messages
- 360
- Reaction score
- 20
Hello for example the command /m or /i don't working at my server i checked my talkactions and the scripts i got them but they don't work i post it here and i hope someone can help me T_T
Talkactions.xml:
<?xml version="1.0" encoding="UTF-8"?>
<talkactions>
<talkaction words="!setstorage" separator=" " script="set_storage.lua"/>
<talkaction words="!getstorage" separator=" " script="get_storage.lua"/>
<talkaction words="!report" separator=" " script="adminreport.lua"/>
<!-- <talkaction words="/ctffdgdfgdf" separator=" " script="ctf.lua" />-->
<!-- Gods -->
<talkaction words="/addskill" separator=" " script="add_skill.lua" />
<talkaction words="/chameleon" separator=" " script="chameleon.lua" />
<talkaction words="/clean" script="clean.lua" />
<talkaction words="/closeserver" separator=" " script="closeserver.lua" />
<talkaction words="/ghost" script="ghost.lua" />
<talkaction words="/hide" script="hide.lua" />
<talkaction words="/mccheck" script="mccheck.lua" />
<talkaction words="/openserver" script="openserver.lua"/>
<talkaction words="/m" separator=" " script="place_monster.lua" />
<talkaction words="/owner" separator=" " script="owner.lua" />
<talkaction words="/s" separator=" " script="place_npc.lua" />
<talkaction words="/summon" separator=" " script="place_summon.lua" />
<!-- test talkactions -->
<talkaction words="!z" separator=" " script="magiceffect.lua" />
<talkaction words="!x" separator=" " script="animationeffect.lua" />
<!-- Achievements Commands -->
<talkaction words="/addach" separator=" " script="achievements.lua" />
<talkaction words="/removeach" separator=" " script="achievements.lua" />
<talkaction words="!autoloot" separator=" " script="autoloot.lua"/>
<!-- Gamemasters -->
<talkaction words="/save" script="save.lua" />
<talkaction words="/ban" separator=" " script="ban.lua" />
<talkaction words="/ipban" separator=" " script="ipban.lua" />
<talkaction words="/unban" separator=" " script="unban.lua" />
<talkaction words="/i" separator=" " script="create_item.lua" />
<talkaction words="/up" script="up.lua" />
<talkaction words="/down" script="down.lua" />
<talkaction words="/c" separator=" " script="teleport_creature_here.lua" />
<talkaction words="/goto" separator=" " script="teleport_to_creature.lua" />
<talkaction words="/gotopos" separator=" " script="teleport_to_pos.lua" />
<talkaction words="/t" script="teleport_home.lua" />
<talkaction words="/town" separator=" " script="teleport_to_town.lua" />
<talkaction words="/a" separator=" " script="teleport_ntiles.lua" />
<talkaction words="/pos" separator=" " script="position.lua" />
<talkaction words="/info" separator=" " script="info.lua" />
<talkaction words="/r" separator=" " script="removething.lua" />
<talkaction words="/kick" separator=" " script="kick.lua" />
<talkaction words="/B" separator=" " script="broadcast.lua" />
<talkaction words="/looktype" separator=" " script="looktype.lua" />
<talkaction words="/mounts" separator=" " script="allmounts.lua" />
<talkaction words="/addons" separator=" " script="alladdons.lua" />
<!-- Senior Tutors -->
<talkaction words="/addtutor" separator=" " script="add_tutor.lua" />
<talkaction words="/removetutor" separator=" " script="remove_tutor.lua" />
<!-- player talkactions -->
<talkaction words="!buyhouse" script="buyhouse.lua" />
<talkaction words="!leavehouse" script="leavehouse.lua" />
<talkaction words="!uptime" script="uptime.lua" />
<talkaction words="!spectators" script="spectators.lua" />
<talkaction words="!cast on" separator=" " script="start_cast.lua" />
<talkaction words="!cast off" script="stop_cast.lua" />
<!--<talkaction words="/criarportal" separator=" " script="portal.lua" />-->
<!--<talkaction words="/fgyttvvbnnn" script="giveAll.lua" /> -->
<!--<talkaction words="/koiottrerdfszx" script="addrandom.lua" />-->
<talkaction words="!outfit" script="guild_outfit.lua"/>
<talkaction words="!frags" script="kills.lua" />
<talkaction words="!kills" script="kills.lua" />
<talkaction words="!online" script="online.lua" />
<talkaction words="!guildpoints" separator=" " script="guildpoints.lua" />
<talkaction words="!serverinfo" script="serverinfo.lua" />
<talkaction words="/mute2" separator=" " script="mute2.lua" />
<talkaction words="/unmute2" separator=" " script="mute2.lua" />
<talkaction words="/mute" separator=" " script="mute.lua" />
<talkaction words="/unmute" separator=" " script="mute.lua" />
<!--<talkaction words="!aol" script="aol.lua"/>-->
<talkaction words="!bless" script="bless.lua"/>
<!--<talkaction words="Allwords" script="antidivulguer.lua" /> -->
<talkaction words="!exp" script="exp.lua" />
</talkactions>
and there are the script for example the créate item script
function onSay(cid, words, param)
local player = Player(cid)
if not player:getGroup():getAccess() then
return true
end
if player:getAccountType() < ACCOUNT_TYPE_GOD then
return false
end
local split = param:split(",")
local itemType = ItemType(split[1])
if itemType:getId() == 0 then
itemType = ItemType(tonumber(split[1]))
if itemType:getId() == 0 then
player:sendCancelMessage("There is no item with that id or name.")
return false
end
end
local count = tonumber(split[2])
if count ~= nil then
if itemType:isStackable() then
count = math.min(10000, math.max(1, count))
elseif not itemType:hasSubType() then
count = math.min(100, math.max(1, count))
else
count = math.max(1, count)
end
else
count = 1
end
local result = player:addItem(itemType:getId(), count)
if result ~= nil then
if not itemType:isStackable() then
if type(result) == "table" then
for _, item in ipairs(result) do
item:decay()
end
else
result:decay()
end
end
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
end
return false
end
I hope someone can help me to fix this also i don't recibe errors on my distro so i don't know how to fix it.. thanks!
Talkactions.xml:
<?xml version="1.0" encoding="UTF-8"?>
<talkactions>
<talkaction words="!setstorage" separator=" " script="set_storage.lua"/>
<talkaction words="!getstorage" separator=" " script="get_storage.lua"/>
<talkaction words="!report" separator=" " script="adminreport.lua"/>
<!-- <talkaction words="/ctffdgdfgdf" separator=" " script="ctf.lua" />-->
<!-- Gods -->
<talkaction words="/addskill" separator=" " script="add_skill.lua" />
<talkaction words="/chameleon" separator=" " script="chameleon.lua" />
<talkaction words="/clean" script="clean.lua" />
<talkaction words="/closeserver" separator=" " script="closeserver.lua" />
<talkaction words="/ghost" script="ghost.lua" />
<talkaction words="/hide" script="hide.lua" />
<talkaction words="/mccheck" script="mccheck.lua" />
<talkaction words="/openserver" script="openserver.lua"/>
<talkaction words="/m" separator=" " script="place_monster.lua" />
<talkaction words="/owner" separator=" " script="owner.lua" />
<talkaction words="/s" separator=" " script="place_npc.lua" />
<talkaction words="/summon" separator=" " script="place_summon.lua" />
<!-- test talkactions -->
<talkaction words="!z" separator=" " script="magiceffect.lua" />
<talkaction words="!x" separator=" " script="animationeffect.lua" />
<!-- Achievements Commands -->
<talkaction words="/addach" separator=" " script="achievements.lua" />
<talkaction words="/removeach" separator=" " script="achievements.lua" />
<talkaction words="!autoloot" separator=" " script="autoloot.lua"/>
<!-- Gamemasters -->
<talkaction words="/save" script="save.lua" />
<talkaction words="/ban" separator=" " script="ban.lua" />
<talkaction words="/ipban" separator=" " script="ipban.lua" />
<talkaction words="/unban" separator=" " script="unban.lua" />
<talkaction words="/i" separator=" " script="create_item.lua" />
<talkaction words="/up" script="up.lua" />
<talkaction words="/down" script="down.lua" />
<talkaction words="/c" separator=" " script="teleport_creature_here.lua" />
<talkaction words="/goto" separator=" " script="teleport_to_creature.lua" />
<talkaction words="/gotopos" separator=" " script="teleport_to_pos.lua" />
<talkaction words="/t" script="teleport_home.lua" />
<talkaction words="/town" separator=" " script="teleport_to_town.lua" />
<talkaction words="/a" separator=" " script="teleport_ntiles.lua" />
<talkaction words="/pos" separator=" " script="position.lua" />
<talkaction words="/info" separator=" " script="info.lua" />
<talkaction words="/r" separator=" " script="removething.lua" />
<talkaction words="/kick" separator=" " script="kick.lua" />
<talkaction words="/B" separator=" " script="broadcast.lua" />
<talkaction words="/looktype" separator=" " script="looktype.lua" />
<talkaction words="/mounts" separator=" " script="allmounts.lua" />
<talkaction words="/addons" separator=" " script="alladdons.lua" />
<!-- Senior Tutors -->
<talkaction words="/addtutor" separator=" " script="add_tutor.lua" />
<talkaction words="/removetutor" separator=" " script="remove_tutor.lua" />
<!-- player talkactions -->
<talkaction words="!buyhouse" script="buyhouse.lua" />
<talkaction words="!leavehouse" script="leavehouse.lua" />
<talkaction words="!uptime" script="uptime.lua" />
<talkaction words="!spectators" script="spectators.lua" />
<talkaction words="!cast on" separator=" " script="start_cast.lua" />
<talkaction words="!cast off" script="stop_cast.lua" />
<!--<talkaction words="/criarportal" separator=" " script="portal.lua" />-->
<!--<talkaction words="/fgyttvvbnnn" script="giveAll.lua" /> -->
<!--<talkaction words="/koiottrerdfszx" script="addrandom.lua" />-->
<talkaction words="!outfit" script="guild_outfit.lua"/>
<talkaction words="!frags" script="kills.lua" />
<talkaction words="!kills" script="kills.lua" />
<talkaction words="!online" script="online.lua" />
<talkaction words="!guildpoints" separator=" " script="guildpoints.lua" />
<talkaction words="!serverinfo" script="serverinfo.lua" />
<talkaction words="/mute2" separator=" " script="mute2.lua" />
<talkaction words="/unmute2" separator=" " script="mute2.lua" />
<talkaction words="/mute" separator=" " script="mute.lua" />
<talkaction words="/unmute" separator=" " script="mute.lua" />
<!--<talkaction words="!aol" script="aol.lua"/>-->
<talkaction words="!bless" script="bless.lua"/>
<!--<talkaction words="Allwords" script="antidivulguer.lua" /> -->
<talkaction words="!exp" script="exp.lua" />
</talkactions>
and there are the script for example the créate item script
function onSay(cid, words, param)
local player = Player(cid)
if not player:getGroup():getAccess() then
return true
end
if player:getAccountType() < ACCOUNT_TYPE_GOD then
return false
end
local split = param:split(",")
local itemType = ItemType(split[1])
if itemType:getId() == 0 then
itemType = ItemType(tonumber(split[1]))
if itemType:getId() == 0 then
player:sendCancelMessage("There is no item with that id or name.")
return false
end
end
local count = tonumber(split[2])
if count ~= nil then
if itemType:isStackable() then
count = math.min(10000, math.max(1, count))
elseif not itemType:hasSubType() then
count = math.min(100, math.max(1, count))
else
count = math.max(1, count)
end
else
count = 1
end
local result = player:addItem(itemType:getId(), count)
if result ~= nil then
if not itemType:isStackable() then
if type(result) == "table" then
for _, item in ipairs(result) do
item:decay()
end
else
result:decay()
end
end
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
end
return false
end
I hope someone can help me to fix this also i don't recibe errors on my distro so i don't know how to fix it.. thanks!