[C++] Reputation NPC (With WotLK Factions) menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    diegoaossas's Avatar Member
    Reputation
    16
    Join Date
    Aug 2008
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [C++] Reputation NPC (With WotLK Factions)

    Well, here I leave this small contribution, I decided to upgrade a Reputation NPC for including WotLK factions. I hope you enjoy

    Download LUA NPC Here:
    Filebeam - Beam up that File Scottie!


    Reputation.cpp

    since the code is a bit extense : Reputation.cpp [pastebin]

    Setup.cpp
    Code:
    extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
    {
    	SetupReputationNPC(mgr);
    }
    Setup.h
    Code:
    void SetupReputationNPC(ScriptMgr * mgr);
    SQL:
    Code:
    /*
    SQLyog Enterprise - MySQL GUI
    MySQL - 5.1.37 
    *********************************************************************
    */
    /*!40101 SET NAMES utf8 */;
    
    insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`) values('987651','Reputation NPC','','','1','7','0','0','0','0','28092','28093','28094','28095','4','4','0','0');
    insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`, `isTrainingDummy`, `guardtype`) values('987651','1','1','35','1','1','0','1','1','2000','0','1','1','0','0','1','1','10','0','0','0','0','0','0','0','1','1','','1','0','0','0','2.5','8','14','0','0','0','0','0','0','0','0','0');
    Last edited by diegoaossas; 09-11-2009 at 09:40 PM. Reason: Code Updated

    [C++] Reputation NPC (With WotLK Factions)
  2. #2
    rysliv's Avatar Member
    Reputation
    1
    Join Date
    Oct 2007
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can you convert it to lua also

  3. #3
    diegoaossas's Avatar Member
    Reputation
    16
    Join Date
    Aug 2008
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorry friend but I couldn't find the lua command to set the factions in the player.
    If someone knows the command for this, please let me know.

  4. #4
    mmhelm's Avatar Member
    Reputation
    25
    Join Date
    Aug 2007
    Posts
    147
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unit:SetFaction <faction ID> <Amount>

    I believe.... just skimming over the lua engine

  5. #5
    diegoaossas's Avatar Member
    Reputation
    16
    Join Date
    Aug 2008
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    after a few hours I managed to make the Reputation NPC in LUA.

    @Mmhelm: friend, the correct command was "player:SetStanding(FactionID, amount)" thanks anyway

  6. #6
    Dynashock's Avatar Contributor

    Reputation
    176
    Join Date
    Nov 2007
    Posts
    203
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looks good from what I can see. I have no use for it but I think some funservers may. Good job!

  7. #7
    Moaradin's Avatar Contributor
    Reputation
    163
    Join Date
    Feb 2008
    Posts
    439
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice Contrib. +Repx3

    +rep people who help you

  8. #8
    marms-08's Avatar Member
    Reputation
    1
    Join Date
    May 2008
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey this is great but i cant put it into my server without the sql file +rep

  9. #9
    mmhelm's Avatar Member
    Reputation
    25
    Join Date
    Aug 2007
    Posts
    147
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by diegoaossas View Post
    after a few hours I managed to make the Reputation NPC in LUA.

    @Mmhelm: friend, the correct command was "player:SetStanding(FactionID, amount)" thanks anyway

    Yeah, I looked at an older version of ascent's LUA commands. ac-web fails.
    I should of just cracked open my rep npc and seen it right away. Cant remember what was going on that day.
    Last edited by mmhelm; 08-11-2009 at 12:40 PM.

  10. #10
    diegoaossas's Avatar Member
    Reputation
    16
    Join Date
    Aug 2008
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thx, I added the SQL code, check the first post

  11. #11
    marms-08's Avatar Member
    Reputation
    1
    Join Date
    May 2008
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by diegoaossas View Post
    Thx, I added the SQL code, check the first post
    thanks alot for the sql +Rep

    but you made a small error the sql is wrong the proper spawn id according to the script is

    987650 thats why it wasnt working for me you may want to change it
    Last edited by marms-08; 08-16-2009 at 07:28 PM. Reason: problem found

  12. #12
    hypershadow's Avatar Member
    Reputation
    2
    Join Date
    Jul 2006
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When I try to use the Rep Guy and click on the Faction it crashes my server ><
    anyone else experience(d) this problem?

  13. #13
    diegoaossas's Avatar Member
    Reputation
    16
    Join Date
    Aug 2008
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by hypershadow View Post
    When I try to use the Rep Guy and click on the Faction it crashes my server ><
    anyone else experience(d) this problem?
    I really dont know why it crashes your server but it works great for me, anyways i will check the code right now, by the way you tried cleaning the solution and then compile it again? it may works.

  14. #14
    Sounddead's Avatar Contributor
    Reputation
    160
    Join Date
    Sep 2007
    Posts
    1,126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One thing;
    if(Plr->getRace()== 10||Plr->getRace()== 2||Plr->getRace()== 6||Plr->getRace()== 8||Plr->getRace()== 5)
    A simpler way to achieve the same result would be instead of checking each race, just get the players team (or faction).

    Plr->GetTeam();
    It returns either a 1 or a 0.


    EDIT: Oh yeah, and good job on releasing a C++ script instead of Lua. Props, and +rep.

    I live in a shoe

  15. #15
    diegoaossas's Avatar Member
    Reputation
    16
    Join Date
    Aug 2008
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Sounddead View Post
    One thing;


    A simpler way to achieve the same result would be instead of checking each race, just get the players team (or faction).

    Plr->GetTeam();
    It returns either a 1 or a 0.


    EDIT: Oh yeah, and good job on releasing a C++ script instead of Lua. Props, and +rep.
    thanks a lot I updated the code with Plr->GetTeam()

Page 1 of 2 12 LastLast

Similar Threads

  1. [Guide] Pushing Reputation with all Factions at the same time
    By mrnice in forum World of Warcraft Guides
    Replies: 14
    Last Post: 10-02-2012, 09:47 PM
  2. How to speak with opposite factions
    By Dignox in forum World of Warcraft Exploits
    Replies: 24
    Last Post: 12-14-2007, 10:17 PM
  3. Don't communicate with opposite faction.
    By Maq- in forum World of Warcraft Guides
    Replies: 34
    Last Post: 09-24-2007, 09:11 AM
  4. Screw with your Faction!
    By ynnuf in forum World of Warcraft Exploits
    Replies: 25
    Last Post: 06-12-2007, 09:41 PM
  5. Killing friendly npcs with no faction.
    By Acdcfreak in forum World of Warcraft Exploits
    Replies: 10
    Last Post: 11-29-2006, 10:27 AM
All times are GMT -5. The time now is 06:59 AM. 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