Svan Area Goblet

unsword

Active User
Zarejestrowany
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:
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 :<
 
Odp: Svan Area Goblet

Proponuje usun?? z arenagoblet linijk?: doSetItemSpecialDescription. Silnik nie posiada tej funkcji. Ewentualnie poszukaj w plikach /lib/ jak sie ona nazywa, byc mo?e po prostu bez Special. :>
 
Odp: Svan Area Goblet

usuniecie s?owa Special, m?wi?c malowniczo 'G?wno da?o'
Pr?bowa?em nawet ze zmian? na DoSetItemText. ale jedyne co sie zmienilo to to ze przesta?o wykrzacza? b??dy w konsoli..

Jakies inne propozycje? :p

@down
gdybym chcia? aby goblety nie by?y podpisywane dla gracza kt?ry zrobi? questa,
Nie musialbym pisac tutaj w tej sprawie.
Idz trollowa? gdzie indziej plax.

@temat,
Ktokolwiek x.x?
 
Ostatnia edycja:
Odp: Svan Area Goblet

Oj mia?em ten sam b??d poprostu wklej to zamiast tego co masz:

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)
doCreateItemEx(cid, 5807, 1)
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)
doCreateItemEx(cid, 5806, 1)
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)
doCreateItemEx(5805, 1)
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
 
Odp: Svan Area Goblet

refresh
znaki znaki
 
Back
Do góry