• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Problem z skryptem.

GarQet

Own3d!
Joined
Feb 10, 2009
Messages
1,381
Solutions
14
Reaction score
81
Siemanko, mam pewien problem z moim skryptem i nie mogę sobie poradzić żeby działał.
Chodzi w nim o to, że:
Jeśli GRACZ I stoi na pozycji 1225 1107 6, a GRACZ II pociągnie za dźwignię, to wtedy GRACZ I zostaje przeteleportowany, dostaje wiadomość, wysyła się na jego nową pozycję efekt oraz dźwignia zmienia się na drugą stronę.

Zrobiłem tak, tylko coś mi nie chodzi, wydaje mi się że skrypt szuka gracza który ciągnie za dźwignię na pozycji 1225 1107 6, a mi chodzi o "Czytaj UP".

Oto skrypt:
Code:
function onUse(cid, item, frompos, item2, topos)
	local name = getCreatureName(cid)

	if isPlayer(cid) == TRUE and getPlayerPosition(cid).x == 1225 and getPlayerPosition(cid).y == 1107 and getPlayerPosition(cid).z == 6 and item.uid == 1004 and item.itemid == 1945 then
		doTeleportThing(cid, {x=1232,y=1110,z=6})
		doSendMagicEffect(topos,CONST_ME_TELEPORT)
		doPlayerSay(cid, "Probably you/'re dead! Good bye "..name.."!", TALKTYPE_ORANGE_1)
		doTransformItem(item.uid,1946)
	elseif isPlayer(cid) == TRUE and isInArray({x=1225, y=1107, z=6}, getCreaturePosition(cid)) and item.uid == 1004 and item.itemid == 1946 then
		doTeleportThing(cid, {x=1232,y=1110,z=6})
		doSendMagicEffect(topos,CONST_ME_TELEPORT)
		doPlayerSay(cid, "You will die "..name.."!", TALKTYPE_ORANGE_1)
		doTransformItem(item.uid,1945)
	else
		doPlayerSendCancel(cid,"To use the leverage one player must be on the special floor.")
		end
	return 1
end

Proszę o pomoc, pozdrawiam GarQet.
Dla wybawcy rep+
 
Siemanko, mam pewien problem z moim skryptem i nie mogę sobie poradzić żeby działał.
Chodzi w nim o to, że:
Jeśli GRACZ I stoi na pozycji 1225 1107 6, a GRACZ II pociągnie za dźwignię, to wtedy GRACZ I zostaje przeteleportowany, dostaje wiadomość, wysyła się na jego nową pozycję efekt oraz dźwignia zmienia się na drugą stronę.

Zrobiłem tak, tylko coś mi nie chodzi, wydaje mi się że skrypt szuka gracza który ciągnie za dźwignię na pozycji 1225 1107 6, a mi chodzi o "Czytaj UP".

Oto skrypt:
Code:
function onUse(cid, item, frompos, item2, topos)
	local name = getCreatureName(cid)

	if isPlayer(cid) == TRUE and getPlayerPosition(cid).x == 1225 and getPlayerPosition(cid).y == 1107 and getPlayerPosition(cid).z == 6 and item.uid == 1004 and item.itemid == 1945 then
		doTeleportThing(cid, {x=1232,y=1110,z=6})
		doSendMagicEffect(topos,CONST_ME_TELEPORT)
		doPlayerSay(cid, "Probably you/'re dead! Good bye "..name.."!", TALKTYPE_ORANGE_1)
		doTransformItem(item.uid,1946)
	elseif isPlayer(cid) == TRUE and isInArray({x=1225, y=1107, z=6}, getCreaturePosition(cid)) and item.uid == 1004 and item.itemid == 1946 then
		doTeleportThing(cid, {x=1232,y=1110,z=6})
		doSendMagicEffect(topos,CONST_ME_TELEPORT)
		doPlayerSay(cid, "You will die "..name.."!", TALKTYPE_ORANGE_1)
		doTransformItem(item.uid,1945)
	else
		doPlayerSendCancel(cid,"To use the leverage one player must be on the special floor.")
		end
	return 1
end

Proszę o pomoc, pozdrawiam GarQet.
Dla wybawcy rep+

Był taki przypadek, że nie miałeś problemów ze skryptem?
 
Był taki przypadek, że nie miałeś problemów ze skryptem?
Aha, to miało być śmieszne? :ninja:
Odpowiedź brzmi: Był.

@Chojrak
Dzięki, jak zawsze pomocny. :confused:

@Topic
Można zamkąć bo już Chojrak się wypowiedział ale tak, że mi nie pomógł a poza nim pewnie nikomu się nie będzie chciało mi pomóc. Więc proszę o zamknięcie tematu. <_<
 
cid -> osoba ktora ciagnie dzwignie.
Code:
if isPlayer(getThinfromPos(mojaposydzja).uid) == TRUE

czy cos zią
 
Back
Top