Postado Abril 2, 2017 8 anos Galera, antes de tudo quero informar que eu ja procurei e achei alguns scripts iguais a esse que eu vou pedir porem quando eu tento instalar no servidor, ele nao funciona. Queria uma bau onde o Player ganhasse apenas 1 vez os itens de sua respectiva classe. Informaçoes: Sorc: 2458 ,1 / 2464 ,1 / 2648 ,1 / 2513 ,1 / 2190 ,1 Druid: 2458 ,1 / 2464 ,1 / 2648 ,1 / 2513 ,1 / 2182 ,1 Paladin: 2458 ,1 / 2464 ,1 / 2648 ,1 / 2513 ,1 / 2389 ,1 Knight: 2458 ,1 / 2464 ,1 / 2648 ,1 / 2513 ,1 / 2386 ,1 / 2389 ,1 / 2376 ,1 Obs: esse ,1 Seria a quantidade do item. Tibia 8.60 Editado Abril 2, 2017 8 anos por caioitalo1 (veja o histórico de edições)
Postado Abril 2, 2017 8 anos actions/scripts/ cria um arquivo ai .lua com isso dentro Spoiler local voc = getPlayerVocation(cid) local sto = 127381 local pos = getCreaturePosition(cid) local tid = { all = {2458, 2464, 2648, 2513}, sorc = {2190}, druid = {2182}, pala = {2389}, kina = {2389, 2376} } function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, sto) <= 0 then for _, v in pairs(tid.all) do doPlayerAddItem(cid, v, 1) end if voc == 1 then doPlayerAddItem(cid, tid.sorc, 1) elseif voc == 2 then doPlayerAddItem(cid, tid.druid, 1) elseif voc == 3 then doPlayerAddItem(cid, tid.pala, 1) elseif voc == 4 then for d, k in pairs(tid.kina) do doPlayerAddItem(cid, k, 1) end end doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations, you completed the quest!") setPlayerStorageValue(cid, sto, 1) else doSendMagicEffect(pos, CONST_ME_POFF) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, you have already took the items.") return true end actions.xml <action actionid="123172" event="script" value="nome do arquivo.lua"/> Ai vc coloca essa actionid ai no baú. Da um feedback dps pra eu saber se funciona! GitHub: https://github.com/s3kk Conteúdo: [SERVER] Heromassa[GESIOR] Gesior 2012 modificado por Sekk[GESIOR] Shop Addons & Mounts - TFS 1.x[GESIOR] Outfitter para Characters e Rank[SISTEMA] Castle 24h[TALKACTION] Multi Element Wand[ACTION] Multi Elemental Arrow & Shield[PROGRAMAÇÃO] Compilar TFS 0.4 no Linux[PROGRAMAÇÃO] Compilando TFS 0.4 no MSVC(x64 e x32) [INFRAESTRUTURA] Configuração COMPLETA Google VM + Tibia 11.x
Postado Abril 2, 2017 8 anos Autor 9 minutos atrás, Sekk disse: actions/scripts/ cria um arquivo ai .lua com isso dentro Mostrar conteúdo oculto local voc = getPlayerVocation(cid) local sto = 127381 local pos = getCreaturePosition(cid) local tid = { all = {2458, 2464, 2648, 2513}, sorc = {2190}, druid = {2182}, pala = {2389}, kina = {2389, 2376} } function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, sto) <= 0 then for _, v in pairs(tid.all) do doPlayerAddItem(cid, v, 1) end if voc == 1 then doPlayerAddItem(cid, tid.sorc, 1) elseif voc == 2 then doPlayerAddItem(cid, tid.druid, 1) elseif voc == 3 then doPlayerAddItem(cid, tid.pala, 1) elseif voc == 4 then for d, k in pairs(tid.kina) do doPlayerAddItem(cid, k, 1) end end doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations, you completed the quest!") setPlayerStorageValue(cid, sto, 1) else doSendMagicEffect(pos, CONST_ME_POFF) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, you have already took the items.") return true end actions.xml <action actionid="123172" event="script" value="nome do arquivo.lua"/> Ai vc coloca essa actionid ai no baú. Da um feedback dps pra eu saber se funciona! Irmao, deu esse seguinte error: [Error - LuaScriptInterface::loadFile] data/actions/scripts/vochest.lua:36: 'end' expected (to close 'function' at line 12) near '<eof>' [Warning - Event::loadScript] Cannot load script (data/actions/scripts/vochest.lua) data/actions/scripts/vochest.lua:36: 'end' expected (to close 'function' at line 12) near '<eof>'
Postado Abril 3, 2017 8 anos Nossa foi mal uahsuhsash esqueci de colocar um end local voc = getPlayerVocation(cid) local sto = 127381 local pos = getCreaturePosition(cid) local tid = { all = {2458, 2464, 2648, 2513}, sorc = {2190}, druid = {2182}, pala = {2389}, kina = {2389, 2376} } function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, sto) <= 0 then for _, v in pairs(tid.all) do doPlayerAddItem(cid, v, 1) end if voc == 1 then doPlayerAddItem(cid, tid.sorc, 1) elseif voc == 2 then doPlayerAddItem(cid, tid.druid, 1) elseif voc == 3 then doPlayerAddItem(cid, tid.pala, 1) elseif voc == 4 then for d, k in pairs(tid.kina) do doPlayerAddItem(cid, k, 1) end end doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations, you completed the quest!") setPlayerStorageValue(cid, sto, 1) else doSendMagicEffect(pos, CONST_ME_POFF) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, you have already took the items.") end return true end testa ai kkk GitHub: https://github.com/s3kk Conteúdo: [SERVER] Heromassa[GESIOR] Gesior 2012 modificado por Sekk[GESIOR] Shop Addons & Mounts - TFS 1.x[GESIOR] Outfitter para Characters e Rank[SISTEMA] Castle 24h[TALKACTION] Multi Element Wand[ACTION] Multi Elemental Arrow & Shield[PROGRAMAÇÃO] Compilar TFS 0.4 no Linux[PROGRAMAÇÃO] Compilando TFS 0.4 no MSVC(x64 e x32) [INFRAESTRUTURA] Configuração COMPLETA Google VM + Tibia 11.x
Postado Abril 3, 2017 8 anos Autor 2 horas atrás, Sekk disse: Nossa foi mal uahsuhsash esqueci de colocar um end local voc = getPlayerVocation(cid) local sto = 127381 local pos = getCreaturePosition(cid) local tid = { all = {2458, 2464, 2648, 2513}, sorc = {2190}, druid = {2182}, pala = {2389}, kina = {2389, 2376} } function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, sto) <= 0 then for _, v in pairs(tid.all) do doPlayerAddItem(cid, v, 1) end if voc == 1 then doPlayerAddItem(cid, tid.sorc, 1) elseif voc == 2 then doPlayerAddItem(cid, tid.druid, 1) elseif voc == 3 then doPlayerAddItem(cid, tid.pala, 1) elseif voc == 4 then for d, k in pairs(tid.kina) do doPlayerAddItem(cid, k, 1) end end doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations, you completed the quest!") setPlayerStorageValue(cid, sto, 1) else doSendMagicEffect(pos, CONST_ME_POFF) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, you have already took the items.") end return true end testa ai kkk Irmao, dessa vez pegou porem ele só esta entregando os itens listado no ALL, [ all = {2458, 2464, 2648, 2513},]. Tambem deu um error na distro que eu nao sei dizer se pode ocorrer problemas com o server futuramente. Error: Citar [Error - Action Interface] data/actions/scripts/vochest.lua Description: (internalGetPlayerInfo) Player not found when requesting player info #6 [Error - Action Interface] data/actions/scripts/vochest.lua Description: (luaGetThingPosition) Thing not found E do mesmo jeito, vlw por estar tentando me ajudar. xD
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.