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

Lua onTarget open NPC trade

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,858
Reaction score
96
Location
Brazil
Why do not work? --no errors in console

Lua:
function onTarget(cid, target)
	if isNpc(npcId) then 
		openShopWindow(cid, itemWindow, onBuy, onSell)
	end
end
 
I don't get how it is supposed work. You want the player to target the NPC, then it would open the trade window?
What is npcId? Wouldn't it be just isNpc(target) or something?
 
you will just need to edit this function in npc.cpp add new param for the npcid and get the npc from the npccid
[cpp]int32_t NpcScript::luaOpenShopWindow(lua_State* L)[/cpp]
 
Back
Top