Scyzoryki.

Status
Zamknięty.

Sveir

Banned
Zbanowany
Dołączył
Marzec 14, 2010
Posty
32
Liczba reakcji
10
Z g?ry m?wie, je?eli taki Temat ju? by? (nie doszuka?em si?, wiec nie wiem), to prosz? o usuni?cie tego.

Witam, mam zaszczyt zaprezentowa? wam scyzoryki, kt?re wygl?daj? tak:

Squeezing_Gear_of_Girlpower.gif
Squeezing Gear of Girlpower.
Sneaky_Stabber_of_Eliteness.gif
Sneaky Stabber of Eliteness.
Whacking_Driller_of_Fate.gif
Whacking Driller of Fate.

Te scyzoryki zast?puj? dane itemy:

  • Rope,
  • Shovel,
  • Pick,
  • Machete,
  • Hammer,
  • Crowbar,
A wi?c, zacznijmy:

Actions.xml
Kod:
<!-- Tool Squeezings -->
    <action itemid="10511-10516" event="script"  value="tools/squeezings.lua"/>
*/data/actions/scripts/tools.
Tworzymy plik o nazwie Squeezings.lua
Kod:
local holes = {468, 481, 483, 7932}
local holeId = {294, 369, 370, 383, 392, 408, 409, 427, 428, 430, 462, 469, 470, 482, 484, 485, 489, 924, 3135, 3136}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	-- Shovel
	if isInArray(holes, itemEx.itemid) == TRUE then
		doTransformItem(itemEx.uid, itemEx.itemid + 1)
		doDecayItem(itemEx.uid)
		return FALSE
	-- Rope
	elseif toPosition.x == CONTAINER_POSITION or toPosition.x == 0 and toPosition.y == 0 and toPosition.z == 0 then
		return FALSE
	end
	local groundTile = getThingfromPos(toPosition)
	if groundTile.itemid == 384 or groundTile.itemid == 418 or groundTile.itemid == 8278 then
		doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, FALSE)
	elseif isInArray(holeId, itemEx.itemid) == TRUE then
		local hole = getThingfromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE})
		if hole.itemid > 0 then
			doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, FALSE)
		else
			doPlayerSendCancel(cid, "Sorry, not possible.")
		end
		return FALSE
	-- Pick
	elseif (itemEx.uid <= 65535 or itemEx.actionid > 0) and (itemEx.itemid == 354 or itemEx.itemid == 355 or itemEx.itemid == 9024 or itemEx.itemid == 9025) then
		doTransformItem(itemEx.uid, 392)
		doDecayItem(itemEx.uid)
		return TRUE
	elseif itemEx.uid == 60001 then
		doTeleportThing(cid, {x=1060, y=1057, z=7})
		doSendMagicEffect({x=1060, y=1057, z=7},10)
		return TRUE
	-- Machete
	elseif itemEx.itemid == 2782 then
		doTransformItem(itemEx.uid, 2781)
		doDecayItem(itemEx.uid)
		return TRUE
	elseif itemEx.itemid == 3985 then
		doTransformItem(itemEx.uid, 3984)
		doDecayItem(itemEx.uid)
		return TRUE
	elseif itemEx.itemid == 1499 then
		doRemoveItem(itemEx.uid)
		return TRUE
	-- Scythe
	elseif itemEx.itemid == 2739 then 
		doTransformItem(itemEx.uid, 2737)
		doCreateItem(2694, 1, toPosition)
		doDecayItem(itemEx.uid)
		return TRUE
	end
	return destroyItem(cid, itemEx, toPosition)
end
Testowany na: TFS 3.6.0pl1(Crying Damson)
Regards,
Sveir.
 
Odp: Scyzoryki.

Mi si? skrypt podoba, nie widzia?em jeszcze takiego na forum.
Przetestuj? i dopisz? czy dzia?a czy te? niezupe?nie.
Reput si? nale?y.


Trawy na przyk?ad mi nie ?cina, tej zielonej z d?ungli. Fakt faktem, ?e dziury otwiera, jednak?e wy?wietla si? napis "you cannont use this object" co uwa?am za oczywisty b??d.

Ale wystarczy doda? jedn? linijk? i dzia?a, wi?c zas?ugujesz na reputa.
 
Ostatnia edycja:
Odp: Scyzoryki.

W niekt?rych miejscach mo?na by mocno skr?ci? kod, ale nie jest ?le. Dobra robota ;)

Chodzi mi dok?adnie o powtarzaj?ce partie kodu :
Kod:
doTransformItem(itemEx.uid, 3984)
doDecayItem(itemEx.uid)
 
Ostatnia edycja:
Odp: Scyzoryki.

Fajny skrypt tak og?lnie. Osobi?cie nie skorzystam, poniewa? wole klasyczny ekwipunek, ale mo?e komu? si? przyda. Tairens ma racje, chocia? mi by si? nawet tyle nie uda?o/nie chcia?o robi?... Reput leci za dobr? robot?, a ocena 8/10.
 
Odp: Scyzoryki.

Nareszcie!! Jest pare b??d?w jak #upup m?wi? ale i tak wielki thx!! 9,5/10
 
Odp: Scyzoryki.

Hmmm najs, tylko czemu ja ten scrypt mia?em od razu w TFS?;]
Jak kopiujesz z czego? to napisz autora lub silnik przynajmniej...
 
Status
Zamknięty.
Back
Do góry