[C++]  Help! :) menu

Shout-Out

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Dr. Livingstone's Avatar Member
    Reputation
    113
    Join Date
    Mar 2008
    Posts
    290
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [C++] Help! :)

    I've been working on this reputation NPC. Which I released, but now I want to make it cost an item. Not gold. So lets say I wanted to make it cost 5 items with the intid of 558801... What would I do? Like what would the script look like? This would be a huge help to me, and +Rep if you can help me out.

    [C++]  Help! :)
  2. #2
    Sonic Waffle's Avatar Contributor
    Reputation
    170
    Join Date
    Dec 2007
    Posts
    990
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make it use a quest to get the requirements. Its way more handy...


  3. #3
    Dr. Livingstone's Avatar Member
    Reputation
    113
    Join Date
    Mar 2008
    Posts
    290
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm... Could you explain more? I was hoping for something people wouldn't have to talk to the NPC twice. Once to get the quest and once to turn in. So I thought this would be better...

  4. #4
    Sonic Waffle's Avatar Contributor
    Reputation
    170
    Join Date
    Dec 2007
    Posts
    990
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well this is the simpliest solution I know of... Unless you know how to code C++ or Lua...
    Wait a little bit longer and see if anyone has got a better idea, but this is best imo.


  5. #5
    Dr. Livingstone's Avatar Member
    Reputation
    113
    Join Date
    Mar 2008
    Posts
    290
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright. +Rep for helping me out I'm open to other thoughts too

  6. #6
    Aznex's Avatar Contributor
    Reputation
    128
    Join Date
    Feb 2008
    Posts
    770
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    something like

    if(Plr->GetItemInterface()->GetItemCount(ItemID, Amount))
    Plr->SetStanding(Faction, Amount);}
    Plr->GetItemInterface()->RemoveItemAmt(ItemID, Amount);

  7. #7
    Kalash47's Avatar Member
    Reputation
    12
    Join Date
    Oct 2008
    Posts
    61
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by jman9368 View Post
    I've been working on this reputation NPC. Which I released, but now I want to make it cost an item. Not gold. So lets say I wanted to make it cost 5 items with the intid of 558801... What would I do? Like what would the script look like? This would be a huge help to me, and +Rep if you can help me out.
    If this is from a quest, then what you should do is make it multiple quests (for reputations).

    There should be, in the DB, and Item Requirement column (look up other quests that have you submit items to the quest giver).

    In that item requirement column add an ID of the item, and there should be a related "count" column which allows for you to add how much of that item is necessary to complete the quest.

    Upon quest completion there should also be a column for rewarding reputation.

    A reputation NPC needn't be coded in C++, it can be done straight from the DB.

    I know this for a FACT with MaNGOS, but it should be in ArcEmu as well.

  8. #8
    Aznex's Avatar Contributor
    Reputation
    128
    Join Date
    Feb 2008
    Posts
    770
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think he's trying to maximize his C++ Skills, thats why he's doing it this way

  9. #9
    Dr. Livingstone's Avatar Member
    Reputation
    113
    Join Date
    Mar 2008
    Posts
    290
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Aznex is right Trying to figure out more C++. And I'm hoping to make something that looks different than what most servers/repacks have for reputation. Gotta spread before I can give you rep Aznex

  10. #10
    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)
    Exactly. Hes not asking people for alternative ways to do it. Hes asking how he can do it in C++. And Aznex is right. Something along those lines.

    I live in a shoe

  11. #11
    Kalash47's Avatar Member
    Reputation
    12
    Join Date
    Oct 2008
    Posts
    61
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Aznex View Post
    I think he's trying to maximize his C++ Skills, thats why he's doing it this way
    Originally Posted by jman9368 View Post
    Aznex is right Trying to figure out more C++. And I'm hoping to make something that looks different than what most servers/repacks have for reputation. Gotta spread before I can give you rep Aznex
    Well you need to keep in mind a good practice in programming. Don't do it one way if there's a faster and easier solution. Find a more challenging project in C++ rather than reinventing the wheel, because you won't be learning much rather than doing it another way.

  12. #12
    Dr. Livingstone's Avatar Member
    Reputation
    113
    Join Date
    Mar 2008
    Posts
    290
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright. I've just been trying to get a grasp of C++ when it comes to these emus. Trying to learn as much as I can. Thanks for the advise +Rep

  13. #13
    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)
    You always gotta start somewhere Kalash. You can't just start tackling big projects if you don't even know what your doing. Starting small and working your way up is how people learn

    I live in a shoe

  14. #14
    Kalash47's Avatar Member
    Reputation
    12
    Join Date
    Oct 2008
    Posts
    61
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by jman9368 View Post
    Alright. I've just been trying to get a grasp of C++ when it comes to these emus. Trying to learn as much as I can. Thanks for the advise +Rep
    Originally Posted by Sounddead View Post
    You always gotta start somewhere Kalash. You can't just start tackling big projects if you don't even know what your doing. Starting small and working your way up is how people learn
    I understand what your saying but even something like this is trivial. It's like a 4th chapter in every common book, calling functions. You give some arguments functions, and you're done.

    If you were doing a function from scratch and doing all the insides & outs, that'd be neat and I'd absolutely encourage for you to do it in C++, but all you are doing is calling implementation.

    Little correct in Aznex code, because according to function definition:
    Code:
    	uint32 GetItemCount(uint32 itemid, bool IncBank = false);
    There is no "amount argument" it just returns how many of "this" items you have. So that's why we say if it's equal to 5 then blah blah.
    Code:
    if (Plr->GetItemInterface()->GetItemCount(ItemID, false) == Amount)
    {
            // Aznex's code
    	Plr->SetStanding(Faction, Amount);}
    	Plr->GetItemInterface()->RemoveItemAmt(ItemID, Amount); 
    }
    else
    {
    	Plr->BroadcastMessage("Error: Items not found in inventory");
    }
    Last edited by Kalash47; 10-28-2008 at 09:09 PM.

  15. #15
    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)
    I totally understand your point. Just doesn't seem like hes reading/read a book :P

    I live in a shoe

Page 1 of 2 12 LastLast

Similar Threads

  1. Help WoW Fish-Bot
    By Eliteplague in forum World of Warcraft General
    Replies: 2
    Last Post: 12-10-2024, 05:46 PM
  2. HELP: Gold Scam Exploit
    By GoldDragon in forum World of Warcraft General
    Replies: 11
    Last Post: 01-23-2007, 07:26 PM
  3. Banner Ad Redesign help
    By Matt in forum Community Chat
    Replies: 57
    Last Post: 07-08-2006, 08:40 PM
  4. Hit points and talent points? Please help
    By hankusdankus in forum World of Warcraft General
    Replies: 6
    Last Post: 05-04-2006, 02:00 PM
  5. bot help
    By xwhitedeathx in forum World of Warcraft General
    Replies: 3
    Last Post: 05-01-2006, 03:50 AM
All times are GMT -5. The time now is 01:06 PM. 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