Ir para conteúdo

[Encerrado] !buy house não funciona


shuzin

Posts Recomendados

Bom, fiz um otserv novo mas chego na frente das casas dou !buy house ele não compra!

 

Procurei por aqui no fórum fiz o que falaram para fazer não funcionou!

 

Meu talkaction

 

 

<?xml version="1.0" encoding="UTF-8"?>

<talkactions>

 

<!-- Gods -->

<talkaction words="/addach;/addallach;/removeach;/removeallach;/getach;/getsecretach" access="5" event="script" value="achievements.lua"/> <talkaction log="yes" words="/attr" access="5" event="function" value="thingProporties"/>

<talkaction log="yes" words="/serverdiag" access="5" event="function" value="diagnostics"/>

<talkaction log="yes" words="/closeserver" access="5" event="script" value="closeopen.lua"/>

<talkaction log="yes" words="/openserver" access="5" event="script" value="closeopen.lua"/>

<talkaction log="yes" words="/promote;/demote" access="5" event="script" value="promote.lua"/>

<talkaction log="yes" words="/shutdown" access="5" event="script" value="shutdown.lua"/>

<talkaction log="yes" words="/mode" access="5" event="script" value="mode.lua"/>

<talkaction log="yes" words="/mtp" access="5" event="script" value="mtp.lua"/>

<talkaction log="yes" words="/skill;/addskill" access="5" event="script" value="skill.lua"/>

<talkaction log="yes" words="/mexp" access="5" event="script" value="mexp.lua"/>

<talkaction words="/ver" access="5" event="script" value="eq.lua"/>

<talkaction log="yes" words="/i" access="5" event="script" value="createitem.lua"/>

<talkaction log="yes" words="/n" access="5" event="script" value="creature.lua"/>

<talkaction log="yes" words="/m" access="5" event="script" value="creature.lua"/>

<talkaction words="/addpacc" access="5" event="script" value="addpremium.lua"/>

<talkaction words="/premiumcheck" access="5" event="script" value="premiumcheck.lua"/>

<talkaction words="/removepremium" access="5" event="script" value="removepremium.lua"/>

 

 

 

<!-- Community Managers -->

<talkaction log="yes" words="/s" access="4" event="script" value="summon.lua"/>

<talkaction log="yes" words="/reload" access="4" event="script" value="reload.lua"/>

<talkaction log="yes" words="/raid" access="4" event="script" value="raid.lua"/>

<talkaction log="yes" words="/newtype" access="4" event="script" value="newtype.lua"/>

<talkaction log="yes" words="/r" access="4" event="script" value="remove.lua"/>

<talkaction log="yes" words="/owner" access="4" event="script" value="owner.lua"/>

<talkaction log="yes" words="/storage" access="4" event="script" value="storage.lua"/>

<talkaction log="yes" words="/config" access="4" event="script" value="configinfo.lua"/>

<talkaction log="yes" words="/bc" access="4" event="script" value="broadcastclass.lua"/>

<talkaction log="yes" access="4" words="/mkick" event="script" value="masskick.lua"/>

<talkaction access="4" words="/z" event="script" value="magiceffect.lua"/>

<talkaction access="4" words="/x" event="script" value="animationeffect.lua"/>

<talkaction access="4" words="/y" event="script" value="animatedtext.lua"/>

 

<!-- Gamemasters -->

<talkaction log="yes" words="/ghost;/invisible" access="3" event="function" value="ghost"/>

<talkaction log="yes" words="/squelch" access="3" event="script" value="gamemaster.lua"/>

<talkaction log="yes" words="/cliport" access="3" event="script" value="gamemaster.lua"/>

<talkaction log="yes" words="/t" access="3" event="script" value="teleportmaster.lua"/>

<talkaction log="yes" words="/c" access="3" event="script" value="teleporthere.lua"/>

<talkaction log="yes" words="/goto" access="3" event="script" value="teleportto.lua"/>

<talkaction log="yes" words="/a" access="3" event="script" value="teleporttiles.lua"/>

<talkaction log="yes" words="/kick" access="3" event="script" value="kick.lua"/>

<talkaction log="yes" words="/send" access="3" event="script" value="teleportsend.lua"/>

<talkaction log="yes" words="/ban" access="3" event="script" value="ban.lua"/>

<talkaction log="yes" words="/unban" access="3" event="script" value="unban.lua"/>

<talkaction log="yes" words="/town" access="3" event="script" value="teleporttown.lua"/>

