script help menu

Shout-Out

User Tag List

Thread: script help

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    volitle's Avatar Contributor
    Reputation
    181
    Join Date
    Nov 2007
    Posts
    1,127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    script help

    ok what do i change in a pvptoken script so it drops a different item?

    http://www.mmowned.com/forums/emulat...r-own-dll.html

    /\ using that guide /\


    script help
  2. #2
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you have inserted something in your main config file. Like <Moon PvpTokenID="id">

  3. #3
    volitle's Avatar Contributor
    Reputation
    181
    Join Date
    Nov 2007
    Posts
    1,127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    its ok fixed it


  4. #4
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Allright :P

  5. #5
    Darksid's Avatar Member
    Reputation
    19
    Join Date
    Jun 2008
    Posts
    375
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey guys for some reason i get this any idea? http://i273.photobucket.com/albums/j...Untitled-1.jpg

  6. #6
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    post the token script please

  7. #7
    volitle's Avatar Contributor
    Reputation
    181
    Join Date
    Nov 2007
    Posts
    1,127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you aint put your revision in it i think


  8. #8
    Darksid's Avatar Member
    Reputation
    19
    Join Date
    Jun 2008
    Posts
    375
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    /*
    PvP Token Plug-in, this plug in will add a token of your choice to the killer of the opposite faction.
    Copyright (C) 2008 Plexor/zxc

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program. If not, see <http://www.gnu.org/licenses/>.
    Credits to NCDB for original Source
    Credits to me for modifying it
    */
    #include "StdAfx.h"
    #include "Setup.h"

    void onPvpKill(Player* plr, Player* victim)
    {
    int itemID;
    uint32 tokenItem = Config.MainConfig.GetInt("ascent_world", "70024", &itemID);

    sLog.outColor(TGREEN,"n[NCDB] (%u)%s killed (%u)%s", plr->getLevel(), plr->GetName(), victim->getLevel(), victim->GetName());
    char onkill[1024];
    snprintf((char*)onkill, 1024, "[PVP]%s has killed %s", plr->GetName(), victim->GetName());
    sWorld.SendWorldWideScreenText(onkill);

    if(plr->getLevel() >= 70 && victim->getLevel() >= 70 && plr->GetTeam() != victim->GetTeam())
    {
    sLog.outColor(TGREEN,"n[NCDB] Adding token to %s", plr->GetName());
    sLog.outColor(TNORMAL,"n");
    ItemPrototype *proto = ItemPrototypeStorage.LookupEntry(itemID);
    SlotResult slotresult;
    slotresult = plr->GetItemInterface()->FindFreeInventorySlot(proto);

    if(!slotresult.Result)
    {
    plr->GetItemInterface()->BuildInventoryChangeError(NULL, NULL, INV_ERR_INVENTORY_FULL);
    }
    else
    {
    Item *itm = objmgr.CreateItem(itemID, plr);
    itm->SetUInt32Value(ITEM_FIELD_STACK_COUNT, 1);
    plr->GetItemInterface()->SafeAddItem(itm,slotresult.ContainerSlot, slotresult.Slot);
    plr->SaveToDB(false);
    }
    }
    else
    {
    sLog.outColor(TGREEN,"n[NCDB] Not adding token since they both are not level 70");
    sLog.outColor(TNORMAL,"n");
    }
    }

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

  9. #9
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try change uint32 tokenItem = Config.MainConfig.GetInt("ascent_world", "70024", &itemID);
    to uint32 tokenItem = Config.MainConfig.GetInt("ascentworld", "70024", &itemID);
    if that doesent work then its your _exp_script_register, _exp_get_version, _exp_get_script_type. Said as your Setup.cpp and Setup.h, post them please.

  10. #10
    volitle's Avatar Contributor
    Reputation
    181
    Join Date
    Nov 2007
    Posts
    1,127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it wont be the ascent_world because that has to match your database doesnt it


  11. #11
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    _exp_script_register, _exp_get_version, _exp_get_script_type

  12. #12
    Darksid's Avatar Member
    Reputation
    19
    Join Date
    Jun 2008
    Posts
    375
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    #ifndef PvPToken_SETUP_H
    #define PvPToken_SETUP_H

    void SetupPvPToken(ScriptMgr * mgr);

    #endif



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


    extern "C" SCRIPT_DECL uint32 _exp_get_script_type()
    {
    return SCRIPT_TYPE_MISC;
    }

    extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
    {
    SetupPvPToken(mgr);

    }

    #ifdef WIN32

    BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
    {
    return TRUE;
    }

    #endif

    there you go

  13. #13
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in setup.cpp try add #include <ScriptSetup.h> in the top, if it still dont work, then it must be the StdAfx.h

  14. #14
    Darksid's Avatar Member
    Reputation
    19
    Join Date
    Jun 2008
    Posts
    375
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    idk what you mean....

  15. #15
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    like this Setup.cpp
    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    
    #include <ScriptSetup.h>
    
    extern "C" SCRIPT_DECL uint32 _exp_get_script_type()
    {
    	return SCRIPT_TYPE_MISC;
    }
    
    extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
    {
    		SetupPvpToken(mgr);
    }
    
    #ifdef WIN32
    
    BOOL APIENTRY DllMain( HANDLE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved )
    {
        return TRUE;
    }
    
    #endif

Page 1 of 2 12 LastLast

Similar Threads

  1. Lua script help and general questions from beginner
    By WinKIller0 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 02-23-2008, 04:38 AM
  2. LUA Boss Script Help
    By neurothymia in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 02-05-2008, 02:57 PM
  3. Need LUA Scripting Help ?
    By Snailz in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 02-04-2008, 12:36 PM
  4. Scripting help please will +rep need for a new server
    By runiker in forum WoW EMU Guides & Tutorials
    Replies: 0
    Last Post: 01-22-2008, 04:05 AM
  5. [Ascent] Boss Scripts help
    By n0t5ew in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 12-24-2007, 03:04 PM
All times are GMT -5. The time now is 09:19 AM. 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