Ir para conteúdo
  • 0

Script de Transform


Skailord

Pergunta

Ola galera do xtibia, hoje venho a voces tirar uma duvida, se tem como colocar na script que eu uso(script no final do topico) uma serta quantidade de life que o player ganha apos se transformar por exemplo: level 25 player transforma e ganha mais 100 de life e mana, tipo assim.Se aguem me aujudar ficarei eternamente grato e conserteza darei rep+.

 

A script:

 

 

local config = {

--[vocation id] = { level, nova voc, looktype, efeito}

[1] = { 25, 51, 66, 130},

[51] = { 50, 52, 91, 130},

[52] = { 75, 53, 18, 130},

[53] = { 100, 54, 31, 130},

[54] = { 125, 55, 92, 130},

[55] = { 150, 56, 40, 130},

[56] = { 175, 57, 49, 130},

[57] = { 200, 58, 320, 130},

[58] = { 225, 59, 179, 130},

[59] = { 250, 60, 394, 130},

[60] = { 275, 174, 397, 140},

[174] = { 400, 175, 31, 130},

[175] = { 600, 175, 124, 140},

[2] = { 25, 61, 93, 108},

[61] = { 50, 62, 6, 108},

[62] = { 75, 63, 5, 108},

[63] = { 100, 64, 306, 108},

[64] = { 125, 65, 54, 1},

[65] = { 150, 66, 94, 108},

[66] = { 175, 67, 59, 108},

[67] = { 200, 68, 8, 108},

[68] = { 225, 69, 178, 1},

[69] = { 250, 70, 95, 110},

[70] = { 275, 71, 54, 110},

[71] = { 400, 72, 54, 110},

[72] = { 600, 72, 94, 110},

[4] = { 25, 73, 67, 19},

[73] = { 50, 74, 72, 19},

[74] = { 75, 75, 273, 116},

[75] = { 100, 76, 62, 19},

[76] = { 125, 77, 189, 19},

[77] = { 150, 78, 65, 19},

[78] = { 175, 79, 188, 19},

[79] = { 200, 80, 329, 19},

[80] = { 225, 81, 335, 19},

[81] = { 250, 81, 57, 19},

[3] = { 25, 83, 175, 36},

[83] = { 50, 84, 173, 36},

[84] = { 75, 85, 174, 36},

[85] = { 100, 86, 169, 36},

[86] = { 150, 87, 172, 36},

[87] = { 175, 88, 194, 36},

[88] = { 250, 88, 170, 36},

[9] = { 50, 93, 384, 5},

[93] = { 100, 94, 385, 5},

[94] = { 150, 95, 386, 5},

[95] = { 200, 95, 396, 5},

[50] = { 25, 96, 97, 108},

[96] = { 50, 97, 282, 108},

[97] = { 75, 98, 98, 109},

[98] = { 100, 99, 99, 109},

[99] = { 125, 100, 283, 109},

[100] = { 150, 101, 284, 109},

[101] = { 200, 102, 100, 109},

[102] = { 400, 102, 285, 109},

[22] = { 25, 103, 373, 20},

[103] = { 50, 104, 374, 20},

[104] = { 75, 105, 375, 20},

[105] = { 100, 106, 376, 20},

[106] = { 150, 107, 268, 20},

[107] = { 200, 108, 377, 20},

[108] = { 400, 108, 395, 20},

[5] = { 50, 110, 378, 10},

[110] = { 75, 111, 379, 10},

[111] = { 100, 112, 380, 10},

[112] = { 150, 113, 381, 10},

[113] = { 200, 113, 382, 10},

[6] = { 50, 115, 312, 10},

[115] = { 100, 116, 311, 10},

[116] = { 150, 117, 310, 10},

[117] = { 200, 117, 313, 10},

[7] = { 25, 122, 101, 175},

[122] = { 50, 123, 103, 175},

[123] = { 100, 124, 107, 175},

[124] = { 150, 125, 105, 175},

[125] = { 200, 126, 347, 175},

[126] = { 250, 127, 315, 175},

[127] = { 275, 128, 333, 175},

[128] = { 400, 128, 314, 133},

[8] = { 25, 129, 190, 95},

[129] = { 50, 130, 83, 95},

[130] = { 75, 131, 82, 95},

[131] = { 100, 132, 80, 95},

[132] = { 125, 133, 190, 95},

[133] = { 150, 134, 78, 95},

[134] = { 175, 135, 191, 95},

[135] = { 200, 136, 192, 95},

[136] = { 250, 137, 81, 95},

[137] = { 275, 138, 330, 51},

[138] = { 400, 138, 111, 51},

[24] = { 25, 139, 24, 5},

[139] = { 50, 140, 295, 5},

[140] = { 75, 141, 296, 5},

[141] = { 100, 142, 297, 5},

[142] = { 150, 143, 298, 5},

[143] = { 200, 144, 299, 5},

[144] = { 250, 144, 300, 5},

[23] = { 25, 146, 69, 3},

[146] = { 50, 147, 331, 3},

[147] = { 75, 148, 70, 3},

[148] = { 100, 149, 84, 3},

[149] = { 125, 150, 196, 3},

[150] = { 150, 151, 197, 3},

[151] = { 175, 152, 198, 3},

[152] = { 200, 153, 199, 3},

[153] = { 250, 154, 200, 3},

[154] = { 275, 154, 332, 3},

[10] = { 25, 156, 11, 30},

[156] = { 50, 157, 287, 30},

[157] = { 75, 158, 12, 30},

[158] = { 100, 159, 289, 30},

[159] = { 125, 160, 10, 30},

[160] = { 150, 161, 13, 30},

[161] = { 175, 162, 289, 30},

[162] = { 200, 163, 13, 30},

[163] = { 250, 164, 14, 30},

[164] = { 400, 164, 203, 30},

[11] = { 25, 165, 259, 70},

[165] = { 50, 166, 149, 70},

[166] = { 100, 167, 16, 70},

[167] = { 150, 168, 262, 70},

[168] = { 200, 169, 159, 70},

[169] = { 250, 170, 323, 70},

[170] = { 400, 170, 321, 70}

}

