Lua problem menu

Shout-Out

User Tag List

Thread: Lua problem

Results 1 to 4 of 4
  1. #1
    Minichili's Avatar Member
    Reputation
    12
    Join Date
    Mar 2008
    Posts
    257
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lua problem

    Can any1 tell me whats wrong with this .lua?


    This software is provided as free and open source by the
    staff of The Moon++ Scripting Project, in accordance with
    the GPL license. This means we provide the software we have
    created freely and it has been thoroughly tested to work for
    the developers, but NO GUARANTEE is made it will work for you
    as well. Please give credit where credit is due, if modifying,
    redistributing and/or using this software. Thank you.

    Staff of The Moon++ Scripting Project, November 2007
    ~~End of License Agreement

    All credits for the files in this folder that are GameMonkey scripts
    go to the GMScripts project, for all their hard work for the Ascent
    community.

    -- Moon++ Project, December 2007 ]]

    function GromHellscream_HeroicStrike(unit)
    print GromHellscream HeroicStrike
    unit:CastSpell(41975)
    unit:endChatMessage(12, 0, "Die !.")
    unit:laySoundToSet (11345)
    end

    function GromHellscream_TerrifyingRoar(unit)
    print GromHellscream_TerrifyingRoar
    unit:CastSpell(36629)
    unit:SendChatMessage(12, 0, "Flee ... In Terror !.")
    unit:PlaySoundToSet (11347)
    end

    function GromHellscream_FelCleave(unit)
    print GromHellscream_FelCleave
    local plr = unit:GetClosestPlayer()
    if (plr ~= nil) then
    unit:CastSpellOnTarget(38742, plr)
    unit:PlaySoundToSet (11346)
    end

    function GromHellscream_FelCleave(unit)
    print GromHellscream_FelCleave
    local plr = unit:GetClosestPlayer()
    if (plr ~= nil) then
    unit:CastSpellOnTarget(38742, plr)
    end

    function GromHellscream_OnEnterCombat(unit)
    print GromHellscream_OnEnterCombat
    unit:SendChatMessage(12, 0, "Feel the wrath of Hellscream !.")
    unit:PlaySoundToSet (11344)
    end
    function "GromHellscream"(unit, event, miscunit, misc)
    print "GromHellscream"
    unit:RegisterEvent("GromHellscream_FelCleave",23000, 0)
    unit:RegisterEvent("GromHellscream_HeroicStrik",40000, 0)
    unit:RegisterEvent("GromHellscream_FelCleave",10000, 0)
    unit:RegisterEvent("GromHellscream_TerrifyingRoar",30000, 0)
    unit:RegisterEvent("GromHellscream_FelCleave",50000, 0)
    unit:RegisterEvent("GromHellscream_FelCleave",120000, 0)
    end

    function GromHellscream_OnLeaveCombat(unit)
    print GromHellscream_OnLeaveCombat
    unit:RemoveEvents()
    end

    function GromHellscream_KilledTarget(unit)
    print GromHellscream_KilledTarget
    unit:SendChatMessage(12, 0, "Another death at the hands of Hellscream !.")
    unit:PlaySoundToSet (11351)
    unit:RemoveEvents()
    end

    function GromHellscream_OnDied(unit)
    print GromHellscream_OnDied
    unit:SendChatMessage(12, 0, "Thann...thank you for freeing me.Good Luck on your quests noble heros")
    unit:PlaySoundToSet (11352)
    unit:RemoveEvents()
    end

    function "GromHellscream"(unit, event, miscunit, misc)
    print "GromHellscream"
    RegisterUnitEvent(17026,1,"GromHellscream")
    RegisterUnitEvent (17026, 1, "Grom_Hellscream_Entercombat")
    RegisterUnitEvent(17026, 3, "GromHellscream_Killtarget")
    RegisterUnitEvent (17026, 4, "GromHellscream_Died")
    RegisterUnitEvent (17026, 2, "GromHellscream_Leavecombat")

    Lua problem
  2. #2
    CairiFEA's Avatar Member
    Reputation
    36
    Join Date
    Jan 2008
    Posts
    194
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    [LEFT]
    Originally Posted by Minichili View Post
    Can any1 tell me whats wrong with this .lua?
    Green text is a revise this section
    Red text is add this parameter

    Code:
    -- Moon++ Project, December 2007 ]]
    
    function GromHellscream_HeroicStrike(unit)
    print GromHellscream HeroicStrike
    unit:CastSpell(41975)
    unit:endChatMessage(12, 0, "Die !.")
    unit:laySoundToSet (11345)    --[[Should be SendChat.... PlaySound...]]--
    end
    end
    
    function GromHellscream_TerrifyingRoar(unit)
    print GromHellscream_TerrifyingRoar
    unit:CastSpell(36629)
    unit:SendChatMessage(12, 0, "Flee ... In Terror !.")
    unit:PlaySoundToSet (11347)
    end
    
    function GromHellscream_FelCleave(unit)
    print GromHellscream_FelCleave
    local plr = unit:GetClosestPlayer()
    if (plr ~= nil) then
    unit:CastSpellOnTarget(38742, plr) 
    unit:PlaySoundToSet (11346)
    end
    end
    
    function GromHellscream_FelCleave(unit)
    print GromHellscream_FelCleave
    local plr = unit:GetClosestPlayer()
    if (plr ~= nil) then
    unit:CastSpellOnTarget(38742, plr) 
    end
    end
    
    function GromHellscream_OnEnterCombat(unit)
    print GromHellscream_OnEnterCombat  --[[ why does this print he is entering combat?]]--
    unit:SendChatMessage(12, 0, "Feel the wrath of Hellscream !.")
    unit:PlaySoundToSet (11344)
    end --[[you need an enter after this line]]--
    function "GromHellscream"(unit, event, miscunit, misc)
    print "GromHellscream"
    unit:RegisterEvent("GromHellscream_FelCleave",23000, 0)
    unit:RegisterEvent("GromHellscream_HeroicStrik",40000, 0)
    unit:RegisterEvent("GromHellscream_FelCleave",10000, 0)
    unit:RegisterEvent("GromHellscream_TerrifyingRoar",30000, 0)
    unit:RegisterEvent("GromHellscream_FelCleave",50000, 0)
    unit:RegisterEvent("GromHellscream_FelCleave",120000, 0) 
    end
    
    function GromHellscream_OnLeaveCombat(unit)
    print GromHellscream_OnLeaveCombat
    unit:RemoveEvents()
    end
    
    function GromHellscream_KilledTarget(unit)
    print GromHellscream_KilledTarget
    unit:SendChatMessage(12, 0, "Another death at the hands of Hellscream !.")
    unit:PlaySoundToSet (11351)
    unit:RemoveEvents()
    end
    
    function GromHellscream_OnDied(unit)
    print GromHellscream_OnDied
    unit:SendChatMessage(12, 0, "Thann...thank you for freeing me.Good Luck on your quests noble heros")
    unit:PlaySoundToSet (11352)
    unit:RemoveEvents()
    end
    end <---- add this
    
    function "GromHellscream"(unit, event, miscunit, misc)
    print "GromHellscream"  --[[this does nothing]]--
    RegisterUnitEvent(17026,1,"GromHellscream")
    RegisterUnitEvent (17026, 1, "Grom_Hellscream_Entercombat")
    RegisterUnitEvent(17026, 3, "GromHellscream_Killtarget")
    RegisterUnitEvent (17026, 4, "GromHellscream_Died")
    RegisterUnitEvent (17026, 2, "GromHellscream_Leavecombat")
    end(add this IF you keep the above useless code, remove if not)

    EDIT:

    Also, why do you have Fel_Cleave at intervals of every 23 seconds, then 10 seconds, then 50 seconds, then 2 minutes. Just put 1 interval in, ie 20 seconds. This will repeat his felcleave.


    Cairi,


    +Rep those who help...
    Last edited by CairiFEA; 04-13-2008 at 12:55 PM.
    Cairi
    As a Nation, we have AGREED to A GREED
    gmtricks.com

  3. #3
    latruwski's Avatar Banned
    Reputation
    647
    Join Date
    Dec 2006
    Posts
    2,456
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    possible mixup of pUnit <> Unit?
    (srr i am busy cant check detailed right now ^^)

  4. #4
    Minichili's Avatar Member
    Reputation
    12
    Join Date
    Mar 2008
    Posts
    257
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Got it, but found how to it before i got this but thank you so much for telling me

Similar Threads

  1. Lua problem. Look here.. Also newcomers:b
    By b!atch in forum World of Warcraft Emulator Servers
    Replies: 16
    Last Post: 04-18-2008, 07:20 AM
  2. [Help] Lua problem
    By Lich King in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 03-23-2008, 04:34 AM
  3. lua problem
    By *Alexz* in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 02-14-2008, 10:41 PM
  4. [Question]-Lua Problem
    By Peter1337 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-07-2008, 07:59 AM
  5. [Question] LUA problem
    By Peter1337 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-01-2008, 09:21 AM
All times are GMT -5. The time now is 03:57 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search