angeldoido 37 Postado Novembro 4, 2011 Share Postado Novembro 4, 2011 Galera achei 2 script mto inportante aki no xtibiaa,que era pra ve os equipes do player, porem so ve ekipes n da pra sabe se o player é bugado etc...entaum achei o pra ve skills do personagem, dai fis o favor e juntei os 2, vamos la ne (: Primeiro vamos as tags: <talkaction log="yes" access="5" words="!equipment" event="script" value="setskill.lua"/> <talkaction log="yes" access="5" words="!skill" event="script" value="setskill.lua"/> Depois Criem um arquivo Com nome setskill.lua e colam isso dentro... function getItemsInContainer(cont, sep) local text = "" local tsep = "" local count = "" for i=1, sep do tsep = tsep.."-" end tsep = tsep..">" for i=0, getContainerSize(cont.uid)-1 do local item = getContainerItem(cont.uid, i) if isContainer(item.uid) == FALSE then if item.type > 0 then count = "("..item.type.."x)" end text = text.."\n"..tsep..getItemNameById(item.itemid).." "..count else if getContainerSize(item.uid) > 0 then text = text.."\n"..tsep..getItemNameById(item.itemid) text = text..getItemsInContainer(item, sep+2) else text = text.."\n"..tsep..getItemNameById(item.itemid) end end end return text end function onSay(cid, words, param, channel) if words == "!skill" then if not param or param == "" or not getPlayerByName(param) then doPlayerSendCancel(cid,'Vc nao pode checar isso') end if player ~= 0 then local n = getPlayerByName(param) doPlayerPopupFYI(cid,"Nome "..getCreatureName(n).."".."\n\nEle esta no level "..getPlayerLevel(n).." !".."\nEle Tem de Distance "..getPlayerSkill(n,4).." !".."\nEle Tem de sword "..getPlayerSkill(n, 2).." !".."\nEle Tem de axe "..getPlayerSkill(n, 3).." !".."\nEle Tem de club "..getPlayerSkill(n, 1).." !".."\nEle Tem de shield "..getPlayerSkill(n, 5).." !".."\nEle Tem de magiclevel "..getPlayerMagLevel(n).."!".."\nEle Tem de mana "..getPlayerMana(n).." !".."\nEle tem de life "..getCreatureMaxHealth(n).." !") return TRUE end end if(param == "") then doPlayerSendCancel(cid, "Command requires param.") return TRUE end local slotName = {"Head Slot", "Amulet Slot", "Backpack Slot", "Armor Slot", "Right Hand", "Left Hand", "Legs Slot", "Feet Slot", "Ring Slot", "Ammo Slot"} local player = getPlayerByNameWildcard(param) if isPlayer(player) == TRUE then local text = getPlayerName(player).."'s Equipment: " for i=1, 10 do text = text.."\n\n" local item = getPlayerSlotItem(player, i) if item.itemid > 0 then if isContainer(item.uid) == TRUE then text = text..slotName[i]..": "..getItemNameById(item.itemid)..getItemsInContainer(item, 1) else text = text..slotName[i]..": "..getItemNameById(item.itemid) end else text = text..slotName[i]..": Empty" end end doPlayerPopupFYI(cid, text) else doPlayerSendCancel(cid, "This player is not online.") end return TRUE end Lenbrando: Este Scripts Apresentados Acima Não fui eu,em os Que crio-u: Donos Legitimos: By:Mulizeu - Checar Skills etc... By:Azi [ersiu] - Checar Itens Do player... Prints: EQUIPAMENTOS: Skills: [===--°°º.~EDITED~.º°°--===] Galera meu colega falo q ta dando alguns errinho na linha 36 e 28,no meu distro n aparece nada, e n achei 1 modo pra comcerta, (POIS NAUM VI E NEM REPAREI ERRO NENHUM)...Como podem ve nas print funcionando d boa -' Link para o comentário Compartilhar em outros sites More sharing options...
SkyDangerous 395 Postado Novembro 4, 2011 Share Postado Novembro 4, 2011 Bem criativo. Parabéns ! ótimos scripts que você faz. Link para o comentário Compartilhar em outros sites More sharing options...
angeldoido 37 Postado Novembro 4, 2011 Autor Share Postado Novembro 4, 2011 Briigado, Porem scripts naum sao meu, so fis o favor de junta (ocupa menos arquivo no pc) POSKAPOSKAPOSK Link para o comentário Compartilhar em outros sites More sharing options...
Mulizeu 86 Postado Novembro 4, 2011 Share Postado Novembro 4, 2011 (editado) Obg Por citar meu creditos! e quanto ao erro do seu amigo eu editei o script aki e n esta ocorrendo mais esse erro que ele havia dito! function getItemsInContainer(cont, sep) local text = "" local tsep = "" local count = "" for i=1, sep do tsep = tsep.."-" end tsep = tsep..">" for i=0, getContainerSize(cont.uid)-1 do local item = getContainerItem(cont.uid, i) if isContainer(item.uid) == FALSE then if item.type > 0 then count = "("..item.type.."x)" end text = text.."\n"..tsep..getItemNameById(item.itemid).." "..count else if getContainerSize(item.uid) > 0 then text = text.."\n"..tsep..getItemNameById(item.itemid) text = text..getItemsInContainer(item, sep+2) else text = text.."\n"..tsep..getItemNameById(item.itemid) end end end return text end function onSay(cid, words, param, channel) if words == "!skill" then if not param or param == "" or not getPlayerByName(param) then doPlayerSendCancel(cid,'Vc nao pode checar isso') end if isPlayer(cid) ~= 0 then local n = getPlayerByName(param) doPlayerPopupFYI(cid,"Nome "..getCreatureName(n).."".."\n\nEle esta no level "..getPlayerLevel(n).." !".."\nEle Tem de Distance "..getPlayerSkill(n,4).." !".."\nEle Tem de sword "..getPlayerSkill(n, 2).." !".."\nEle Tem de axe "..getPlayerSkill(n, 3).." !".."\nEle Tem de club "..getPlayerSkill(n, 1).." !".."\nEle Tem de shield "..getPlayerSkill(n, 5).." !".."\nEle Tem de magiclevel "..getPlayerMagLevel(n).."!".."\nEle Tem de mana "..getPlayerMana(n).." !".."\nEle tem de life "..getCreatureMaxHealth(n).." !") return TRUE end end if(param == "") then doPlayerSendCancel(cid, "Command requires param.") return TRUE end local slotName = {"Head Slot", "Amulet Slot", "Backpack Slot", "Armor Slot", "Right Hand", "Left Hand", "Legs Slot", "Feet Slot", "Ring Slot", "Ammo Slot"} local player = getPlayerByNameWildcard(param) if isPlayer(player) == TRUE then local text = getPlayerName(player).."'s Equipment: " for i=1, 10 do text = text.."\n\n" local item = getPlayerSlotItem(player, i) if item.itemid > 0 then if isContainer(item.uid) == TRUE then text = text..slotName[i]..": "..getItemNameById(item.itemid)..getItemsInContainer(item, 1) else text = text..slotName[i]..": "..getItemNameById(item.itemid) end else text = text..slotName[i]..": Empty" end end doPlayerPopupFYI(cid, text) else doPlayerSendCancel(cid, "This player is not online.") end return TRUE end Editado Novembro 4, 2011 por mulizeu Link para o comentário Compartilhar em outros sites More sharing options...
Eskylo 175 Postado Novembro 4, 2011 Share Postado Novembro 4, 2011 q tal juntar duas tags numa só? <talkaction log="yes" access="5" words="!equipment;!skill" event="script" value="setskill.lua"/> o script (arquivo) é o mesmo, então vc pode deixar assim Link para o comentário Compartilhar em outros sites More sharing options...
angeldoido 37 Postado Novembro 4, 2011 Autor Share Postado Novembro 4, 2011 opskaspoka, ss economizando menos espaço possivel, POSAKOSAPO, [quanto ao erro mulizeu] so naum vi 1 modo de comcerta pq no meu distro n deu nenhum erro, meu amigo so falo que no dele tava dando erro, Obg por comcerta, e belo script Mto eficient em otservs Link para o comentário Compartilhar em outros sites More sharing options...
lovemetal 0 Postado Novembro 6, 2011 Share Postado Novembro 6, 2011 noss car parabens realmente adoro seus script s2 Link para o comentário Compartilhar em outros sites More sharing options...
andretoprox 3 Postado Novembro 6, 2011 Share Postado Novembro 6, 2011 (editado) Boa a ideia de colocar os 2 numa só linha hehe... @TOPIC Achei legal, vou testar! @EDIT Funfando legal sem erro algum! Aqui é Forgotten Server 8.60 falow e Obrigado! REP+ PRA TI! Editado Novembro 6, 2011 por andretoprox Link para o comentário Compartilhar em outros sites More sharing options...
Vinc 101 Postado Novembro 7, 2011 Share Postado Novembro 7, 2011 so tem um pequeno erro na parte do skill(provavelmente por confusao),ele mostra quanto o player tem de mana no momento e o hpmax do player o que fica estranho entao passe deixe os dois igual ou mostra o hp e mana no momento ou mostra o hp e mana maximo(mistura fica confuso para os playes) ou entao ponha tanto o hp e mana max quanto o hp e mana atual pra que n intendeu o que eu falei é essa parte aki que to falando "!".."\nEle Tem de mana "..getPlayerMana(n).." !".."\nEle tem de life "..getCreatureMaxHealth(n).." !") getPlayerMana(n) mostra mana atual do player getCreatureMaxHealth(n) mostra hp maxima do player ou mostra so as max,ou so as atuais Link para o comentário Compartilhar em outros sites More sharing options...
HannahHelenaTei 1 Postado Novembro 7, 2011 Share Postado Novembro 7, 2011 brigada, aki funfo certinho *-* Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados