GO
dúvida

Azerus Script Movements

Por GodalonexD, 14 de out. de 2012 em Scripts

azerus
script
9
1.9k
GodalonexDG
14 de outubro de 2012 às 01:37

[14/10/2012 1:13:43] [Error - MoveEvents Interface]

[14/10/2012 1:13:43] data/movements/scripts/azerus.lua:onStepIn

[14/10/2012 1:13:43] Description:

[14/10/2012 1:13:43] attempt to index a nil value

[14/10/2012 1:13:43] stack traceback:

[14/10/2012 1:13:43] [C]: in function 'doTeleportThing'

[14/10/2012 1:13:43] data/movements/scripts/azerus.lua:47: in function <data/movements/scripts/azerus.lua:1>

 

[14/10/2012 1:13:46] [Error - MoveEvents Interface]

[14/10/2012 1:13:46] data/movements/scripts/azerus.lua:onStepIn

[14/10/2012 1:13:46] Description:

[14/10/2012 1:13:46] attempt to index a nil value

[14/10/2012 1:13:46] stack traceback:

[14/10/2012 1:13:46] [C]: in function 'doTeleportThing'

[14/10/2012 1:13:46] data/movements/scripts/azerus.lua:47: in function <data/movements/scripts/azerus.lua:1>

 

[14/10/2012 1:13:46] [Error - MoveEvents Interface]

[14/10/2012 1:13:46] data/movements/scripts/azerus.lua:onStepIn

[14/10/2012 1:13:46] Description:

[14/10/2012 1:13:46] attempt to index a nil value

[14/10/2012 1:13:46] stack traceback:

[14/10/2012 1:13:46] [C]: in function 'doTeleportThing'

[14/10/2012 1:13:46] data/movements/scripts/azerus.lua:47: in function <data/movements/scripts/azerus.lua:1>

 

[14/10/2012 1:13:57] [Error - MoveEvents Interface]

[14/10/2012 1:13:57] data/movements/scripts/azerus.lua:onStepIn

[14/10/2012 1:13:57] Description:

[14/10/2012 1:13:57] attempt to index a nil value

[14/10/2012 1:13:57] stack traceback:

[14/10/2012 1:13:57] [C]: in function 'doTeleportThing'

[14/10/2012 1:13:57] data/movements/scripts/azerus.lua:47: in function <data/movements/scripts/azerus.lua:1>

 

porque esta dando esse erro?

o servidor as vezes cai quando ta dando esse erro, e as vezes demora um tempo para cair mais sempre ta esse erro no meio...

 

alguem poderia me da uma ajuda me informando pelo menos porque o do erro?

meu distro é 9.6

 

esse é o script

 

 

function onStepIn(cid, item, position, fromPosition)

 

 

--Config-->

local queststatus = getPlayerStorageValue(cid, 50001)

--EndConfig-->

if item.actionid == 1974 and queststatus == -1 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "It seems by defeating Azerus you have stoped this army from entering your world! Better leave this ghastly place forever.")

setPlayerStorageValue(cid, 4765, 1)

return TRUE

end

 

if item.actionid == 1973 and queststatus == -1 then

-- Here is the code start:

starting={x = 32778, y = 31160, z = 10, stackpos = 253}

checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}

ending={x = 32788, y = 31172, z = 10, stackpos = 253}

players=0

totalmonsters=0

monster = {}

repeat

creature= getThingfromPos(checking)

if creature.itemid > 0 then

if getPlayerAccess(creature.uid) == 0 then

players=players+1

end

if getPlayerAccess(creature.uid) ~= 0 and getPlayerAccess(creature.uid) ~= 3 then

totalmonsters=totalmonsters+1

monster[totalmonsters]=creature.uid

end

end

checking.x=checking.x+1

if checking.x>ending.x then

checking.x=starting.x

checking.y=checking.y+1

end

until checking.y>ending.y

if players==0 then

trash= {x=33193, y=31689, z=15}

current=0

repeat

current=current+1

doTeleportThing(monster[current],trash)

until current>=totalmonsters

