Ir para conteúdo
  • Cadastre-se

Preciso de um npc que vende a ROD...


Posts Recomendados

Estou com 2 scripts lua aqui ... ROD normal qe é a que o player já é criado com ela e preciso de um npc que vende-se a outra rod aqui vou postar o arquivo e eu quero que ele venda a rod por 1kk que no caso é 10000hd dever ser 1000000dollars e 100000000 cents... ai vai meu arquivo lua.. rep + para quem ajudar ..

function onUse(cid, item, fromPos, itemEx, toPos)

d0 =

{

[0] = {pokemon = 'Magikarp s'},

[1] = {pokemon = 'Poliwag s'},

[2] = {pokemon = 'Magikarp s'},

[4] = {pokemon = 'Poliwag s'},

}

d20 =

{

[0] = {pokemon = 'Magikarp s'},

[1] = {pokemon = 'Poliwhirl s'},

[2] = {pokemon = 'Poliwag s'},

[3] = {pokemon = 'Poliwhirl s'},

[4] = {pokemon = 'Krabby s'},

[5] = {pokemon = 'Poliwag s'},

[6] = {pokemon = 'Magikarp s'},

[7] = {pokemon = 'Poliwhirl s'},

[8] = {pokemon = 'Poliwag s'},

[9] = {pokemon = 'Staryu s'},

[10] = {pokemon = 'Krabby s'},

[11] = {pokemon = 'Tentacool s'},

}

d40 =

{

[0] = {pokemon = 'Magikarp s'},

[1] = {pokemon = 'Seaking s'},

[2] = {pokemon = 'Krabby s'},

[3] = {pokemon = 'Horsea s'},

[4] = {pokemon = 'Poliwhirl s'},

[5] = {pokemon = 'Poliwag s'},

[6] = {pokemon = 'Magikarp s'},

[7] = {pokemon = 'Krabby s'},

[8] = {pokemon = 'Poliwhirl s'},

[9] = {pokemon = 'Horsea s'},

[10] = {pokemon = 'Staryu s'},

[11] = {pokemon = 'Poliwag s'},

[12] = {pokemon = 'Poliwhirl s'},

[13] = {pokemon = 'Krabby s'},

[14] = {pokemon = 'Poliwag s'},

[15] = {pokemon = 'Horsea s'},

[16] = {pokemon = 'Tentacool s'},

[17] = {pokemon = 'Seaking s'},

}

d60 =

