GameServer 1.00.90

Page 42 of 86 FirstFirst ... 32343536373839404142434445464748495052 ... LastLast
Results 1,026 to 1,050 of 2143
  1. #1026
    Account Upgraded | Title Enabled! ToMMeG is offline
    MemberRank
    Oct 2006 Join Date
    Latvia, RigaLocation
    300Posts

    Re: GameServer 1.00.90

    Dudi2 - can you post OptionData table info? whick rows it have? originaly?

  2. #1027
    Account Upgraded | Title Enabled! Dudi2 is offline
    MemberRank
    Dec 2006 Join Date
    PolandLocation
    217Posts

    Re: GameServer 1.00.90

    generated on sql 2k8...

    Code:
    USE [MuOnline]
    GO
    
    /****** Object:  Table [dbo].[OptionData]    Script Date: 04/06/2010 21:57:10 ******/
    SET ANSI_NULLS ON
    GO
    
    SET QUOTED_IDENTIFIER ON
    GO
    
    SET ANSI_PADDING ON
    GO
    
    CREATE TABLE [dbo].[OptionData](
    	[Name] [varchar](10) NOT NULL,
    	[GameOption] [tinyint] NULL,
    	[Qkey] [int] NULL,
    	[Wkey] [int] NULL,
    	[Ekey] [int] NULL,
    	[ChatWindow] [tinyint] NULL,
    	[RKey] [int] NULL,
    	[QWERLevel] [int] NULL,
    	[SkillKey] [binary](20) NULL
    ) ON [PRIMARY]
    
    GO
    
    SET ANSI_PADDING OFF
    GO

  3. #1028
    Account Upgraded | Title Enabled! ToMMeG is offline
    MemberRank
    Oct 2006 Join Date
    Latvia, RigaLocation
    300Posts

    Re: GameServer 1.00.90

    Code:
    //Fix Golden Invasion Message
    	BYTE FixGoldenInvMsg[] = { 0xEB, 0x51, 0x90 };
    	memcpy((int*)0x0048018A,FixGoldenInvMsg,sizeof(FixGoldenInvMsg));                                    
    
    	BYTE FixGoldenInvMsg1[] = { 0x00, 0x00, 0x83, 0xC4, 0x08, 0x50, 0xE8, 0xED, 0x3F, 0xF8, 0xFF, 0xEB, 0xA5, 0x00, 0x00 };
    	memcpy((int*)0x004801DB,FixGoldenInvMsg1,sizeof(FixGoldenInvMsg1));
    Here is fix for Golden Invasion message. Syntax of message is - "%s, Golden Invasion"

    Credits :
    -really dunno, but i think that person who firstly fixed it on the 1.00.16 GS =)
    -ACGroup
    Last edited by ToMMeG; 07-04-10 at 07:24 PM.

  4. #1029
    Valued Member zemattana is offline
    MemberRank
    Jan 2008 Join Date
    BrasilLocation
    149Posts

    Re: GameServer 1.00.90

    Quote Originally Posted by Dudi2 View Post
    - Santa Clause 100%
    - Leo The Helper 100%
    - Illusion Temple Rank Point 100%
    - PCBang Point System 100%

    But we need procedures and tables :F (SQL)

    DataServer:
    - fixed OptionData loading (hotkeys)
    - ChangeCharacterName
    - PropertyItem ??
    Yes... confirmed!!!

    Only lacking procedures =S

  5. #1030
    Proficient Member josesp is offline
    MemberRank
    Mar 2009 Join Date
    186Posts

    Re: GameServer 1.00.90

    Quote Originally Posted by ToMMeG View Post
    Credits :
    -really dunno, but i think that person who firstly fixed it on the 1.00.16 GS =)
    -also me, for searching it on new gs =)
    Yes, we can was the nickname, or something like that xD

    i make it for 1.00.18 with my old account and now you adapt this to 90? :)

    jejeje i make this same fix yesterday :S xD

  6. #1031
    Account Upgraded | Title Enabled! Domination is offline
    MemberRank
    Dec 2004 Join Date
    Russian FederationLocation
    504Posts

    Re: GameServer 1.00.90

    So...
    Could anyone provide missing procedures and queries to add lacking tables?

  7. #1032
    Member siikaisz is offline
    MemberRank
    Jan 2005 Join Date
    Riga, LatviaLocation
    72Posts

    Re: GameServer 1.00.90

    made some custom procedures and now some stuff working, but how enable PC Points button on command panel?

  8. #1033
    Proficient Member xom1b is offline
    MemberRank
    Aug 2006 Join Date
    VietnamLocation
    197Posts

    Re: GameServer 1.00.90

    Quote Originally Posted by siikaisz View Post
    made some custom procedures and now some stuff working, but how enable PC Points button on command panel?
    Can you share some procedures and tables. I use Shatter's db

  9. #1034
    Valued Member Crazzy is offline
    MemberRank
    Jun 2009 Join Date
    Moscow, Russia,Location
    106Posts

    Re: GameServer 1.00.90

    Quote Originally Posted by xom1b View Post
    Can you share some procedures and tables. I use Shatter's db
    mb in encteam base's have this...or drake ..At shatter db base cut down

  10. #1035
    Account Upgraded | Title Enabled! Bason4ik is offline
    MemberRank
    Aug 2007 Join Date
    AnonOpsLocation
    470Posts

    Re: GameServer 1.00.90

    josesp i kill you^^))))you say what you dont work with mu)))))

  11. #1036
    Proficient Member josesp is offline
    MemberRank
    Mar 2009 Join Date
    186Posts

    Re: GameServer 1.00.90

    Quote Originally Posted by Bason4ik View Post
    josesp i kill you^^))))you say what you dont work with mu)))))
    a friend still work on Mu and i help him, like when i help you :)

  12. #1037
    Account Upgraded | Title Enabled! Bason4ik is offline
    MemberRank
    Aug 2007 Join Date
    AnonOpsLocation
    470Posts

    Re: GameServer 1.00.90

    :-p ))))))))))))))

  13. #1038
    Apprentice Χιμαιρα is offline
    MemberRank
    Jan 2010 Join Date
    greeceLocation
    15Posts

    Re: GameServer 1.00.90

    Can you add New Duel System into this version?

  14. #1039
    Proficient Member Young is offline
    MemberRank
    Jul 2005 Join Date
    BrazilLocation
    190Posts

    Re: GameServer 1.00.90

    Quote Originally Posted by genoxide View Post
    i dont think negative values will work, try a values 1-50, and remember it drops as normal items (level item ~ level mobs)
    Dont work

  15. #1040
    Account Upgraded | Title Enabled! Bason4ik is offline
    MemberRank
    Aug 2007 Join Date
    AnonOpsLocation
    470Posts

    Re: GameServer 1.00.90

    Quote Originally Posted by Χιμαιρα View Post
    Can you add New Duel System into this version?
    .h
    Code:
    #include <windows.h>
    
    #define ENCCTS "..\\ENCData\\ENCCustoms.ini"
    
    class DuelSystemClass
    {
    public:
    	void Init();
    	void DeleteSpectator(DWORD PlayerID, BYTE Room);
    	BYTE GetSpectatorPosition(DWORD PlayerID, BYTE Room);
    	void SetDuelInfo(DWORD PlayerID, BYTE Room);
    	void NPCTalk_GateKeeper(DWORD PlayerID);
    	int DuelOK_EnterRoom(DWORD PlayerID1, DWORD PlayerID2);
    	void ClearRoom(BYTE Room);
    	void ClearRoombyPlayerID(DWORD PlayerID, int Winner);
    	void WarpRoom(DWORD PlayerID, BYTE Room);
    	bool isInDuelRoom(DWORD PlayerID);
    	int GetRoom(DWORD PlayerID);
    	DWORD GetRival(DWORD PlayerID);
    	bool IsRival(DWORD PlayerID);
    	void SendDuelInfo(DWORD PlayerID, BYTE Room);
    	BYTE SetSpectator(DWORD PlayerID, BYTE Room);
    	bool isSpectator(DWORD PlayerID);
    
    	BOOL DuelRoom[4];
    	DWORD Player[2][4];
    	DWORD Spectator[10][4];
    	BOOL isNewSystem;
    };
    
    extern DuelSystemClass Duel;
    #include <windows.h>
    
    #define ENCCTS "..\\ENCData\\ENCCustoms.ini"
    
    class DuelSystemClass
    {
    public:
    	void Init();
    	void DeleteSpectator(DWORD PlayerID, BYTE Room);
    	BYTE GetSpectatorPosition(DWORD PlayerID, BYTE Room);
    	void SetDuelInfo(DWORD PlayerID, BYTE Room);
    	void NPCTalk_GateKeeper(DWORD PlayerID);
    	int DuelOK_EnterRoom(DWORD PlayerID1, DWORD PlayerID2);
    	void ClearRoom(BYTE Room);
    	void ClearRoombyPlayerID(DWORD PlayerID, int Winner);
    	void WarpRoom(DWORD PlayerID, BYTE Room);
    	bool isInDuelRoom(DWORD PlayerID);
    	int GetRoom(DWORD PlayerID);
    	DWORD GetRival(DWORD PlayerID);
    	bool IsRival(DWORD PlayerID);
    	void SendDuelInfo(DWORD PlayerID, BYTE Room);
    	BYTE SetSpectator(DWORD PlayerID, BYTE Room);
    	bool isSpectator(DWORD PlayerID);
    
    	BOOL DuelRoom[4];
    	DWORD Player[2][4];
    	DWORD Spectator[10][4];
    	BOOL isNewSystem;
    };
    
    extern DuelSystemClass Duel;
    #include <windows.h>
    
    class DuelSystemClass
    {
    public:
    	void Init();
    	void DeleteSpectator(DWORD PlayerID, BYTE Room);
    	BYTE GetSpectatorPosition(DWORD PlayerID, BYTE Room);
    	void SetDuelInfo(DWORD PlayerID, BYTE Room);
    	void NPCTalk_GateKeeper(DWORD PlayerID);
    	int DuelOK_EnterRoom(DWORD PlayerID1, DWORD PlayerID2);
    	void ClearRoom(BYTE Room);
    	void ClearRoombyPlayerID(DWORD PlayerID, int Winner);
    	void WarpRoom(DWORD PlayerID, BYTE Room);
    	bool isInDuelRoom(DWORD PlayerID);
    	int GetRoom(DWORD PlayerID);
    	DWORD GetRival(DWORD PlayerID);
    	bool IsRival(DWORD PlayerID);
    	void SendDuelInfo(DWORD PlayerID, BYTE Room);
    	BYTE SetSpectator(DWORD PlayerID, BYTE Room);
    	bool isSpectator(DWORD PlayerID);
    
    	BOOL DuelRoom[4];
    	DWORD Player[2][4];
    	DWORD Spectator[10][4];
    	BOOL isNewSystem;
    };
    
    extern DuelSystemClass Duel;
    #include <windows.h>
    
    #define ENCCTS "..\\ENCData\\ENCCustoms.ini"
    
    class DuelSystemClass
    {
    public:
    	void Init();
    	void DeleteSpectator(DWORD PlayerID, BYTE Room);
    	BYTE GetSpectatorPosition(DWORD PlayerID, BYTE Room);
    	void SetDuelInfo(DWORD PlayerID, BYTE Room);
    	void NPCTalk_GateKeeper(DWORD PlayerID);
    	int DuelOK_EnterRoom(DWORD PlayerID1, DWORD PlayerID2);
    	void ClearRoom(BYTE Room);
    	void ClearRoombyPlayerID(DWORD PlayerID, int Winner);
    	void WarpRoom(DWORD PlayerID, BYTE Room);
    	bool isInDuelRoom(DWORD PlayerID);
    	int GetRoom(DWORD PlayerID);
    	DWORD GetRival(DWORD PlayerID);
    	bool IsRival(DWORD PlayerID);
    	void SendDuelInfo(DWORD PlayerID, BYTE Room);
    	BYTE SetSpectator(DWORD PlayerID, BYTE Room);
    	bool isSpectator(DWORD PlayerID);
    
    	BOOL DuelRoom[4];
    	DWORD Player[2][4];
    	DWORD Spectator[10][4];
    	BOOL isNewSystem;
    };
    
    extern DuelSystemClass Duel;
    #include <windows.h>
    
    #define ENCCTS "..\\ENCData\\ENCCustoms.ini"
    
    class DuelSystemClass
    {
    public:
    	void Init();
    	void DeleteSpectator(DWORD PlayerID, BYTE Room);
    	BYTE GetSpectatorPosition(DWORD PlayerID, BYTE Room);
    	void SetDuelInfo(DWORD PlayerID, BYTE Room);
    	void NPCTalk_GateKeeper(DWORD PlayerID);
    	int DuelOK_EnterRoom(DWORD PlayerID1, DWORD PlayerID2);
    	void ClearRoom(BYTE Room);
    	void ClearRoombyPlayerID(DWORD PlayerID, int Winner);
    	void WarpRoom(DWORD PlayerID, BYTE Room);
    	bool isInDuelRoom(DWORD PlayerID);
    	int GetRoom(DWORD PlayerID);
    	DWORD GetRival(DWORD PlayerID);
    	bool IsRival(DWORD PlayerID);
    	void SendDuelInfo(DWORD PlayerID, BYTE Room);
    	BYTE SetSpectator(DWORD PlayerID, BYTE Room);
    	bool isSpectator(DWORD PlayerID);
    
    	BOOL DuelRoom[4];
    	DWORD Player[2][4];
    	DWORD Spectator[10][4];
    	BOOL isNewSystem;
    };
    
    extern DuelSystemClass Duel;

    .cpp
    Code:
    #include <process.h>
    #include "stdafx.h"
    #include "Gameserver.h"
    #include "Utilidades.h"
    #include "DuelSystem.h"
    #include "Extra.h"
    
    void DuelSystemClass__InsideTrigger(void * lpParam);
    DuelSystemClass Duel;
    
    void DuelSystemClass::NPCTalk_GateKeeper(DWORD PlayerID)
    {	
    	BYTE Dialog[0x5C]={0};
    		
    	Dialog[0]= 0xC1;
    	Dialog[1]= 0x5C;
    	Dialog[2]= 0xAA;
    	Dialog[3]= 0x06;
    
    	for( int Room = 0; Room < 4; Room++)
    	{
    		if(DuelRoom[Room] == 1)
    		{
    			memcpy (&Dialog[4 + Room * 22], gObj_GetNickDuel(Player[0][Room]), 10 );
    			memcpy (&Dialog[4+10 + Room * 22], gObj_GetNickDuel(Player[1][Room]), 10 );
    			Dialog[4+19+1 + Room * 22]= 0x01;
    			Dialog[4+19+2 + Room * 22]= 0x01;				
    		}
    	}
    		
    	BYTE buff[4] = { 0xC3 , 0x04 , 0x30 , 0x21 };
    	DataSend (PlayerID,buff , buff[1]);
    	DataSend( PlayerID , (PBYTE)Dialog , Dialog[1] );	
    }
    
    bool DuelSystemClass::isInDuelRoom(DWORD PlayerID)
    {
    	for(int Room = 0;Room < 4;Room++)
    	{
    		if((Player[0][Room] == PlayerID) || (Player[1][Room] == PlayerID))
    		{
    			return 1;
    		}
    	}
    	return 0;
    }
    
    int DuelSystemClass::GetRoom(DWORD PlayerID)
    {
    	for(int Room = 0;Room < 4;Room++)
    	{
    		if((Player[0][Room] == PlayerID) || (Player[1][Room] == PlayerID))
    		{
    			return Room;
    		}
    	}
    	return 10;
    }
    
    DWORD DuelSystemClass::GetRival(DWORD PlayerID)
    {
    	for(int Room = 0;Room < 4;Room++)
    	{
    		if((Player[0][Room] == PlayerID))
    		{
    			return Player[1][Room];
    		}
    		if((Player[1][Room] == PlayerID))
    		{
    			return Player[0][Room];
    		}
    	}
    	return 10;
    }
    
    BYTE DuelSystemClass::GetSpectatorPosition(DWORD PlayerID, BYTE Room)
    {
    	for(int Pos = 0;Pos < 10;Pos++)
    	{
    		if(Spectator[Pos][Room] == PlayerID)
    		{
    			return Pos;
    		}
    	}
    	return 0xFF;
    }
    
    BYTE DuelSystemClass::SetSpectator(DWORD PlayerID, BYTE Room)
    {
    	for(int Pos = 0;Pos < 10;Pos++)
    	{
    		if(Spectator[Pos][Room] == 0)
    		{
    			Spectator[Pos][Room] = PlayerID;
    			return Pos;
    		}
    	}
    	return 0xFF;	
    }
    
    bool DuelSystemClass::isSpectator(DWORD PlayerID)
    {
    	for(int Room = 0;Room < 4;Room++)
    	{
    		for(int Pos=0;Pos<10;Pos++)
    		{
    			if(Spectator[Pos][Room] == PlayerID)return 1;
    		}
    	}
    	return 0;
    }
    
    int DuelSystemClass::DuelOK_EnterRoom(DWORD PlayerID1, DWORD PlayerID2)
    {
    	int EnterTo = -1;
    
    	if(isInDuelRoom(PlayerID1) == 0)
    	{
    		for(int Room = 0;Room < 4;Room++)
    		{
    			if(DuelRoom[Room] == 0)
    			{
    				EnterTo = Room;
    				DuelRoom[Room] = 1;
    				break;
    			}
    		}
    
    		if(EnterTo != -1)
    		{
    			Player[0][EnterTo] = PlayerID1;
    			Player[1][EnterTo] = PlayerID2;
    			WarpRoom(PlayerID1,EnterTo);
    			WarpRoom(PlayerID2,EnterTo);
    		}
    	return EnterTo;
    	}
    
    	else
    	{
    		return 10;
    	}
    }
    
    void DuelSystemClass::WarpRoom(DWORD PlayerID, BYTE Room)
    {
    	int Gate = 0;
    	BOOL isSpectator = 0;
    	switch(Room)
    	{
    		case 0:
    		{
    			if(Player[0][Room] == PlayerID)
    			{
    				Gate = 295;
    			}else if(Player[1][Room] == PlayerID)
    			{
    				Gate = 296;
    			}else
    			{
    				Gate = 303;
    				isSpectator = 1;
    			}
    		}break;
    		case 1:
    		{
    			if(Player[0][Room] == PlayerID)
    			{
    				Gate = 297;
    			}else if(Player[1][Room] == PlayerID)
    			{
    				Gate = 398;
    			}else
    			{
    				Gate = 304;
    				isSpectator = 1;
    			}
    		}break;
    		case 2:
    		{
    			if(Player[0][Room] == PlayerID)
    			{
    				Gate = 299;
    			}else if(Player[1][Room] == PlayerID)
    			{
    				Gate = 300;
    			}else
    			{
    				Gate = 305;
    				isSpectator = 1;
    			}
    		}break;
    		case 3:
    		{
    			if(Player[0][Room] == PlayerID)
    			{
    				Gate = 301;
    			}else if(Player[1][Room] == PlayerID)
    			{
    				Gate = 302;
    			}else
    			{
    				Gate = 306;
    				isSpectator = 1;
    			}
    		}break;
    		case 0xFF:
    		{
    			Gate = 294;
    		}break;
    	}	
    
    	if((isSpectator == 1) && (DuelRoom[Room] == 1))
    	{
    		if(SetSpectator(PlayerID,Room) != 0xFF)
    		{
    			gObjMoveGate(PlayerID, Gate);
    			SetDuelInfo(PlayerID,Room);
    		}else
    		{
    			GCServerMsgStringSend("This room is full!",PlayerID, 0x01);
    		}
    	}else
    	{
    		gObjMoveGate(PlayerID, Gate);
    	}
    }
    
    
    void DuelSystemClass__InsideTrigger(void * lpParam)
    {
    	while(true)
    	{
    		for(int Room = 0; Room < 4; Room++)
    		{
    			for(int i = 0; i < 10; i++)
    			{
    				if(Duel.Spectator[i][Room] != 0)
    				{
    					if (Duel.DuelRoom[Room] == 1)
    						Duel.SendDuelInfo(Duel.Spectator[i][Room],Room);
    					else
    						Duel.DeleteSpectator(Duel.Spectator[i][Room],Room);
    				}			
    			}
    		}
    		Sleep(1000);
    	}
    	_endthread();
    }
    
    void DuelSystemClass::DeleteSpectator(DWORD PlayerID, BYTE Room)
    {
    	int Pos = GetSpectatorPosition(PlayerID,Room);
    	
    	if (Pos != 0xFF)
    	{
    		if(gObjIsConnected(PlayerID) == 1)
    		{
    			//Remove Invisibility Skill
    			if(!IsGM(PlayerID))
    			{
    				DWORD Encrypt = 0;
    				int Serial = 1;
    				gObj_Write(PlayerID,gObjCtl,32);
    				BYTE aRecv[23]={0xC1,0x17,0x00,0x5A,0x45,0x45,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x2F,0x68,0x69,0x64,0x65,0x5F,0x6F,0x66,0x66,0x00};
    				DataRecv(aRecv[2],aRecv,aRecv[1],PlayerID,Encrypt,Serial);
    				gObj_Write(PlayerID,gObjCtl,0);
    				CallSkillEffect(PlayerID,98,0x00,PlayerID,1);
    			}else
    			{
    				DWORD Encrypt = 0;
    				int Serial = 1;
    				BYTE aRecv[23]={0xC1,0x17,0x00,0x5A,0x45,0x45,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x2F,0x68,0x69,0x64,0x65,0x5F,0x6F,0x66,0x66,0x00};
    				DataRecv(aRecv[2],aRecv,aRecv[1],PlayerID,Encrypt,Serial);
    				CallSkillEffect(PlayerID,98,0x00,PlayerID,1);
    			}
    			WarpRoom(PlayerID,0xFF);
    		}
    		Spectator[Pos][Room] = 0;
    	}
    }
    
    
    void DuelSystemClass::SetDuelInfo(DWORD PlayerID, BYTE Room)
    {
    	if((gObjIsConnected(Player[0][Room]) == 1) && (gObjIsConnected(Player[1][Room]) == 1))
    	{		
    		BYTE Packet0[0x0F] = {0xC1,0x0F,0xAA,0x0B, 0x01};
    		memcpy (&Packet0[5], gObj_GetNickDuel(PlayerID), 10 );
    		DataSend( PlayerID , (PBYTE)Packet0 , Packet0[1] );
    
    		
    		//Send Invisibility Skill
    		if(!IsGM(PlayerID))
    		{
    			DWORD Encrypt = 0;
    			int Serial = 1;
    			gObj_Write(PlayerID,gObjCtl,32);
    			BYTE aRecv[22]={0xC1,0x16,0x00,0x5A,0x45,0x45,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x2F,0x68,0x69,0x64,0x65,0x5F,0x6F,0x6E,0x00};
    			DataRecv(aRecv[2],aRecv,aRecv[1],PlayerID,Encrypt,Serial);
    			gObj_Write(PlayerID,gObjCtl,0);
    			CallSkillEffect(PlayerID,98,0x01,PlayerID,1);
    		}else
    		{
    			DWORD Encrypt = 0;
    			int Serial = 1;
    			BYTE aRecv[22]={0xC1,0x16,0x00,0x5A,0x45,0x45,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x2F,0x68,0x69,0x64,0x65,0x5F,0x6F,0x6E,0x00};
    			DataRecv(aRecv[2],aRecv,aRecv[1],PlayerID,Encrypt,Serial);
    			CallSkillEffect(PlayerID,98,0x01,PlayerID,1);
    		}
    
    		BYTE Packet1[0x1E] = {0xC1,0x1E,0xAA,0x07, 0x00, 0x00};
    		memcpy (&Packet1[6], gObj_GetNickDuel(Player[0][Room]), 10 );
    		memcpy (&Packet1[6+10], gObj_GetNickDuel(Player[1][Room]), 10 );
    		Packet1[6+20] = HIBYTE(Player[0][Room]);
    		Packet1[6+21] = LOBYTE(Player[0][Room]);
    		Packet1[6+22] = HIBYTE(Player[1][Room]);
    		Packet1[6+23] = LOBYTE(Player[1][Room]);
    		DataSend( PlayerID , (PBYTE)Packet1 , Packet1[1] );
    
    		BYTE Packet2[0x05] = {0xC1,0x05,0xAA,0x0D, 0x98};	
    		DataSend( PlayerID , (PBYTE)Packet2 , Packet2[1] );
    
    		BYTE Packet3[0x0A] = {0xC1,0x0A,0xAA,0x04, HIBYTE(Player[0][Room]), LOBYTE(Player[0][Room]), HIBYTE(Player[1][Room]), LOBYTE(Player[1][Room]),gObj_GetInt(Player[0][Room],0xF10),gObj_GetInt(Player[1][Room],0xF10)};
    		DataSend( PlayerID , (PBYTE)Packet3 , Packet3[1] );
    
    	}else
    	{
    		ClearRoom(Room);
    	}
    
    }
    
    void DuelSystemClass::SendDuelInfo(DWORD PlayerID, BYTE Room)
    {
    	if((gObjIsConnected(Player[0][Room]) == 1) && (gObjIsConnected(Player[1][Room]) == 1) && (DuelRoom[Room] == 1))
    	{
    
    		int LifePercent1 = ((int)gObj_GetInt(Player[0][Room],gObjLife) * 100) / ((int)gObj_GetInt(Player[0][Room],gObjMaxLife) + (int)gObj_GetInt(Player[0][Room],gObjAddLife));
    		int ShieldPercent1 = ((int)gObj_GetInt(Player[0][Room],gObjShield) * 100) / ((int)gObj_GetInt(Player[0][Room],gObjMaxShield) + (int)gObj_GetInt(Player[0][Room],gObjAddShield));
    		int LifePercent2 = ((int)gObj_GetInt(Player[1][Room],gObjLife) * 100) / ((int)gObj_GetInt(Player[1][Room],gObjMaxLife) + (int)gObj_GetInt(Player[1][Room],gObjAddLife));
    		int ShieldPercent2 = ((int)gObj_GetInt(Player[1][Room],gObjShield) * 100) / ((int)gObj_GetInt(Player[1][Room],gObjMaxShield) + (int)gObj_GetInt(Player[1][Room],gObjAddShield));
    
    		BYTE Packet[12] = {0xC1,0x0C,0xAA,0x05, HIBYTE(Player[0][Room]), LOBYTE(Player[0][Room]), HIBYTE(Player[1][Room]), LOBYTE(Player[1][Room]), LifePercent1, LifePercent2, ShieldPercent1, ShieldPercent2};
    
    		DataSend( PlayerID , (PBYTE)Packet , Packet[1] );
    
    		BYTE Packet2[0x0A] = {0xC1,0x0A,0xAA,0x04, HIBYTE(Player[0][Room]), LOBYTE(Player[0][Room]), HIBYTE(Player[1][Room]), LOBYTE(Player[1][Room]),gObj_GetInt(Player[0][Room],0xF10),gObj_GetInt(Player[1][Room],0xF10)};
    		DataSend( PlayerID , (PBYTE)Packet2 , Packet2[1] );
    	}else
    	{
    		DeleteSpectator(PlayerID,Room);			
    	}
    }
    
    void DuelSystemClass::ClearRoom(BYTE Room)
    {
    	DuelRoom[Room] = 0;
    	Player[0][Room]= 0;
    	Player[1][Room]= 0;
    
    	for(int i = 0; i < 10; i++)
    		Spectator[i][Room] = 0;
    }
    
    void DuelSystemClass::ClearRoombyPlayerID(DWORD PlayerID, int Winner)
    {
    	for(int Room = 0; Room < 4; Room++)
    	{
    		if((Player[0][Room] == PlayerID) || (Player[1][Room] == PlayerID))
    		{
    			if(Winner == 1)
    			{
    				CallSkillEffect(PlayerID,103,0x01,PlayerID,1);
    			}
    
    			WarpRoom(Player[0][Room],0xFF);
    			WarpRoom(Player[1][Room],0xFF);
    
    			DuelRoom[Room] = 0;
    			Player[0][Room]= 0;
    			Player[1][Room]= 0;
    			break;
    		}
    	}
    }
    
    void DuelSystemClass::Init()
    {
    	_beginthread( DuelSystemClass__InsideTrigger, 0, NULL  );
    }
    Cr:
    zemattana

    p.s. i dont test work it or no :-)

  16. #1041
    Account Upgraded | Title Enabled! Dudi2 is offline
    MemberRank
    Dec 2006 Join Date
    PolandLocation
    217Posts

    Re: GameServer 1.00.90

    Quote Originally Posted by Bason4ik View Post
    .h
    Code:
    #include <windows.h>
    
    #define ENCCTS "..\\ENCData\\ENCCustoms.ini"
    
    class DuelSystemClass
    {
    public:
    	void Init();
    	void DeleteSpectator(DWORD PlayerID, BYTE Room);
    	BYTE GetSpectatorPosition(DWORD PlayerID, BYTE Room);
    	void SetDuelInfo(DWORD PlayerID, BYTE Room);
    	void NPCTalk_GateKeeper(DWORD PlayerID);
    	int DuelOK_EnterRoom(DWORD PlayerID1, DWORD PlayerID2);
    	void ClearRoom(BYTE Room);
    	void ClearRoombyPlayerID(DWORD PlayerID, int Winner);
    	void WarpRoom(DWORD PlayerID, BYTE Room);
    	bool isInDuelRoom(DWORD PlayerID);
    	int GetRoom(DWORD PlayerID);
    	DWORD GetRival(DWORD PlayerID);
    	bool IsRival(DWORD PlayerID);
    	void SendDuelInfo(DWORD PlayerID, BYTE Room);
    	BYTE SetSpectator(DWORD PlayerID, BYTE Room);
    	bool isSpectator(DWORD PlayerID);
    
    	BOOL DuelRoom[4];
    	DWORD Player[2][4];
    	DWORD Spectator[10][4];
    	BOOL isNewSystem;
    };
    
    extern DuelSystemClass Duel;
    #include <windows.h>
    
    #define ENCCTS "..\\ENCData\\ENCCustoms.ini"
    
    class DuelSystemClass
    {
    public:
    	void Init();
    	void DeleteSpectator(DWORD PlayerID, BYTE Room);
    	BYTE GetSpectatorPosition(DWORD PlayerID, BYTE Room);
    	void SetDuelInfo(DWORD PlayerID, BYTE Room);
    	void NPCTalk_GateKeeper(DWORD PlayerID);
    	int DuelOK_EnterRoom(DWORD PlayerID1, DWORD PlayerID2);
    	void ClearRoom(BYTE Room);
    	void ClearRoombyPlayerID(DWORD PlayerID, int Winner);
    	void WarpRoom(DWORD PlayerID, BYTE Room);
    	bool isInDuelRoom(DWORD PlayerID);
    	int GetRoom(DWORD PlayerID);
    	DWORD GetRival(DWORD PlayerID);
    	bool IsRival(DWORD PlayerID);
    	void SendDuelInfo(DWORD PlayerID, BYTE Room);
    	BYTE SetSpectator(DWORD PlayerID, BYTE Room);
    	bool isSpectator(DWORD PlayerID);
    
    	BOOL DuelRoom[4];
    	DWORD Player[2][4];
    	DWORD Spectator[10][4];
    	BOOL isNewSystem;
    };
    
    extern DuelSystemClass Duel;
    #include <windows.h>
    
    class DuelSystemClass
    {
    public:
    	void Init();
    	void DeleteSpectator(DWORD PlayerID, BYTE Room);
    	BYTE GetSpectatorPosition(DWORD PlayerID, BYTE Room);
    	void SetDuelInfo(DWORD PlayerID, BYTE Room);
    	void NPCTalk_GateKeeper(DWORD PlayerID);
    	int DuelOK_EnterRoom(DWORD PlayerID1, DWORD PlayerID2);
    	void ClearRoom(BYTE Room);
    	void ClearRoombyPlayerID(DWORD PlayerID, int Winner);
    	void WarpRoom(DWORD PlayerID, BYTE Room);
    	bool isInDuelRoom(DWORD PlayerID);
    	int GetRoom(DWORD PlayerID);
    	DWORD GetRival(DWORD PlayerID);
    	bool IsRival(DWORD PlayerID);
    	void SendDuelInfo(DWORD PlayerID, BYTE Room);
    	BYTE SetSpectator(DWORD PlayerID, BYTE Room);
    	bool isSpectator(DWORD PlayerID);
    
    	BOOL DuelRoom[4];
    	DWORD Player[2][4];
    	DWORD Spectator[10][4];
    	BOOL isNewSystem;
    };
    
    extern DuelSystemClass Duel;
    #include <windows.h>
    
    #define ENCCTS "..\\ENCData\\ENCCustoms.ini"
    
    class DuelSystemClass
    {
    public:
    	void Init();
    	void DeleteSpectator(DWORD PlayerID, BYTE Room);
    	BYTE GetSpectatorPosition(DWORD PlayerID, BYTE Room);
    	void SetDuelInfo(DWORD PlayerID, BYTE Room);
    	void NPCTalk_GateKeeper(DWORD PlayerID);
    	int DuelOK_EnterRoom(DWORD PlayerID1, DWORD PlayerID2);
    	void ClearRoom(BYTE Room);
    	void ClearRoombyPlayerID(DWORD PlayerID, int Winner);
    	void WarpRoom(DWORD PlayerID, BYTE Room);
    	bool isInDuelRoom(DWORD PlayerID);
    	int GetRoom(DWORD PlayerID);
    	DWORD GetRival(DWORD PlayerID);
    	bool IsRival(DWORD PlayerID);
    	void SendDuelInfo(DWORD PlayerID, BYTE Room);
    	BYTE SetSpectator(DWORD PlayerID, BYTE Room);
    	bool isSpectator(DWORD PlayerID);
    
    	BOOL DuelRoom[4];
    	DWORD Player[2][4];
    	DWORD Spectator[10][4];
    	BOOL isNewSystem;
    };
    
    extern DuelSystemClass Duel;
    #include <windows.h>
    
    #define ENCCTS "..\\ENCData\\ENCCustoms.ini"
    
    class DuelSystemClass
    {
    public:
    	void Init();
    	void DeleteSpectator(DWORD PlayerID, BYTE Room);
    	BYTE GetSpectatorPosition(DWORD PlayerID, BYTE Room);
    	void SetDuelInfo(DWORD PlayerID, BYTE Room);
    	void NPCTalk_GateKeeper(DWORD PlayerID);
    	int DuelOK_EnterRoom(DWORD PlayerID1, DWORD PlayerID2);
    	void ClearRoom(BYTE Room);
    	void ClearRoombyPlayerID(DWORD PlayerID, int Winner);
    	void WarpRoom(DWORD PlayerID, BYTE Room);
    	bool isInDuelRoom(DWORD PlayerID);
    	int GetRoom(DWORD PlayerID);
    	DWORD GetRival(DWORD PlayerID);
    	bool IsRival(DWORD PlayerID);
    	void SendDuelInfo(DWORD PlayerID, BYTE Room);
    	BYTE SetSpectator(DWORD PlayerID, BYTE Room);
    	bool isSpectator(DWORD PlayerID);
    
    	BOOL DuelRoom[4];
    	DWORD Player[2][4];
    	DWORD Spectator[10][4];
    	BOOL isNewSystem;
    };
    
    extern DuelSystemClass Duel;

    .cpp
    Code:
    #include <process.h>
    #include "stdafx.h"
    #include "Gameserver.h"
    #include "Utilidades.h"
    #include "DuelSystem.h"
    #include "Extra.h"
    
    void DuelSystemClass__InsideTrigger(void * lpParam);
    DuelSystemClass Duel;
    
    void DuelSystemClass::NPCTalk_GateKeeper(DWORD PlayerID)
    {	
    	BYTE Dialog[0x5C]={0};
    		
    	Dialog[0]= 0xC1;
    	Dialog[1]= 0x5C;
    	Dialog[2]= 0xAA;
    	Dialog[3]= 0x06;
    
    	for( int Room = 0; Room < 4; Room++)
    	{
    		if(DuelRoom[Room] == 1)
    		{
    			memcpy (&Dialog[4 + Room * 22], gObj_GetNickDuel(Player[0][Room]), 10 );
    			memcpy (&Dialog[4+10 + Room * 22], gObj_GetNickDuel(Player[1][Room]), 10 );
    			Dialog[4+19+1 + Room * 22]= 0x01;
    			Dialog[4+19+2 + Room * 22]= 0x01;				
    		}
    	}
    		
    	BYTE buff[4] = { 0xC3 , 0x04 , 0x30 , 0x21 };
    	DataSend (PlayerID,buff , buff[1]);
    	DataSend( PlayerID , (PBYTE)Dialog , Dialog[1] );	
    }
    
    bool DuelSystemClass::isInDuelRoom(DWORD PlayerID)
    {
    	for(int Room = 0;Room < 4;Room++)
    	{
    		if((Player[0][Room] == PlayerID) || (Player[1][Room] == PlayerID))
    		{
    			return 1;
    		}
    	}
    	return 0;
    }
    
    int DuelSystemClass::GetRoom(DWORD PlayerID)
    {
    	for(int Room = 0;Room < 4;Room++)
    	{
    		if((Player[0][Room] == PlayerID) || (Player[1][Room] == PlayerID))
    		{
    			return Room;
    		}
    	}
    	return 10;
    }
    
    DWORD DuelSystemClass::GetRival(DWORD PlayerID)
    {
    	for(int Room = 0;Room < 4;Room++)
    	{
    		if((Player[0][Room] == PlayerID))
    		{
    			return Player[1][Room];
    		}
    		if((Player[1][Room] == PlayerID))
    		{
    			return Player[0][Room];
    		}
    	}
    	return 10;
    }
    
    BYTE DuelSystemClass::GetSpectatorPosition(DWORD PlayerID, BYTE Room)
    {
    	for(int Pos = 0;Pos < 10;Pos++)
    	{
    		if(Spectator[Pos][Room] == PlayerID)
    		{
    			return Pos;
    		}
    	}
    	return 0xFF;
    }
    
    BYTE DuelSystemClass::SetSpectator(DWORD PlayerID, BYTE Room)
    {
    	for(int Pos = 0;Pos < 10;Pos++)
    	{
    		if(Spectator[Pos][Room] == 0)
    		{
    			Spectator[Pos][Room] = PlayerID;
    			return Pos;
    		}
    	}
    	return 0xFF;	
    }
    
    bool DuelSystemClass::isSpectator(DWORD PlayerID)
    {
    	for(int Room = 0;Room < 4;Room++)
    	{
    		for(int Pos=0;Pos<10;Pos++)
    		{
    			if(Spectator[Pos][Room] == PlayerID)return 1;
    		}
    	}
    	return 0;
    }
    
    int DuelSystemClass::DuelOK_EnterRoom(DWORD PlayerID1, DWORD PlayerID2)
    {
    	int EnterTo = -1;
    
    	if(isInDuelRoom(PlayerID1) == 0)
    	{
    		for(int Room = 0;Room < 4;Room++)
    		{
    			if(DuelRoom[Room] == 0)
    			{
    				EnterTo = Room;
    				DuelRoom[Room] = 1;
    				break;
    			}
    		}
    
    		if(EnterTo != -1)
    		{
    			Player[0][EnterTo] = PlayerID1;
    			Player[1][EnterTo] = PlayerID2;
    			WarpRoom(PlayerID1,EnterTo);
    			WarpRoom(PlayerID2,EnterTo);
    		}
    	return EnterTo;
    	}
    
    	else
    	{
    		return 10;
    	}
    }
    
    void DuelSystemClass::WarpRoom(DWORD PlayerID, BYTE Room)
    {
    	int Gate = 0;
    	BOOL isSpectator = 0;
    	switch(Room)
    	{
    		case 0:
    		{
    			if(Player[0][Room] == PlayerID)
    			{
    				Gate = 295;
    			}else if(Player[1][Room] == PlayerID)
    			{
    				Gate = 296;
    			}else
    			{
    				Gate = 303;
    				isSpectator = 1;
    			}
    		}break;
    		case 1:
    		{
    			if(Player[0][Room] == PlayerID)
    			{
    				Gate = 297;
    			}else if(Player[1][Room] == PlayerID)
    			{
    				Gate = 398;
    			}else
    			{
    				Gate = 304;
    				isSpectator = 1;
    			}
    		}break;
    		case 2:
    		{
    			if(Player[0][Room] == PlayerID)
    			{
    				Gate = 299;
    			}else if(Player[1][Room] == PlayerID)
    			{
    				Gate = 300;
    			}else
    			{
    				Gate = 305;
    				isSpectator = 1;
    			}
    		}break;
    		case 3:
    		{
    			if(Player[0][Room] == PlayerID)
    			{
    				Gate = 301;
    			}else if(Player[1][Room] == PlayerID)
    			{
    				Gate = 302;
    			}else
    			{
    				Gate = 306;
    				isSpectator = 1;
    			}
    		}break;
    		case 0xFF:
    		{
    			Gate = 294;
    		}break;
    	}	
    
    	if((isSpectator == 1) && (DuelRoom[Room] == 1))
    	{
    		if(SetSpectator(PlayerID,Room) != 0xFF)
    		{
    			gObjMoveGate(PlayerID, Gate);
    			SetDuelInfo(PlayerID,Room);
    		}else
    		{
    			GCServerMsgStringSend("This room is full!",PlayerID, 0x01);
    		}
    	}else
    	{
    		gObjMoveGate(PlayerID, Gate);
    	}
    }
    
    
    void DuelSystemClass__InsideTrigger(void * lpParam)
    {
    	while(true)
    	{
    		for(int Room = 0; Room < 4; Room++)
    		{
    			for(int i = 0; i < 10; i++)
    			{
    				if(Duel.Spectator[i][Room] != 0)
    				{
    					if (Duel.DuelRoom[Room] == 1)
    						Duel.SendDuelInfo(Duel.Spectator[i][Room],Room);
    					else
    						Duel.DeleteSpectator(Duel.Spectator[i][Room],Room);
    				}			
    			}
    		}
    		Sleep(1000);
    	}
    	_endthread();
    }
    
    void DuelSystemClass::DeleteSpectator(DWORD PlayerID, BYTE Room)
    {
    	int Pos = GetSpectatorPosition(PlayerID,Room);
    	
    	if (Pos != 0xFF)
    	{
    		if(gObjIsConnected(PlayerID) == 1)
    		{
    			//Remove Invisibility Skill
    			if(!IsGM(PlayerID))
    			{
    				DWORD Encrypt = 0;
    				int Serial = 1;
    				gObj_Write(PlayerID,gObjCtl,32);
    				BYTE aRecv[23]={0xC1,0x17,0x00,0x5A,0x45,0x45,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x2F,0x68,0x69,0x64,0x65,0x5F,0x6F,0x66,0x66,0x00};
    				DataRecv(aRecv[2],aRecv,aRecv[1],PlayerID,Encrypt,Serial);
    				gObj_Write(PlayerID,gObjCtl,0);
    				CallSkillEffect(PlayerID,98,0x00,PlayerID,1);
    			}else
    			{
    				DWORD Encrypt = 0;
    				int Serial = 1;
    				BYTE aRecv[23]={0xC1,0x17,0x00,0x5A,0x45,0x45,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x2F,0x68,0x69,0x64,0x65,0x5F,0x6F,0x66,0x66,0x00};
    				DataRecv(aRecv[2],aRecv,aRecv[1],PlayerID,Encrypt,Serial);
    				CallSkillEffect(PlayerID,98,0x00,PlayerID,1);
    			}
    			WarpRoom(PlayerID,0xFF);
    		}
    		Spectator[Pos][Room] = 0;
    	}
    }
    
    
    void DuelSystemClass::SetDuelInfo(DWORD PlayerID, BYTE Room)
    {
    	if((gObjIsConnected(Player[0][Room]) == 1) && (gObjIsConnected(Player[1][Room]) == 1))
    	{		
    		BYTE Packet0[0x0F] = {0xC1,0x0F,0xAA,0x0B, 0x01};
    		memcpy (&Packet0[5], gObj_GetNickDuel(PlayerID), 10 );
    		DataSend( PlayerID , (PBYTE)Packet0 , Packet0[1] );
    
    		
    		//Send Invisibility Skill
    		if(!IsGM(PlayerID))
    		{
    			DWORD Encrypt = 0;
    			int Serial = 1;
    			gObj_Write(PlayerID,gObjCtl,32);
    			BYTE aRecv[22]={0xC1,0x16,0x00,0x5A,0x45,0x45,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x2F,0x68,0x69,0x64,0x65,0x5F,0x6F,0x6E,0x00};
    			DataRecv(aRecv[2],aRecv,aRecv[1],PlayerID,Encrypt,Serial);
    			gObj_Write(PlayerID,gObjCtl,0);
    			CallSkillEffect(PlayerID,98,0x01,PlayerID,1);
    		}else
    		{
    			DWORD Encrypt = 0;
    			int Serial = 1;
    			BYTE aRecv[22]={0xC1,0x16,0x00,0x5A,0x45,0x45,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x2F,0x68,0x69,0x64,0x65,0x5F,0x6F,0x6E,0x00};
    			DataRecv(aRecv[2],aRecv,aRecv[1],PlayerID,Encrypt,Serial);
    			CallSkillEffect(PlayerID,98,0x01,PlayerID,1);
    		}
    
    		BYTE Packet1[0x1E] = {0xC1,0x1E,0xAA,0x07, 0x00, 0x00};
    		memcpy (&Packet1[6], gObj_GetNickDuel(Player[0][Room]), 10 );
    		memcpy (&Packet1[6+10], gObj_GetNickDuel(Player[1][Room]), 10 );
    		Packet1[6+20] = HIBYTE(Player[0][Room]);
    		Packet1[6+21] = LOBYTE(Player[0][Room]);
    		Packet1[6+22] = HIBYTE(Player[1][Room]);
    		Packet1[6+23] = LOBYTE(Player[1][Room]);
    		DataSend( PlayerID , (PBYTE)Packet1 , Packet1[1] );
    
    		BYTE Packet2[0x05] = {0xC1,0x05,0xAA,0x0D, 0x98};	
    		DataSend( PlayerID , (PBYTE)Packet2 , Packet2[1] );
    
    		BYTE Packet3[0x0A] = {0xC1,0x0A,0xAA,0x04, HIBYTE(Player[0][Room]), LOBYTE(Player[0][Room]), HIBYTE(Player[1][Room]), LOBYTE(Player[1][Room]),gObj_GetInt(Player[0][Room],0xF10),gObj_GetInt(Player[1][Room],0xF10)};
    		DataSend( PlayerID , (PBYTE)Packet3 , Packet3[1] );
    
    	}else
    	{
    		ClearRoom(Room);
    	}
    
    }
    
    void DuelSystemClass::SendDuelInfo(DWORD PlayerID, BYTE Room)
    {
    	if((gObjIsConnected(Player[0][Room]) == 1) && (gObjIsConnected(Player[1][Room]) == 1) && (DuelRoom[Room] == 1))
    	{
    
    		int LifePercent1 = ((int)gObj_GetInt(Player[0][Room],gObjLife) * 100) / ((int)gObj_GetInt(Player[0][Room],gObjMaxLife) + (int)gObj_GetInt(Player[0][Room],gObjAddLife));
    		int ShieldPercent1 = ((int)gObj_GetInt(Player[0][Room],gObjShield) * 100) / ((int)gObj_GetInt(Player[0][Room],gObjMaxShield) + (int)gObj_GetInt(Player[0][Room],gObjAddShield));
    		int LifePercent2 = ((int)gObj_GetInt(Player[1][Room],gObjLife) * 100) / ((int)gObj_GetInt(Player[1][Room],gObjMaxLife) + (int)gObj_GetInt(Player[1][Room],gObjAddLife));
    		int ShieldPercent2 = ((int)gObj_GetInt(Player[1][Room],gObjShield) * 100) / ((int)gObj_GetInt(Player[1][Room],gObjMaxShield) + (int)gObj_GetInt(Player[1][Room],gObjAddShield));
    
    		BYTE Packet[12] = {0xC1,0x0C,0xAA,0x05, HIBYTE(Player[0][Room]), LOBYTE(Player[0][Room]), HIBYTE(Player[1][Room]), LOBYTE(Player[1][Room]), LifePercent1, LifePercent2, ShieldPercent1, ShieldPercent2};
    
    		DataSend( PlayerID , (PBYTE)Packet , Packet[1] );
    
    		BYTE Packet2[0x0A] = {0xC1,0x0A,0xAA,0x04, HIBYTE(Player[0][Room]), LOBYTE(Player[0][Room]), HIBYTE(Player[1][Room]), LOBYTE(Player[1][Room]),gObj_GetInt(Player[0][Room],0xF10),gObj_GetInt(Player[1][Room],0xF10)};
    		DataSend( PlayerID , (PBYTE)Packet2 , Packet2[1] );
    	}else
    	{
    		DeleteSpectator(PlayerID,Room);			
    	}
    }
    
    void DuelSystemClass::ClearRoom(BYTE Room)
    {
    	DuelRoom[Room] = 0;
    	Player[0][Room]= 0;
    	Player[1][Room]= 0;
    
    	for(int i = 0; i < 10; i++)
    		Spectator[i][Room] = 0;
    }
    
    void DuelSystemClass::ClearRoombyPlayerID(DWORD PlayerID, int Winner)
    {
    	for(int Room = 0; Room < 4; Room++)
    	{
    		if((Player[0][Room] == PlayerID) || (Player[1][Room] == PlayerID))
    		{
    			if(Winner == 1)
    			{
    				CallSkillEffect(PlayerID,103,0x01,PlayerID,1);
    			}
    
    			WarpRoom(Player[0][Room],0xFF);
    			WarpRoom(Player[1][Room],0xFF);
    
    			DuelRoom[Room] = 0;
    			Player[0][Room]= 0;
    			Player[1][Room]= 0;
    			break;
    		}
    	}
    }
    
    void DuelSystemClass::Init()
    {
    	_beginthread( DuelSystemClass__InsideTrigger, 0, NULL  );
    }
    Cr:
    zemattana

    p.s. i dont test work it or no :-)
    hahahahahhahahahahaha, pr0 duel system xDDDDDDD

    1.
    Code:
    //Send Invisibility Skill
    		if(!IsGM(PlayerID))
    		{
    			DWORD Encrypt = 0;
    			int Serial = 1;
    			gObj_Write(PlayerID,gObjCtl,32);
    			BYTE aRecv[22]={0xC1,0x16,0x00,0x5A,0x45,0x45,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x2F,0x68,0x69,0x64,0x65,0x5F,0x6F,0x6E,0x00};
    			DataRecv(aRecv[2],aRecv,aRecv[1],PlayerID,Encrypt,Serial);
    			gObj_Write(PlayerID,gObjCtl,0);
    			CallSkillEffect(PlayerID,98,0x01,PlayerID,1);
    OWNED xD Great Idea ^^

    PS. This is SCFMT source, not zemattana...

  17. #1042
    Account Upgraded | Title Enabled! Bason4ik is offline
    MemberRank
    Aug 2007 Join Date
    AnonOpsLocation
    470Posts

    Re: GameServer 1.00.90

    Dudi2,i dont know :-) i paste with source from ENCTeam :-)

  18. #1043
    Valued Member Crazzy is offline
    MemberRank
    Jun 2009 Join Date
    Moscow, Russia,Location
    106Posts

    Re: GameServer 1.00.90

    Quote Originally Posted by Χιμαιρα View Post
    Can you add New Duel System into this version?
    http://forum.ragezone.com/f197/dark-...source-585969/

    use it

  19. #1044
    Account Upgraded | Title Enabled! Dudi2 is offline
    MemberRank
    Dec 2006 Join Date
    PolandLocation
    217Posts

    Re: GameServer 1.00.90

    Quote Originally Posted by Crazzy View Post
    and adjust it to work with this GS xd

  20. #1045
    Account Upgraded | Title Enabled! Dudi2 is offline
    MemberRank
    Dec 2006 Join Date
    PolandLocation
    217Posts

    Re: GameServer 1.00.90

    Code:
    USE [MU2003_EVENT_DATA]
    GO
    /****** Object:  StoredProcedure [dbo].[SP_REQ_PCBANG_POINT_INFO2]    Script Date: 04/07/2010 19:38:25 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    CREATE PROCEDURE [dbo].[SP_REQ_PCBANG_POINT_INFO2]
    	@unk			int,
    	@AccountID		varchar(10)
    As
    Begin
    	BEGIN TRANSACTION
    	SET NOCOUNT ON
    	
    	DECLARE @PCBANGPOINT INT
    	DECLARE @YEAR INT
    	DECLARE @MONTH INT
    	DECLARE @DAY INT
    	DECLARE @HOUR INT
    	
    
    	IF EXISTS (SELECT * FROM T_PCBANG_POINT_INFO WHERE memb___id = @AccountID)
    	BEGIN
    		SELECT @PCBANGPOINT = PCBangPoint, @YEAR = Year, @MONTH = MONTH, @DAY = DAY, @HOUR = Hour FROM T_PCBANG_POINT_INFO WHERE
    		memb___id = @AccountID
    		SELECT @PCBANGPOINT As Result, @YEAR As ResetYear, @MONTH As ResetMonth, @DAY As ResetDay, @HOUR As ResetHour
    		END
    	ELSE
    	BEGIN
    		INSERT INTO T_PCBANG_POINT_INFO (memb___id, PCBangPoint, Year, Month, Day, Hour) VALUES (@AccountID, 0, 2011, 12, 31, 23)
    		SELECT @PCBANGPOINT = PCBangPoint, @YEAR = YEAR, @MONTH = MONTH, @DAY = DAY, @HOUR = Hour FROM T_PCBANG_POINT_INFO WHERE
    		memb___id = @AccountID
    		SELECT @PCBANGPOINT As Result, @YEAR As ResetYear, @MONTH As ResetMonth, @DAY As ResetDay, @HOUR As ResetHour
    		END
    	
    		
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    End
    Code:
    USE [MU2003_EVENT_DATA]
    GO
    /****** Object:  StoredProcedure [dbo].[SP_REQ_PCBANG_POINT_UPDATE2]    Script Date: 04/07/2010 19:38:57 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    CREATE PROCEDURE [dbo].[SP_REQ_PCBANG_POINT_UPDATE2]
    	@unk			int, /* I dont know what is it, it always 0... */
    	@AccountID		varchar(10),
    	@PCPoint		int,
    	@ResetYear		datetime
    As
    Begin
    	BEGIN TRANSACTION
    	SET NOCOUNT ON
    	
    	UPDATE T_PCBANG_POINT_INFO SET PCBangPoint=@PCPoint WHERE memb___id = @AccountID
    	SELECT 1 As Result
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    End
    Code:
    USE [MU2003_EVENT_DATA]
    GO
    
    /****** Object:  Table [dbo].[T_PCBANG_POINT_INFO]    Script Date: 04/07/2010 19:41:19 ******/
    SET ANSI_NULLS ON
    GO
    
    SET QUOTED_IDENTIFIER ON
    GO
    
    SET ANSI_PADDING ON
    GO
    
    CREATE TABLE [dbo].[T_PCBANG_POINT_INFO](
    	[memb___id] [varchar](10) NOT NULL,
    	[PCBangPoint] [int] NOT NULL,
    	[Hour] [smallint] NULL,
    	[Year] [smallint] NULL,
    	[Month] [smallint] NULL,
    	[Day] [smallint] NULL,
     CONSTRAINT [PK_T_PCBANG_POINT_INFO] PRIMARY KEY CLUSTERED 
    (
    	[memb___id] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    
    GO
    
    SET ANSI_PADDING OFF
    GO
    
    ALTER TABLE [dbo].[T_PCBANG_POINT_INFO] ADD  CONSTRAINT [DF_T_PCBANG_POINT_INFO_PCBangPoint]  DEFAULT ((0)) FOR [PCBangPoint]
    GO
    credits: me...
    Last edited by Dudi2; 10-04-10 at 12:17 AM.

  21. #1046
    Valued Member Crazzy is offline
    MemberRank
    Jun 2009 Join Date
    Moscow, Russia,Location
    106Posts

    Re: GameServer 1.00.90

    ACGroup Season 5 Source for GS/GSCS .87
    http://www.megaupload.com/?d=9YLUXBQR
    Credits : Mu Community, ACGroup(Crazzy,SmallHabit,LeGrand)

  22. #1047
    Apprentice DielDF is offline
    MemberRank
    Jul 2009 Join Date
    17Posts

    Re: GameServer 1.00.90

    ENCTeam source!

    GS: http://www.multiupload.com/56YKICUQJO
    GSCS: http://www.megaupload.com/?d=OX4O65R2

    Credits: all developers

  23. #1048
    Proficient Member Bug Eye Billy is offline
    MemberRank
    Dec 2008 Join Date
    Barquisimeto, VLocation
    182Posts

    Re: GameServer 1.00.90

    Quote Originally Posted by Crazzy View Post
    ACGroup Season 5 Source for GS/GSCS .87
    http://www.megaupload.com/?d=9YLUXBQR
    Credits : Mu Community, ACGroup(Crazzy,SmallHabit,LeGrand)
    No Include GS_CS :(!

  24. #1049
    Proficient Member 7770988 is offline
    MemberRank
    Jan 2007 Join Date
    NYLocation
    162Posts

    Re: GameServer 1.00.90

    Quote Originally Posted by DielDF View Post
    ENCTeam source!

    GS: http://www.multiupload.com/56YKICUQJO
    GSCS: http://www.megaupload.com/?d=OX4O65R2

    Credits: all developers
    what's the password?

  25. #1050
    Account Upgraded | Title Enabled! Bason4ik is offline
    MemberRank
    Aug 2007 Join Date
    AnonOpsLocation
    470Posts

    Re: GameServer 1.00.90

    Quote Originally Posted by kliver View Post
    No Include GS_CS :(!
    this source have GS and GS_CS too,in config file you need put GameServer_CS=1 for use WzAG.dll for GS_CS :-)

    maybe somebody release MCTeam source?^_^



Advertisement