<talkaction log="yes" words="/up" access="3" event="script" value="teleportfloor.lua"/>

<talkaction log="yes" words="/down" access="3" event="script" value="teleportfloor.lua"/>

<talkaction log="yes" words="/save" access="3" event="script" value="save.lua"/>

<talkaction log="yes" words="/clean" access="3" event="script" value="clean.lua"/>

<talkaction log="yes" words="/reports" access="3" event="script" value="reports.lua"/>

<talkaction log="yes" words="/mc" access="3" event="script" value="multicheck.lua"/>

<talkaction log="yes" words="/wp" access="3" event="script" value="waypoints.lua"/>

<talkaction log="yes" words="/jail;/unjail" access="3" event="script" value="jail.lua"/>

 

<!-- Senior Tutors -->

<talkaction log="yes" words="/notations" access="2" event="script" value="notations.lua"/>

<talkaction log="yes" words="/gethouse" access="2" event="script" value="gethouse.lua"/>

<talkaction log="yes" words="/b" access="2" event="script" value="broadcast.lua"/>

<talkaction log="yes" words="/info" access="2" event="script" value="playerinfo.lua"/>

 

<!-- Tutors -->

<talkaction log="yes" access="1" words="/baninfo" event="function" value="banishmentInfo"/>

<talkaction log="yes" access="1" words="/pos" event="script" value="position.lua"/>

<talkaction log="yes" access="1" hide="yes" words="!pos" event="script" value="position.lua"/>

 

<!-- Players -->

<talkaction words="!frags;/frags" event="script" value="frags.lua"/>

<talkaction words="!uptime;/uptime" event="script" value="uptime.lua"/>

<talkaction words="!serverinfo;/serverinfo" event="script" value="serverinfo.lua"/>

<talkaction words="!commands;/commands" event="script" value="commands.lua"/>

<talkaction words="!buybless;/buybless;!bless;/bless" script="bless.lua" />

<talkaction words="!changesex;/changesex;/changender" script="changesex.lua"/>

<talkaction words="!exp" event="script" value="exp.lua"/>

<talkaction words="!online;/online" event="script" value="online.lua"/>

<talkaction words="!mount" event="script" value="mountdoll.lua"/>

<talkaction words="!addon" event="script" value="addondoll.lua"/>

<talkaction words="!aol" event="script" value="aol.lua"/>

<talkaction words="!wand" event="script" value="wand.lua"/>

<talkaction words="/cast" event="script" value="cast.lua"/>

 

<!-- WoE -->

<talkaction words="/rainbow" event="script" value="rain.lua"/> <!-- Bank -->

<talkaction log="yes" words="!balance" script="bankbalance.lua" />

<talkaction log="yes" words="!deposit" script="deposit.lua" />

<talkaction log="yes" words="!withdraw" script="withdraw.lua" />

<talkaction log="yes" words="!transfer" script="transfer.lua" />

<talkaction log="yes" words="!depositall" script="depositall.lua" />

<talkaction log="yes" words="!withdrawall" script="withdrawall.lua" />

<talkaction log="yes" words="!transferall" script="transferall.lua" />

 

<!-- Houses -->

<talkaction words="!buyhouse;/buyhouse" filter="word-spaced" event="function" value="houseBuy"/>

<talkaction words="!sellhouse;/sellhouse" filter="word-spaced" event="function" value="houseSell"/>

<talkaction words="alana sio" filter="word-spaced" event="function" value="houseKick"/>

<talkaction words="aleta grav" filter="word-spaced" event="function" value="houseDoorList"/>

<talkaction words="aleta sio" filter="word-spaced" event="function" value="houseGuestList"/>

<talkaction words="aleta som" filter="word-spaced" event="function" value="houseSubOwnerList"/>

<talkaction words="!leavehouse;/leavehouse;alana som" filter="word-spaced" event="script" value="leavehouse.lua"/>

 

<!-- Guild System -->

<talkaction words="/war" channel="0" event="script" value="war.lua" desc="(Guild channel command) War management."/>

<talkaction words="/balance" channel="0" event="script" value="balance.lua" desc="(Guild channel command) Balance management."/>

<talkaction filter="word" words="!bg;/bg" script="guildcast.lua"/>

</talkactions>

 

 

 

 

Eu não sei pq mas quando eu crio o houses.lua ele fica houses.lua.lua ( não sei se esse é o erro )

Meu houses.lua

 

 

 

