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

NPC selling houses. Buying by house name.

Vanitas

Anaerobe
Joined
Jul 7, 2008
Messages
34
Reaction score
0
I tried to make NPC selling houses but I want that player will be saying name of house which he want to buy.
I just don't know how to "change" name of house to his ID.
I have table of houses and IDs:
PHP:
    local houseName =
    {
        -- abdendriel
        ["Coastwood 1"] = 1,
        ["Coastwood 2"] = 2,
        ["Coastwood 3"] = 2,
        ["Coastwood 5"] = 4,
        ["Coastwood 5"] = 5,
        ["Coastwood 6"] = 6,
        ["Coastwood 7"] = 7,
        ["Coastwood 8"] = 8,
        ["Coastwood 9"] = 9,
        ["Coastwood 10"] = 10        
    }
But I have no idea how to use it in NPC becouse NPC is using
PHP:
function onCreatureSay(cid, type, msg)
and to read table I need
PHP:
function onSay(cid, words, param)
 
BUMP
It doesn't have to be like I've written.
The point is that I want to use names of houses, if someone have different idea post it :D
 
Back
Top