• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action (Script) All missed windows script

Bulet

Knight of Apocalypse
Joined
Jul 12, 2009
Messages
183
Reaction score
9
Location
Brazil
I put here all windows are missed like darashia windows and anothers like port hope and more for who want

windows.lua
Code:
local WINDOWS = {
	
	[6448] = 5303, [5303] = 6448,
	[6449] = 5304, [5304] = 6449,
	[6438] = 6436, [6436] = 6438,
	[6439] = 6437, [6437] = 6439,
	[6442] = 6440, [6440] = 6442,
	[6443] = 6441, [6441] = 6443,
	[6446] = 6444, [6444] = 6446,
	[6447] = 6445, [6445] = 6447,
	[6452] = 6450, [6450] = 6452,
	[6453] = 6451, [6451] = 6453,
	[6456] = 6454, [6454] = 6456,
	[6457] = 6455, [6455] = 6457,
	[6460] = 6458, [6458] = 6460,
	[6461] = 6459, [6459] = 6461,
	[6464] = 6462, [6462] = 6464,
	[6465] = 6463, [6463] = 6465,
	[6468] = 6466, [6466] = 6468,
	[6469] = 6467, [6467] = 6469,
	[6472] = 6470, [6470] = 6472,
	[6473] = 6471, [6471] = 6473,
	[6790] = 6788, [6788] = 6790,
	[6791] = 6789, [6789] = 6791,
	[7027] = 7025, [7025] = 7027,
	[7028] = 7026, [7026] = 7028,
	[7031] = 7029, [7029] = 7031,
	[7032] = 7030, [7030] = 7032,
	[10264] = 10266, [10266] = 10264,
	[10265] = 10267, [10267] = 10265,
	[10488] = 10490, [10490] = 10488,
	[10489] = 10491, [10491] = 10489
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local window = WINDOWS[item.itemid]
	if(not window or (not getHouseFromPos(getCreaturePosition(cid)) and not getPlayerCustomFlagValue(cid, PlayerCustomFlag_GamemasterPrivileges))) then
		return false
	end

	doTransformItem(item.uid, window)
	return true
end

actions.xml
Code:
	<!-- Windows -->
	 <action fromid="5303" toid="5304" event="script" value="other/windows.lua"/>
	 <action fromid="5400" toid="5401" event="script" value="other/windows.lua"/>
	 <action fromid="6436" toid="6473" event="script" value="other/windows.lua"/>
	 <action fromid="6788" toid="6791" event="script" value="other/windows.lua"/>
	 <action fromid="7025" toid="7032" event="script" value="other/windows.lua"/>
	 <action fromid="10264" toid="10267" event="script" value="other/windows.lua"/>
	 <action fromid="10488" toid="10491" event="script" value="other/windows.lua"/>

If i help you REP-ME :peace:
 
Last edited:
  1. Code:
    	[6452] = 6450, [6450] = 6452,
    Already exists.​
  2. Code:
    	[5478] = 5400, [5400] = 5478,	
    	[5479] = 5401, [5401] = 5479,
    Remove this because they shouldn't work like that.​
The only useful ones would be Darashian.
 
  1. Code:
    	[6452] = 6450, [6450] = 6452,
    Already exists.​
  2. Code:
    	[5478] = 5400, [5400] = 5478,	
    	[5479] = 5401, [5401] = 5479,
    Remove this because they shouldn't work like that.​
The only useful ones would be Darashian.

Thanks cyko for help i dont test im on busy to make mine server but put all windows who i see on itens.xml :thumbup:
 
Add that on actions.xml to do that works fine
Code:
	<!-- Windows -->
	 <action fromid="5303" toid="5304" event="script" value="other/windows.lua"/>
	 <action fromid="5400" toid="5401" event="script" value="other/windows.lua"/>
	 <action fromid="6436" toid="6473" event="script" value="other/windows.lua"/>
	 <action fromid="6788" toid="6791" event="script" value="other/windows.lua"/>
	 <action fromid="7025" toid="7032" event="script" value="other/windows.lua"/>
	 <action fromid="10264" toid="10267" event="script" value="other/windows.lua"/>
	 <action fromid="10488" toid="10491" event="script" value="other/windows.lua"/>
 
Last edited:
Back
Top