function onSay(cid, words, param, channel)

doPlayerSay(cid, "transformar")

local voc = config[getPlayerVocation(cid)]

if voc then

if getPlayerLevel(cid) >= voc[1] then

doPlayerSetVocation(cid, voc[2])

doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você Transformou!")

local outfit = {lookType = voc[3]}

doCreatureChangeOutfit(cid, outfit)

doSendMagicEffect(getCreaturePosition(cid), voc[4])

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você precisa estar no level " .. voc[1] .. " para transformar.")

end

else

doPlayerSendCancel(cid, "Você não pode se Transformar!")

end

return true

end

 

Desde já agra desso pela atenção, Skailord

Editado por Skailord
Link para o comentário
Compartilhar em outros sites

13 respostass a esta questão

Posts Recomendados

  • 0

teste ai:

 

local config = {

--[vocation id] = { level, nova voc, looktype, efeito}

[1] = { 25, 51, 66, 130},

[51] = { 50, 52, 91, 130},

[52] = { 75, 53, 18, 130},

[53] = { 100, 54, 31, 130},

[54] = { 125, 55, 92, 130},

[55] = { 150, 56, 40, 130},

[56] = { 175, 57, 49, 130},

[57] = { 200, 58, 320, 130},

[58] = { 225, 59, 179, 130},

[59] = { 250, 60, 394, 130},

[60] = { 275, 174, 397, 140},

[174] = { 400, 175, 31, 130},

[175] = { 600, 175, 124, 140},

[2] = { 25, 61, 93, 108},

[61] = { 50, 62, 6, 108},

[62] = { 75, 63, 5, 108},

[63] = { 100, 64, 306, 108},

[64] = { 125, 65, 54, 1},

[65] = { 150, 66, 94, 108},

[66] = { 175, 67, 59, 108},

[67] = { 200, 68, 8, 108},

[68] = { 225, 69, 178, 1},

[69] = { 250, 70, 95, 110},

[70] = { 275, 71, 54, 110},

[71] = { 400, 72, 54, 110},

[72] = { 600, 72, 94, 110},

[4] = { 25, 73, 67, 19},

[73] = { 50, 74, 72, 19},

[74] = { 75, 75, 273, 116},

[75] = { 100, 76, 62, 19},

[76] = { 125, 77, 189, 19},

[77] = { 150, 78, 65, 19},

[78] = { 175, 79, 188, 19},

[79] = { 200, 80, 329, 19},

[80] = { 225, 81, 335, 19},

[81] = { 250, 81, 57, 19},

[3] = { 25, 83, 175, 36},

[83] = { 50, 84, 173, 36},

[84] = { 75, 85, 174, 36},

[85] = { 100, 86, 169, 36},

[86] = { 150, 87, 172, 36},

[87] = { 175, 88, 194, 36},

[88] = { 250, 88, 170, 36},

[9] = { 50, 93, 384, 5},

[93] = { 100, 94, 385, 5},

[94] = { 150, 95, 386, 5},

[95] = { 200, 95, 396, 5},

[50] = { 25, 96, 97, 108},

[96] = { 50, 97, 282, 108},

[97] = { 75, 98, 98, 109},

[98] = { 100, 99, 99, 109},

[99] = { 125, 100, 283, 109},

[100] = { 150, 101, 284, 109},

[101] = { 200, 102, 100, 109},

[102] = { 400, 102, 285, 109},

[22] = { 25, 103, 373, 20},

[103] = { 50, 104, 374, 20},

[104] = { 75, 105, 375, 20},

[105] = { 100, 106, 376, 20},

[106] = { 150, 107, 268, 20},

[107] = { 200, 108, 377, 20},

[108] = { 400, 108, 395, 20},

[5] = { 50, 110, 378, 10},

[110] = { 75, 111, 379, 10},

[111] = { 100, 112, 380, 10},

[112] = { 150, 113, 381, 10},

[113] = { 200, 113, 382, 10},

[6] = { 50, 115, 312, 10},

[115] = { 100, 116, 311, 10},

[116] = { 150, 117, 310, 10},

[117] = { 200, 117, 313, 10},

[7] = { 25, 122, 101, 175},

[122] = { 50, 123, 103, 175},

[123] = { 100, 124, 107, 175},

[124] = { 150, 125, 105, 175},

[125] = { 200, 126, 347, 175},

[126] = { 250, 127, 315, 175},

[127] = { 275, 128, 333, 175},

[128] = { 400, 128, 314, 133},

[8] = { 25, 129, 190, 95},

[129] = { 50, 130, 83, 95},

[130] = { 75, 131, 82, 95},

[131] = { 100, 132, 80, 95},

[132] = { 125, 133, 190, 95},

[133] = { 150, 134, 78, 95},

[134] = { 175, 135, 191, 95},

[135] = { 200, 136, 192, 95},

[136] = { 250, 137, 81, 95},

[137] = { 275, 138, 330, 51},

[138] = { 400, 138, 111, 51},

[24] = { 25, 139, 24, 5},

[139] = { 50, 140, 295, 5},

[140] = { 75, 141, 296, 5},

[141] = { 100, 142, 297, 5},

[142] = { 150, 143, 298, 5},

[143] = { 200, 144, 299, 5},

[144] = { 250, 144, 300, 5},

[23] = { 25, 146, 69, 3},

[146] = { 50, 147, 331, 3},

[147] = { 75, 148, 70, 3},

[148] = { 100, 149, 84, 3},

[149] = { 125, 150, 196, 3},

[150] = { 150, 151, 197, 3},

[151] = { 175, 152, 198, 3},

[152] = { 200, 153, 199, 3},

[153] = { 250, 154, 200, 3},

[154] = { 275, 154, 332, 3},

[10] = { 25, 156, 11, 30},

[156] = { 50, 157, 287, 30},

[157] = { 75, 158, 12, 30},

[158] = { 100, 159, 289, 30},

[159] = { 125, 160, 10, 30},

[160] = { 150, 161, 13, 30},

[161] = { 175, 162, 289, 30},

[162] = { 200, 163, 13, 30},

[163] = { 250, 164, 14, 30},

[164] = { 400, 164, 203, 30},

[11] = { 25, 165, 259, 70},

[165] = { 50, 166, 149, 70},

[166] = { 100, 167, 16, 70},

[167] = { 150, 168, 262, 70},

[168] = { 200, 169, 159, 70},

[169] = { 250, 170, 323, 70},

[170] = { 400, 170, 321, 70}

}

function onSay(cid, words, param, channel)

doPlayerSay(cid, "transformar")

local voc = config[getPlayerVocation(cid)]

if voc then

if getPlayerLevel(cid) >= voc[1] then

doPlayerSetVocation(cid, voc[2])

doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você Transformou!")

local outfit = {lookType = voc[3]}

doCreatureChangeOutfit(cid, outfit)

doSendMagicEffect(getCreaturePosition(cid), voc[4])

doCreatureAddHealth(cid, voc[5])

doCreatureAddMana(cid, voc[6])

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você precisa estar no level " .. voc[1] .. " para transformar.")

end

else

doPlayerSendCancel(cid, "Você não pode se Transformar!")

end

return true

end

Link para o comentário
Compartilhar em outros sites

  • 0

local hp = 1000 -- hp que adiciona
local hpm = getCreatureMaxHealth(cid)
setCreatureMaxHealth(cid, hp+hpm)
doCreatureAddHealth(cid, hpm)

 

Use isso ai ao invéz disso

 

doCreatureAddHealth(cid, 0000)

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...