What's new

Step In Problem.

Status
Not open for further replies.

Oskar1

Advanced User
Joined
May 8, 2008
Messages
221
Reaction score
33
Age
32
Gdy pr?buje naj?? na kratk? o nadanym AID wyskakuje mi co? takiego:

213123213.png
 

Ugrys Suchara

Advanced User
Joined
Jan 24, 2009
Messages
281
Reaction score
15
Odp: Step In Problem.

Mo?e masz skrypt do tego ??
jak masz by? bym ci wdzi?czny abys go tu umie?ci? mo?e co? pomog? pozdro
 

Oskar1

Advanced User
Joined
May 8, 2008
Messages
221
Reaction score
33
Age
32
Odp: Step In Problem.

Tylko, ?e w?a?nie jest dziwny problem bo kurde jakiekolwiek AID nadam tym przycisk? to i tak zawsze wystakuje to samo...;(
 

Xart Irok

Senior User
Joined
Sep 7, 2008
Messages
2,925
Reaction score
419
Age
32
Odp: Step In Problem.

a tak sie zapytam to jakie im nadajesz te aid
 

Oskar1

Advanced User
Joined
May 8, 2008
Messages
221
Reaction score
33
Age
32
Odp: Step In Problem.

Xart... czy nadam 1 czy 2 czy 666 czy 2000 czy 100000000000xxxxx to nie istotne... zawsze wyskakuje ta sama reakcja.
 

Xart Irok

Senior User
Joined
Sep 7, 2008
Messages
2,925
Reaction score
419
Age
32
Odp: Step In Problem.

uzyles skeyptow smoczka jesli tak mniejwiecej chyba wiem jak pomoc ale musze looknac w skrpyty

podaj mi dokladnie aid jakie uzyles na plytkach i jakie przy dodaniu do plikow xml
 
Last edited:

Sentil

Ten Typ
Joined
May 11, 2008
Messages
211
Reaction score
85
Odp: Step In Problem.

M?wisz, ?e niewa?ne jaki nadasz AID, wyskakuje ten sam napis, tak? Mimo wszystko p?ytka o ID 426 musi by? jako? zadeklarowana w pliku XML. Sprawd? to. Dok?adniej otw?rz plik movements.xml, wpisz w wyszukiwarce tekstu itemid="426" i zobacz jaki skrypt za to odpowiada.
 

Oskar1

Advanced User
Joined
May 8, 2008
Messages
221
Reaction score
33
Age
32
Odp: Step In Problem.

<movevent type="StepIn" itemid="426" event="script" value="tiles.lua"/>

Code:
local config = {
	maxLevel = getConfigInfo('maximumDoorLevel')
}

local increasingItems = {[416] = 417, [426] = 425, [446] = 447, [3216] = 3217, [3202] = 3215}
local decreasingItems = {[417] = 416, [425] = 426, [447] = 446, [3217] = 3216, [3215] = 3202}
local depots = {2589, 2590, 2591, 2592}

local checkCreature = {isPlayer, isMonster, isNpc}
function onStepIn(cid, item, position, fromPosition)
	if(not increasingItems[item.itemid]) then
		return FALSE
	end

	if(isPlayer(cid) ~= TRUE or isPlayerGhost(cid) ~= TRUE) then
		doTransformItem(item.uid, increasingItems[item.itemid])
	end

	if(item.actionid >= 194 and item.actionid <= 196) then
		local f = checkCreature[item.actionid - 193]
		if(f(cid) == TRUE) then
			doTeleportThing(cid, fromPosition, FALSE)
			doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
		end

		return TRUE
	end

	if(item.actionid >= 191 and item.actionid <= 193) then
		local f = checkCreature[item.actionid - 190]
		if(f(cid) ~= TRUE) then
			doTeleportThing(cid, fromPosition, FALSE)
			doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
		end

		return TRUE
	end

	if(isPlayer(cid) ~= TRUE) then
		return TRUE
	end

	if(item.actionid == 189 and isPremium(cid) ~= TRUE) then
		doTeleportThing(cid, fromPosition, FALSE)
		doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)

		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
		return TRUE
	end

	local gender = item.actionid - 186
	if(isInArray({PLAYERSEX_FEMALE,  PLAYERSEX_MALE, PLAYERSEX_GAMEMASTER}, gender) == TRUE) then
		local playerGender = getPlayerSex(cid)
		if(playerGender ~= gender) then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
			doTeleportThing(cid, fromPosition, FALSE)
			doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
		end

		return TRUE
	end

	local skull = item.actionid - 180
	if(skull >= 0 and skull < 6) then
		local playerSkull = getCreatureSkullType(cid)
		if(playerSkull ~= skull) then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
			doTeleportThing(cid, fromPosition, FALSE)
			doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
		end

		return TRUE
	end

	local group = item.actionid - 150
	if(group >= 0 and group < 30) then
		local playerGroup = getPlayerGroupId(cid)
		if(playerGroup < group) then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
			doTeleportThing(cid, fromPosition, FALSE)
			doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
		end

		return TRUE
	end

	local vocation = item.actionid - 100
	if(vocation >= 0 and vocation < 50) then
		local playerVocationInfo = getVocationInfo(getPlayerVocation(cid))
		if(playerVocationInfo.id ~= vocation and playerVocationInfo.fromVocation ~= vocation) then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
			doTeleportThing(cid, fromPosition, FALSE)
			doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
		end

		return TRUE
	end

	if(item.actionid >= 1000 and item.actionid <= config.maxLevel) then
		if(getPlayerLevel(cid) < item.actionid - 1000) then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
			doTeleportThing(cid, fromPosition, FALSE)
			doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
		end

		return TRUE
	end

	if(item.actionid ~= 0 and getPlayerStorageValue(cid, item.actionid) <= 0) then
		doTeleportThing(cid, fromPosition, FALSE)
		doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)

		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
		return TRUE
	end

	if(getTileInfo(position).protection) then
		local depotPos, depot = getPlayerLookPos(cid), {}
		depotPos.stackpos = STACKPOS_GROUND
		while(true) do
			depotPos.stackpos = depotPos.stackpos + 1
			depot = getThingFromPos(depotPos)
			if(depot.uid == 0) then
				break
			end

			if(isInArray(depots, depot.itemid) == TRUE) then
				local depotItems = getPlayerDepotItems(cid, getDepotId(depot.uid))
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Your depot contains " .. depotItems .. " item" .. (depotItems > 1 and "s" or "") .. ".")
				break
			end
		end

		return TRUE
	end

	return FALSE
