- Dołączył
- Maj 12, 2009
- Posty
- 146
- Liczba reakcji
- 8
Mam problem ze skryptem na arenie, wszystko inne dzia?a dobrze, i nie ma ?adnych b??d?w, b??dy pojawiaj? si? w momencie gdy gracz chce wzi??? Goblet :<
b??d w konsoli:
skrypt arenagoblet.lua
Movements
Wie kto? co jest nie tak?, musz? doda? ?e strasznie cierpie z powodu tego problemu :<
b??d w konsoli:
Kod:
[16/02/2010 13:02:58] [Error - MoveEvents Interface]
[16/02/2010 13:02:58] data/movements/scripts/arenagoblet.lua:onStepIn
[16/02/2010 13:02:58] Description:
[16/02/2010 13:02:58] data/movements/scripts/arenagoblet.lua:21: attempt to call global 'doSetItemSpecialDescription' (a nil value)
[16/02/2010 13:02:58] stack traceback:
[16/02/2010 13:02:58] data/movements/scripts/arenagoblet.lua:21: in function <data/movements/scripts/arenagoblet.lua:1>
skrypt arenagoblet.lua
Kod:
function onStepIn(cid, item, position, fromPosition)
local gobletPos = getThingPos(item.uid)
if item.actionid == 42360 then
if getPlayerStorageValue(cid, 42360) ~= 1 then
setPlayerStorageValue(cid, 42360, 1)
local goblet = doCreateItemEx(5807, 1)
doSetItemSpecialDescription(goblet, "It is given to the courageous victor of the barbarian arena greenhorn difficulty.\nAwarded to " .. getCreatureName(cid) .. ".")
doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet)
end
elseif item.actionid == 42370 then
if getPlayerStorageValue(cid, 42370) ~= 1 then
setPlayerStorageValue(cid, 42370, 1)
local goblet = doCreateItemEx(5806, 1)
doSetItemSpecialDescription(goblet, "It is given to the courageous victor of the barbarian arena scrapper difficulty.\nAwarded to " .. getCreatureName(cid) .. ".")
doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet)
end
elseif item.actionid == 42380 then
if getPlayerStorageValue(cid, 42380) ~= 1 then
setPlayerStorageValue(cid, 42380, 1)
local goblet = doCreateItemEx(5805, 1)
doSetItemSpecialDescription(goblet, "It is given to the courageous victor of the barbarian arena warlord difficulty.\nAwarded to " .. getCreatureName(cid) .. ".")
doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet)
end
end
doTransformItem(item.uid, item.itemid - 1)
return TRUE
end
function onStepOut(cid, item, pos)
doTransformItem(item.uid, item.itemid + 1)
return TRUE
end
Kod:
Movements
Kod:
<movevent type="StepIn" actionid="42360" event="script" value="arenagoblet.lua" />
<movevent type="StepIn" actionid="42370" event="script" value="arenagoblet.lua" />
<movevent type="StepIn" actionid="42380" event="script" value="arenagoblet.lua" />
<movevent type="StepOut" actionid="42360" event="script" value="arenagoblet.lua" />
<movevent type="StepOut" actionid="42370" event="script" value="arenagoblet.lua" />
<movevent type="StepOut" actionid="42380" event="script" value="arenagoblet.lua" />
Wie kto? co jest nie tak?, musz? doda? ?e strasznie cierpie z powodu tego problemu :<
