[GuaEngine][AddOn] Extra Useful LUA Functions menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Claiver's Avatar Member
    Reputation
    138
    Join Date
    Mar 2009
    Posts
    217
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [GuaEngine][AddOn] Extra Useful LUA Functions

    Warning!
    This is an AddOn to the LUA functions library based on the GuaEngine. This means you will have to use the GuaEngine in order to use these additions. These additions are made by Claiver, and were able to me made thanks to GastricPenguin, the creator of the GuaEngine. This thread will be updated quite frequently. Some functions may be directly implemented into the core, meaning they won't be necessary into the AddOn. However, more functions will be added over time.

    __[ GuaAddon ]__
    The Addition to the GuaEngine

    Current Features
    Arguments in this color are required.
    Arguments in this color are optional.



    SendMail(Player, Subject, Message, Gold, Item, ItemCount)
    For your message you can currently use the following variables:
    $N will Print the Player's Name.
    $C will Print the Player's Class.
    $G will Print the Player's Gold.
    $R will Print the Player's Race.
    [Example]
    Code:
    SendMail(Player, "Welcome!","Hello $N, we have seen you are a great $R $C, and would like to welcome you to our server. You currently have $G gold. We will give you 6 gold.",6)


    CheckCombat(Player, IncombatMessage)
    This function will return 'true' when the player is not in combat. If the player is in combat, it will display the IncombatMessage.
    [Example]
    Code:
    if (CheckCombat(Player,"You are in Combat!") == true) then 
    	print("You are not in combat!") 
    end



    DebugPrint(Message)
    This function will print Message to console when GA_DEBUG is set to 'true' in the GuaAddonSettings.conf. (GA_DEBUG = true)
    So instead of
    Code:
    if (DEBUG == true) then 
    	print("[DEBUG] Spawned Creature.")
    end
    > Will output:
    > [DEBUG] Spawned Creature.
    You will have:
    [Example]
    Code:
    DebugPrint("Spawned Creature")
    > Will output:
    > [DEBUG] Spawned Creature.



    Download
    I hope to have a SVN ready for this soon, to make it easier for you. But for now I have to stick to a download, and posted the whole script in CODE format for you too, to preview.

    CLICK HERE TO DOWNLOAD

    or create the files yourself:

    SCRIPTS/[GuaEngine].LUA
    Code:
    --#####################################################################################################################
    --## 	SETTINGS																									###	
    --## 		   																										###
    			GuaAddonSettings_Folder = "configs"
    			GuaAddonSettings_File = "[GuaAddon] Settings.LUA"
    --## 		   																										###			
    --#####################################################################################################################
    --## 		   						#####							!	READ THIS	!								###	
    --## 		- GuaAddon -			#####																			###	
    --## 	   GUAENGINE ADDON			#####	This script is intended to add extra funtionality to the GuaEngine.		###
    --## 					 			#####	I, Claiver, want every function to function as intended. Sometimes 		###
    --##--------------------------------#####	bugs may occur. Therefor it is strictly recommended to report any 		###
    --##  GuaEngine by GastricPenguin 	#####	possible bugs found to Claiver @ MMOWNED, and ask questions if any.		###
    --## 		©Copywrite 2009	 		#####		- Claiver															###
    --## 		   						#####																			###
    --#####################################################################################################################
    												ADDON_VERSION = "1.0BETA"
    --[[#################################################################################################################]]
    
    
    --------------------------------------------------------------------------------------|
    --\	[Function] SendMail(Player)
    --------------------------------------------------------------------------------------|
    	function SendMail(_P,_Subject,_Message,_Gold,_Item,_ItemCount)
    		if (_P ~= nil) then
    			if (_Gold == nil) then _Gold = 0 else _Gold=_Gold*10000 end
    			if (_Item == nil) then _Item = 0 end
    			if (_ItemCount == nil) then _ItemCount = 1 end
    			if (_Message == nil) then _Message = "Missing Message for $N" end
    			if (_Subject == nil) then _Subject = "Message to ".._P:GetName() end
    				GRace = _P:GetPlayerRace()
    				if (GRace == 1) then  PRace = "Human" end							
    				if (GRace == 2) then  PRace = "Orc" end	
    				if (GRace == 3) then  PRace = "Dwarf" end
    				if (GRace == 4) then  PRace = "NightElf" end
    				if (GRace == 5) then  PRace = "Undead" end
    				if (GRace == 6) then  PRace = "Tauren" end
    				if (GRace == 7) then  PRace = "Gnome" end
    				if (GRace == 8) then  PRace = "Troll" end
    				if (GRace == 10) then  PRace = "Blood Elf" end
    				if (GRace == 11) then  PRace = "Draenei" end 
    			_Message = string.gsub(_Message,"$N",_P:GetName())
    			_Message = string.gsub(_Message,"$C",_P:GetPlayerClass())
    			_Message = string.gsub(_Message,"$G",string.sub(string.format("%s",_P:GetMoney()/10000),1,string.find(string.format("%s",_P:GetMoney()/10000),"%.",1)-1))
    			_Message = string.gsub(_Message,"$R",PRace)
    			Execute(1, "INSERT INTO mailbox_insert_queue (`sender_guid`, `receiver_guid`, `subject`, `body`, `stationary`, `money`, `item_id`, `item_stack`) VALUES (".._P:GetLowGUID()..", ".._P:GetLowGUID()..", '".. _Subject .."', '".. _Message .."', 41, ".. _Gold ..", ".. _Item ..",".. _ItemCount ..");")
    		end 
    	end
    --------------------------------------------------------------------------------------|	
    --\	[Function] CheckCombat
    --------------------------------------------------------------------------------------|	
    	function CheckCombat(_P,_EMSG)
    		if (_P:IsInCombat()==true) then 
    			if (_EMSG ~= nil) then _P:SendAreaTriggerMessage("[ ".. _EMSG .." ]") end
    			return false elseif (_P:IsInCombat()==false) then return true else return true 
    		end
    	end
    --------------------------------------------------------------------------------------|		
    --\	[Function] LoadConfig
    --------------------------------------------------------------------------------------|
    	function LoadConfig(_folder,_conf)
    		dofile(_folder .."/".. _conf)
    	end LoadConfig(GuaAddonSettings_Folder,GuaAddonSettings_File)	
    --------------------------------------------------------------------------------------|
    --\	[Function] DebugPrint
    --------------------------------------------------------------------------------------|		
    	function DebugPrint(_d)
    		if (string.upper(GA_DEBUG) == "ENABLED") then 
    			if (CheckValue(_d) == true) then print("[DEBUG] ".. string.format("%s",_d) ..".") end
    		end 
    	end	
    --------------------------------------------------------------------------------------|	
    --\	[Function] PrintGAInfo
    --------------------------------------------------------------------------------------|		
    	function PrintGAInfo()
    		print("\n------------------------------------------------------------------------------")
    		print("\tLoaded GuaAddon version "..ADDON_VERSION.." \n\t'The Addition to GuaEngine' by Claiver")
    		print("------------------------------------------------------------------------------\n")
    	end	PrintGAInfo()

    CONFIGS/[GuaAddon] Settings.LUA

    Code:
    --#########################################################################################################################
    --## 		   							#####							!	READ THIS	!								###	
    --## 		  - GuaAddon -				#####																			###	
    --## 	   	GUAENGINE ADDON				#####	This script is intended to add extra funtionality to the GuaEngine.		###
    --## 					 				#####	I, Claiver, want every function to function as intended. Sometimes 		###
    --##------------------------------------#####	bugs may occur. Therefor it is strictly recommended to report any 		###
    --##  	  GuaEngine by GastricPenguin 	#####	possible bugs found to Claiver @ MMOWNED, and ask questions if any.		###
    --## 		  ©Copywrite 2009	 		#####		- Claiver															###
    --## 		   							#####																			###
    --#########################################################################################################################
    											ADDON_VERSION = "1.0BETA"
    --#########################################################################################################################
    
    
    	--|#######################################################
    	--|  	
    	--|  GA_DEBUG	
    	--|		Enable or Disable Debugging. (Enabled/Disabled)
    	--|		Default: Disabled
    	--|
    	--|#######################################################
    		GA_DEBUG = "Enabled"
    Greetings Claiver!

    [GuaEngine][AddOn] Extra Useful LUA Functions
  2. #2
    2dgreengiant's Avatar ★ Elder ★


    Reputation
    1190
    Join Date
    Feb 2007
    Posts
    7,129
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome! +rep if i can tbh
    If you need me you have my skype, if you don't have my skype then you don't need me.

  3. #3
    Claiver's Avatar Member
    Reputation
    138
    Join Date
    Mar 2009
    Posts
    217
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Will add some Example here soon.
    -RESERVED-

  4. #4
    Jotox's Avatar Contributor
    Reputation
    250
    Join Date
    Mar 2008
    Posts
    282
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Interesting. I like your style of LUA coding, you're very concrete, and slightly C++-like.

  5. #5
    Choices's Avatar Member
    Reputation
    94
    Join Date
    Apr 2008
    Posts
    231
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very Nice Claiver. +Rep

    Edit: Gotta spread

  6. #6
    Flake0207's Avatar Active Member
    Reputation
    30
    Join Date
    Apr 2008
    Posts
    221
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    intresting for the servers who dont have the talent system working say fun servers have it give more than gold such as spells/talent points and somthing to look into vip set up of this

    +Rep
    +Rep




  7. #7
    LaAevie's Avatar Member
    Reputation
    85
    Join Date
    Mar 2008
    Posts
    143
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Love these extra's Claiver. Keep up these awesome LUA Addon's, I think I should pickup GLua, but Gastric no loves me.

    Haha.
    Last edited by LaAevie; 05-05-2009 at 08:34 PM.
    <3

  8. #8
    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)
    Originally Posted by N2Dark View Post
    Love these extra's Claiver. Keep up these awesome LUA Addon's, I think I should pickup GLua, but Gastric no loves me.

    Haha.

    Since when? D:
    Life Puzzler WoW - Website | Forums

  9. #9
    LaAevie's Avatar Member
    Reputation
    85
    Join Date
    Mar 2008
    Posts
    143
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Since HSWoW...I think?

    Add's my MSN me want's to talk to you again. [email protected]
    <3

  10. #10
    Vindicated's Avatar Contributor
    Reputation
    226
    Join Date
    Aug 2008
    Posts
    1,067
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need a TOC file :O

    +Rape nonetheless


  11. #11
    Claiver's Avatar Member
    Reputation
    138
    Join Date
    Mar 2009
    Posts
    217
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Vindicated View Post
    You need a TOC file :O

    +Rape nonetheless
    Thank you .
    You mean.. Theory of Contraints (TOC) ?


    Claiver

  12. #12
    Cardell's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    68
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome Release, this will help my LUA Scripters

  13. #13
    Vindicated's Avatar Contributor
    Reputation
    226
    Join Date
    Aug 2008
    Posts
    1,067
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


  14. #14
    Claiver's Avatar Member
    Reputation
    138
    Join Date
    Mar 2009
    Posts
    217
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Vindicated View Post
    Haha XD. Well, this ain't a WoW addOn !

  15. #15
    Scubast3ve's Avatar Member
    Reputation
    55
    Join Date
    Apr 2009
    Posts
    125
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow lol... ummmm i thought this would be in c++, not quite what i expected.

    But still i see that you are thinking of things people might want. The only real feature i saw people wanting may have been the mail sender and even then i would like to see some of the implementations. Just wondering by any chance is it using that GUA dbquery?
    Don't Forget To Give Rep To People Who Help You.

Page 1 of 2 12 LastLast

Similar Threads

  1. Is it safe to use Lua DoString function now?
    By codedemen in forum WoW Memory Editing
    Replies: 10
    Last Post: 05-19-2015, 12:09 AM
  2. Use return value from a lua function as a PE condition
    By Filint in forum PE Support forum
    Replies: 3
    Last Post: 11-23-2014, 09:23 PM
  3. [Guide] Some Useful Player Functions in Lua
    By Hadesminion13 in forum WoW EMU Guides & Tutorials
    Replies: 2
    Last Post: 08-03-2010, 02:31 AM
  4. [Guide] How to use local LUA function!
    By Dartignan in forum WoW EMU Guides & Tutorials
    Replies: 0
    Last Post: 08-05-2008, 09:28 PM
  5. Popular Addons for use with Glider Last Updated Dec13
    By AlMoBdE3 in forum WoW UI, Macros and Talent Specs
    Replies: 0
    Last Post: 07-31-2007, 04:12 AM
All times are GMT -5. The time now is 09:42 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