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

Czy jest taka funkcja?

legolas23

New Member
Joined
Jan 8, 2009
Messages
537
Reaction score
3
Witam
Czy istnieje taka funkcja ,aby nadac stworzonemu przez skrypt itemkowi unique id?
 
Code:
local item = doPlayerAddItem(cid, 1234)
doSetItemUniqueId(item, 4321)
 
Code:
local item = doPlayerAddItem(cid, 1234)
doSetItemUniqueId(item, 4321)


gdzie jest taka funkcja?? bo tak patrze w /doc i w zrodla i nie widze nic z tym zwiazanego, no pewnie jestem slepy ;P

EDIT: tak jak myslalem, nie ma takiej funkcji ;P
 
Last edited:
gdzie jest taka funkcja?? bo tak patrze w /doc i w zrodla i nie widze nic z tym zwiazanego, no pewnie jestem slepy ;P

EDIT: tak jak myslalem, nie ma takiej funkcji ;P

No to trzeba kombinowac!

Sprobuj:
Code:
local addItem = doPlayerAddItem(cid, 1234)
addItem.uid = 4321
 
Kiedys mi sie obilo o uszy, ze po prostu nie da sie ustawic unique id w zaden sposob, moze zle ktos mowil, moze dobrze. W sumie /attrem sie da, wiec powinna byc "fizyczna" mozliwosc ;p

@legolas23
Po co Ci to? Moze jest inny sposob, albo po prostu na actiony :)
 
Zrobilem skrypt na "kruszenie sciany" jak uderzy sie w nia raz mlotkiem o id xxx zmienia sie w bardziej skruszona sciane (xD) ,a jezeli uderzy sie drugi raz mlotkiem o id yyy znika na 90 sekund i spowrotem sie pojawia.
 
Zrob na action, duzo szybciej niz kombinowac jak zrobic to na unique.
 
Last edited:
Zrobilem na action i kiedy uzywam mlotka na tej scianie nie dzieje sie nic. Moze cos namieszalem w kodzie?
Code:
function onUse(cid, item, frompos, item2, topos)
	local ruina = 9299
	local sciana = 9132
	local wsp = {x=150, y=56, z=7, stackpos=1}
	local wsp2 = {x=150, y=56, z=8, stackpos=1}
	
function resp()
local wallPos ={x=150, y=56, z=7, stackpos=2} 
doSendAnimatedText(wallPos, "!?", TEXTCOLOR_YELLOW) 
end

if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
		doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
	return TRUE
end
		if (item2.aid == 23241) then
			if math.random(1, 100) <= 70 then
				doPlayerSendTextMessage(cid, 22, "Udalo ci sie czesciowo rozbic sciane")
				doTransformItem(item2.uid, ruina)
				doSendMagicEffect(getCreaturePosition(cid), 4)
			else
				doPlayerSendTextMessage(cid, 22, "Nieudalo ci sie rozbic sciany")
			end
		end	
			
		if (item2.aid == 23241) then
			if (item2.itemid == ruina) then
				if (item.itemid == 2398) then
					if math.random(1,100) <= 60 then
						doPlayerSendTextMessage(cid, 22, "Udalo ci sie rozbic sciane")
						doSendMagicEffect(getCreaturePosition(cid), 4)
						doRemoveItem(item2.uid, 1)
						addEvent(resp, 10*1000)
						doTileAddItemEx(wsp, uid)
					else
						doPlayerSendTextMessage(cid, 22, "Nieudalo ci sie rozbic sciany")
					end
				end
			end
		end	
return TRUE	
end
 
Back
Top