ArcEmu: [release] Lua Script For Exalting All Factions - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Labels

Make sure when posting a help or release topic you put [c++] or [lua] BEFORE your topic title!
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[release] Lua Script For Exalting All Factions

#1 User is offline   Godrick 

  • Newbie
  • Group: Members
  • Posts: 9
  • Joined: 07-May 12
  • Gender:Male
  • Location:United States
  • Server OS:Windows

Posted 20 May 2012 - 12:36 PM

Just a script i made thought someone might find it useful : )
This will make a character exalted with all factions so if you wanted to make a mall and add items with halted required not the way i do it but an easy way to do it

local NPCID = xxxxx
 
function Npc_Click(unit, event, player)
unit:GossipCreateMenu(101, player, 0)
unit:GossipMenuAddItem(0, "|cFF0000FFExhalt with all", 1, 0)
unit:GossipSendMenu(player)
end

function Npc_select(unit, event, player, id, intid, code)
 if(intid == 1) then 
 unit:GossipCreateMenu(101, player, 0)
 player:SetStanding(1156, 43000)
 
 --Neutral
 
player:SetStanding(529, 43000)
player:SetStanding(1012, 43000)
player:SetStanding(87, 43000)
player:SetStanding(21, 43000)
player:SetStanding(910, 43000)
player:SetStanding(609, 43000)
player:SetStanding(942, 43000)

player:SetStanding(909, 43000)
player:SetStanding(577, 43000)
player:SetStanding(369, 43000)
player:SetStanding(92, 43000)
player:SetStanding(749, 43000)
player:SetStanding(989, 43000)
player:SetStanding(1011, 43000)

player:SetStanding(93, 43000)
player:SetStanding(1015, 43000)
player:SetStanding(1038, 43000)
player:SetStanding(430, 43000)
player:SetStanding(349, 43000)
player:SetStanding(1031, 43000)
player:SetStanding(809, 43000)

player:SetStanding(970, 43000)
player:SetStanding(70, 43000)
player:SetStanding(932, 43000)
player:SetStanding(933, 43000)
player:SetStanding(990, 43000)
player:SetStanding(934, 43000)
player:SetStanding(935, 43000)

player:SetStanding(967, 43000)
player:SetStanding(59, 43000)
player:SetStanding(576, 43000)
player:SetStanding(922, 43000)
player:SetStanding(471, 43000)
player:SetStanding(589, 43000)
player:SetStanding(270, 43000)

player:SetStanding(1077, 43000)

--wotlk neutral

player:SetStanding(1106, 43000)
player:SetStanding(1104, 43000)
player:SetStanding(1090, 43000)
player:SetStanding(1098, 43000)
player:SetStanding(1073, 43000)
player:SetStanding(1105, 43000)

player:SetStanding(1119, 43000)
player:SetStanding(1091, 43000)

--Alliance

player:SetStanding(69, 43000)
player:SetStanding(930, 43000)
player:SetStanding(54, 43000)
player:SetStanding(946, 43000)
player:SetStanding(47, 43000)
player:SetStanding(890, 43000)
player:SetStanding(730, 43000)

player:SetStanding(72, 43000)
player:SetStanding(509, 43000)
player:SetStanding(978, 43000)

--wotlk alliance

player:SetStanding(1037, 43000)
player:SetStanding(1068, 43000)
player:SetStanding(1126, 43000)
player:SetStanding(1094, 43000)
player:SetStanding(1050, 43000)

--Horde

player:SetStanding(530, 43000)
player:SetStanding(729, 43000)
player:SetStanding(76, 43000)
player:SetStanding(911, 43000)
player:SetStanding(510, 43000)
player:SetStanding(81, 43000)
player:SetStanding(68, 43000)

player:SetStanding(889, 43000)
player:SetStanding(941, 43000)
player:SetStanding(947, 43000)

--wotlk horde

player:SetStanding(1052, 43000)
player:SetStanding(1067, 43000)
player:SetStanding(1124, 43000)
player:SetStanding(1064, 43000)
player:SetStanding(1085, 43000)

player:SendBroadcastMessage("You are now exhalted with all factions.") -- Message
player:GossipComplete()
end

 
end
 
RegisterUnitGossipEvent(xxxxx, 1,"Npc_Click")
RegisterUnitGossipEvent(xxxxx, 2,"Npc_select")

1

#2 User is offline   kenuvis 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 440
  • Joined: 27-July 08

Posted 21 May 2012 - 06:06 AM

there is a release forum, so if a mod see this, move it, please. (and delete this comment^^)

useful, I think.

doing it better:
" if(intid == 1) then ... end" is senceless, because this is the only one, the user can selected.

2nd "unit:GossipCreateMenu(101, player, 0)", maybe I dont understand something, but I think you do not need it, because you do not create a new gossip menu there.

and the last, I think:
do it with a table, its easier to read.
local factionTable = {21,23,25,....} 
...
for _,faction in ipairs(factionTable) do
player:SetStanding(faction, 43000)
end


i mean it already good. ^^

so, have a nice day.
kenuvis

0

#3 User is offline   Godrick 

  • Newbie
  • Group: Members
  • Posts: 9
  • Joined: 07-May 12
  • Gender:Male
  • Location:United States
  • Server OS:Windows

Posted 23 May 2012 - 11:19 AM

sorry for the wrong section

@ kenuvis

you could set it faction specific if you want i just made it for people running a fun server that want to put items in vendors that require rep
this is one way or you could do

UPDATE items
SET RequiredFaction = 0;
UPDATE items
SET RequiredFactionStanding = 0;

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users