Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- -- Guild House system teleporter
- -- by Grumbo/Blackwolf
- -- allows guild members to teleport to area flags owned by
- -- there guild.
- -- re-worked with advanced skills by Grandelf1 ty.
- -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- function Guildteleport(event, pPlayer, message, type, language)
- local ChatMsg = ".gtele"
- local startpos, endpos = string.find(message, ChatMsg)
- if(startpos == 1) then
- local text = message:gsub(ChatMsg, "")
- if(pPlayer:IsInGuild()==true)then
- local Loc = tonumber(text)
- if(GWARZ[Loc]==nil)then
- pPlayer:SendBroadcastMessage("|cffcc0000error.... teleport entry doesn't exsist.|r")
- return false;
- end
- if(GWARZ[Loc]~=nil)then
- if(GWARZ[Loc].Guildname~=pPlayer:GetGuildName())then
- pPlayer:SendBroadcastMessage("Your guild doesn't own that area.")
- pPlayer:SendBroadcastMessage("You cannot teleport there.")
- return false;
- end
- if(pPlayer:GetGuildName()==GWARZ[Loc].Guildname)then
- pPlayer:Teleport(GWARZ[Loc].Mapid, GWARZ[Loc].X, GWARZ[Loc].Y, GWARZ[Loc].Z, 1.0)
- pPlayer:SendBroadcastMessage("|cff00cc00Teleport complete.|r")
- return false;
- end
- return false;
- end
- return false;
- end
- end
- end
- RegisterServerHook(16, "Guildteleport")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement