Jfrye
Mapper, trying to learn scripting
Hey everyone, Im looking for a little help with the citizenship teleport.
Im using tfs 1.1 and 10.77 client. Basically, I was trying to add in the script that says, "You are now a citizen of 'xxx' town."
The script works great, so there is no issue with the script. I just attempted to add the message in various locations and had no luck. I left the message in the code above, but I also tried placing it under player:setTown(town).
Neither place would show the message like I had hoped, and neither place caused any console errors. Im sure this is a simple fix, but Im just not seeing it.
Im using tfs 1.1 and 10.77 client. Basically, I was trying to add in the script that says, "You are now a citizen of 'xxx' town."
Code:
function onStepIn(creature, item, position, fromPosition)
if item.actionid > 30020 and item.actionid < 30050 then
local player = creature:getPlayer()
if player == nil then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You are now a citizen of 'town'")
return false
end
local town = Town(item.actionid - 30020)
player:setTown(town)
end
return true
end
The script works great, so there is no issue with the script. I just attempted to add the message in various locations and had no luck. I left the message in the code above, but I also tried placing it under player:setTown(town).
Neither place would show the message like I had hoped, and neither place caused any console errors. Im sure this is a simple fix, but Im just not seeing it.