-- request by Vitrex
-- Script by Rochet2 of EmuDevs
-- updated by slp13at420 of EmuDevs
-- drunken slurred outbursts by Bender
local npcid = 500017 -- 10000
local delay = 1*60*12000-- 60 seconds
local cycles = 1
local ANN = {};
-- {Statement, stated} statement in quotes "blah blah", stated // say = 0 // yell = 1
ANN[npcid] = {
[1] = {"Hallo ich Verkaufe sachen die ihr mit einem Produkt Key bekommen könnt...", 0},
[2] = {"Bei intresse meldet euch an unseren Entwickler und Inhaber Xaver..", 0},
[3] = {"Diese sachen erhaltet ihr nirgend wo sonst !!", 1},
[4] = {"Einmalige chance und nur für hilfsbereite Spiler die den Server unterstüzen..", 1},
};
local function Drop_Event_On_Death(eventid, creature, killer)
ANN[creature:GetGUIDLow()] = nil;
creature:RemoveEvents()
end
RegisterCreatureEvent(npcid, 4, Drop_Event_On_Death)
local function TimedSay(eventId, delay, repeats, creature)
ANN[creature:GetGUIDLow()] = nil;
yell = math.random(1, #ANN[npcid])
if(ANN[npcid][yell][2] == 0)then
creature:SendUnitSay(ANN[npcid][yell][1], 0)
creature:CastSpell(creature, 58837, true)
else
creature:SendUnitYell(ANN[npcid][yell][1], 0)
creature:CastSpell(creature, 58837, true)
end
creature:RemoveEvents()
creature:RegisterEvent(TimedSay, delay, cycles) -- Constant
ANN[creature:GetGUIDLow()] = {reset = 1,}; -- Constant
end
local function OnMotion(event, creature, unit)
if(unit:GetObjectType()=="Creature")then
if(ANN[creature:GetGUIDLow()]==nil)then
ANN[creature:GetGUIDLow()] = {reset = 1,};
creature:RegisterEvent(TimedSay, delay, cycles)
else
end
else
end
end
RegisterCreatureEvent(npcid, 27, OnMotion)