Lua script loaded but no change in game menu

User Tag List

Results 1 to 11 of 11
  1. #1
    Gix85's Avatar Private
    Reputation
    1
    Join Date
    Feb 2011
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lua script loaded but no change in game

    Hi, I'm new in Lua and wow repacks in general. A friend of mine installed a Pendregon's repack on his notebook, we put on a network in hamachi and i'm having fun with debugging.

    I was trying to fix a bug in darkweaver syth in settek halls. He's not spawning elementals. I've corrected the script in lua file and sent it to my friend that loaded it in the server. He says that the console tells him that the load has been succesfull, but we don't see any change in darkweaver syth.


    Any ideas Oo?

    And by the way, it's correct to fix boss bugs with lua scripting? There are any tutorials to help me improve?

    Lua script loaded but no change in game
  2. #2
    BanzBoyz77's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2010
    Posts
    258
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A script error not poping up doesn't mean you script it correct, just means the script is not wrong. The script being wrong and the script not working like it should are 2 different things.

  3. #3
    Gix85's Avatar Private
    Reputation
    1
    Join Date
    Feb 2011
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Being a completely noob with scripts, i've done some tests to try out if the script is wrong or is not loaded u.u, i'll show.

    This is the first part of the darkweaver syth lua:

    local NPCID = 18472
    local randomtextOC = math.random(1,3)
    local randomtextOKT = math.random(1,2)

    function Syth_OnCombat(Unit, Event)
    if randomtextOC==1 then
    Unit:PlaySoundToSet(10503)
    Unit:SendChatMessage(14, 0, "Hrrmm.. Time to.. hrrm.. make my move")
    if radonmtextOC==2 then
    Unit:PlaySoundToSet(10504)
    Unit:SendChatMessage(14, 0, "Nice pets..hrm.. Yes!")
    if randomtextOC==3 then
    Unit:PlaySoundToSet(10505)
    Unit:SendChatMessage(14, 0, "Nice pets have.. weapons. No so..squawk..nice")
    end
    end
    end
    unit:RegisterEvent("Syth_HealthCheckA", 1000, 1) -- Those 3 lines impose the boss to summon adds at some health checks --
    unit:RegisterEvent("Syth_HealthCheckB", 1000, 1)
    unit:RegisterEvent("Syth_HealthCheckC", 1000, 1)
    unit:RegisterEvent("Syth_Frost", 10000, 0)
    unit:RegisterEvent("Syth_Flame", 15000, 0)
    unit:RegisterEvent("Syth_Shadow", 21000, 0)
    unit:RegisterEvent("Syth_Arcane", 26000, 0)
    unit:RegisterEvent("Syth_Chain", 29000, 0)
    end

    Now, to try if it has been loaded, i've put a -- to comment the 3 lines that check syth's health and causes the summons. Well, we have loaded it, the console check told that the lua file was ok and load succesfull, but syth tried to summon the elementals (he yells and cast the spell, but the elementals don't come out). Don't you think that, if the lua file was Really loaded, he should simply attack without trying a summon? Man i hope you can understand me, it's about 5 years i don't write in english XD...

  4. #4
    Facerolling's Avatar Contributor
    Reputation
    116
    Join Date
    Mar 2007
    Posts
    307
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The spell isn't scripted in the DB in ArcEmu, to go around this, make the script spawn the Adds instead.
    hey ervyone whats up gamboys

  5. #5
    BanzBoyz77's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2010
    Posts
    258
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's what I'm scripting for him now but I can't figure out how the script reads Darkweaver's health if it doesn't specify it in here. All it is is a registered hook with no specific health to check for.

  6. #6
    Facerolling's Avatar Contributor
    Reputation
    116
    Join Date
    Mar 2007
    Posts
    307
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    local Random_Xx = math.random(1,3)
    
    function Syth_OnEnterCombat(Unit, Event)
    	if Random_Xx==1 then
    		Unit:PlaySoundToSet(10503)
    		Unit:SendChatMessage(14, 0, "Hrrmm.. Time to.. hrrm.. make my move")
    	end
    	if Random_Xx==2 then
    		Unit:PlaySoundToSet(10504)
    		Unit:SendChatMessage(14, 0, "Nice pets..hrm.. Yes!")
    	end
    	if Random_Xx==3 then
    		Unit:PlaySoundToSet(10505)
    		Unit:SendChatMessage(14, 0, "Nice pets have.. weapons. No so..squawk..nice")
    	end
    	Unit:RegisterEvent("Checkhealth_zz", 1000, 0)
    end
    
    function Syth_Phase2(Unit, Event)
    	Unit:RemoveEvents()
    	Unit:RegisterEvent("Checkhealth_zyz", 1000, 0)
    end
    
    function Syth_Phase3(Unit, Event)
    	Unit:RemoveEvents()
    	Unit:RegisterEvent("Checkhealth_xyz", 1000, 0)
    end
    
    function Syth_Phase4(Unit, Event)
    	Unit:RemoveEvents()
    end
    
    function Checkhealth_zz(Unit, Event)
    	if Unit:GetHealthPct() =< 70 then
    		Unit:SpawnCreature(**<Creature ID Here>**, Unit:GetX(), Unit:GetY(), Unit:GetZ(), Unit:GetO(), 14, 150000)
    		Unit:RegisterEvent("Syth_Phase2", 1000, 1)
    	end
    end
    
    function Checkhealth_zyz(Unit, Event)
    	if Unit:GetHealthPct() =< 50 then
    		Unit:SpawnCreature(**<Creature ID Here>**, Unit:GetX(), Unit:GetY(), Unit:GetZ(), Unit:GetO(), 14, 150000)
    		Unit:RegisterEvent("Syth_Phase3", 1000, 1)
    	end
    end
    
    function Checkhealth_xyz(Unit, Event)
    	if Unit:GetHealthPct() =< 20 then
    		Unit:SpawnCreature(**<Creature ID Here>**, Unit:GetX(), Unit:GetY(), Unit:GetZ(), Unit:GetO(), 14, 150000)
    		Unit:RegisterEvent("Syth_Phase4", 1000, 1)
    	end
    end
    
    function Syth_OnLeaveCombat(Unit,Event)
    	Unit:RemoveEvents()
    end
    
    function Syth_OnDeath(Unit,Event)
    	Unit:RemoveEvents()
    end
    
    RegisterUnitEvent(18472, 1,"Syth_OnEnterCombat")
    RegisterUnitEvent(18472, 2,"Syth_OnLeaveCombat")
    RegisterUnitEvent(18472, 4,"Syth_OnDeath")
    Whipped this up real quick, might not work, let me know how you get on, no spells or whatever so you can fill them in.
    hey ervyone whats up gamboys

  7. #7
    Gix85's Avatar Private
    Reputation
    1
    Join Date
    Feb 2011
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for help. Just tried this one. As usual, ArcEmu server says that the lua is good, but when we summon syth he doesn't seem changed at all. I'm wondering why... I mean, even if i change the yells in the lua, the speech doesn't change at all. Is like the lua is completely ignored and we can't explain why...

  8. #8
    Facerolling's Avatar Contributor
    Reputation
    116
    Join Date
    Mar 2007
    Posts
    307
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The boss is already scripted if you compiled with scripts I think. To bypass this create another npc with a different Id and bind the script to the new NPC, you'll have to change the loot IDs if you want the correct loot though
    hey ervyone whats up gamboys

  9. #9
    Gix85's Avatar Private
    Reputation
    1
    Join Date
    Feb 2011
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Let me understand, if the boss is already scripted there's no way to change it? the only way is to create another scripted ncp?

  10. #10
    Facerolling's Avatar Contributor
    Reputation
    116
    Join Date
    Mar 2007
    Posts
    307
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is a way to exclude it from the ArcScripts if you have a poke around in the source files, but if it's a repack then yes, that's the only way.
    hey ervyone whats up gamboys

  11. #11
    Gix85's Avatar Private
    Reputation
    1
    Join Date
    Feb 2011
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok. So we misunderstood everything about the private servers. Can you explain me the procedures? I mean, not how to do (I suppose it would take ages to write it down in a single post), but WHAT we have to do, we can find tutorials if we know what to do.
    We want a server where we are capable of correct boss bugs with lua scripts, is it possible? what are the usual ways to do that? I gave a look at the various tutorials in this and other sites, they all explain how to do something, not why. We didn't understand if we need to compile a server from the source code everytime we fix a bug (and if we have to fix the bug modifying the source code). It would make sense, all the saved data are stored in a database so when we compile and start it, no one will notice the difference. Am I right?

Similar Threads

  1. [Lua Script] [Request] LUA Script on game objects
    By Ultradethv2 in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 08-10-2010, 10:17 AM
  2. [Lua Script] How to I reload lua scripts in-game ?
    By Wheeze201 in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 06-27-2010, 08:28 AM
  3. Lua scripts not loading?
    By trygon11 in forum WoW EMU Questions & Requests
    Replies: 8
    Last Post: 03-03-2010, 05:52 PM
  4. Lua Warp Npc , but it wont load -.-
    By mafiaboy in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 06-28-2008, 02:58 AM
  5. LUA scripting -- Making game objects cast spells.
    By Jotox in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 05-08-2008, 03:44 PM
All times are GMT -5. The time now is 06:17 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search