Need some help. menu

Shout-Out

User Tag List

Results 1 to 5 of 5
  1. #1
    CynthiavDis's Avatar Private
    Reputation
    1
    Join Date
    Mar 2010
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need some help.

    Hello, ive been trying to get PvP tokens into my server, (whenever you kill an enemy player you will be rewarded with this) however it will just give me an error, I cant stand it ive been trying to fix this but no success, so now im asking you, could you help me solve this problem?

    Script:

    #include "StdAfx.h"
    #include "Setup.h"

    #define GOLD_AMOUNT 1000000 //it is in copper

    #define PVP_TOKEN 44115 //Put Your Token ID Here



    char message[200];
    sprintf(message, "|cff00ff00[World PvP]|r |cffff0000%s has killed %s...The hunt begins!|r", plr->GetName(), victim->GetName());
    sWorld.SendWorldWideScreenText(message);
    sLog.outColor(TRED,"\n[WPVP]: WPVP Activated - the killer was %s...The victim was %s.", plr->GetName(), victim->GetName());
    sLog.outColor(TNORMAL,"\n");
    int32 gold_check_p = plr->GetUInt32Value( PLAYER_FIELD_COINAGE );
    int32 gold_check_v = victim->GetUInt32Value( PLAYER_FIELD_COINAGE );
    int32 new_gold_p = gold_check_p + GOLD_AMOUNT;
    int32 new_gold_v;
    if(gold_check_v < GOLD_AMOUNT)
    {
    new_gold_v = 0;
    }
    else
    {

    int Chance = 20;
    int Generator = RandomUInt(100);

    if(Generator <= Chance)
    {
    plr->GetItemInterface()->SafeAddItem(PVP_TOKEN, INVENTORY_SLOT_NOT_SET, -1);
    Item * it = objmgr.CreateItem(PVP_TOKEN, plr);
    plr->GetItemInterface()->AddItemToFreeSlot(it);
    sLog.outColor(TGREEN,"[WPVP]: A Token was added for this kill to %s", plr->GetName());
    sLog.outColor(TNORMAL,"\n");
    }
    else
    {
    sLog.outColor(TYELLOW,"[WPVP]: A Token was not added to %s", plr->GetName());
    sLog.outColor(TNORMAL,"\n");
    }

    }
    }
    void SetupPvP(ScriptMgr * mgr)
    {
    mgr->register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, (void*)onPvpKill);
    }

    Ive have this in notepad, im opening this with HeidiSQL, my database. When I try to execute it, it will give me an error: http://img828.imageshack.us/img828/374/4584.png
    Whenever I remove those words what this error gives me, I keep getting more and more error's, is it me, am I stupid or is this just a messed up script?

    Thanks for your time, -Cynthia.

    Need some help.
  2. #2
    Maisteri's Avatar That spoiler guy
    Reputation
    441
    Join Date
    Aug 2007
    Posts
    893
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its c++(not sure?) not SQL.

  3. #3
    Reflection's Avatar Legendary
    Reputation
    783
    Join Date
    Mar 2008
    Posts
    3,377
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by CynthiavDis View Post
    Hello, ive been trying to get PvP tokens into my server, (whenever you kill an enemy player you will be rewarded with this) however it will just give me an error, I cant stand it ive been trying to fix this but no success, so now im asking you, could you help me solve this problem?

    Script:

    #include "StdAfx.h"
    #include "Setup.h"

    #define GOLD_AMOUNT 1000000 //it is in copper

    #define PVP_TOKEN 44115 //Put Your Token ID Here



    char message[200];
    sprintf(message, "|cff00ff00[World PvP]|r |cffff0000%s has killed %s...The hunt begins!|r", plr->GetName(), victim->GetName());
    sWorld.SendWorldWideScreenText(message);
    sLog.outColor(TRED,"\n[WPVP]: WPVP Activated - the killer was %s...The victim was %s.", plr->GetName(), victim->GetName());
    sLog.outColor(TNORMAL,"\n");
    int32 gold_check_p = plr->GetUInt32Value( PLAYER_FIELD_COINAGE );
    int32 gold_check_v = victim->GetUInt32Value( PLAYER_FIELD_COINAGE );
    int32 new_gold_p = gold_check_p + GOLD_AMOUNT;
    int32 new_gold_v;
    if(gold_check_v < GOLD_AMOUNT)
    {
    new_gold_v = 0;
    }
    else
    {

    int Chance = 20;
    int Generator = RandomUInt(100);

    if(Generator <= Chance)
    {
    plr->GetItemInterface()->SafeAddItem(PVP_TOKEN, INVENTORY_SLOT_NOT_SET, -1);
    Item * it = objmgr.CreateItem(PVP_TOKEN, plr);
    plr->GetItemInterface()->AddItemToFreeSlot(it);
    sLog.outColor(TGREEN,"[WPVP]: A Token was added for this kill to %s", plr->GetName());
    sLog.outColor(TNORMAL,"\n");
    }
    else
    {
    sLog.outColor(TYELLOW,"[WPVP]: A Token was not added to %s", plr->GetName());
    sLog.outColor(TNORMAL,"\n");
    }

    }
    }
    void SetupPvP(ScriptMgr * mgr)
    {
    mgr->register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, (void*)onPvpKill);
    }

    Ive have this in notepad, im opening this with HeidiSQL, my database. When I try to execute it, it will give me an error: http://img828.imageshack.us/img828/374/4584.png
    Whenever I remove those words what this error gives me, I keep getting more and more error's, is it me, am I stupid or is this just a messed up script?

    Thanks for your time, -Cynthia.
    That's not an SQL script at all and should not be executed, it's a c++/c# script.


    Freelance Digital Artist
    https://reflectionartwork.deviantart.com
    You did not desert me
    My brothers in arms


  4. #4
    CynthiavDis's Avatar Private
    Reputation
    1
    Join Date
    Mar 2010
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol, fail but ok thanks a lot, I never did any scripts but I dont know how to do something with C++ any of you have an tut? Thanks alot for your help

  5. #5
    Kiev's Avatar Contributor
    Reputation
    288
    Join Date
    Nov 2007
    Posts
    1,819
    Thanks G/R
    0/4
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is already a option for this within ArcEmu I believe... also, this is C++.

    Look in the guides section and it'll give you a idea, where ever you got the code from, must have instructions so look there.




Similar Threads

  1. Need some help =( fast!
    By Niko33 in forum Gaming Chat
    Replies: 4
    Last Post: 11-29-2006, 05:19 PM
  2. Need some help with fishing bot
    By ralphie123 in forum World of Warcraft Bots and Programs
    Replies: 3
    Last Post: 11-24-2006, 09:41 AM
  3. warrior head tier 2 --> tier 3 need some help please
    By katjenl in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 11-22-2006, 09:10 AM
  4. Need some help
    By _Shapes_ in forum World of Warcraft Model Editing
    Replies: 2
    Last Post: 11-11-2006, 02:18 PM
  5. NEED SOME HELP with Model Editing
    By Dwarf in forum World of Warcraft Model Editing
    Replies: 4
    Last Post: 09-12-2006, 08:12 PM
All times are GMT -5. The time now is 04:21 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