end

function onStepOut(cid, item, position, fromPosition)
	if(not decreasingItems[item.itemid]) then
		return FALSE
	end

	if(isPlayer(cid) ~= TRUE or isPlayerGhost(cid) ~= TRUE) then
		doTransformItem(item.uid, decreasingItems[item.itemid])
		return TRUE
	end

	return FALSE
end
 

Sentil

Ten Typ
Joined
May 11, 2008
Messages
211
Reaction score
85
Odp: Step In Problem.

No i wszystko jasne. Je?li nigdzie nie u?ywasz tego skryptu to po prostu go wyjeb, usu? te? deklaracj?.

@down:
Po kiego chuja dajesz mu skrypty o kt?re nie prosi? Chcia? ?eby nie wyskakiwa? napis - wyjebanie zb?dnego skryptu za?atwia problem, czy? nie? Pomy?l zanim zaczniesz prawi? o "irozrazie intelikecji", ogarze. Gdyby poprosi? o skrypty na transformacj? poduszek, nie widzia?bym problemu w daniu mu go. To inna bajka.
 
Last edited:

Xart Irok

Senior User
Joined
Sep 7, 2008
Messages
2,925
Reaction score
419
Age
32
Odp: Step In Problem.

ja pierdole irozra itelikecji teraz pokazales mi samo zastosowanie itemid a nie aid naucz sie odrozniac funkcje
PHP:
<movevent event="StepIn" actionid="6464" script="dcq/pillows1.lua" />
<movevent event="StepIn" actionid="6465" script="dcq/pillows2.lua" />
pillow1
PHP:
function onStepIn(cid, item, pos)

