• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

SimpleI Information/Buff/Teleport Script

Status
Not open for further replies.

Toby

Enthusiast
I'll add more as I feel like it, but I was just testing out the OnChat function.

This is for 3.3.5a ArcEmu

Anyway here's what you can do:

#sexy - Makes you feel good about yourself.
#info - tells player about the server
#arena - Teleports to gurbashi arena
#buffme - Buffs the player
#removeres - Removes Res sickness
#Dalaran - TP To Dal
#Shattrath - TP to Shatt

You type those in chat.

Here's the code:

Code:
--locals--
local SEXY = "#sexy"
local INFO = "#info"
local ARENA = "#arena"
local BUFFS = "#buffme"
local REMOVERESS = "#removeres"
local DALARAN = "#Dalaran"
local SHATTRATH = "#Shattrath" 

function OnChat(event, pPlayer, message, type, language)
if (message == SEXY) then
pPlayer:SendBroadcastMessage("YOU ARE A SEXY YOYO")

elseif (message == INFO) then
pPlayer:SendBroadcastMessage("This server was created by Kyrie Newton")

elseif (message == ARENA) then
pPlayer:Teleport(0, -13152.9, 342.729, 53.1328)

elseif (message == BUFFS) then
         pPlayer:CastSpell(48102)
        pPlayer:CastSpell(58451)
        pPlayer:CastSpell(48104)
        pPlayer:CastSpell(58449)
        pPlayer:CastSpell(48100)
        pPlayer:CastSpell(20217)
        pPlayer:CastSpell(61024)
        pPlayer:CastSpell(48469)
        pPlayer:CastSpell(57294)

elseif(message == REMOVERESS) then
        pPlayer:LearnSpell(15007)
        pPlayer:UnlearnSpell(15007)

        elseif (message == DALARAN) then
                pPlayer:Teleport(571, 5785.24, 724.91, 641.081)
        elseif (message == SHATTRATH) then
                pPlayer:Teleport(530, -1722.58, 5382.7, 2.47504)
end

end

RegisterServerHook(16, "OnChat")


If you'd like to build upon to do this, simply add a new local and command. I'll highly mine is green for if you wanted to add a new one.

Code:
--locals--
local SEXY = "#sexy"
local INFO = "#info"
local ARENA = "#arena"
local BUFFS = "#buffme"
local REMOVERESS = "#removeres"
local DALARAN = "#Dalaran"
local SHATTRATH = "#Shattrath" 
[COLOR="#00FF00"]local YOURNAME = "#command"[/COLOR]

function OnChat(event, pPlayer, message, type, language)
if (message == SEXY) then
pPlayer:SendBroadcastMessage("YOU ARE A SEXY YOYO")

elseif (message == INFO) then
pPlayer:SendBroadcastMessage("This server was created by Kyrie Newton")

elseif (message == ARENA) then
pPlayer:Teleport(0, -13152.9, 342.729, 53.1328)

elseif (message == BUFFS) then
         pPlayer:CastSpell(48102)
        pPlayer:CastSpell(58451)
        pPlayer:CastSpell(48104)
        pPlayer:CastSpell(58449)
        pPlayer:CastSpell(48100)
        pPlayer:CastSpell(20217)
        pPlayer:CastSpell(61024)
        pPlayer:CastSpell(48469)
        pPlayer:CastSpell(57294)

elseif(message == REMOVERESS) then
        pPlayer:LearnSpell(15007)
        pPlayer:UnlearnSpell(15007)

        elseif (message == DALARAN) then
                pPlayer:Teleport(571, 5785.24, 724.91, 641.081)
        elseif (message == SHATTRATH) then
                pPlayer:Teleport(530, -1722.58, 5382.7, 2.47504)
       [COLOR="#00FF00"] elseif (message == YOURNAME) then
pPlayer:SendBroadcastMessage("This just says words. Change me.")[/COLOR]

end

end

RegisterServerHook(16, "OnChat")

It's very simple to edit, and I'd love to see what you can come up with.

Thanks for reading, enjoy.
 
Status
Not open for further replies.
Top