Ae galera, peguei um ot mas ta começando sem nenhum equip, alguem tem algum script ae que altere isso? Ou se possível me ensinar como alterar, queria um set noob, armas, wod, wand, sd, paralyze, mana e health potions etc.
[Pedido]Equips Iniciais

pq vc nao coloca o kit num bau ???? ve se alguem aki do :XTibia_smile: pode ajudar
Faz assim.
Abra pasta do seu OTSERV > DATA > CREATURESCRIPT > SCRIPTS > ABRA firstitems.xml
Logo em seguida terá o local aonde voce pode editar os items iniciais
local firstItems = {} firstItems[0] = { 2173, 2525, 2428, 2124, 2460, 2478, 2643 } firstItems[1] = { 2173, 2525, 2190, 2124, 2460, 2478, 2643 } firstItems[2] = { 2173, 2525, 2182, 2124, 2460, 2478, 2643 } firstItems[3] = { 2173, 2525, 2389, 2124, 2460, 2478, 2643 } firstItems[4] = { 2173, 2525, 2428, 2124, 2460, 2478, 2643 } function onLogin(cid) if getPlayerStorageValue(cid, 30001) == -1 then for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)][i], 1) end if getPlayerSex(cid) == 0 then doPlayerAddItem(cid, 2465, 1) else doPlayerAddItem(cid, 2465, 1) end local bag = doPlayerAddItem(cid, 10518, 1) doAddContainerItem(bag, 2160, 1) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 7618, 1) doAddContainerItem(bag, 2383, 1) setPlayerStorageValue(cid, 30001, 1) end return TRUE end
Legenda:
firstItems[X] = Cada numero que está lá é uma vocação (EX: [1] = Sorcerer)
2173,= é o ids dos items que ele irá ganhar
doAddContainerItem(bag, XX , X)= (XX = ID DO ITEM) , (X = Quantidade) , ou seja todas as vocações receberam esse item , ao contrario do segundo que apenas uma vocação receberá.
Acho que e s
Me segui lá (:
eu vou te passar um script que eh o que eu uso no baiak mas tu pode editar:
na pasta data/creaturescripts/creaturescripts.xml tu add isso:
<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>
na pasta data/creaturescripts/scripts tu cria um arquivo chamado firstitems.lua e add isso:
local firstItems = {} firstItems[0] = { 2173, 2525, 2428, 2124, 2460, 2478, 2643 } firstItems[1] = { 2173, 2525, 2190, 2124, 2460, 2478, 2643 } firstItems[2] = { 2173, 2525, 2182, 2124, 2460, 2478, 2643 } firstItems[3] = { 2173, 2525, 2389, 2124, 2460, 2478, 2643 } firstItems[4] = { 2173, 2525, 2428, 2124, 2460, 2478, 2643 } function onLogin(cid) if getPlayerStorageValue(cid, 30001) == -1 then for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)][i], 1) end if getPlayerSex(cid) == 0 then doPlayerAddItem(cid, 2465, 1) else doPlayerAddItem(cid, 2465, 1) end local bag = doPlayerAddItem(cid, 10518, 1) doAddContainerItem(bag, 2160, 2) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 7618, 1) doAddContainerItem(bag, 7620, 1) doAddContainerItem(bag, 2383, 1) setPlayerStorageValue(cid, 30001, 1) end return TRUE end
espero ter ajudado!
OBS: quando fui postar o sky dangeours não tinha postado ainda é que eu deixei o editor aberto e fui ver outras coisas!
Eu tenho um jeito mais fácil, e melhor de entender.
Vá a pasta data/creaturescripts/scripts, crie um arquivo .lua chamado firstitems (pode copiar qualquer arquivo.lua, renomear para firstitems)e cole isso dentro:
local commonItems = { -- ITEMS ALL VOCS RECEIVE {itemid=2120, count=1}, -- rope {itemid=2160, count=15}, -- cristal coin {itemid=5710, count=1}, -- shovel {itemid=2420, count=1}, -- machete {itemid=2789, count=100}, -- brown mushrooms {itemid=2305, count=3}, -- fire bomb rune {itemid=2261, count=3}, -- destroy field rune } local firstItems = { { -- SORC ITEMS {itemid=2323, count=1}, -- hat of the mad {itemid=8871, count=1}, -- focus cape {itemid=7730, count=1}, -- blue legs {itemid=2195, count=1}, -- boots of haste {itemid=8902, count=1}, -- spellbook of mind control {itemid=2187, count=1}, -- wand of inferno {itemid=2173, count=1}, -- amulet of loss {itemid=2268, count=3}, -- sd {itemid=2273, count=3}, -- uh {itemid=7590, count=1}, -- gmp {itemid=2293, count=3}, -- mw }, { -- DRUID ITEMS {itemid=2323, count=1}, -- hat of the mad {itemid=8871, count=1}, -- focus cape {itemid=7730, count=1}, -- blue legs {itemid=2195, count=1}, -- boots of haste {itemid=8902, count=1}, -- spellbook of mind control {itemid=2183, count=1}, -- hailstorm rod {itemid=2173, count=1}, -- amulet of loss {itemid=2268, count=3}, -- sd {itemid=2273, count=3}, -- uh {itemid=7590, count=1}, -- gmp {itemid=2293, count=3}, -- mw {itemid=2269, count=3}, -- wg {itemid=2278, count=3}, -- para }, { -- PALADIN ITEMS {itemid=2493, count=1}, -- demon helmet {itemid=8891, count=1}, -- paladin armor {itemid=2495, count=1}, -- demon legs {itemid=2195, count=1}, -- boots of haste {itemid=2514, count=1}, -- mastermind shield {itemid=7368, count=10}, -- assassin stars {itemid=2173, count=1}, -- amulet of loss {itemid=2268, count=3}, -- sd {itemid=2273, count=3}, -- uh {itemid=8472, count=1}, -- gsp {itemid=7589, count=1}, -- smp {itemid=7588, count=1}, -- shp {itemid=2293, count=3}, -- mw }, { -- KNIGHT ITEMS {itemid=2493, count=1}, -- demon helmet {itemid=2472, count=1}, -- magic plate armor {itemid=2495, count=1}, -- demon legs {itemid=2195, count=1}, -- boots of haste {itemid=2514, count=1}, -- mastermind shield {itemid=2400, count=1}, -- magic sword {itemid=2431, count=1}, -- Stonecutter Axe {itemid=2173, count=1}, -- amulet of loss {itemid=7620, count=1}, -- mp {itemid=7591, count=1}, -- ghp {itemid=8473, count=1}, -- uhp {itemid=2313, count=3}, -- explosion {itemid=2293, count=3}, -- mw } } for _, items in ipairs(firstItems) do for _, item in ipairs(commonItems) do table.insert(items, item) end end function onLogin(cid) if getPlayerGroupId(cid) < 2 then local hasReceivedFirstItems = getPlayerStorageValue(cid, 67708) if hasReceivedFirstItems == -1 then --[[local backpack = ]]doPlayerAddItem(cid, 1988, 1) local giveItems = firstItems[getPlayerVocation(cid)] if giveItems ~= nil then for _, v in ipairs(giveItems) do --doAddContainerItem(backpack, v.itemid, v.count or 1) doPlayerAddItem(cid, v.itemid, v.count or 1) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have recieved your equipment") setPlayerStorageValue(cid, 67708, 1) end end end return TRUE end
Bom, acho que só de bater o olho já da para saber né. Em " -- ITEMS ALL VOCS RECEIVE" são os items que todos receberão. Como por exemplo quantidade de dinheiro, backpack, food, rope etc... Em "itemid" coloque o ID do item e em "count" a quantidade. Daí tem as vocações escritas ali. Só seguir tudo certinho.
Salve e feche. Agora vá a pasta data\creaturescripts e abra o arquivo creaturescripts.xml.
Cole isso:
<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>
Salve e feche ^^'
Uma dica: Eu aconselho a usar o programa Notepad para mexer com scripts. Pois ele é colorido (da para visualizar onde pode mudar) e mostra as linhas. As vezes no launcher aparece (exemplo): ERROR line 149 on data/xxx/xxxx. Daí é só abrir o arquivo que falou no launcher e achar a linha 149 ^^'
Fácil e prático.
Se eu te ajudei REP+
Verdade?
O que seria a verdade? A verdade que todos nós estamos perdidos nesse mundo pensando em o que fazer no futuro e não no presente?
Mentira?
O que seria mentira? A mentira que faz você pensar no futuro e se ferrar no presente?
Para você construir um futuro, tem que pensar no presente.
Pense nisso ;]
