Skrypty & Kody Portale do enchantu :(

Status
Zamknięty.

Kacper Zioom

Active User
Zarejestrowany
Dołączył
Styczeń 10, 2010
Posty
133
Liczba reakcji
12
Witam,

Mam problem kt?ry polega na tym, ?e jak wejd? w teleport do enchantu, to mnie teleportuje albo na jaki? filar obok albo ?cian?. Powinno by? tak jak w global tibi, czyli teleportuje ile? tam sqm od wej?cia :(
O to skriny:

Bez-tytuu_rehhepn.jpg


Bez-tytuu_rehhepe.jpg
 
Odp: Portale do enchantu :(

Przeciez cie dobrze teleportuje 1 kratke przerwy miedzy toba a portalem... Tylko nie w tym kierunku w ktorym trzeba i to musisz zmienic, albo po prostu przesunac portal tak zeby po teleportowaniu stalo sie w dobrym miejscu a nie w scianie.
Albo w skrypcie od tego zmien pozycje zeby zamiast -2 bylo +2. Wtedy zamiast tepowac 2 kratki w dole tepnie 2 w gore...
Jak nie umiesz to daj ten skrypt...
 
Odp: Portale do enchantu :(

No dobra. Dobrze m?wisz. Ale co wtedy gdy np. taki elektryczny teleport jest w np. Carlin, gdzie stoi na samej g?rze? To wtedy b?dzie +2, czyli na ?cian? :D
Masz tu ca?y skrypt enchanting.

PHP:
local config = {
	hardcoreManaSpent = getConfigValue("addManaSpentInPvPZone"),
	manaCost = 300,
	soulCost = 2,
}

local spheres = {
	[7759] = {3, 7},
	[7760] = {1, 5},
	[7761] = {2, 6},
	[7762] = {4, 8}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isInArray({33268, 33269}, toPosition.x) and toPosition.y == 31830 and toPosition.z == 10 and getPlayerStorageValue(cid, 65100) > 0 then
		if not isInArray(spheres[item.itemid], getPlayerVocation(cid)) then
			return false
		elseif isInArray({7915, 7916}, itemEx.itemid) == TRUE then
			doCreatureSay(cid, 'Turn off the machine first.', TALKTYPE_ORANGE_1)
			return true
		else
			setPlayerStorageValue(cid, 65102, math.max(1, getPlayerStorageValue(cid, 65102) + 1))
			doSendMagicEffect(toPosition, CONST_ME_PURPLEENERGY)
			doChangeTypeItem(item.uid, item.type - 1)
			return true
		end
	end

	if(item.itemid == 2147 and itemEx.itemid == 2342) then
		doTransformItem(itemEx.uid, 2343)
		doDecayItem(itemEx.uid)
		doRemoveItem(item.uid, 1)

		doSendMagicEffect(toPosition, CONST_ME_MAGIC_RED)
		return true
	end

	if(item.itemid == 7760 and isInArray({9934, 10022}, itemEx.itemid)) then
		doTransformItem(itemEx.uid, 9933)
		doRemoveItem(item.uid, 1)

		doSendMagicEffect(toPosition, CONST_ME_MAGIC_RED)
		return true
	end

	if(isInArray(enchantableGems, item.itemid)) then
		local subtype = item.type
		if(subtype == 0) then
			subtype = 1
		end

		local mana = config.manaCost * subtype
		if(getPlayerMana(cid) < mana) then
			doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHMANA)
			return true
		end

		local soul = config.soulCost * subtype
		if(getPlayerSoul(cid) < soul) then
			doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHSOUL)
			return true
		end

		local a = table.find(enchantableGems, item.itemid)
		if(a == nil or not isInArray(enchantingAltars[a], itemEx.itemid)) then
			return false
		end

		doPlayerAddMana(cid, -mana)
		doPlayerAddSoul(cid, -soul)

		doTransformItem(item.uid, enchantedGems[a])
		if(not getPlayerFlagValue(cid, PlayerFlag_NotGainMana) and (not getTileInfo(getThingPosition(cid)).hardcore or config.hardcoreManaSpent)) then
			doPlayerAddSpentMana(cid, mana)
		end

		doSendMagicEffect(fromPosition, CONST_ME_HOLYDAMAGE)
		return true
	end
 
	if(isInArray(enchantedGems, item.itemid)) then
		if(not isInArray(enchantableItems, itemEx.itemid)) then
			doSendMagicEffect(fromPosition, CONST_ME_POFF)
			return false
		end

		local b = table.find(enchantedGems, item.itemid)
		if(b == nil) then
			return false
		end

		local subtype = itemEx.type
		if(not isInArray({2544, 8905}, itemEx.itemid)) then
			subtype = 1000
		end

		doTransformItem(itemEx.uid, enchantedItems[itemEx.itemid][b], subtype)
		doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_HOLYDAMAGE)
		doDecayItem(itemEx.uid)

		doRemoveItem(item.uid, 1)
		return true
	end

	return false
end

Albo jest opcja ?e poda?em z?e, znalaz?em co? innego za? :D
PHP:
function onStepIn(cid, item, pos)

local thais = {x=32377, y=32241, z=6}
local venore = {x=32958, y=32074, z=5}
local kazo = {x=32643, y=31923, z=11}
local carlin = {x=32363, y=31783, z=9}
local ab = {x=32681, y=31684, z=2}
local lb = {x=32339, y=32834, z=8}
local ph = {x=32631, y=32744, z=4}
local ankrahmun = {x=33131, y=32822, z=4}
local darashia = {x=33226, y=32391, z=5}
local edron = {x=33270, y=31837, z=9}
local svar = {x=32209, y=31131, z=8}
local yala = {x=32781, y=31245, z=5}
 queststatus1 = getPlayerStorageValue(cid,15135)
  queststatus2 = getPlayerStorageValue(cid,15136)
  queststatus3 = getPlayerStorageValue(cid,15137)
  queststatus4 = getPlayerStorageValue(cid,15138)
  queststatus5 = getPlayerStorageValue(cid,15139)
  queststatus6 = getPlayerStorageValue(cid,15140)
  queststatus7 = getPlayerStorageValue(cid,15141)
  queststatus8 = getPlayerStorageValue(cid,15142)
  queststatus9 = getPlayerStorageValue(cid,15143)
  queststatus10 = getPlayerStorageValue(cid,15144)
  queststatus11 = getPlayerStorageValue(cid,15145)
  queststatus12 = getPlayerStorageValue(cid,15146)

    if item.actionid == 15113 then
	if queststatus1 == 1 then
		doTeleportThing(cid,thais)
		setPlayerStorageValue(cid, 15135, -1)
		doSendMagicEffect(getCreaturePosition(cid),10)
else
if item.actionid == 15113 then
	if queststatus2 == 1 then
		doTeleportThing(cid,venore)
		setPlayerStorageValue(cid, 15136, -1)
		doSendMagicEffect(getCreaturePosition(cid),10)
		else
if item.actionid == 15113 then
	if queststatus3 == 1 then
		doTeleportThing(cid,kazo)
		setPlayerStorageValue(cid, 15137, -1)
		doSendMagicEffect(getCreaturePosition(cid),10)
		else
if item.actionid == 15113 then
	if queststatus4 == 1 then
		doTeleportThing(cid,carlin)
		setPlayerStorageValue(cid, 15138, -1)
		doSendMagicEffect(getCreaturePosition(cid),10)
		else
if item.actionid == 15113 then
	if queststatus5 == 1 then
		doTeleportThing(cid,ab)
		setPlayerStorageValue(cid, 15139, -1)
		doSendMagicEffect(getCreaturePosition(cid),10)
		else
if item.actionid == 15113 then
	if queststatus6 == 1 then
		doTeleportThing(cid,lb)
		setPlayerStorageValue(cid, 15140, -1)
		doSendMagicEffect(getCreaturePosition(cid),10)
		else
if item.actionid == 15113 then
	if queststatus7 == 1 then
		doTeleportThing(cid,ph)
		setPlayerStorageValue(cid, 15141, -1)
		doSendMagicEffect(getCreaturePosition(cid),10)
		else
if item.actionid == 15113 then
	if queststatus8 == 1 then
		doTeleportThing(cid,ankrahmun)
		setPlayerStorageValue(cid, 15142, -1)
		doSendMagicEffect(getCreaturePosition(cid),10)
		else
if item.actionid == 15113 then
	if queststatus9 == 1 then
		doTeleportThing(cid,darashia)
		setPlayerStorageValue(cid, 15143, -1)
		doSendMagicEffect(getCreaturePosition(cid),10)
		else
if item.actionid == 15113 then
	if queststatus10 == 1 then
		doTeleportThing(cid,edron)
		setPlayerStorageValue(cid, 15144, -1)
		doSendMagicEffect(getCreaturePosition(cid),10)
		else
if item.actionid == 15113 then
	if queststatus11 == 1 then
		doTeleportThing(cid,svar)
		setPlayerStorageValue(cid, 15145, -1)
		doSendMagicEffect(getCreaturePosition(cid),10)
		else
if item.actionid == 15113 then
	if queststatus12 == 1 then
		doTeleportThing(cid,yala)
		setPlayerStorageValue(cid, 15146, -1)
		doSendMagicEffect(getCreaturePosition(cid),10)
        end
    end
	end
	end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
 
Ostatnia edycja:
Odp: Portale do enchantu :(

Wejdz do gry godem albo otworz mape map edytorem i sprawdz aid/uid kratki ktora jest w tym portalu.
Potem w skryptach poszukaj linijki ktora sie odnosi do tego aid/uid(zapewne w actions) i bedziesz tam miec sciezke do pliku.
Sprawdz wetdy tamten plik...
Ten pierwszy to najwyrazniej oltaz do enchantowania, czyli po teleportowaniu sie do niego na nim uzywasz kamyczka i on sie czaruje.
Ten drugi to nie wiem do konca co to jest, ale moze i to byc to... Sprawdz te pozycje gdzie sa. Przykladowo w 1 miescie ktoryms i sprawdz czy w to miejsce cie teleportuje jesli nie mozesz wejsc. Jesli tak to wiesz gdzie to zmienic. Jesli nie to musisz znalezc dobry skrypt do tego portalu a nie jakies inne jak ten do oltaza...
 
Status
Zamknięty.
Back
Do góry