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

script request , also as idea.

Lbtg

Advanced OT User
Joined
Nov 22, 2008
Messages
2,398
Reaction score
165
ello i wonder to make Doors like experince X lvl.
i want make doors the player with etc with 100kills+ can enter that doors , who dont have 100kills on his character he can't enter doors.

Doors For Kills not for lvl.

Sorry for my english.
 
mhm . every kills etc. Player:He has 113 frags , but unjust he got only like 10 . so should by count every player kills.
should by count any ppl kills not only unjust
sorry for me english .
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == ID_OF_OPEN_DOOR then
		local v = db.getResult('SELECT count(kill_id) as v FROM player_killers a LEFT JOIN killers b ON a.kill_id=b.id WHERE a.player_id=' .. getPlayerGUID(cid))
		if v:getID() ~= -1 then
			if v:getDataInt('v') >= 100 then
				doTransformItem(item.uid, item.itemid + 1)
				doTeleportThing(cid, toPosition, true)
			end
			v:free()
			return true
		end
		return doPlayerSendCancel(cid, 'You need 100 frags to enter.')
	end
end
 
Make a new lua file in data/actions/scripts/ or its subfolders, then register it with an uniqueid or actionid in actions.xml (no coordinates needed)
 
uniqueid="some random unused number between 1000 and 65535"

and then use the same number in editor as the unique ID for the door
 
tested on 0.3.6 and its doesnt work
i set the opened door ID added uniueID to actions.xml also in door same ID. but it doesnt work
 
Back
Top