How can i revert this Lua script ? menu

User Tag List

Results 1 to 4 of 4
  1. #1
    Wheeze201's Avatar Active Member
    Reputation
    51
    Join Date
    Apr 2007
    Posts
    660
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How can i revert this Lua script ?

    Code:
    function MallSanctuary_OnSpawn(unit, event)
        unit:RegisterEvent("UnflagAll", 1000, 0);    
    end
    
    function UnflagAll(unit, event)
        local InRangePlayers = unit:GetInRangePlayers();
        
        for a, plr in pairs(InRangePlayers) do
            if plr:IsPvPFlagged() then plr:TogglePvPFlag(); end
            if plr:IsFFAPvPFlagged() then plr:ToggleFFAPvPFlag(); end
        end
    end
    
    RegisterUnitEvent(91909, 18, "MallSanctuary_OnSpawn");
    So i want this NPC not to deflag you but FLAG you as PvP.

    I just don't know how to do like "if plr:IsNotPvPFlagged".
    Need advice how to.

    How can i revert this Lua script ?
  2. #2
    The-Eradicator's Avatar Contributor

    Reputation
    149
    Join Date
    May 2007
    Posts
    829
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Wheeze201 View Post
    Code:
    function MallSanctuary_OnSpawn(unit, event)
        unit:RegisterEvent("UnflagAll", 1000, 0);    
    end
    
    function UnflagAll(unit, event)
        local InRangePlayers = unit:GetInRangePlayers();
        
        for a, plr in pairs(InRangePlayers) do
            if plr:IsPvPFlagged() then plr:TogglePvPFlag(); end
            if plr:IsFFAPvPFlagged() then plr:ToggleFFAPvPFlag(); end
        end
    end
    
    RegisterUnitEvent(91909, 18, "MallSanctuary_OnSpawn");
    So i want this NPC not to deflag you but FLAG you as PvP.

    I just don't know how to do like "if plr:IsNotPvPFlagged".
    Need advice how to.
    Not sure how it is with this, but with clientside Lua you use the not logical operator.

    Code:
    if not plr:IsPvPFlagged() then
         -- Do stuff
    end

  3. #3
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or

    Code:
    if plr:IsPvPFlagged() == false then
         -- Do stuff
    end

  4. #4
    Wheeze201's Avatar Active Member
    Reputation
    51
    Join Date
    Apr 2007
    Posts
    660
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Eradicator's advice worked.

    +rep for you Eradicator!

Similar Threads

  1. Replies: 22
    Last Post: 05-29-2008, 03:52 PM
  2. [helpzerz] What is wrong with this lua script?
    By w21froster in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 05-21-2008, 09:45 PM
  3. Whats wrong with this LUA Script?
    By controlsx2 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 05-20-2008, 03:03 PM
  4. Help with this LUA script
    By jordash in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 03-08-2008, 04:19 PM
  5. How to fix this LUA Script???
    By marcosgue in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-08-2008, 07:51 AM
All times are GMT -5. The time now is 11:11 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