XxShallowxX
ಠ_ಠ
Why are my house commands not working?
I try and say "Aleta Sio" or "!buyhouse" or any house command and nothing happens
I try and say "Aleta Sio" or "!buyhouse" or any house command and nothing happens
because script says house is in japan, but you're in texas
<talkaction location="Texas" filter="word-spaced" event="function" value="Lago Vista"/>
No. See,
LUA:<talkaction location="Texas" filter="word-spaced" event="function" value="Lago Vista"/>
<talkaction words="alana res" filter="word-spaced" event="function" value="houseBuy"/>
lol? wtf is this line? =O
HEREAA =OLUA:<talkaction words="alana res" filter="word-spaced" event="function" value="houseBuy"/>
Make the spells with lua, not server functions. c,c
function onSay(cid, words, param, channel)
local house = getHouseFromPos(getCreaturePosition(cid))
if(not house) then
doPlayerSendCancel(cid, "You are not inside a house.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return false
end
local owner = getHouseInfo(house).owner
if(owner ~= getPlayerGUID(cid) and (owner ~= getPlayerGuildId(cid) or getPlayerGuildLevel(cid) ~= GUILDLEVEL_LEADER)) then
doPlayerSendCancel(cid, "You are not the owner of this house.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return false
end
setHouseOwner(house, 0)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE)
return false
end
Script them in lua..? <,<
for example..
leavehouse.lua
LUA:function onSay(cid, words, param, channel) local house = getHouseFromPos(getCreaturePosition(cid)) if(not house) then doPlayerSendCancel(cid, "You are not inside a house.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return false end local owner = getHouseInfo(house).owner if(owner ~= getPlayerGUID(cid) and (owner ~= getPlayerGuildId(cid) or getPlayerGuildLevel(cid) ~= GUILDLEVEL_LEADER)) then doPlayerSendCancel(cid, "You are not the owner of this house.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return false end setHouseOwner(house, 0) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) return false end
Can someone do this? o.0
I thought you were some prodigy scripter.
local config = {
teleportAccess = 3
}
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
local teleport = false
local t = string.explode(param, ",")
if(t[2]) then
teleport = getBooleanFromString(t[2])
param = t[1]
end
local house = getHouseByPlayerGUID(getPlayerGUIDByName(param))
if(not house) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " does not own house or doesn't exists.")
return true
end
local houseInfo = getHouseInfo(house)
if(teleport and getPlayerAccess(cid) >= config.teleportAccess) then
doTeleportThing(cid, houseInfo.entry)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param .. " owns house: " .. houseInfo.name .. ".")
return true
end
try thisCode:local config = { teleportAccess = 3 } function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local teleport = false local t = string.explode(param, ",") if(t[2]) then teleport = getBooleanFromString(t[2]) param = t[1] end local house = getHouseByPlayerGUID(getPlayerGUIDByName(param)) if(not house) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " does not own house or doesn't exists.") return true end local houseInfo = getHouseInfo(house) if(teleport and getPlayerAccess(cid) >= config.teleportAccess) then doTeleportThing(cid, houseInfo.entry) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param .. " owns house: " .. houseInfo.name .. ".") return true end
[14/12/2010 22:15:20] >> Checking software version... failed - could not parse remote file (are you connected to the internet?)
[14/12/2010 22:15:34] Warning: [CallBack::loadCallBack] Event onGetFormulaValues not found
[14/12/2010 22:15:34] [Warning - InstantSpell::loadFunction] Function "editHouseGuest" does not exist.
[14/12/2010 22:15:34] [Warning - InstantSpell::loadFunction] Function "editHouseSubOwner" does not exist.
[14/12/2010 22:15:34] [Warning - InstantSpell::loadFunction] Function "editHouseDoor" does not exist.
[14/12/2010 22:15:34] [Warning - InstantSpell::loadFunction] Function "houseKick" does not exist.
Why don't you tell us your server version? ;|