local config = {

days = 7,

log = true,

file = getDataDir() .. "/logs/cleanhouses.txt"

}

local ns_query =[[ SELECT houses.owner,houses.id,players.name FROM houses

LEFT JOIN players ON players.id=houses.owner

WHERE players.lastlogin < (UNIX_TIMESTAMP() - ]] ..config.days.. [[*24*60*60)]]

 

function onStartup(_time)

 

local house = db.getResult(ns_query)

local logs = " :: Houses cleaned:\n\n"

if house:getID() ~= -1 then

repeat

logs = logs .. getHouseInfo(house:getDataInt('id')).name ..", owned by " .. house:getDataString('name') .. "\n"

setHouseOwner(house:getDataInt('id'), 0)

until not house:next()

house:free()

else

logs = logs .. "There were no houses to clean."

end

if config.log then

doWriteLogFile(config.file, logs)

end

addEvent(doSaveServer, 1000)

end

 

 

 

obrigado

Link para o comentário
Compartilhar em outros sites

Amigo, fica houses.lua.lua

Porque você cria com o nome houses.lua

e dps muda no blcoo de notas pra .lua novamente.

 

Faça assim, tire o .lua

deixe só houses

Link para o comentário
Compartilhar em outros sites

Sobre o .lua.lua foi mal Roksas, eu me enganei, eu li outra coisa.

 

No talkaction.lua na parte da sua house apaga os talkactions de lá e poem essa aqui:

 

<!-- Houses -->
<talkaction words="!buyhouse" filter="word-spaced" event="function" value="houseBuy"/>
<talkaction words="!sellhouse" filter="word-spaced" event="function" value="houseSell"/>
<talkaction words="alana sio" filter="word-spaced" event="function" value="houseKick"/>
<talkaction words="aleta grav" filter="word-spaced" event="function" value="houseDoorList"/>
<talkaction words="aleta sio" filter="word-spaced" event="function" value="houseGuestList"/>
<talkaction words="aleta som" filter="word-spaced" event="function" value="houseSubOwnerList"/>
<talkaction words="!leavehouse" filter="word-spaced" event="script" value="leavehouse.lua"/>

 

Caso você não tenha o script leavehouse.lua ou o seu não esteja funcionando toma ele ai:

 

Pasta do seu OT/data/talkactions/scripts/leavehouse.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

Editado por ThiagoBjiW
Link para o comentário
Compartilhar em outros sites

Vamos tentar até não ter mais saída. Dá algum erro na distro? ou na hora que vai comprar, fala apenas !buyhouse e não aconteçe nada? mesma coisa que falar qualquer coisa no default?

Link para o comentário
Compartilhar em outros sites

Creio que está se confundindo na hora de por as tags e códigos. tente assim

Troque o seu talkactions.xml por:

 

 

<?xml version="1.0" encoding="UTF-8"?>

<talkactions>

 

<!-- Gods -->

<talkaction words="/addach;/addallach;/removeach;/removeallach;/getach;/getsecretach" access="5" event="script" value="achievements.lua"/> <talkaction log="yes" words="/attr" access="5" event="function" value="thingProporties"/>

<talkaction log="yes" words="/serverdiag" access="5" event="function" value="diagnostics"/>

<talkaction log="yes" words="/closeserver" access="5" event="script" value="closeopen.lua"/>

<talkaction log="yes" words="/openserver" access="5" event="script" value="closeopen.lua"/>

<talkaction log="yes" words="/promote;/demote" access="5" event="script" value="promote.lua"/>

<talkaction log="yes" words="/shutdown" access="5" event="script" value="shutdown.lua"/>

<talkaction log="yes" words="/mode" access="5" event="script" value="mode.lua"/>

<talkaction log="yes" words="/mtp" access="5" event="script" value="mtp.lua"/>

<talkaction log="yes" words="/skill;/addskill" access="5" event="script" value="skill.lua"/>

<talkaction log="yes" words="/mexp" access="5" event="script" value="mexp.lua"/>

<talkaction words="/ver" access="5" event="script" value="eq.lua"/>

<talkaction log="yes" words="/i" access="5" event="script" value="createitem.lua"/>

<talkaction log="yes" words="/n" access="5" event="script" value="creature.lua"/>

<talkaction log="yes" words="/m" access="5" event="script" value="creature.lua"/>

<talkaction words="/addpacc" access="5" event="script" value="addpremium.lua"/>

<talkaction words="/premiumcheck" access="5" event="script" value="premiumcheck.lua"/>

