ArcEmu  -> TrinityCore script conversion? menu

User Tag List

Results 1 to 1 of 1
  1. #1
    Enderox's Avatar Private
    Reputation
    1
    Join Date
    Aug 2012
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ArcEmu -> TrinityCore script conversion?

    Hey

    After i moved to Trinitycore, a few of my scripts wouldn't work.. and i've been trying to find a way to make them work so decided to come here and ask if people can do a conversion for me...

    -- VIP Only Gear

    Script

    Code:
    		// VIP ITEM STUFF
    		QueryResult * resultVipCheck = CharacterDatabase.Query("SELECT vip_level FROM logon.accounts WHERE acct='%u'", m_pOwner->GetSession()->GetAccountId());
    
    		QueryResult * resultItemCheck = WorldDatabase.Query("SELECT vip_lvl FROM vip_items WHERE itemid='%u'", proto->ItemId);
    
    		if(!resultItemCheck)
    		return false;
    
    		do
    			{
    				Field * VipCheck = resultVipCheck->Fetch(); // resulted vip level int
    				Field * ItemCheck = resultItemCheck->Fetch(); // resulted vip level required for item int
    		if(ItemCheck[0].GetUInt32() == ItemCheck[0].GetUInt32()) // if item has vip lvl
    		{
    			if(VipCheck[0].GetUInt32() == 0)
    				return INV_ERR_YOU_CAN_NEVER_USE_THAT_ITEM;
    			if(VipCheck[0].GetUInt32() == ItemCheck[0].GetUInt32())
    			{}
    			else
    				return INV_ERR_YOU_CAN_NEVER_USE_THAT_ITEM;
    		}
    		}while(resultItemCheck->NextRow());
    		// VIP ITEM STUFF
    SQL

    Code:
    DROP TABLE IF EXISTS `vip_items`;
    CREATE TABLE IF NOT EXISTS `vip_items` (
      `itemid` int(10) NOT NULL,
      `vip_lvl` int(10) DEFAULT '0',
      PRIMARY KEY (`itemid`),
      UNIQUE KEY `itemid` (`itemid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='The stored table for vip items';
    Whats supposed to happen?

    Items listed in the "vip_items" require somoneones account in "logon" (Arc) to have a "1" inside vip_level or they cannot equip the item
    - Need it to happen but the script to be converted to TrinityCore

    -- Custom Error message

    script

    Code:
    // VIP VENDOR STUFF
    	if((error = _player->GetItemInterface()->CanAffordItem(it, amount, unit)) != 0)
    	{
    		QueryResult * resultVendorString = WorldDatabase.Query("SELECT string FROM vip_vendors WHERE npc_id='%u'", unit->GetEntry());
    
    		QueryResult * resultSideString = WorldDatabase.Query("SELECT side FROM vip_vendors WHERE npc_id='%u'", unit->GetEntry());
    
    		if(!resultVendorString) 
    		{
    			_player->GetItemInterface()->BuildInventoryChangeError(NULL, NULL, error);
    			return;
    		}
    		else
    		{
    		Field * VendorString = resultVendorString->Fetch();
    
    		Field * SideString = resultSideString->Fetch();
    
    			if(SideString[0].GetUInt32() == 1) // if chatbox
    			{
    				_player->BroadcastMessage("%s", VendorString->GetString());
    			}
    			if(SideString[0].GetUInt32() == 2) // if area trigger
    			{
    				_player->SendAreaTriggerMessage("%s", VendorString->GetString());
    			}
    			if(SideString[0].GetUInt32() == 3) // if both sides
    			{
    				_player->BroadcastMessage("%s", VendorString->GetString());
    				_player->SendAreaTriggerMessage("%s", VendorString->GetString());
    			}
    
    		return;
    		}
    	}
    // VIP VENDOR STUFF
    SQL

    Code:
    DROP TABLE IF EXISTS `vip_vendors`;
    CREATE TABLE IF NOT EXISTS `vip_vendors` (
      `npc_id` int(10) NOT NULL DEFAULT '0',
      `string` varchar(255) DEFAULT 'default string; please edit',
      `side` int(11) NOT NULL DEFAULT '1' COMMENT '1: chatbox, 2: area trigger, 3: both sides'
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    Whats supposed to happen?

    When a player tries to buy an item (listed in vip_vendor) without having the required item, it will post up a string, depending on the "side" 1 being chat box, 2 being an area trigger and 3 being both ..

    -- Willing to pay for the conversion (10-15$) since they'll both be released, and maybe a skyfire conversion..

    Thanks

    ArcEmu  -> TrinityCore script conversion?

Similar Threads

  1. Arcemu over TrinityCore?
    By Dualrom in forum World of Warcraft Emulator Servers
    Replies: 30
    Last Post: 09-08-2010, 02:05 PM
  2. [Lua Script] Arcemu Simple Gossip Scripts
    By epiclynoobish in forum WoW EMU General Releases
    Replies: 6
    Last Post: 08-02-2010, 07:04 AM
  3. [ArcEmu] Need battleground scripts
    By RoyPwns in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 04-25-2010, 02:13 PM
  4. [C#] TrinityCore Script Generator
    By Pharcide in forum WoW EMU Programs
    Replies: 13
    Last Post: 04-19-2010, 06:56 AM
  5. Arcemu's retarded scripts.....
    By almigtyoftich in forum World of Warcraft Emulator Servers
    Replies: 15
    Last Post: 03-04-2009, 08:26 AM
All times are GMT -5. The time now is 06:31 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