{

[0] = {pokemon = 'Poliwhirl s'},

[1] = {pokemon = 'Krabby s'},

[2] = {pokemon = 'Krabby s'},

[3] = {pokemon = 'Poliwhirl s'},

[4] = {pokemon = 'Horsea s'},

[5] = {pokemon = 'Poliwag s'},

[6] = {pokemon = 'Poliwhirl s'},

[7] = {pokemon = 'Krabby s'},

[8] = {pokemon = 'Starmie s'},

[9] = {pokemon = 'Horsea s'},

[10] = {pokemon = 'Horsea s'},

[11] = {pokemon = 'Poliwag s'},

[12] = {pokemon = 'Magikarp s'},

[13] = {pokemon = 'Krabby s'},

[14] = {pokemon = 'Poliwag s'},

[15] = {pokemon = 'Staryu s'},

[16] = {pokemon = 'Staryu s'},

[17] = {pokemon = 'Poliwag s'},

[18] = {pokemon = 'Magikarp s'},

[19] = {pokemon = 'Krabby s'},

[20] = {pokemon = 'Krabby s'},

[21] = {pokemon = 'Horsea s'},

[22] = {pokemon = 'Horsea s'},

[23] = {pokemon = 'Poliwag s'},

[24] = {pokemon = 'Magikarp s'},

[25] = {pokemon = 'Krabby s'},

[26] = {pokemon = 'Seaking s'},

[27] = {pokemon = 'Horsea s'},

[28] = {pokemon = 'Kingler s'},

[29] = {pokemon = 'Poliwag s'},

[30] = {pokemon = 'Seaking s'},

[31] = {pokemon = 'Krabby s'},

[32] = {pokemon = 'Poliwag s'},

[33] = {pokemon = 'Kingler s'},

[34] = {pokemon = 'Poliwag s'},

[35] = {pokemon = 'Seaking s'},

d80 =

{

[0] = {pokemon = 'Poliwhirl s'},

[1] = {pokemon = 'Seaking s'},

[2] = {pokemon = 'Poliwhirl s'},

[3] = {pokemon = 'Seaking s'},

[4] = {pokemon = 'Poliwhirl s'},

[5] = {pokemon = 'Seaking s'},

[6] = {pokemon = 'Poliwhirl s'},

[7] = {pokemon = 'Seaking s'},

[8] = {pokemon = 'Poliwhirl s'},

[9] = {pokemon = 'Horsea s'},

[10] = {pokemon = 'Horsea s'},

[11] = {pokemon = 'Staryu s'},

[12] = {pokemon = 'Magikarp s'},

[13] = {pokemon = 'Staryu s'},

[14] = {pokemon = 'Poliwag s'},

[15] = {pokemon = 'Horsea s'},

[16] = {pokemon = 'Poliwag s'},

[17] = {pokemon = 'Kingler s'},

[18] = {pokemon = 'Staryu s'},

[19] = {pokemon = 'Krabby s'},

[20] = {pokemon = 'Kingler s'},

[21] = {pokemon = 'Horsea s'},

[22] = {pokemon = 'Horsea s'},

[23] = {pokemon = 'Kingler s'},

[24] = {pokemon = 'Kingler s'},

[25] = {pokemon = 'Starmie s'},

[26] = {pokemon = 'Krabby s'},

[27] = {pokemon = 'Starmie s'},

[28] = {pokemon = 'Horsea s'},

[29] = {pokemon = 'Poliwag s'},

[30] = {pokemon = 'Magikarp s'},

[31] = {pokemon = 'Krabby s'},

[32] = {pokemon = 'Poliwag s'},

[33] = {pokemon = 'Horsea s'},

[34] = {pokemon = 'Poliwag s'},

[35] = {pokemon = 'Poliwag s'},

[36] = {pokemon = 'Magikarp s'},

[37] = {pokemon = 'Krabby s'},

[38] = {pokemon = 'Krabby s'},

[39] = {pokemon = 'Horsea s'},

[40] = {pokemon = 'Horsea s'},

[41] = {pokemon = 'Poliwag s'},

[42] = {pokemon = 'Magikarp s'},

[43] = {pokemon = 'Krabby s'},

[44] = {pokemon = 'Krabby s'},

[45] = {pokemon = 'Horsea s'},

[46] = {pokemon = 'Horsea s'},

[47] = {pokemon = 'Poliwag s'},

[48] = {pokemon = 'Magikarp s'},

[49] = {pokemon = 'Krabby s'},

[50] = {pokemon = 'Seadra s'},

[51] = {pokemon = 'Horsea s'},

[52] = {pokemon = 'Poliwag s'},

[53] = {pokemon = 'Seadra s'},

d100 =

{

[0] = {pokemon = 'Poliwhirl s'},

[1] = {pokemon = 'Seaking s'},

[2] = {pokemon = 'Poliwhirl s'},

[3] = {pokemon = 'Seaking s'},

[4] = {pokemon = 'Poliwhirl s'},

[5] = {pokemon = 'Seaking s'},

[6] = {pokemon = 'Poliwhirl s'},

[7] = {pokemon = 'Seaking s'},

[8] = {pokemon = 'Poliwhirl s'},

[9] = {pokemon = 'Horsea s'},

[10] = {pokemon = 'Horsea s'},

[11] = {pokemon = 'Staryu s'},

[12] = {pokemon = 'Magikarp s'},

[13] = {pokemon = 'Staryu s'},

[14] = {pokemon = 'Poliwag s'},

[15] = {pokemon = 'Horsea s'},

[16] = {pokemon = 'Poliwag s'},

[17] = {pokemon = 'Kingler s'},

[18] = {pokemon = 'Staryu s'},

[19] = {pokemon = 'Krabby s'},

[20] = {pokemon = 'Kingler s'},

[21] = {pokemon = 'Horsea s'},

[22] = {pokemon = 'Horsea s'},

[23] = {pokemon = 'Kingler s'},

[24] = {pokemon = 'Kingler s'},

[25] = {pokemon = 'Starmie s'},

[26] = {pokemon = 'Krabby s'},

[27] = {pokemon = 'Starmie s'},

[28] = {pokemon = 'Horsea s'},

[29] = {pokemon = 'Poliwag s'},

[30] = {pokemon = 'Magikarp s'},

[31] = {pokemon = 'Krabby s'},

[32] = {pokemon = 'Poliwag s'},

[33] = {pokemon = 'Horsea s'},

[34] = {pokemon = 'Poliwag s'},

[35] = {pokemon = 'Poliwag s'},

[36] = {pokemon = 'Magikarp s'},

[37] = {pokemon = 'Krabby s'},

[38] = {pokemon = 'Krabby s'},

[39] = {pokemon = 'Horsea s'},

[40] = {pokemon = 'Horsea s'},

[41] = {pokemon = 'Poliwag s'},

[42] = {pokemon = 'Magikarp s'},

[43] = {pokemon = 'Gyarados s'},

[44] = {pokemon = 'Krabby s'},

[45] = {pokemon = 'Horsea s'},

[46] = {pokemon = 'Gyarados s'},

[47] = {pokemon = 'Poliwag s'},

[48] = {pokemon = 'Magikarp s'},

[49] = {pokemon = 'Krabby s'},

[50] = {pokemon = 'Seadra s'},

[51] = {pokemon = 'Horsea s'},

[52] = {pokemon = 'Poliwag s'},

[53] = {pokemon = 'Seadra s'},

}

local config = {

waters = {4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825},

}

local skill = getPlayerSkillLevel(cid, 6)

local playerpos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z}

if(isInArray(config.waters, itemEx.itemid)) then

doSendMagicEffect(toPos, CONST_ME_LOSEENERGY)

doPlayerAddSkillTry(cid, 6, 1)

if skill >= 100 then

local random = math.random(0, 80)

if random <= 14 then

doSummonCreature(d100[random].pokemon, playerpos)

return true

end

else

if skill >= 80 then

local random = math.random(0, 80)

if random <= 11 then

doSummonCreature(d80[random].pokemon, playerpos)

return true

end

else

if skill >= 60 then

local random = math.random(0, 80)

if random <= 7 then

doSummonCreature(d60[random].pokemon, playerpos)

return true

end

else

if skill >= 40 then

local random = math.random(0, 80)

if random <= 4 then

doSummonCreature(d40[random].pokemon, playerpos)

return true

end

else

if skill >= 20 then

local random = math.random(0, 80)

if random <= 2 then

doSummonCreature(d20[random].pokemon, playerpos)

return true

end

else

if skill >= 0 and skill < 20 then

local random = math.random(0, 80)

if random <= 1 then

doSummonCreature(d0[random].pokemon, playerpos)

return true

end

return true

end

return true

end

return true

end

end

end

end

end

end

esse ai é oque eu id que eu colokei lá no actions.xml já adicionei no server certinho so preciso de um npc que venda esse item para o player já colocado com a rode lá no local. ou até de só um upgrade nela para pescar esses pokes ae.

<action itemid="7379" event="script" value="tools/advanced fishing.lua" allowfaruse="1"/>

Editado por karlkalvin (veja o histórico de edições)

                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Assinatura~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                pmnz1.jpg

Link para o post
Compartilhar em outros sites

Em data/npc crie um arquivo com extenção .xml e adicione isto!


<?xml version="1.0" encoding="UTF-8"?>

<npc name="Rod Magic" script="default.lua" walkinterval="2000" floorchange="0">

    <health now="150" max="150"/>

    <look type="128" head="20" body="110" legs="50" feet="110" corpse="2212"/>

    <parameters>

        <parameter key="module_shop" value="1"/>

        <parameter key="message_greet" value="Olá |PLAYERNAME|. Eu vendo a advanced fishing."/>

        <parameter key="shop_buyable" value="advanced fishing,7379,1000000"/>

    </parameters>

</npc>

Ta ai!

Link para o post
Compartilhar em outros sites

Eu tento sumonar o NPC Criar um mais ele não aparece e ai .... ???

outra coisa qual script eu deixo ele... porque o script ele está lá no data/actions/script/tools e não no data/npc/scripts qual directorio do arquivo lua eu coloco ???

                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Assinatura~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                pmnz1.jpg

Link para o post
Compartilhar em outros sites

Vá em data/NPCs copie um script e cole, mude o nome que quiser, dentro coloque o script do nosso amigo Subyth:


<?xml version="1.0" encoding="UTF-8"?>

<npc name="NOMEDONPC" script="default.lua" walkinterval="2000" floorchange="0">

    <health now="150" max="150"/>

    <look type="128" head="20" body="110" legs="50" feet="110" corpse="2212"/>

    <parameters>

	    <parameter key="module_shop" value="1"/>

	    <parameter key="message_greet" value="Olá |PLAYERNAME|. Eu vendo a advanced fishing."/>

	    <parameter key="shop_buyable" value="advanced fishing,7379,1000000"/>

    </parameters>

</npc>

Agora salve, abra o servidor e digite o comando

/n NOMEDONPC

ou

/s NOMEDONPC

Lembrando que o script é do Subith, eu só expliquei, boa sorte.

Link para o post
Compartilhar em outros sites

Vá em data/NPCs copie um script e cole, mude o nome que quiser, dentro coloque o script do nosso amigo Subyth:


<?xml version="1.0" encoding="UTF-8"?>

<npc name="NOMEDONPC" script="default.lua" walkinterval="2000" floorchange="0">

	<health now="150" max="150"/>

	<look type="128" head="20" body="110" legs="50" feet="110" corpse="2212"/>

	<parameters>

		<parameter key="module_shop" value="1"/>

		<parameter key="message_greet" value="Olá |PLAYERNAME|. Eu vendo a advanced fishing."/>

		<parameter key="shop_buyable" value="advanced fishing,7379,1000000"/>

	</parameters>

</npc>

Agora salve, abra o servidor e digite o comando

/n NOMEDONPC

ou

/s NOMEDONPC

Lembrando que o script é do Subith, eu só expliquei, boa sorte.

Tá mais onde está script="default.lua" como eu vou colocar o diretorio, se não está na pasta script de npc eu tenho que colocar oque script="data/actions/script/advenced.fishing.lua"

tem que ser assim ou tenho que adicionar o scrip do fishing lá no script dos npc ???

                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Assinatura~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                pmnz1.jpg

Link para o post
Compartilhar em outros sites

Cara, o npc só serve para vender a rod, o default é default.


<parameter key="shop_buyable" value="advanced fishing,7379,1000000"/>


Isso faz que o NPC venda a advanced rod:

7379 é o id da rod

1000000 é o valor

Não precisa mecher mais em nada, só faz oque eu te falei, em data/npc e dpois sumona o npc...

Editado por Subyth (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

tá bom mais em meus scripts tem um default.lua ele não ira dar conflito ?

                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Assinatura~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                pmnz1.jpg

Link para o post
Compartilhar em outros sites

tá bom mais em meus scripts tem um default.lua ele não ira dar conflito ?

Nem vai dar conflito.

Pode ficar tranquilo!

Link para o post
Compartilhar em outros sites

[Error - LuaScriptInterface::loadFile] data/actions/scripts/tools/advanced fishing.lua:202: '}' expected (to close '{' at line 89) near 'local'

[23/05/2012 20:58:03] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/tools/advanced fishing.lua)

[23/05/2012 20:58:03] data/actions/scripts/tools/advanced fishing.lua:202: '}' expected (to close '{' at line 89) near 'local'

tá dando esse erro no negocio do server lá =x

meu scripter :

function onUse(cid, item, fromPos, itemEx, toPos)

d0 =

{

[0] = {pokemon = 'Magikarp s'},

[1] = {pokemon = 'Poliwag s'},

[2] = {pokemon = 'Magikarp s'},

[4] = {pokemon = 'Poliwag s'},

}

d20 =

{

[0] = {pokemon = 'Magikarp s'},

[1] = {pokemon = 'Poliwhirl s'},

[2] = {pokemon = 'Poliwag s'},

[3] = {pokemon = 'Poliwhirl s'},

[4] = {pokemon = 'Krabby s'},

[5] = {pokemon = 'Poliwag s'},

[6] = {pokemon = 'Magikarp s'},

[7] = {pokemon = 'Poliwhirl s'},

[8] = {pokemon = 'Poliwag s'},

[9] = {pokemon = 'Staryu s'},

[10] = {pokemon = 'Krabby s'},

[11] = {pokemon = 'Tentacool s'},

}

d40 =

{

[0] = {pokemon = 'Magikarp s'},

[1] = {pokemon = 'Seaking s'},

[2] = {pokemon = 'Krabby s'},

[3] = {pokemon = 'Horsea s'},

[4] = {pokemon = 'Poliwhirl s'},

[5] = {pokemon = 'Poliwag s'},

[6] = {pokemon = 'Magikarp s'},

[7] = {pokemon = 'Krabby s'},

[8] = {pokemon = 'Poliwhirl s'},

[9] = {pokemon = 'Horsea s'},

[10] = {pokemon = 'Staryu s'},

[11] = {pokemon = 'Poliwag s'},

[12] = {pokemon = 'Poliwhirl s'},

[13] = {pokemon = 'Krabby s'},

[14] = {pokemon = 'Poliwag s'},

[15] = {pokemon = 'Horsea s'},

[16] = {pokemon = 'Tentacool s'},

[17] = {pokemon = 'Seaking s'},

}

d60 =

{

[0] = {pokemon = 'Poliwhirl s'},

[1] = {pokemon = 'Krabby s'},

[2] = {pokemon = 'Krabby s'},

[3] = {pokemon = 'Poliwhirl s'},

[4] = {pokemon = 'Horsea s'},

[5] = {pokemon = 'Poliwag s'},

[6] = {pokemon = 'Poliwhirl s'},

[7] = {pokemon = 'Krabby s'},

[8] = {pokemon = 'Starmie s'},

[9] = {pokemon = 'Horsea s'},

[10] = {pokemon = 'Horsea s'},

[11] = {pokemon = 'Poliwag s'},

[12] = {pokemon = 'Magikarp s'},

[13] = {pokemon = 'Krabby s'},

[14] = {pokemon = 'Poliwag s'},

[15] = {pokemon = 'Staryu s'},

[16] = {pokemon = 'Staryu s'},

[17] = {pokemon = 'Poliwag s'},

[18] = {pokemon = 'Magikarp s'},

[19] = {pokemon = 'Krabby s'},

[20] = {pokemon = 'Krabby s'},

[21] = {pokemon = 'Horsea s'},

[22] = {pokemon = 'Horsea s'},

[23] = {pokemon = 'Poliwag s'},

[24] = {pokemon = 'Magikarp s'},

[25] = {pokemon = 'Krabby s'},

[26] = {pokemon = 'Seaking s'},

[27] = {pokemon = 'Horsea s'},

[28] = {pokemon = 'Kingler s'},

[29] = {pokemon = 'Poliwag s'},

[30] = {pokemon = 'Seaking s'},

[31] = {pokemon = 'Krabby s'},

[32] = {pokemon = 'Poliwag s'},

[33] = {pokemon = 'Kingler s'},

[34] = {pokemon = 'Poliwag s'},

[35] = {pokemon = 'Seaking s'},

d80 =

{

[0] = {pokemon = 'Poliwhirl s'},

[1] = {pokemon = 'Seaking s'},

[2] = {pokemon = 'Poliwhirl s'},

[3] = {pokemon = 'Seaking s'},

[4] = {pokemon = 'Poliwhirl s'},

[5] = {pokemon = 'Seaking s'},

[6] = {pokemon = 'Poliwhirl s'},

[7] = {pokemon = 'Seaking s'},

[8] = {pokemon = 'Poliwhirl s'},

[9] = {pokemon = 'Horsea s'},

[10] = {pokemon = 'Horsea s'},

[11] = {pokemon = 'Staryu s'},

[12] = {pokemon = 'Magikarp s'},

[13] = {pokemon = 'Staryu s'},

[14] = {pokemon = 'Poliwag s'},

[15] = {pokemon = 'Horsea s'},

[16] = {pokemon = 'Poliwag s'},

[17] = {pokemon = 'Kingler s'},

[18] = {pokemon = 'Staryu s'},

[19] = {pokemon = 'Krabby s'},

[20] = {pokemon = 'Kingler s'},

[21] = {pokemon = 'Horsea s'},

[22] = {pokemon = 'Horsea s'},

[23] = {pokemon = 'Kingler s'},

[24] = {pokemon = 'Kingler s'},

[25] = {pokemon = 'Starmie s'},

[26] = {pokemon = 'Krabby s'},

[27] = {pokemon = 'Starmie s'},

[28] = {pokemon = 'Horsea s'},

[29] = {pokemon = 'Poliwag s'},

[30] = {pokemon = 'Magikarp s'},

[31] = {pokemon = 'Krabby s'},

[32] = {pokemon = 'Poliwag s'},

[33] = {pokemon = 'Horsea s'},

[34] = {pokemon = 'Poliwag s'},

[35] = {pokemon = 'Poliwag s'},

[36] = {pokemon = 'Magikarp s'},

[37] = {pokemon = 'Krabby s'},

[38] = {pokemon = 'Krabby s'},

[39] = {pokemon = 'Horsea s'},

[40] = {pokemon = 'Horsea s'},

[41] = {pokemon = 'Poliwag s'},

[42] = {pokemon = 'Magikarp s'},

[43] = {pokemon = 'Krabby s'},

[44] = {pokemon = 'Krabby s'},

[45] = {pokemon = 'Horsea s'},

[46] = {pokemon = 'Horsea s'},

[47] = {pokemon = 'Poliwag s'},

[48] = {pokemon = 'Magikarp s'},

[49] = {pokemon = 'Krabby s'},

[50] = {pokemon = 'Seadra s'},

[51] = {pokemon = 'Horsea s'},

[52] = {pokemon = 'Poliwag s'},

[53] = {pokemon = 'Seadra s'},

d100 =

{

[0] = {pokemon = 'Poliwhirl s'},

[1] = {pokemon = 'Seaking s'},

[2] = {pokemon = 'Poliwhirl s'},

[3] = {pokemon = 'Seaking s'},

[4] = {pokemon = 'Poliwhirl s'},

[5] = {pokemon = 'Seaking s'},

[6] = {pokemon = 'Poliwhirl s'},

[7] = {pokemon = 'Seaking s'},

[8] = {pokemon = 'Poliwhirl s'},

[9] = {pokemon = 'Horsea s'},

[10] = {pokemon = 'Horsea s'},

[11] = {pokemon = 'Staryu s'},

[12] = {pokemon = 'Magikarp s'},

[13] = {pokemon = 'Staryu s'},

[14] = {pokemon = 'Poliwag s'},

[15] = {pokemon = 'Horsea s'},

[16] = {pokemon = 'Poliwag s'},

[17] = {pokemon = 'Kingler s'},

[18] = {pokemon = 'Staryu s'},

[19] = {pokemon = 'Krabby s'},

[20] = {pokemon = 'Kingler s'},

[21] = {pokemon = 'Horsea s'},

[22] = {pokemon = 'Horsea s'},

[23] = {pokemon = 'Kingler s'},

[24] = {pokemon = 'Kingler s'},

[25] = {pokemon = 'Starmie s'},

[26] = {pokemon = 'Krabby s'},

[27] = {pokemon = 'Starmie s'},

[28] = {pokemon = 'Horsea s'},

[29] = {pokemon = 'Poliwag s'},

[30] = {pokemon = 'Magikarp s'},

[31] = {pokemon = 'Krabby s'},

[32] = {pokemon = 'Poliwag s'},

[33] = {pokemon = 'Horsea s'},

[34] = {pokemon = 'Poliwag s'},

[35] = {pokemon = 'Poliwag s'},

[36] = {pokemon = 'Magikarp s'},

[37] = {pokemon = 'Krabby s'},

[38] = {pokemon = 'Krabby s'},

[39] = {pokemon = 'Horsea s'},

[40] = {pokemon = 'Horsea s'},

[41] = {pokemon = 'Poliwag s'},

[42] = {pokemon = 'Magikarp s'},

[43] = {pokemon = 'Gyarados s'},

[44] = {pokemon = 'Krabby s'},

[45] = {pokemon = 'Horsea s'},

[46] = {pokemon = 'Gyarados s'},

[47] = {pokemon = 'Poliwag s'},

[48] = {pokemon = 'Magikarp s'},

[49] = {pokemon = 'Krabby s'},

[50] = {pokemon = 'Seadra s'},

[51] = {pokemon = 'Horsea s'},

[52] = {pokemon = 'Poliwag s'},

[53] = {pokemon = 'Seadra s'},

}

local config = {

waters = {4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825},

}

local skill = getPlayerSkillLevel(cid, 6)

local playerpos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z}

if(isInArray(config.waters, itemEx.itemid)) then

doSendMagicEffect(toPos, CONST_ME_LOSEENERGY)

doPlayerAddSkillTry(cid, 6, 1)

if skill >= 100 then

local random = math.random(0, 80)

if random <= 14 then

doSummonCreature(d100[random].pokemon, playerpos)

return true

end

else

if skill >= 80 then

local random = math.random(0, 80)

if random <= 11 then

doSummonCreature(d80[random].pokemon, playerpos)

return true

end

else

if skill >= 60 then

local random = math.random(0, 80)

if random <= 7 then

doSummonCreature(d60[random].pokemon, playerpos)

return true

end

else

if skill >= 40 then

local random = math.random(0, 80)

if random <= 4 then

doSummonCreature(d40[random].pokemon, playerpos)

return true

end

else

if skill >= 20 then

local random = math.random(0, 80)

if random <= 2 then

doSummonCreature(d20[random].pokemon, playerpos)

return true

end

else

if skill >= 0 and skill < 20 then

local random = math.random(0, 80)

if random <= 1 then

doSummonCreature(d0[random].pokemon, playerpos)

return true

end

return true

Editado por karlkalvin (veja o histórico de edições)

                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Assinatura~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                pmnz1.jpg

Link para o post
Compartilhar em outros sites

Poste aqui o script do advancedfight, ele está com erro, poste para que eu possa arrumar.

- Edit, desculpe, não vi o script, estou arrumando ele, jaja edito aqui!

Edit² - Consegui eu axo, não tenho servidor pokemon para testar mais está ai:


function onUse(cid, item, fromPos, itemEx, toPos)


d0 =

{

[0] = {pokemon = 'Magikarp s'},

[1] = {pokemon = 'Poliwag s'},

[2] = {pokemon = 'Magikarp s'},

[4] = {pokemon = 'Poliwag s'},

}


d20 =

{

[0] = {pokemon = 'Magikarp s'},

[1] = {pokemon = 'Poliwhirl s'},

[2] = {pokemon = 'Poliwag s'},

[3] = {pokemon = 'Poliwhirl s'},

[4] = {pokemon = 'Krabby s'},

[5] = {pokemon = 'Poliwag s'},

[6] = {pokemon = 'Magikarp s'},

[7] = {pokemon = 'Poliwhirl s'},

[8] = {pokemon = 'Poliwag s'},

[9] = {pokemon = 'Staryu s'},

[10] = {pokemon = 'Krabby s'},

[11] = {pokemon = 'Tentacool s'},

}


d40 =

{

[0] = {pokemon = 'Magikarp s'},

[1] = {pokemon = 'Seaking s'},

[2] = {pokemon = 'Krabby s'},

[3] = {pokemon = 'Horsea s'},

[4] = {pokemon = 'Poliwhirl s'},

[5] = {pokemon = 'Poliwag s'},

[6] = {pokemon = 'Magikarp s'},

[7] = {pokemon = 'Krabby s'},

[8] = {pokemon = 'Poliwhirl s'},

[9] = {pokemon = 'Horsea s'},

[10] = {pokemon = 'Staryu s'},

[11] = {pokemon = 'Poliwag s'},

[12] = {pokemon = 'Poliwhirl s'},

[13] = {pokemon = 'Krabby s'},

[14] = {pokemon = 'Poliwag s'},

[15] = {pokemon = 'Horsea s'},

[16] = {pokemon = 'Tentacool s'},

[17] = {pokemon = 'Seaking s'},

}


d60 =

{

[0] = {pokemon = 'Poliwhirl s'},

[1] = {pokemon = 'Krabby s'},

[2] = {pokemon = 'Krabby s'},

[3] = {pokemon = 'Poliwhirl s'},

[4] = {pokemon = 'Horsea s'},

[5] = {pokemon = 'Poliwag s'},

[6] = {pokemon = 'Poliwhirl s'},

[7] = {pokemon = 'Krabby s'},

[8] = {pokemon = 'Starmie s'},

[9] = {pokemon = 'Horsea s'},

[10] = {pokemon = 'Horsea s'},

[11] = {pokemon = 'Poliwag s'},

[12] = {pokemon = 'Magikarp s'},

[13] = {pokemon = 'Krabby s'},

[14] = {pokemon = 'Poliwag s'},

[15] = {pokemon = 'Staryu s'},

[16] = {pokemon = 'Staryu s'},

[17] = {pokemon = 'Poliwag s'},

[18] = {pokemon = 'Magikarp s'},

[19] = {pokemon = 'Krabby s'},

[20] = {pokemon = 'Krabby s'},

[21] = {pokemon = 'Horsea s'},

[22] = {pokemon = 'Horsea s'},

[23] = {pokemon = 'Poliwag s'},

[24] = {pokemon = 'Magikarp s'},

[25] = {pokemon = 'Krabby s'},

[26] = {pokemon = 'Seaking s'},

[27] = {pokemon = 'Horsea s'},

[28] = {pokemon = 'Kingler s'},

[29] = {pokemon = 'Poliwag s'},

[30] = {pokemon = 'Seaking s'},

[31] = {pokemon = 'Krabby s'},

[32] = {pokemon = 'Poliwag s'},

[33] = {pokemon = 'Kingler s'},

[34] = {pokemon = 'Poliwag s'},

[35] = {pokemon = 'Seaking s'},

}


d80 =

{

[0] = {pokemon = 'Poliwhirl s'},

[1] = {pokemon = 'Seaking s'},

[2] = {pokemon = 'Poliwhirl s'},

[3] = {pokemon = 'Seaking s'},

[4] = {pokemon = 'Poliwhirl s'},

[5] = {pokemon = 'Seaking s'},

[6] = {pokemon = 'Poliwhirl s'},

[7] = {pokemon = 'Seaking s'},

[8] = {pokemon = 'Poliwhirl s'},

[9] = {pokemon = 'Horsea s'},

[10] = {pokemon = 'Horsea s'},

[11] = {pokemon = 'Staryu s'},

[12] = {pokemon = 'Magikarp s'},

[13] = {pokemon = 'Staryu s'},

[14] = {pokemon = 'Poliwag s'},

[15] = {pokemon = 'Horsea s'},

[16] = {pokemon = 'Poliwag s'},

[17] = {pokemon = 'Kingler s'},

[18] = {pokemon = 'Staryu s'},

[19] = {pokemon = 'Krabby s'},

[20] = {pokemon = 'Kingler s'},

[21] = {pokemon = 'Horsea s'},

[22] = {pokemon = 'Horsea s'},

[23] = {pokemon = 'Kingler s'},

[24] = {pokemon = 'Kingler s'},

[25] = {pokemon = 'Starmie s'},

[26] = {pokemon = 'Krabby s'},

[27] = {pokemon = 'Starmie s'},

[28] = {pokemon = 'Horsea s'},

[29] = {pokemon = 'Poliwag s'},

[30] = {pokemon = 'Magikarp s'},

[31] = {pokemon = 'Krabby s'},

[32] = {pokemon = 'Poliwag s'},

[33] = {pokemon = 'Horsea s'},

[34] = {pokemon = 'Poliwag s'},

[35] = {pokemon = 'Poliwag s'},

[36] = {pokemon = 'Magikarp s'},

[37] = {pokemon = 'Krabby s'},

[38] = {pokemon = 'Krabby s'},

[39] = {pokemon = 'Horsea s'},

[40] = {pokemon = 'Horsea s'},

[41] = {pokemon = 'Poliwag s'},

[42] = {pokemon = 'Magikarp s'},

[43] = {pokemon = 'Krabby s'},

[44] = {pokemon = 'Krabby s'},

[45] = {pokemon = 'Horsea s'},

[46] = {pokemon = 'Horsea s'},

[47] = {pokemon = 'Poliwag s'},

[48] = {pokemon = 'Magikarp s'},

[49] = {pokemon = 'Krabby s'},

[50] = {pokemon = 'Seadra s'},

[51] = {pokemon = 'Horsea s'},

[52] = {pokemon = 'Poliwag s'},

[53] = {pokemon = 'Seadra s'},

}


d100 =

{

[0] = {pokemon = 'Poliwhirl s'},

[1] = {pokemon = 'Seaking s'},

[2] = {pokemon = 'Poliwhirl s'},

[3] = {pokemon = 'Seaking s'},

[4] = {pokemon = 'Poliwhirl s'},

[5] = {pokemon = 'Seaking s'},

[6] = {pokemon = 'Poliwhirl s'},

[7] = {pokemon = 'Seaking s'},

[8] = {pokemon = 'Poliwhirl s'},

[9] = {pokemon = 'Horsea s'},

[10] = {pokemon = 'Horsea s'},

[11] = {pokemon = 'Staryu s'},

[12] = {pokemon = 'Magikarp s'},

[13] = {pokemon = 'Staryu s'},

[14] = {pokemon = 'Poliwag s'},

[15] = {pokemon = 'Horsea s'},

[16] = {pokemon = 'Poliwag s'},

[17] = {pokemon = 'Kingler s'},

[18] = {pokemon = 'Staryu s'},

[19] = {pokemon = 'Krabby s'},

[20] = {pokemon = 'Kingler s'},

[21] = {pokemon = 'Horsea s'},

[22] = {pokemon = 'Horsea s'},

[23] = {pokemon = 'Kingler s'},

[24] = {pokemon = 'Kingler s'},

[25] = {pokemon = 'Starmie s'},

[26] = {pokemon = 'Krabby s'},

[27] = {pokemon = 'Starmie s'},

[28] = {pokemon = 'Horsea s'},

[29] = {pokemon = 'Poliwag s'},

[30] = {pokemon = 'Magikarp s'},

[31] = {pokemon = 'Krabby s'},

[32] = {pokemon = 'Poliwag s'},

[33] = {pokemon = 'Horsea s'},

[34] = {pokemon = 'Poliwag s'},

[35] = {pokemon = 'Poliwag s'},

[36] = {pokemon = 'Magikarp s'},

[37] = {pokemon = 'Krabby s'},

[38] = {pokemon = 'Krabby s'},

[39] = {pokemon = 'Horsea s'},

[40] = {pokemon = 'Horsea s'},

[41] = {pokemon = 'Poliwag s'},

[42] = {pokemon = 'Magikarp s'},

[43] = {pokemon = 'Gyarados s'},

[44] = {pokemon = 'Krabby s'},

[45] = {pokemon = 'Horsea s'},

[46] = {pokemon = 'Gyarados s'},

[47] = {pokemon = 'Poliwag s'},

[48] = {pokemon = 'Magikarp s'},

[49] = {pokemon = 'Krabby s'},

[50] = {pokemon = 'Seadra s'},

[51] = {pokemon = 'Horsea s'},

[52] = {pokemon = 'Poliwag s'},

[53] = {pokemon = 'Seadra s'},


}

local config = {

waters = {4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825},

}


local skill = getPlayerSkillLevel(cid, 6)

local playerpos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z}


		if not (isInArray(config.waters, itemEx.itemid)) then

						return doPlayerSendCancel(cid, "You cannot fish here.")

				end


		if getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 9393) >= 1 then

		   return doPlayerSendCancel(cid, "Você não pode pescar no surf ou fly.")

		end


				doSendMagicEffect(toPos, CONST_ME_LOSEENERGY)

				doPlayerAddSkillTry(cid, 6, 1)


				if skill >= 100 then

						local random = math.random(0, 53)

						if random <= 11 then

								doSummonCreature(d100[random].pokemon, playerpos)

						return true

						end

				elseif skill >= 80 then

						local random = math.random(0, 53)

						if random <= 9 then

							doSummonCreature(d80[random].pokemon, playerpos)

						return true

						end

								elseif skill >= 60 then

						local random = math.random(0, 35)

						if random <= 6 then

							doSummonCreature(d60[random].pokemon, playerpos)

						return true

						 end

				elseif skill >= 40 then

						 local random = math.random(0, 17)

						 if random <= 5 then

							 doSummonCreature(d40[random].pokemon, playerpos)

						 return true

						 end

								elseif skill >= 20 then

						 local random = math.random(0, 11)

						  if random <= 4 then

							  doSummonCreature(d20[random].pokemon, playerpos)

						  return true

						  end

								elseif skill >= 0 and skill < 20 then

						  local random = math.random(0, 4)

						   if random <= 0 then

							   doSummonCreature(d0[random].pokemon, playerpos)

						   return true

						   end

								end

return true

end

Editado por Subyth
Adicionando o scritp (para evitar flood, não criei outro post) (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo