• 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!

[Request] Obsidian Knife Script.

Status
Not open for further replies.

Hazher

OTServ Member
Joined
Sep 18, 2007
Messages
104
Reaction score
0
Someone have the Obsidian knife Script
working in TFS ?

TY :).
 
obsidian knife.lua:
Code:
function onUse(cid,item,frompos,item2,topos)

--obsidian knife code--

local DRAGON = 3104
local DRAGON_AFTER = 3105

local DL = 2881
local DL_AFTER = 2882

local BONEBEAST = 3031
local BONEBEAST_AFTER = 3032

local BEHEMOTH = 2931
local BEHEMOTH_AFTER = 2932

local LIZARD_SENTINEL = 4259
local LIZARD_SENTINEL_AFTER = 4260

local LIZARD_TEMPLAR = 4256
local LIZARD_TEMPLAR_AFTER = 4257

local LIZARD_SNAKECHARMER = 4262
local LIZARD_SNAKECHARMER_AFTER = 4263

local MINOTAUR = 2830
local MINOTAUR_AFTER = 2831

local MINOTAUR_ARCHER = 2871
local MINOTAUR_ARCHER_AFTER = 2872

local MINOTAUR_MAGE = 2866
local MINOTAUR_MAGE_AFTER = 2867

local MINOTAUR_GUARD = 2876
local MINOTAUR_GUARD_AFTER = 2877

local LIZARD_LEATHER = 5876
local DRAGON_LEATHER = 5877
local DL_LEATHER = 5948
local MINOTAUR_LEATHER = 5878
local BEHEMOTH_FANG = 5893
local BONEBEAST_BONE = 5925

local LIZARD_LEATHER_COUNT = 1
local DRAGON_LEATHER_COUNT = 1
local DL_LEATHER_COUNT = 1
local MINOTAUR_LEATHER_COUNT = 1
local BEHEMOTH_FANG_COUNT = 1
local BONEBEAST_BONE_COUNT = 1

