WiLDTuRTLE
Member
- Joined
- Feb 26, 2011
- Messages
- 478
- Reaction score
- 5
So this is my script, but i want to add !go home, <-- !go home = it teleports you to your house, house could i make it? or like !go PLAYERNAMEHOUSE
Thanks for the answers !
local to = {
["temple"] = {x=1063, y=607, z=7},
["depot"] = {x=1037, y=586, z=7},
["dp"] = {x=1037, y=586, z=7},
["teleports"] = {x=1158, y=689, z=7},
["jail"] = {x=1150, y=848, z=6},
["carlin"] = {x=1203, y=507, z=7},
["thais"] = {x=1062, y=581, z=7},
["tps"] = {x=1158, y=689, z=7},
["ship"] = {x=1006, y=576, z=6},
["desert"] = {x=873, y=632, z=6},
["trainers"] = {x=1095, y=793, z=8},
["train"] = {x=1109, y=441, z=7},
["donate"] = {x=987, y=420, z=7},
["arena"] = {x=1027, y=505, z=7},
["duel"] = {x=1137, y=702, z=7},
["island"] = {x=1030, y=798, z=7},
["yalahar"] = {x=1516, y=1172, z=7},
["edron"] = {x=2106, y=1499, z=8},
["stonehome"] = {x=2222, y=1438, z=7},
["port hope"] = {x=1763, y=1228, z=7},
}
function onSay(cid, words, param, channel)
local p = param:lower()
if getCreatureCondition(cid,CONDITION_INFIGHT) == false then
if to[p] ~= nil then
doTeleportThing(cid,to[p])
doSendMagicEffect(to[p],10)
doPlayerSendTextMessage(cid,4,"Teleported To "..p..".")
else
doPlayerSendTextMessage(cid,4,"Invalid Location.")
end
else
doPlayerSendTextMessage(cid,4,"Lose PZ.")
end
return true
end
Thanks for the answers !
local to = {
["temple"] = {x=1063, y=607, z=7},
["depot"] = {x=1037, y=586, z=7},
["dp"] = {x=1037, y=586, z=7},
["teleports"] = {x=1158, y=689, z=7},
["jail"] = {x=1150, y=848, z=6},
["carlin"] = {x=1203, y=507, z=7},
["thais"] = {x=1062, y=581, z=7},
["tps"] = {x=1158, y=689, z=7},
["ship"] = {x=1006, y=576, z=6},
["desert"] = {x=873, y=632, z=6},
["trainers"] = {x=1095, y=793, z=8},
["train"] = {x=1109, y=441, z=7},
["donate"] = {x=987, y=420, z=7},
["arena"] = {x=1027, y=505, z=7},
["duel"] = {x=1137, y=702, z=7},
["island"] = {x=1030, y=798, z=7},
["yalahar"] = {x=1516, y=1172, z=7},
["edron"] = {x=2106, y=1499, z=8},
["stonehome"] = {x=2222, y=1438, z=7},
["port hope"] = {x=1763, y=1228, z=7},
}
function onSay(cid, words, param, channel)
local p = param:lower()
if getCreatureCondition(cid,CONDITION_INFIGHT) == false then
if to[p] ~= nil then
doTeleportThing(cid,to[p])
doSendMagicEffect(to[p],10)
doPlayerSendTextMessage(cid,4,"Teleported To "..p..".")
else
doPlayerSendTextMessage(cid,4,"Invalid Location.")
end
else
doPlayerSendTextMessage(cid,4,"Lose PZ.")
end
return true
end