Postado Dezembro 20, 2016 8 anos Olá, estou com um pequeno erro no meu OT 10.10 (pode até não ser um erro, mas uma falta de função) O GOD só consegue criar itens se for pelo id, pelo nome do item não vai. Exemplo: /i 2160 - assim vai /i crystal coin - assim não vai Aqui vai minha Talkactions: Talkactions.xml <?xml version="1.0" encoding="UTF-8"?> <talkactions> <!-- Gods --> <talkaction log="yes" words="/attr" access="5" event="function" value="thingProporties"/> <talkaction log="yes" words="/serverdiag" access="5" event="function" value="diagnostics"/> <talkaction log="yes" words="/closeserver" access="5" event="script" value="closeopen.lua"/> <talkaction log="yes" words="/openserver" access="5" event="script" value="closeopen.lua"/> <talkaction log="yes" words="/promote;/demote" access="5" event="script" value="promote.lua"/> <talkaction log="yes" words="/downserver" access="5" event="script" value="shutdown.lua"/> <talkaction log="yes" access="5" words="/mode" event="script" value="mode.lua"/> <talkaction log="yes" words="/i" access="4" event="script" value="createitem.lua"/> <!-- Community Managers --> <talkaction log="yes" words="/s" access="4" event="script" value="summon.lua"/> <talkaction log="yes" words="/n" access="4" event="script" value="creature.lua"/> <talkaction log="yes" words="/m" access="4" event="script" value="creature.lua"/> <talkaction log="yes" words="/reload" access="4" event="script" value="reload.lua"/> <talkaction log="yes" words="/raid" access="4" event="script" value="raid.lua"/> <talkaction log="yes" words="/newtype" access="4" event="script" value="newtype.lua"/> <talkaction log="yes" words="/r" access="4" event="script" value="remove.lua"/> <talkaction log="yes" words="/owner" access="4" event="script" value="owner.lua"/> <talkaction log="yes" words="/storage" access="4" event="script" value="storage.lua"/> <talkaction log="yes" words="/config" access="4" event="script" value="configinfo.lua"/> <talkaction access="4" words="/z" event="script" value="magiceffect.lua"/> <talkaction access="4" words="/x" event="script" value="animationeffect.lua"/> <talkaction access="4" words="/y" event="script" value="animatedtext.lua"/> <talkaction log="yes" words="/bc" access="4" event="script" value="broadcastclass.lua"/> <talkaction log="yes" access="4" words="/mkick" event="script" value="masskick.lua"/> <!-- Gamemasters --> <talkaction log="yes" words="/ghost" access="3" event="function" value="ghost"/> <talkaction log="yes" words="/squelch" access="3" event="script" value="gamemaster.lua"/> <talkaction log="yes" words="/cliport" access="3" event="script" value="gamemaster.lua"/> <talkaction log="yes" words="/t" access="3" event="script" value="teleportmaster.lua"/> <talkaction log="yes" words="/c" access="3" event="script" value="teleporthere.lua"/> <talkaction log="yes" words="/goto" access="3" event="script" value="teleportto.lua"/> <talkaction log="yes" words="/a" access="3" event="script" value="teleporttiles.lua"/> <talkaction log="yes" words="/kick" access="3" event="script" value="kick.lua"/> <talkaction log="yes" words="/send" access="3" event="script" value="teleportsend.lua"/> <talkaction log="yes" words="/unban" access="3" event="script" value="unban.lua"/> <talkaction log="yes" words="/town" access="3" event="script" value="teleporttown.lua"/> <talkaction log="yes" words="/up" access="3" event="script" value="teleportfloor.lua"/> <talkaction log="yes" words="/down" access="3" event="script" value="teleportfloor.lua"/> <talkaction log="yes" words="/save" access="3" event="script" value="save.lua"/> <talkaction log="yes" words="/clean" access="3" event="script" value="clean.lua"/> <talkaction log="yes" words="/reports" access="3" event="script" value="reports.lua"/> <talkaction log="yes" words="/mc" access="3" event="script" value="multicheck.lua"/> <talkaction log="yes" access="3" words="/wp" event="script" value="waypoints.lua"/> <!-- Senior Tutors --> <talkaction log="yes" words="/notations" access="2" event="script" value="notations.lua"/> <talkaction log="yes" words="/information" access="2" event="script" value="allinfo.lua"/> <talkaction log="yes" words="/gethouse" access="2" event="script" value="gethouse.lua"/> <talkaction log="yes" access="2" words="/b" event="script" value="broadcast.lua"/> <!-- Tutors --> <talkaction log="yes" words="/baninfo" access="1" event="function" value="banishmentInfo"/> <talkaction log="yes" access="1" words="/pos" event="script" value="position.lua"/> <!-- Players --> <talkaction words="!frags;!kills" event="script" value="frags.lua"/> <talkaction words="!online" event="script" value="online.lua"/> <talkaction words="!uptime" event="script" value="uptime.lua"/> <talkaction words="!pvp" event="script" value="pvp.lua"/> <talkaction words="!q" event="script" value="money.lua"/> <talkaction words="/commands" event="script" value="commands.lua"/> <talkaction words="!addon" event="script" value="addondoll.lua"/> <talkaction words="!vipdays;!buyvip;/checkvip;/delvip" script="systemvip.lua"/> <talkaction words="!aol" event="script" value="aol.lua"/> <talkaction words="!food" event="script" value="food.lua"/> <talkaction words="!buybless;/buybless;!bless;/bless" script="bless.lua" /> <talkaction words="!glist" script="guildlist.lua"/> <talkaction words="!topfrags" script="topfrags.lua"/> <talkaction words="!cast;/cast" event="script" value="castSys.lua"/> <talkaction words="!mount" event="script" value="mountdoll.lua"/> <talkaction words="/rank" script="cd.lua" /> <!-- Guilds --> <talkaction words="!createguild" event="function" value="guildCreate"/> <talkaction words="!joinguild" event="function" value="guildJoin"/> <!-- Houses --> <talkaction words="!buyhouse" filter="word-spaced" event="function" value="houseBuy"/> <talkaction words="!sellhouse" filter="word-spaced" event="function" value="houseSell"/> <talkaction words="alana sio" filter="word-spaced" event="function" value="houseKick"/> <talkaction words="aleta grav" filter="word-spaced" event="function" value="houseDoorList"/> <talkaction words="aleta sio" filter="word-spaced" event="function" value="houseGuestList"/> <talkaction words="aleta som" filter="word-spaced" event="function" value="houseSubOwnerList"/> <talkaction words="!leavehouse" filter="word-spaced" event="script" value="leavehouse.lua"/> <!-- (Deprecated) Redirect old '/' to '!' --> <talkaction words="/online" hide="yes" event="script" value="online.lua"/> <talkaction words="/uptime" hide="yes" event="script" value="uptime.lua"/> <talkaction words="/pvp" hide="yes" event="script" value="pvp.lua"/> <talkaction words="/serverinfo" hide="yes" event="script" value="serverinfo.lua"/> <talkaction log="yes" access="1" hide="yes" words="!pos" event="script" value="position.lua"/> <!-- Custom systems --> <talkaction words="!notice" event="script" value="notice.lua"/> <talkaction words="!service" event="script" value="Fragas.lua"/> <talkaction words="!jail" script="Cadeia.lua"/> <talkaction words="!unjail" script="Cadeia.lua"/> <talkaction words="/jail" script="Cadeia.lua"/> <talkaction words="/unjail" script="Cadeia.lua"/> <talkaction words="!necromancer" script="demonic.lua"/> <talkaction words="!nightmare" script="love.lua"/> <talkaction filter="word" words="/guild" script="guildcast.lua"/> <talkaction words="!afk" event="script" value="afk.lua"/> <talkaction words="!treinando" event="script" value="treinando.lua"/> <!-- custon By Revange --> <!-- pollsystem talkactions --> <talkaction words="!createpoll" event="script" value="PollSystem.lua"/> <talkaction words="!activatepoll" event="script" value="PollSystem.lua"/> <talkaction words="!cancelpoll" event="script" value="PollSystem.lua"/> <talkaction words="!seepoll" event="script" value="PollSystem.lua"/> <talkaction words="!seeresults" event="script" value="PollSystem.lua"/> <talkaction words="!remvotes" event="script" value="PollSystem.lua"/> <talkaction words="!rempoll" event="script" value="PollSystem.lua"/> <talkaction words="!votepoll" event="script" value="PollSystem.lua"/> <talkaction words="love" script="love.lua"/> <talkaction words="/addvip" script="addvip2.lua"/> <talkaction log="yes" words="/vip" access="5" event="script" value="vip/addvipp.lua" /> <talkaction log="yes" access="5" words="/openwar" event="script" value="cairitem.lua"/> <talkaction log="yes" words="/addpremium" access="5" event="script" value="addpremium.lua" /> <!-- Guild War System --> <talkaction words="/war" channel="0" event="script" value="war.lua" desc="(Guild channel command) War management."/> </talkactions> createitem.lua function onSay(cid, words, param, channel) if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return TRUE end local t = string.explode(param, ",") local ret = RETURNVALUE_NOERROR local tmp = getCreaturePosition(cid) local id = tonumber(t[1]) if(not id) then id = getItemIdByName(t[1], FALSE) if(id == LUA_ERROR) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.") return TRUE end end local amount = 100 if(t[2]) then amount = t[2] end local item = doCreateItemEx(id, amount) if(t[3] and getBooleanFromString(t[3]) == TRUE) then if(t[4] and getBooleanFromString(t[4]) == TRUE) then tmp = getPlayerLookPos(cid) end ret = doTileAddItemEx(tmp, item) else ret = doPlayerAddItemEx(cid, item, TRUE) end if(ret ~= RETURNVALUE_NOERROR) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Couldn't add item: " .. t[1]) return TRUE end doSendMagicEffect(tmp, CONST_ME_MAGIC_RED) return TRUE end Podem me ajudar ? Ajudei? Reputar Cai o dedo? Acho que não Mapper : 80% Scripter : 40% Client Maker : 100% Spriter : 100% Web Designer : Aprendendo Meus Mapas : [8.60] Rivals Baiak 1.0 Global Compacto Edited by MatheusVidaLoka [8.60]
Postado Dezembro 20, 2016 8 anos function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local t = string.explode(param, ",") local ret = RETURNVALUE_NOERROR local pos = getCreaturePosition(cid) local id = tonumber(t[1]) if(not id) then id = getItemIdByName(t[1], false) if(not id) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.") return true end end local amount = 100 if(t[2]) then amount = t[2] end local item = doCreateItemEx(id, amount) if(t[3] and getBooleanFromString(t[3])) then if(t[4] and getBooleanFromString(t[4])) then pos = getCreatureLookPosition(cid) end ret = doTileAddItemEx(pos, item) else ret = doPlayerAddItemEx(cid, item, true) end if(ret ~= RETURNVALUE_NOERROR) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Couldn't add item: " .. t[1]) return true end doDecayItem(item) if(not isPlayerGhost(cid)) then doSendMagicEffect(pos, CONST_ME_MAGIC_RED) end return true end Ou Modifica a 2º linha if(param == "") then troca para if(param == '') then Editado Dezembro 20, 2016 8 anos por Subyth (veja o histórico de edições)
Postado Dezembro 20, 2016 8 anos Autor 9 minutos atrás, Subyth disse: function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local t = string.explode(param, ",") local ret = RETURNVALUE_NOERROR local pos = getCreaturePosition(cid) local id = tonumber(t[1]) if(not id) then id = getItemIdByName(t[1], false) if(not id) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.") return true end end local amount = 100 if(t[2]) then amount = t[2] end local item = doCreateItemEx(id, amount) if(t[3] and getBooleanFromString(t[3])) then if(t[4] and getBooleanFromString(t[4])) then pos = getCreatureLookPosition(cid) end ret = doTileAddItemEx(pos, item) else ret = doPlayerAddItemEx(cid, item, true) end if(ret ~= RETURNVALUE_NOERROR) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Couldn't add item: " .. t[1]) return true end doDecayItem(item) if(not isPlayerGhost(cid)) then doSendMagicEffect(pos, CONST_ME_MAGIC_RED) end return true end Ou Modifica a 2º linha if(param == "") then troca para if(param == '') then Tentei amigo, continua com o mesmo erro! Ajudei? Reputar Cai o dedo? Acho que não Mapper : 80% Scripter : 40% Client Maker : 100% Spriter : 100% Web Designer : Aprendendo Meus Mapas : [8.60] Rivals Baiak 1.0 Global Compacto Edited by MatheusVidaLoka [8.60]
Postado Dezembro 20, 2016 8 anos Creio que não seja problema no scripts, procurei alguma diferença entre o seu e o meu e não encontrei nenhuma! Meu: Spoiler function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local t = string.explode(param, ",") local ret = RETURNVALUE_NOERROR local pos = getCreaturePosition(cid) local id = tonumber(t[1]) if(not id) then id = getItemIdByName(t[1], false) if(not id) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.") return true end end local amount = 100 if(t[2]) then amount = t[2] end local item = doCreateItemEx(id, amount) if(t[3] and getBooleanFromString(t[3])) then if(t[4] and getBooleanFromString(t[4])) then pos = getCreatureLookPosition(cid) end ret = doTileAddItemEx(pos, item) else ret = doPlayerAddItemEx(cid, item, true) end if(ret ~= RETURNVALUE_NOERROR) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Couldn't add item: " .. t[1]) return true end doDecayItem(item) if(not isPlayerGhost(cid)) then doSendMagicEffect(pos, CONST_ME_MAGIC_RED) end return true end Spoiler <talkaction log="yes" words="/i" access="5" event="script" value="createitem.lua"/> Porem o meu é TFS 0.4, funciona normalmente aqui..
Postado Dezembro 20, 2016 8 anos Autor 1 minuto atrás, Digoshow disse: Creio que não seja problema no scripts, procurei alguma diferença entre o seu e o meu e não encontrei nenhuma! Meu: Ocultar conteúdo function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local t = string.explode(param, ",") local ret = RETURNVALUE_NOERROR local pos = getCreaturePosition(cid) local id = tonumber(t[1]) if(not id) then id = getItemIdByName(t[1], false) if(not id) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.") return true end end local amount = 100 if(t[2]) then amount = t[2] end local item = doCreateItemEx(id, amount) if(t[3] and getBooleanFromString(t[3])) then if(t[4] and getBooleanFromString(t[4])) then pos = getCreatureLookPosition(cid) end ret = doTileAddItemEx(pos, item) else ret = doPlayerAddItemEx(cid, item, true) end if(ret ~= RETURNVALUE_NOERROR) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Couldn't add item: " .. t[1]) return true end doDecayItem(item) if(not isPlayerGhost(cid)) then doSendMagicEffect(pos, CONST_ME_MAGIC_RED) end return true end Ocultar conteúdo <talkaction log="yes" words="/i" access="5" event="script" value="createitem.lua"/> Porem o meu é TFS 0.4, funciona normalmente aqui.. também notei essa diferença nos .lua citados, pode upar seu tfs pra mim ? ou me passar o link ? Ajudei? Reputar Cai o dedo? Acho que não Mapper : 80% Scripter : 40% Client Maker : 100% Spriter : 100% Web Designer : Aprendendo Meus Mapas : [8.60] Rivals Baiak 1.0 Global Compacto Edited by MatheusVidaLoka [8.60]
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.