local RAND_LIZARDS = math.random(1,7)
local RAND_BONEBEAST = math.random(1,9)
local RAND_DL = math.random(1,11)
local RAND_DRAGON = math.random(1,10)
local RAND_BEHEMOTH = math.random(1,12)
local RAND_MINOTAURS = math.random(1,8)

	--start lizards--
	if item2.itemid == LIZARD_SENTINEL then
	doTransformItem(item2.uid,LIZARD_SENTINEL_AFTER)
		if RAND_LIZARDS == 1 then
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
			doPlayerAddItem(cid,LIZARD_LEATHER,LIZARD_LEATHER_COUNT)
		else
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
		end
		return 1
	end
	
	if item2.itemid == LIZARD_TEMPLAR then
	doTransformItem(item2.uid,LIZARD_TEMPLAR_AFTER)
		if RAND_LIZARDS == 1 then
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
			doPlayerAddItem(cid,LIZARD_LEATHER,LIZARD_LEATHER_COUNT)
		else
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
		end
		return 1
	end
	
	if item2.itemid == LIZARD_SNAKECHARMER then
	doTransformItem(item2.uid,LIZARD_SNAKECHARMER_AFTER)
		if RAND_LIZARDS == 1 then
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
			doPlayerAddItem(cid,LIZARD_LEATHER,LIZARD_LEATHER_COUNT)
		else
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
		end
		return 1
	end
	--lizards end--
	--start bonebeast--
	if item2.itemid == BONEBEAST then
	doTransformItem(item2.uid,BONEBEAST_AFTER)
		if RAND_BONEBEAST == 1 then
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
			doPlayerAddItem(cid,BONEBEAST_BONE,BONEBEAST_BONE_COUNT)
		else
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
		end
		return 1
	end
	--bonebeast end--
	--start dl--
	if item2.itemid == DL then
	doTransformItem(item2.uid,DL_AFTER)
		if RAND_DL == 1 then
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
			doPlayerAddItem(cid,DL_LEATHER,DL_LEATHER_COUNT)
		else
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
		end
		return 1
	end
	--end dl--
	--start dragon--
	if item2.itemid == DRAGON then
	doTransformItem(item2.uid, DRAGON_AFTER)
		if RAND_DRAGON == 1 then
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
			doPlayerAddItem(cid,DRAGON_LEATHER,DRAGON_LEATHER_COUNT)
		else
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
		end
		return 1
	end
	--end dragon--
	--start behemoth--
	if item2.itemid == BEHEMOTH then
	doTransformItem(item2.uid,BEHEMOTH_AFTER)
		if RAND_BEHEMOTH == 1 then
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
			doPlayerAddItem(cid,BEHEMOTH_FANG,BEHEMOTH_FANG_COUNT)
		else
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
		end
		return 1
	end
	--end behemoth--
	--start minotaurs--
	if item2.itemid == MINOTAUR then
		doTransformItem(item2.uid,MINOTAUR_AFTER)
		if RAND_MINOTAURS == 1 then
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
			doPlayerAddItem(cid,MINOTAUR_LEATHER,MINOTAUR_LEATHER_COUNT)
		else
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
		end
		return 1
	end
	if item2.itemid == MINOTAUR_ARCHER then
		doTransformItem(item2.uid,MINOTAUR_ARCHER_AFTER)
		if RAND_MINOTAURS == 1 then
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
			doPlayerAddItem(cid,MINOTAUR_LEATHER,MINOTAUR_LEATHER_COUNT)
		else
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
		end
		return 1
	end
	if item2.itemid == MINOTAUR_MAGE then
		doTransformItem(item2.uid,MINOTAUR_MAGE_AFTER)
		if RAND_MINOTAURS == 1 then
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
			doPlayerAddItem(cid,MINOTAUR_LEATHER,MINOTAUR_LEATHER_COUNT)
		else
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
		end
		return 1
	end
	if item2.itemid == MINOTAUR_GUARD then
		doTransformItem(item2.uid,MINOTAUR_GUARD_AFTER)
		if RAND_MINOTAURS == 1 then
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
			doPlayerAddItem(cid,MINOTAUR_LEATHER,MINOTAUR_LEATHER_COUNT)
		else
			doSendMagicEffect(topos, CONST_ME_BLOCKHIT)
		end
		return 1
	end
	--end minotaurs--

-- Wykluwanie figurki mamuta zrobione przez Smoczek Leon --
-- Ice statue mammoth by Smoczek Leon --
rand = math.random(1, 3)
rand2 = math.random(1, 90)
lod = math.random(6715, 6718)
icepos = getThingPos(item2.uid)

if item2.itemid == 7441 then
if rand2 <= 30 then
doTransformItem(item2.uid,item2.itemid+1)
elseif rand2 == 31 then
doTransformItem(item2.uid,7447)
elseif rand2 == 32 then
doTransformItem(item2.uid,7448)
else
doRemoveItem(item2.uid,1)
doCreateItem(lod,1,icepos)
end
end

if item2.itemid == 7442 then
if rand == 1 then
doTransformItem(item2.uid,item2.itemid+2)
else
doRemoveItem(item2.uid,1)
doCreateItem(lod,1,icepos)
end
end

if item2.itemid == 7444 then
if rand == 1 then
doTransformItem(item2.uid,item2.itemid+1)
else
doRemoveItem(item2.uid,1)
doCreateItem(lod,1,icepos)
end
end

if item2.itemid == 7445 then
if rand == 1 then
doTransformItem(item2.uid,item2.itemid+1)
else
doRemoveItem(item2.uid,1)
doCreateItem(lod,1,icepos) 
end
end

return 1
end

in actions.xml:
Code:
	<action itemid="5908" 	script="obsidian knife.lua"/>
 
I have one osbian knife and Blessed wooden stake released on fans.net it's like 1 year old and it was for 7.92 but the are cool there is one minor bug in it but could y post my script from fans.net on this forum? since i dont have any access to it =)
 
I have one osbian knife and Blessed wooden stake released on fans.net it's like 1 year old and it was for 7.92 but the are cool there is one minor bug in it but could y post my script from fans.net on this forum? since i dont have any access to it =)

What's your nick there?
 
Status
Not open for further replies.
Back
Top