Ateu 0 Postado Agosto 24, 2010 Share Postado Agosto 24, 2010 Tipo do script: creaturescripts Protocolo (versão do Tibia): 8.6 Servidor utilizado: uso o .exe do styller Nível de experiência: - Adicionais/Informações: No meu OT preciso de alterar os items que começa, mais por algum motivo não estou dando conta e o player começa ou com os itens errados ou sem items nenhum... Queria o script já feito para: Knight começar com: Backpack, leather boots, dwarven shield, brass armor, brass legs, soldier helmet, jagged sword e dentro da backpack: 1 shovel, 1 rope, 100 gps, 1 daramian mace, 1 steel axe e 1 health potion. Sorcerer começar com: Backpack, leather boots, spellbook, magician's robe, studded legs, wand of vortex, e dentro da backpack: 1 shovel, 1 rope, 100 gps e 1 mana potion. Paladin começar com: Backpack, leather boots, dwarven shield, belted cape, brass legs, soldier helmet, 1 spear, e dentro da backpack: shovel, 1 rope, 100 gps, 1 bow e 30 arrows. Druid começar com: Backpack, leather boots, spellbook, magician's robe, studded legs, snakebite rod, e dentro da backpack: 1 shovel, 1 rope, 100 gps e 1 mana potion. --------- Não sei se estou postando na seção certa e nem se pedi certo, mais eu precisava de ajuda com isso pois é o único motivo e ainda não ter posto o server ON. Se alguém quiser me ajudar por fora, msn: bruno_goiaba2010@hotmail.com Thanks anyway... \,,/_ Link para o comentário Compartilhar em outros sites More sharing options...
Zaroth1 1 Postado Agosto 24, 2010 Share Postado Agosto 24, 2010 Amigo, voce apenas tem qe mudar o ID dos itens que vem no creaturescripts :s vá em Data/creaturescripts/scripts Crie um arquivo.lua e renomeie para firstitems.lua depois adicione isso dentro: local firstItems = {} firstItems[0] = { 2173, 2525, 3965, 2124, 2457, 2647, 2643 } firstItems[1] = { 2173, 2525, 2190, 2124, 2457, 2647, 2643 } firstItems[2] = { 2173, 2525, 2182, 2124, 2457, 2647, 2643 } firstItems[3] = { 2173, 2525, 2399, 2124, 2457, 2647, 2643 } firstItems[4] = { 2173, 2525, 2428, 2124, 2457, 2647, 2643 } function onLogin(cid) if getPlayerStorageValue(cid, 30001) == -1 then for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)], 1) end if getPlayerSex(cid) == 0 then doPlayerAddItem(cid, 2463, 1) else doPlayerAddItem(cid, 2463, 1) end local bag = doPlayerAddItem(cid, 11235, 1) doAddContainerItem(bag, 2160, 3) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 7618, 1) setPlayerStorageValue(cid, 30001, 1) end depois vá no creaturescripts.xml e adicione essa linha: <event type="login" name="FirstItems" event="script" value="firstitems.lua"/> Na linha vermelha logo acima, é a vocaçao None que serveria pra rookgard no caso. Na linha verde é 1 que representa Sorcerer adicione os ID dos itens que achar melhor =D Na linha rosa, é 2 que representa Druid , adicione os ID dos itens que achar melhor =D Na linha azul, é 3 que representa Paladin, adicione os ID dos itens que achar melhor =D Na linha roxa, é 4 que representa Knight, adicione os ID dos itens que achar melhor =D espero ter ajudado , se ajudei ... Rep++ ae ;@ valeu e Pra baxo do script , são itens extra, se voce nao souber, loga o GM .. e faça os itens pra ter uma idéia mais o menos , e edite como preferir ;D Link para o comentário Compartilhar em outros sites More sharing options...
Ateu 0 Postado Agosto 24, 2010 Autor Share Postado Agosto 24, 2010 (editado) Isso eu sei Eu tentei fazer isso, já tenho o script salvo mais não está dando certo. Já vi e revi várias vezes o script pra procurar erro e não da certo... O char aparece sem items. Olho inclusive o id dos itens no GOD e no Map Editor antes de por mais não da certo... Eis o erro, acho que tem a ver com os crystal coins que eu tiro: [24/08/2010 18:20:40] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/firstitems.lua:65: ')' expected near 'coin'[24/08/2010 18:20:40] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/firstitems.lua) [24/08/2010 18:20:40] data/creaturescripts/scripts/firstitems.lua:65: ')' expected near 'coin Editado Agosto 24, 2010 por Ateu Link para o comentário Compartilhar em outros sites More sharing options...
Blekwave 0 Postado Agosto 24, 2010 Share Postado Agosto 24, 2010 Não tem nada com "coin" no script original. Se você fez alguma modificação nele, provavelmente tem algo a ver com essa modificação. Poste, que aí será possível avaliar o erro. Link para o comentário Compartilhar em outros sites More sharing options...
Ateu 0 Postado Agosto 24, 2010 Autor Share Postado Agosto 24, 2010 Pra garantir que o erro não era algo de formatação eu peguei o que o cara postou ali (que por sinal era quase idêntico ao meu) e só mudei alguns itens com o maior cuidado pra nao errar, eu tirei o aol, os crystal coins entre outros e só do sorcerer pra testar... Continua o mesmo erro... Eis o script local firstItems = {}firstItems[0] = { 2525, 8819, 8820, 2468, 2647, 2643 } firstItems[1] = { 2525, 2190, 2124, 2457, 2647, 2643 } firstItems[2] = { 2525, 2182, 2124, 2457, 2647, 2643 } firstItems[3] = { 2525, 2399, 2124, 2457, 2647, 2643 } firstItems[4] = { 2525, 2428, 2124, 2457, 2647, 2643 } function onLogin(cid) if getPlayerStorageValue(cid, 30001) == -1 then for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)], 1) end if getPlayerSex(cid) == 0 then doPlayerAddItem(cid, 2463, 1) else doPlayerAddItem(cid, 2463, 1) end local bag = doPlayerAddItem(cid, 11235, 1) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 7618, 1) setPlayerStorageValue(cid, 30001, 1) end local bag = doPlayerAddItem(cid, 11235, 1) doAddContainerItem(bag, platinum coin, 2152) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 7618, 1) setPlayerStorageValue(cid, 30001, 1) end return TRUE end Não ta nem de acordo com o que o queria... Mais como aqui é pra pedir scripts ninguém podia postar pra mim pronto não? :S Link para o comentário Compartilhar em outros sites More sharing options...
MatheusGlad 424 Postado Agosto 24, 2010 Share Postado Agosto 24, 2010 local firstItems = {}firstItems[0] = { 2525, 8819, 8820, 2468, 2647, 2643 } firstItems[1] = { 2525, 2190, 2124, 2457, 2647, 2643 } firstItems[2] = { 2525, 2182, 2124, 2457, 2647, 2643 } firstItems[3] = { 2525, 2399, 2124, 2457, 2647, 2643 } firstItems[4] = { 2525, 2428, 2124, 2457, 2647, 2643 } function onLogin(cid) if getPlayerStorageValue(cid, 30001) == -1 then for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)], 1) end if getPlayerSex(cid) == 0 then doPlayerAddItem(cid, 2463, 1) else doPlayerAddItem(cid, 2463, 1) end local bag = doPlayerAddItem(cid, 11235, 1) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 7618, 1) setPlayerStorageValue(cid, 30001, 1) end local bag = doPlayerAddItem(cid, 11235, 1) doAddContainerItem(bag, 2152, 100) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 7618, 1) setPlayerStorageValue(cid, 30001, 1) return TRUE end Link para o comentário Compartilhar em outros sites More sharing options...
Ateu 0 Postado Agosto 24, 2010 Autor Share Postado Agosto 24, 2010 Aeeeew, deu certinho! Valeu matheus... Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados