Well I am making a simple scripts, please correct me if I am wrong:
XML
Comment Please!
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if hasCondition(cid, CONDITION_INFIGHT) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Tienes que esperar a que la PZ se vaya MENSO!.")
return TRUE
end
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), TRUE)
doPlayerSendTextMessage(cid, 25, "Ya te teletransportaste a la cama de un homosexual, corre!")
doSendMagicEffect(getCreaturePosition(cid), 10)
return true
end
XML
Lua:
<action itemid="ITEMID" event="script" value="telebook.lua" allowfaruse="1"/>