Jump to content

slp13at420

Members
  • Posts

    22
  • Joined

  • Last visited

  • Days Won

    3
  • Donations

    0.00 GBP 

Posts posted by slp13at420

  1. Grumbo'z

    Hyper-Dynamic

    Pan-Dimensional

    Quantum

    Teleporter

     

    Now available - A teleporter script that can be used for any Mangos build.

                      No longer do you need to spend hours searching forums

                      for a tele script for a your specific build.             

     

    No longer do you need to edit throughout the script removing bad locations and adding new entries for use on a different server build.

    Just add any new Menu/Entry to the table and go slap it on all of your builds.

    the table has entries that allow parsing for team requirement (ally/horde/both/gm), minimum level requirement, plus min/max build it will support.

    So now your teleporter will control who can see the map by team, level, and expansion limiting.

     

    PLUS 

    operates by a handy dandy pocket stone.

     

    Default Menu and Entries expansion support:

    Drums of War 5875

    The Burning Crusades 8606

    Wrath of the Lich King 12340

    Cataclysm 15595

     

    GitHub Link

     

    Another

    masterpiece

    from the

    Mad Scientist

     

     

     

  2. ok i made you an example using a simple 2D table to store the buff id's.

     

    local command = "buff"; -- here we define "command" as local variable with a string value of "buff". I defined it as a `local` outside any functions so it is localized to this Lua file only.
    local buff = {}; -- here i define the variable `buff` as an empty table (Without data).again i have defined it as a local outside any functions so it is localized to this Lua file only.
    
    buff = {48074,35912,38734,65075,65077,43223,15366,36880,36880,16609,48073,48469,26035}; -- Here I will now store data in the table named `buff`. each id separated by a comma. each spot will be a unique address piece(1,2,3,4,5,6.....) accessed by using the full adress. so to puff a player with buff id '43223' i will use the command `player:AddAura(buff[6], player)` and the player will get buffed with 43223.
    
    	
    function buff(event, player, message, Type, lang)
    
    	if(message:lower() == command)then -- here we chech every chat message (converting it to `lower`case) to see if it matches absolute(==) the string stored in the variable `command`.
    		
    		local entry_id; -- here i am defining a variable i will use ONLY inside this function so when its local inside a function it will be localized to only that function and you can make a new variable inside another function using the same name but different stored data.
    		
    			for entry_id = 1, #buff do -- here i am starting a loop. telling it that entry_id will be from 1 to the max size of the `buff` table (#buff).
    
    				player:AddAura(buff[entry_id], player); -- now using the full address to pinpoint a location of stored data we will apply the data as a buff to the player.
    			end -- end for when our current loop is complete and increase entry_id +1 or if entry_id value is the max size for the loop then end and exit the loop.
    	
    		player:SendBroadcastMessage("You have been Buffed!")
    	end -- end for the end of our if statement.
    end -- end of function end.
    
    RegisterPlayerEvent(42, buff)

     

    • Like 2
  3. nice job newbie ;) 

    now lets see you learn how to take it from another newbie buff script and make it an advanced dynamic buff script. B|

    oooh like make it so it will buff each class with a group of different buffs or every 10 levels a player gains access to more buff id's... 

    Arrays/Tables are frak'n sooo easy in Lua once you understand how to store data and access the stored data when needed.  3d tables will be just an everyday thing :) 

    check out my buff command in my VIP System. its setup to issue players buff's depending on VIP level, guild member or if they have an item in inventory.

     

    When you stop learning you stop living ;)

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use