<talkaction words="/removepremium" access="5" event="script" value="removepremium.lua"/>

 

 

 

<!-- Community Managers -->

<talkaction log="yes" words="/s" access="4" event="script" value="summon.lua"/>

<talkaction log="yes" words="/reload" access="4" event="script" value="reload.lua"/>

<talkaction log="yes" words="/raid" access="4" event="script" value="raid.lua"/>

<talkaction log="yes" words="/newtype" access="4" event="script" value="newtype.lua"/>

<talkaction log="yes" words="/r" access="4" event="script" value="remove.lua"/>

<talkaction log="yes" words="/owner" access="4" event="script" value="owner.lua"/>

<talkaction log="yes" words="/storage" access="4" event="script" value="storage.lua"/>

<talkaction log="yes" words="/config" access="4" event="script" value="configinfo.lua"/>

<talkaction log="yes" words="/bc" access="4" event="script" value="broadcastclass.lua"/>

<talkaction log="yes" access="4" words="/mkick" event="script" value="masskick.lua"/>

<talkaction access="4" words="/z" event="script" value="magiceffect.lua"/>

<talkaction access="4" words="/x" event="script" value="animationeffect.lua"/>

<talkaction access="4" words="/y" event="script" value="animatedtext.lua"/>

 

<!-- Gamemasters -->

<talkaction log="yes" words="/ghost;/invisible" access="3" event="function" value="ghost"/>

<talkaction log="yes" words="/squelch" access="3" event="script" value="gamemaster.lua"/>

<talkaction log="yes" words="/cliport" access="3" event="script" value="gamemaster.lua"/>

<talkaction log="yes" words="/t" access="3" event="script" value="teleportmaster.lua"/>

<talkaction log="yes" words="/c" access="3" event="script" value="teleporthere.lua"/>

<talkaction log="yes" words="/goto" access="3" event="script" value="teleportto.lua"/>

<talkaction log="yes" words="/a" access="3" event="script" value="teleporttiles.lua"/>

<talkaction log="yes" words="/kick" access="3" event="script" value="kick.lua"/>

<talkaction log="yes" words="/send" access="3" event="script" value="teleportsend.lua"/>

<talkaction log="yes" words="/ban" access="3" event="script" value="ban.lua"/>

<talkaction log="yes" words="/unban" access="3" event="script" value="unban.lua"/>

<talkaction log="yes" words="/town" access="3" event="script" value="teleporttown.lua"/>

<talkaction log="yes" words="/up" access="3" event="script" value="teleportfloor.lua"/>

<talkaction log="yes" words="/down" access="3" event="script" value="teleportfloor.lua"/>

<talkaction log="yes" words="/save" access="3" event="script" value="save.lua"/>

<talkaction log="yes" words="/clean" access="3" event="script" value="clean.lua"/>

<talkaction log="yes" words="/reports" access="3" event="script" value="reports.lua"/>

<talkaction log="yes" words="/mc" access="3" event="script" value="multicheck.lua"/>

<talkaction log="yes" words="/wp" access="3" event="script" value="waypoints.lua"/>

<talkaction log="yes" words="/jail;/unjail" access="3" event="script" value="jail.lua"/>

 

<!-- Senior Tutors -->

<talkaction log="yes" words="/notations" access="2" event="script" value="notations.lua"/>

<talkaction log="yes" words="/gethouse" access="2" event="script" value="gethouse.lua"/>

<talkaction log="yes" words="/b" access="2" event="script" value="broadcast.lua"/>

<talkaction log="yes" words="/info" access="2" event="script" value="playerinfo.lua"/>

 

<!-- Tutors -->

<talkaction log="yes" access="1" words="/baninfo" event="function" value="banishmentInfo"/>

<talkaction log="yes" access="1" words="/pos" event="script" value="position.lua"/>

<talkaction log="yes" access="1" hide="yes" words="!pos" event="script" value="position.lua"/>

 

<!-- Players -->

<talkaction words="!frags;/frags" event="script" value="frags.lua"/>

<talkaction words="!uptime;/uptime" event="script" value="uptime.lua"/>

<talkaction words="!serverinfo;/serverinfo" event="script" value="serverinfo.lua"/>

<talkaction words="!commands;/commands" event="script" value="commands.lua"/>

<talkaction words="!buybless;/buybless;!bless;/bless" script="bless.lua" />

<talkaction words="!changesex;/changesex;/changender" script="changesex.lua"/>

