Postado Janeiro 17, 2014 11 anos Phodarks ou ricardo Tibia, postem a resolução do problema aqui no fórum. Ricardo, use nomes mais coerentes em seus tópicos. Ot Design: https://discord.gg/VgtVRNmCD7
Postado Janeiro 17, 2014 11 anos "data/talkactions/scripts/attr.lua" local itemFuncs = { ["attackspeed"] = setItemAttackSpeed, ["name"] = setItemName, ["plural"] = setItemPluralName, ["attack"] = setItemAttack, ["extraattack"] = setItemExtraAttack, ["defense"] = setItemDefense, ["armor"] = setItemArmor, ["extradefense"] = setItemExtraDefense, ["hitchance"] = setItemHitChance, ["range"] = setItemShootRange, ["actionid"] = doSetItemActionId, ["action"] = doSetItemActionId, ["aid"] = doSetItemActionId, ["description"] = doSetItemSpecialDescription, ["desc"] = doSetItemSpecialDescription, ["protection"] = doSetItemProtection, ["charges"] = doChangeTypeItem, ["count"] = doChangeTypeItem }[/size][/color][/font] [font="helvetica, arial, sans-serif"][color="#282828"][size=3]local creatureFuncs = { ["health"] = doCreatureAddHealth, ["maxhealth"]= setCreatureMaxHealth, ["mana"] = doCreatureAddMana, ["maxmana"] = setCreatureMaxMana, ["speed"] = doChangeSpeed, ["droploot"] = doCreatureSetDropLoot, ["cannotmove"] = doCreatureSetNoMove, ["skull"] = doCreatureSetSkullType, ["redskull"] = doPlayerSetRedSkullTicks }[/size][/color][/font] [font="helvetica, arial, sans-serif"][color="#282828"][size=3]local playerFuncs = { ["fyi"] = doPlayerPopupFYI, ["tutorial"] = doPlayerSendTutorial, ["guildrank"] = doPlayerSetGuildRank, ["guildnick"] = doPlayerSetGuildNick, ["group"] = doPlayerSetGroupId, ["vocation"] = doPlayerSetVocation, ["promotion"] = setPlayerPromotionLevel, ["stamina"] = doPlayerAddStamina, ["town"] = doPlayerSetTown, ["balance"] = doPlayerDepositMoney }[/size][/color][/font] [font="helvetica, arial, sans-serif"][color="#282828"][size=3]function onSay(cid, words, param, channel) if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return TRUE end[/size][/color][/font] [font="helvetica, arial, sans-serif"][color="#282828"][size=3]local pos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z, stackpos=1} if getCreatureLookDirection(cid) == SOUTH then pos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z, stackpos=255} elseif getCreatureLookDirection(cid) == NORTH then pos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y-1, z=getCreaturePosition(cid).z, stackpos=255} elseif getCreatureLookDirection(cid) == EAST then pos = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z, stackpos=255} elseif getCreatureLookDirection(cid) == WEST then pos = {x=getCreaturePosition(cid).x-1, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z, stackpos=255} end[/size][/color][/font] [font="helvetica, arial, sans-serif"][color="#282828"][size=3]local t = string.explode(param, ",")[/size][/color][/font] [font="helvetica, arial, sans-serif"][color="#282828"][size=3]local getThing = getThingFromPos(pos)[/size][/color][/font] [font="helvetica, arial, sans-serif"][color="#282828"][size=3]if itemFuncs[t[1]] then if getThing.itemid > 0 then if itemFuncs[t[1]](getThing.uid, t[2]) then doSendMagicEffect(pos, CONST_ME_MAGIC_GREEN) return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can not add attribute to this item.") return TRUE end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item not found.") return TRUE end elseif creatureFuncs[t[1]] then if isCreature(getThing.uid) then if creatureFuncs[t[1]](getThing.uid, t[2]) then doSendMagicEffect(pos, CONST_ME_MAGIC_GREEN) return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can not add attribute to this creature.") return TRUE end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Creature not found.") return TRUE end elseif playerFuncs[t[1]] then if isPlayer(getThing.uid) then if playerFuncs[t[1]](getThing.uid, t[2]) then doSendMagicEffect(pos, CONST_ME_MAGIC_GREEN) return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can not add attribute to this player.") return TRUE end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player not found.") return TRUE end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Unknow attribute.") return TRUE end return TRUE end "data/talkactions/talkactions.xml" <talkaction log="yes" words="/attr" access="5" event="function" value="attr.lua"/> Editado Janeiro 17, 2014 11 anos por phodarks (veja o histórico de edições) Ajudei = REP+ Não dou suporte por PM qualquer dúvida procure no fórum,caso não encontre oque procura crie um tópico. [email protected]" /> | TFS 0.4 DEV | %5Bcreaturescript%5D Icones no minimap com descrição%5Btalkaction%5D Adicionar ou remover VIP do player.%5Bcreaturescripts%5D Senha para porta%5Btalkaction%5D Mandar mensagem para pasta do servidorMapa Evento War Castle%5Baction%5D Canoa em MovimentoTeleport Scroll System%5Bcreaturescripts%5D Recompensa por level para X vocations%5Btalkaction%5D Adicionar X item para o player%5Btalkactions%5D Adicionar item para todos players online%5Baction%5D Item que teleporta o player para house[action+movement] Passaporte para entrar no barco
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.