pillow1pos = {x=pos.x+2, y=pos.y, z=pos.z, stackpos=1}
pillow2pos = {x=pos.x+3, y=pos.y, z=pos.z, stackpos=1}
pillow3pos = {x=pos.x+4, y=pos.y, z=pos.z, stackpos=1}
pillow4pos = {x=pos.x+5, y=pos.y, z=pos.z, stackpos=1}
pillow5pos = {x=pos.x+6, y=pos.y, z=pos.z, stackpos=1}
pillow6pos = {x=pos.x+7, y=pos.y, z=pos.z, stackpos=1}
pillow1 = getThingfromPos(pillow1pos)
pillow2 = getThingfromPos(pillow2pos)
pillow3 = getThingfromPos(pillow3pos)
pillow4 = getThingfromPos(pillow4pos)
pillow5 = getThingfromPos(pillow5pos)
pillow6 = getThingfromPos(pillow6pos)

	doTransformItem(pillow1.uid,pillow6.itemid)
	doTransformItem(pillow2.uid,pillow1.itemid)
	doTransformItem(pillow3.uid,pillow2.itemid)
	doTransformItem(pillow4.uid,pillow3.itemid)
	doTransformItem(pillow5.uid,pillow4.itemid)
	doTransformItem(pillow6.uid,pillow5.itemid)

return 1
end
pillow2
PHP:
function onStepIn(cid, item, pos)

pillow1pos = {x=pos.x, y=pos.y+2, z=pos.z, stackpos=1}
pillow2pos = {x=pos.x, y=pos.y+3, z=pos.z, stackpos=1}
pillow3pos = {x=pos.x, y=pos.y+4, z=pos.z, stackpos=1}
pillow4pos = {x=pos.x, y=pos.y+5, z=pos.z, stackpos=1}
pillow5pos = {x=pos.x, y=pos.y+6, z=pos.z, stackpos=1}
pillow6pos = {x=pos.x, y=pos.y+7, z=pos.z, stackpos=1}
pillow1 = getThingfromPos(pillow1pos)
pillow2 = getThingfromPos(pillow2pos)
pillow3 = getThingfromPos(pillow3pos)
pillow4 = getThingfromPos(pillow4pos)
pillow5 = getThingfromPos(pillow5pos)
pillow6 = getThingfromPos(pillow6pos)

	doTransformItem(pillow1.uid,pillow6.itemid)
	doTransformItem(pillow2.uid,pillow1.itemid)
	doTransformItem(pillow3.uid,pillow2.itemid)
	doTransformItem(pillow4.uid,pillow3.itemid)
	doTransformItem(pillow5.uid,pillow4.itemid)
	doTransformItem(pillow6.uid,pillow5.itemid)

return 1
end
 

Oskar1

Advanced User
Joined
May 8, 2008
Messages
221
Reaction score
33
Age
32
Odp: Step In Problem.

Refresh @up to pliki Smoczka Leona ... po 2 s? mi nie potrzebne bo takowe mam.

Nie mam zamiaru kasowa? plik?w o krt?rych nie mam poj?cia co robi? tak wi?c Refresh i please help me ;)
 

Oskar1

Advanced User
Joined
May 8, 2008
Messages
221
Reaction score
33
Age
32
Odp: Step In Problem.

No m?g?by wko?cu kto? mi pom?c ^^. Ju? nawet z nud?w zaczo?em 3 inne projekty robi? przez to ?e nikt nie chce mi pom?c :p.

~Refresh~
 

Kowol

Senior User
Joined
Apr 9, 2008
Messages
1,250
Reaction score
158
Odp: Step In Problem.

Jak nie usuniesz to nie zadzia?a. Usu? przynajmniej deklaracje w movements.xml ale przy odpalaniu silnika b?dzie wypierdala? b??d ?e nie masz zdeklarowanego skryptu ale reszta b?dzie dzia?a?.
 
Status
Not open for further replies.
Top