<talkaction words="!exp" event="script" value="exp.lua"/>

<talkaction words="!online;/online" event="script" value="online.lua"/>

<talkaction words="!mount" event="script" value="mountdoll.lua"/>

<talkaction words="!addon" event="script" value="addondoll.lua"/>

<talkaction words="!aol" event="script" value="aol.lua"/>

<talkaction words="!wand" event="script" value="wand.lua"/>

<talkaction words="/cast" event="script" value="cast.lua"/>

 

<!-- WoE -->

<talkaction words="/rainbow" event="script" value="rain.lua"/> <!-- Bank -->

<talkaction log="yes" words="!balance" script="bankbalance.lua" />

<talkaction log="yes" words="!deposit" script="deposit.lua" />

<talkaction log="yes" words="!withdraw" script="withdraw.lua" />

<talkaction log="yes" words="!transfer" script="transfer.lua" />

<talkaction log="yes" words="!depositall" script="depositall.lua" />

<talkaction log="yes" words="!withdrawall" script="withdrawall.lua" />

<talkaction log="yes" words="!transferall" script="transferall.lua" />

 

<!-- Houses -->

<talkaction words="!buyhouse" filter="word-spaced" event="script" value="housebuy.lua"/>

 

<talkaction words="!sellhouse;/sellhouse" filter="word-spaced" event="function" value="houseSell"/>

<talkaction words="alana sio" filter="word-spaced" event="function" value="houseKick"/>

<talkaction words="aleta grav" filter="word-spaced" event="function" value="houseDoorList"/>

<talkaction words="aleta sio" filter="word-spaced" event="function" value="houseGuestList"/>

<talkaction words="aleta som" filter="word-spaced" event="function" value="houseSubOwnerList"/>

<talkaction words="!leavehouse;/leavehouse;alana som" filter="word-spaced" event="script" value="leavehouse.lua"/>

 

<!-- Guild System -->

<talkaction words="/war" channel="0" event="script" value="war.lua" desc="(Guild channel command) War management."/>

<talkaction words="/balance" channel="0" event="script" value="balance.lua" desc="(Guild channel command) Balance management."/>

<talkaction filter="word" words="!bg;/bg" script="guildcast.lua"/>

</talkactions>

 

 

OK, AGORA É O SEGUINT

Dentro da pasta TALKACTIONS, abra a pasta SCRIPTS, lá copie algum arquivo e cole. Renomeie o novo arquivo para apenas "housebuy" sem as aspas!

 

Muito bem,abra o arquivo com o bloco de notas e cole isso:

 

 

 

local function getBoolean(x)

local e = false

if type(x) == "boolean" then

e = x

else

e = getBooleanFromString(x)

end

return e

end

 

function onSay(cid, words, param, channel)

if not isPlayer(cid) or getBoolean(getConfigValue('buyableAndSellableHouses')) == false then

return true

end

 

local pos = getPlayerLookPos(cid)

local tile = getTileInfo(pos)

if not tile then