end

-- Here is the end of it

 

doTeleportThing(cid, player_pos_entrada)

doSendMagicEffect(player_pos_entrada, 10)

 

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Você já terminou a quest!')

end

end

SlicerS
14 de outubro de 2012 às 09:48

talvez seja pq nao tem essa variavel ae no script ;x ...

doTeleportThing(cid, player_pos_entrada)

-alias.. eita script confuso o.O-

Editado Outubro 14 por Slicer

GodalonexDG
14 de outubro de 2012 às 12:05

eu acho que esse script faz , quando termina a quest os monstros que estao la serem teleportado pra longe para quem for fazer denovo ta limpo o local...

 

porem eu tirei a action do script e os monstros ficam la... agora nao sei o que faço, mais deixa esse script ai nao vou fica dando aquele montao de erro as vezes até cai, vamo ve agora.

Session StartS
14 de outubro de 2012 às 13:02

Re-coloca o action e arruma a parte do frompos... D:

GodalonexDG
14 de outubro de 2012 às 13:08

como assim? seja mais especifico... arruma o que? diretamente

SlicerS
14 de outubro de 2012 às 18:23

tens q por as actions IDs no mapa denovo... ;x

e tenta usar esse script aki.. achu q n vai da erro..

 

function onStepIn(cid, item, position, fromPosition)

--Config-->

local queststatus = getPlayerStorageValue(cid, 50001)

local player_pos_entrada = {x = 1000, y = 1000, z = 7} --coloque a pos pra onde o player q pisou no piso vai ser teleportado!

local starting={x = 32778, y = 31160, z = 10}

local ending={x = 32788, y = 31172, z = 10}

local trash= {x=33193, y=31689, z=15}

local players = 0

local total = 0

local monster = {}

--EndConfig-->

 

 

if item.actionid == 1974 and queststatus == -1 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "It seems by defeating Azerus you have stoped this army from entering your world! Better leave this ghastly place forever.")

setPlayerStorageValue(cid, 4765, 1)

return TRUE

end

 

if item.actionid == 1973 and queststatus == -1 then

 

for x = starting.x, ending.x do

for y = starting.y, ending.y do

local creature = getThingfromPos({x = x, y = y, z = starting.z, stackpos = 253}).uid

if isPlayer(creature) then players = players+1 end

if isMonster(creature) then monster[total+1] = creature total = total+1 end

end

end

 

if #monster > 0 and players == 0 then

for i = 1, #monster do

doTeleportThing(monster, trash)

end

end

 

doTeleportThing(cid, player_pos_entrada)

doSendMagicEffect(player_pos_entrada, 10)

 

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Você já terminou a quest!')

end

return true

end

 

Editado Outubro 14 por Slicer

GodalonexDG
21 de outubro de 2012 às 11:09
local player_pos_entrada = {x = 1000, y = 1000, z = 7}

 

isso aqui eu deixo desse jeito? ou coloco alguma posição exata? meu map é global

SmiXS
21 de outubro de 2012 às 11:53
local player_pos_entrada = {x = 1000, y = 1000, z = 7}

 

Isso ai vai ser a entrada do Player, o piso do qual o player vai PISAR(obvio) e ativar o Movent...

GodalonexDG
21 de outubro de 2012 às 16:05

a no caso é um teleport entao coloco as cordenadas aonde o teleport esta?

edit

 

deu esse erro depois que coloquei

 

 

[27/10/2012 20:26:32] [Error - MoveEvents Interface]

[27/10/2012 20:26:32] data/movements/scripts/azerus.lua:onStepIn

[27/10/2012 20:26:32] Description:

[27/10/2012 20:26:32] (luaDoTeleportThing) Thing not found

 

[27/10/2012 20:26:32] [Error - MoveEvents Interface]

[27/10/2012 20:26:32] data/movements/scripts/azerus.lua:onStepIn

[27/10/2012 20:26:32] Description:

[27/10/2012 20:26:32] (luaDoTeleportThing) Thing not found

Editado Outubro 27 por TitanicoxD