nickissonlobo 3 Postado Novembro 19, 2012 Share Postado Novembro 19, 2012 (editado) No Comando /attr eu mudo a vocação do player e logo em seguida o server cai ta ai o attr.xml 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 } local creatureFuncs = { ["health"] = doCreatureAddHealth, ["maxhealth"]= setCreatureMaxHealth, ["mana"] = doCreatureAddMana, ["maxmana"] = setCreatureMaxMana, ["speed"] = doChangeSpeed, ["droploot"] = doCreatureSetDropLoot, ["cannotmove"] = doCreatureSetNoMove, ["skull"] = doCreatureSetSkullType, ["redskull"] = doPlayerSetRedSkullTicks } local playerFuncs = { ["fyi"] = doPlayerPopupFYI, ["tutorial"] = doPlayerSendTutorial, ["guildrank"] = doPlayerSetGuildRank, ["guildnick"] = doPlayerSetGuildNick, ["group"] = doPlayerSetGroupId, ["vocation"] = doPlayerSetVocation, ["promotion"] = setPlayerPromotionLevel, ["stamina"] = doPlayerAddStamina, ["town"] = doPlayerSetTown, ["balance"] = doPlayerDepositMoney } function onSay(cid, words, param, channel) if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return TRUE end 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 local t = string.explode(param, ",") local getThing = getThingFromPos(pos) 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 Por Favor alguem me ajuda Resumindo quero um script tipo assim /addvocation player id da vocation Editado Novembro 19, 2012 por nickissonlobo Link para o comentário https://xtibia.com/forum/topic/199240-talk-bugada/ Compartilhar em outros sites More sharing options...
0 SmiX 265 Postado Novembro 19, 2012 Share Postado Novembro 19, 2012 Local incorreto. O correto seria Dúvidas e Pedidos de Scripts. Reportado! Link para o comentário https://xtibia.com/forum/topic/199240-talk-bugada/#findComment-1390529 Compartilhar em outros sites More sharing options...
0 Stigal 584 Postado Novembro 19, 2012 Share Postado Novembro 19, 2012 Movido Para Area Correta Link para o comentário https://xtibia.com/forum/topic/199240-talk-bugada/#findComment-1390610 Compartilhar em outros sites More sharing options...
0 SkyLigh 453 Postado Novembro 20, 2012 Share Postado Novembro 20, 2012 http://www.xtibia.com/forum/topic/114531-talkaction-troca-de-vocacao-100/ Link para o comentário https://xtibia.com/forum/topic/199240-talk-bugada/#findComment-1391184 Compartilhar em outros sites More sharing options...
0 nickissonlobo 3 Postado Novembro 22, 2012 Autor Share Postado Novembro 22, 2012 Esse script só troca vocação sem mecher em nada nas skills life e mana? Link para o comentário https://xtibia.com/forum/topic/199240-talk-bugada/#findComment-1392903 Compartilhar em outros sites More sharing options...
Pergunta
nickissonlobo 3
No Comando /attr eu mudo a vocação do player e logo em seguida o server cai
ta ai o attr.xml
Por Favor alguem me ajuda
Resumindo quero um script tipo assim
/addvocation player id da vocation
Editado por nickissonloboLink para o comentário
https://xtibia.com/forum/topic/199240-talk-bugada/Compartilhar em outros sites
4 respostass a esta questão
Posts Recomendados