doPlayerSendCancel(cid, "You have to be looking at door of flat you would like to purchase.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

return true

end

 

local house = getHouseFromPos(pos)

if not house then

doPlayerSendCancel(cid, "You have to be looking at door of flat you would like to purchase.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

return true

end

 

local doorPos = getThingFromPos({ x=pos.x, y=pos.y, z=pos.z, stackpos=1}).itemid

if not isItemDoor(doorPos) then

doPlayerSendCancel(cid, "You have to be looking at door of flat you would like to purchase.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

return true

end

 

local houseInfo = getHouseInfo(house)

local guild = houseInfo.guildHall

local guid = getPlayerGUID(cid)

if guild == false then

if getHouseByPlayerGUID(guid) then

doTeleportThing(cid,getHouseEntry(getHouseByPlayerGUID(guid)))

doPlayerSendCancel(cid, "You already rent another house.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

return true

end

 

local accountHouses = tonumber(getConfigValue('housesPerAccount'))

local account = getPlayerAccountId(cid)

local housesInAccountsql = db.getResult("SELECT `p`.`account_id` FROM `houses` h LEFT JOIN `players` p ON `h`.`owner` = `p`.`id` WHERE `p`.`account_id` = " .. account .. " AND `guild` = 0;")

local housesInAccount = housesInAccountsql:getID() == -1 and 0 or housesInAccountsql:getRows(free)

housesInAccountsql:free()

if accountHouses > 0 and housesInAccount >= accountHouses then

doPlayerSendCancel(cid, "You may own only " .. accountHouses .. " house\'s per account.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

return true

end

 

if getBoolean(getConfigValue('houseNeedPremium')) == true and not isPremium(cid) then

doPlayerSendCancel(cid, RETURNVALUE_YOUNEEDPREMIUMACCOUNT)

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

return true

end

 

local levelToBuyHouse = tonumber(getConfigValue('levelToBuyHouse'))

if getPlayerLevel(cid) < levelToBuyHouse then

doPlayerSendCancel(cid, "You have to be at least Level " .. levelToBuyHouse .. " to purchase a house.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

return true

end

else

if not getPlayerGuildId(cid) or getPlayerGuildLevel(cid) ~= GUILDLEVEL_LEADER then

doPlayerSendCancel(cid, "You have to be at least a guild leader to purchase a hall.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

return true

end

 

local guildHouses = getPlayerGuildId(cid)

local housesInGuildsql = db.getResult("SELECT `owner` FROM `houses` WHERE `owner` = " .. guildHouses .. " AND `guild` = 1;"):getRows(free)

local housesInGuild = housesInGuildsql:getID() == -1 and 0 or housesInGuildsql:getRows(free)

housesInGuildsql:free()

if housesInGuild ~= 0 then

doPlayerSendCancel(cid, "Your guild rents already another hall.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

return true

end

end

 

if getHouseOwner(house) ~= 0 then

doPlayerSendCancel(cid, "This flat is already owned by someone else.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

return true

end

 

if getPlayerMoney(cid) < getHousePrice(house) or not doPlayerRemoveMoney(cid, getHousePrice(house)) then

doPlayerSendCancel(cid, "You do not have enough money.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

return true

end

 

setHouseOwner(house, guid, true)

local ret = "You have successfully bought this "

if guild == true then

ret = ret .. "hall"

else

ret = ret .. "house"

end

 

ret = ret .. ", remember to leave money at "

if guild == true then

ret = ret .. "guild owner "

end

 

if getBoolean(getConfigValue('bankSystem')) then

ret = ret .. "bank or "

end

 

ret = ret .. "depot of this town for rent."

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, ret)

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE)

 

return true

end

 

 

Link para o comentário
Compartilhar em outros sites

Vamos tentar até não ter mais saída. Dá algum erro na distro? ou na hora que vai comprar, fala apenas !buyhouse e não aconteçe nada? mesma coisa que falar qualquer coisa no default?

 

Thiago: Mesma coisa que aparece no default.

Roksas fiz isso com letras maiusculas, minusculas, vou tentar de novo!

Link para o comentário
Compartilhar em outros sites

Vamos tentar de novo, só que diferente. Vá em: Pasta do seu OT/data/talkactions/talkactions.xml:

 

<!-- Houses -->
    <talkaction words="!buyhouse;alana res" filter="word-spaced" event="function" value="houseBuy"/>
    <talkaction words="!sellhouse;alana grav" filter="word-spaced" event="function" value="houseSell"/>
    <talkaction words="alana sio" filter="word-spaced" event="function" value="houseKick"/>
    <talkaction words="aleta grav" filter="word-spaced" event="function" value="houseDoorList"/>
    <talkaction words="aleta sio" filter="word-spaced" event="function" value="houseGuestList"/>
    <talkaction words="aleta som" filter="word-spaced" event="function" value="houseSubOwnerList"/>
    <talkaction words="alana som" filter="word-spaced" event="script" value="leavehouse.lua"/>

 

Agora, faça-me um favor, vá em config.lua do seu servidor e me fala se nessa parte aqui do seu config.lua como está:

 

buyableAndSellableHouses = true
houseNeedPremium = false
bedsRequirePremium = false
levelToBuyHouse = 100
housesPerAccount = 1
houseRentAsPrice = false
housePriceAsRent = false
housePriceEachSquare = 10000
houseRentPeriod = "weekly"
houseCleanOld = 0
guildHalls = false

Link para o comentário
Compartilhar em outros sites

buyableAndSellableHouses = true

houseNeedPremium = true

bedsRequirePremium = true

levelToBuyHouse = 20

housesPerAccount = 1

houseRentAsPrice = false

housePriceAsRent = false

housePriceEachSquare = 1000

houseRentPeriod = "weekly"

houseCleanOld = 8 * 24 * 60 * 60

guildHalls = true

houseSkipInitialRent = true

houseProtection = true

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...