Long Script Crashes world.exe menu

User Tag List

Results 1 to 5 of 5
  1. #1
    choweyiii's Avatar Contributor
    Reputation
    91
    Join Date
    Aug 2010
    Posts
    127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Long Script Crashes world.exe

    I tried to make a lua script that lets you talk to an npc, that npc then spawns another npc that nearly identical, has combat capabilities instead of gossip to help the player, along with an invisible unfriendly mob that will begin summoning adds for two minutes upon entering combat.

    There's three different types of adds that will be spawned: Raider - general melee unit, Walking Bomb - low health bomb that creates a way point to the beginning friendly npc that starts the event, once the bomb reaches the way point, it explodes, and you die horribly, Commander - high health high damage creature which will drop the quest item once I make the quest.

    World.exe crashes before the entire duration of the script.

    Take a look at the scripts below, and see what I did wrong. Any useful comments will be +Rep'd

    Spawner
    Code:
    function HordeRaidEventSpawner_OnCombat(Unit, Event)
      Unit:Despawn(120000, 0)
      Unit:RemoveAllAuras()
      Unit:RegisterEvent("HordeRaidEventSpawner_RandomSummon", 8000, 0)
      Unit:RegisterEvent("HordeRaidEventSpawner_SpawnHordeCommander", 100000, 1)
      end
    
      --SOUTH DOOR 2616.333008, 5262.813477, 39.410072, 5.513389
      --NORTH DOOR 2643.458984, 5248.559570, 38.309711, 3.145407
      
     function HordeRaidEventSpawner_RandomSummon(Unit, Event)
     local RandomSummon=math.random(1, 4);
        if RandomSummon == 1 then -- 2 raiders
        Unit:SpawnCreature(900063, 2616.333008, 5262.813477, 39.410072, 5.513389, 85, 120000)
    	Unit:SpawnCreature(900063, 2643.458984, 5248.559570, 38.309711, 3.145407, 85, 120000)
        elseif RandomSummon == 2 then -- 2 walking bombs
        Unit:SpawnCreature(900064, 2616.333008, 5262.813477, 39.410072, 5.513389, 32, 120000)
    	Unit:SpawnCreature(900064, 2643.458984, 5248.559570, 38.309711, 3.145407, 32, 120000)                       -- Takes place in Farshire, Borean Tundra
        elseif RandomSummon == 3 then -- one of each
        Unit:SpawnCreature(900064, 2616.333008, 5262.813477, 39.410072, 5.513389, 32, 120000)
    	Unit:SpawnCreature(900063, 2643.458984, 5248.559570, 38.309711, 3.145407, 85, 120000)
        elseif RandomSummon == 4 then -- one of each, spawns at different doors than one above
        Unit:SpawnCreature(900063, 2616.333008, 5262.813477, 39.410072, 5.513389, 85, 120000)
        Unit:SpawnCreature(900064, 2643.458984, 5248.559570, 38.309711, 3.145407, 32, 120000)
    end
    end
    
    function HordeRaidEventSpawner_SpawnHordeCommander(Unit, Event)
      Unit:SpawnCreature(900065, 2643.458984, 5248.559570, 38.309711, 3.145407, 85, 120000)
    end
    
    function HordeRaidEventSpawner_OnDied(Unit, Event)
      Unit:RemoveEvents()
    end
    
    function HordeRaidEventSpawner_OnLeaveCombat(Unit, Event)
      Unit:RemoveEvents()
    end
    
    RegisterUnitEvent(900068, 1, "HordeRaidEventSpawner_OnCombat")
    RegisterUnitEvent(900068, 4, "HordeRaidEventSpawner_OnDied")
    RegisterUnitEvent(900068, 2, "HordeRaidEventSpawner_OnLeaveCombat")

    Gossip NPC which starts the event
    Code:
    function AllianceWarLeaderGOSSIPOn_Gossip(unit, event, player)
    unit:GossipCreateMenu(50, player, 0)
    unit:GossipMenuAddItem(0, "I'm ready to help defend against the Horde.", 1, 0)
    unit:GossipMenuAddItem(0, "Uhh, never mind...", 2, 0)
    unit:GossipSendMenu(player)
    end
    
    function AllianceWarLeaderGOSSIPGossip_Submenus(unit, event, player, id, intid, code)
    
    if(intid == 1) then
    unit:GossipCreateMenu(58, player, 0)
    unit:SendChatMessage(14, 0, "Here they come!")
    unit:Despawn(1000, 0)
    unit:SpawnCreature(900067, 2623.929, 5249.411, 38.3, .73, 12, 0) --combat unit to help player
    unit:SpawnCreature(900068, 2623.929, 5249.411, 38.3, .73, 85, 120000) --invisible spawner unit that will spawn the adds
    end
    
    
    if(intid ==2) then
    unit:GossipComplete()
    unit:SendChatMessage(14, 0, "Bastard.")
    end
    end
    
    RegisterUnitGossipEvent(900066, 1, "AllianceWarLeaderGOSSIPOn_Gossip")
    RegisterUnitGossipEvent(900066, 2, "AllianceWarLeaderGOSSIPGossip_Submenus")
    Walking Bomb [Usually crashes once ascend to the heavens is casted, but varies]

    Code:
    function WalkingBomb_OnLoad(Unit, Event)
      Unit:CreateWaypoint(2624.588867, 5250.187500, 38.292435, 3.83, 300, 0, 0)
      Unit:MoveToWaypoint(1)
      end
    
      function WalkingBomb_OnReachWaypoint(Unit, Event)
      Unit:FullCastSpell(64487) --ascend to the heavens
      Unit:RegisterEvent("WalkingBomb_DespawnSpecial", 2500, 1)
      end
        
    function WalkingBomb_DespawnSpecial(Unit, Event)
      Unit:Despawn(300, 0)
      Unit:RemoveEvents()
      end
      
    function WalkingBomb_OnDied(Unit, Event)
      Unit:RemoveEvents()
      Unit:Despawn(1500, 0)
    end
    
    function WalkingBomb_OnLeaveCombat(Unit, Event)
      Unit:Despawn(8000, 0)
      Unit:RemoveEvents()
    end
    RegisterUnitEvent(900064, 19, "WalkingBomb_OnReachWaypoint")
    RegisterUnitEvent(900064, 18, "WalkingBomb_OnLoad")
    RegisterUnitEvent(900064, 4, "WalkingBomb_OnDied")
    RegisterUnitEvent(900064, 2, "WalkingBomb_OnLeaveCombat")
    I really appreciate any helpful comments!

    Long Script Crashes world.exe
  2. #2
    Terrorblade's Avatar Contributor I spent 5k CC and all I got was this user title
    CoreCoins Purchaser
    Reputation
    153
    Join Date
    Oct 2010
    Posts
    312
    Thanks G/R
    6/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it helps if you post the crash dump information.
    Stuff & Things

  3. #3
    choweyiii's Avatar Contributor
    Reputation
    91
    Join Date
    Aug 2010
    Posts
    127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It actually didn't create a dmp file as previous crashes did.

  4. #4
    Terrorblade's Avatar Contributor I spent 5k CC and all I got was this user title
    CoreCoins Purchaser
    Reputation
    153
    Join Date
    Oct 2010
    Posts
    312
    Thanks G/R
    6/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    compile in debug mode.
    Stuff & Things

  5. #5
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Terrorblade View Post
    compile in debug mode.
    ^
    Two easy ways to solve this, read crash dump when compiled in debug mode or to follow the code line by line, printing as each method is called.

Similar Threads

  1. Need help with crashing world.exe
    By Edude in forum WoW EMU Questions & Requests
    Replies: 9
    Last Post: 08-02-2009, 02:55 AM
  2. Achievements are crashing World.exe
    By xiaoset in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 05-17-2009, 08:58 AM
  3. [Help] Waypoints > Crashing World.exe
    By Zudrik in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 02-22-2009, 07:12 PM
  4. arcemu-world.exe crashes -.-
    By worldslayer in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 01-31-2009, 09:02 PM
  5. [Problem] Ascent-World.exe Crash
    By pewor in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 04-20-2008, 03:15 PM
All times are GMT -5. The time now is 02:22 AM. 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