Spawn Revive/ReviveHere butons

05/13/2011 12:58 S/W#1
Ok Any one can tell my how realy works revive/revivehere 12talis (5369) I am using

GeneralData
Quote:
public enum GeneralDataTypes : int
{
StatueScroll = 1066,
FriendOffMsg = 1058,
ReviveButton = 1052,
ReviveButtonRemove = 1051,
ShowShopMall = 1100,
ShopMallRemove = 1101,
ClaimCPButton = 1197,
CpsClaimedMsg = 1198,
DetainedEquips = 1231,
InvRedemShowing = 1235,
RemoveFlowerUp = 1247,
AddFlowerUp = 1244,
VipButtonRemove = 1281
GeneralData
Quote:
public const ushort
SetLocation = 74,
SpawnEffect = 0x86,
ItemRequest = 75,
ConfirmAssociates = 76,
ConfirmProficiencies = 77,
ConfirmSpells = 78,
ChangeDirection = 79,
ChangeAction = 81,
UsePortal = 85,
Teleport = 86,
Leveled = 92,
EndXp = 93,
Revive = 94,
DeleteCharacter = 95,
ChangePKMode = 96,
ConfirmGuild = 97,
InvisibleEntity = 102,
NewCoordonates = 108,
StartVending = 111,
GetSurroundings = 114,
OpenCustom = 116,
ObserveEquipment = 117,
EndTransformation = 118,
EndFly = 120,
EnemyInfo = 123,
OpenWindow = 126,
CompleteLogin = 132,
RemoveEntity = 135,
Jump = 137,
EndTeleport = 146,
FriendInfo = 148,
ChangeAvatar = 0x97,
ChangeFace = 151,
TradePartner = 152,
Confiscator = 153,
ObvserveFriendEq = 310,
FlashStep = 156,
Away = 161,
PathFinding = 162;
PacketHandler
Quote:
static void Revive(GeneralData generalData, Receivers.ClientState client)
{
if (NulledClient(client))
client.Send(new MapStatus() { ID = client.Entity.MapID, Status = 0 });
return;

if (Time32.Now >= client.Entity.DeathStamp.AddSeconds(20))
{
if (client.Entity.Buffers.Values.ContainsKey((ushort) Game.Enums.SkillIDs.SoulShackle))
{ client.Send(new Message("You can't revive while you're at soul shackle effect!", Color.Red, Message.TopLeft)); return; }

bool ReviveHere = generalData.dwParam == 1;

client.Send(new MapStatus() { ID = client.Entity.MapID, Status = 0 });
client.Entity.TransformationID = 0;
client.Entity.Update(true, false, true, Game.Enums.StatusFlag.Dead);
client.Entity.Update(true, false, true, Game.Enums.StatusFlag.Ghost);
client.Entity.Hitpoints = client.Entity.MaxHitpoints;

if (client.Entity.MapID == 1038 && Game.Features.GuildWar.Handle.Running)
{
client.Entity.Teleport(6001, 035, 076);
goto Jump;
}
if (client.Entity.PKPoints >= 100)
{
client.Entity.Teleport(6000, 035, 076);
}
if (ReviveHere)
client.Entity.Teleport(client.Entity.MapID, client.Entity.X, client.Entity.Y);
else
{
foreach (ushort[] Point in Database.DataHolder.RevivePoints)
{
if (Point[0] == client.Entity.MapID)
{
client.Entity.Teleport(Point[1], Point[2], Point[3]);
UpdateprevXY(client);
return;
}
}
client.Entity.Teleport(1002, 430, 380);
}
Jump:
client.Screen.FullWipe();
client.Screen.Reload(null);
}
}
Attack type?????????
Quote:
#region Revive
if (Attacker.Owner.Screen.TryGetValue(TargetUID, out Attacked))
{
if (Attacked.Buffers.Contains(Enums.SkillIDs.SoulShac kle))
{ Attacker.Owner.Send(new Message("You can't revive that player while it is at soul shackle effect!", System.Drawing.Color.Red, Message.TopLeft)); return; }

if (Attacked.EntityFlag == EntityFlag.Player)
{
Attacked.Update(true, false, true, Enums.StatusFlag.Dead);
Attacked.TransformationID = 0;
Attacked.Hitpoints = Attacked.MaxHitpoints;
Attacked.Teleport(Attacked.MapID, Attacked.X, Attacked.Y);

Packet.Targets.SafeAdd(Attacked.UID, new SpellUse.DamageClass { Damage = Damage, Hit = 0 });
}
else
Packet.Targets.SafeAdd(Attacked.UID, new SpellUse.DamageClass { Damage = Damage, Hit = 0 });
}
#endregion
05/13/2011 13:31 iStefan#2
I Don't think It's General Data. It's a Stat Eff.
05/13/2011 13:33 -Shunsui-#3
soo.. are you trying to make the buttons spawn or make revive here work?
05/13/2011 13:51 S/W#4
Buttons spawn and aw make it work for now only spawn need :D
05/13/2011 14:34 { Angelius }#5
i think i can explain it a little bit,
right after the death hit you are gonna be clearing all player Status Effects cept for the ones that shouldent be removed .
and you are gonna have to add the NoMovement effect its = 32,

in 2 or maybe 3 seconds the client responds with a general data subtype which is 145,

and right there you'll be adding the Dead effect its = 1024,
and the Dead Mesh for the client ,
and thats it

its gonna look like this thought

public void Kill()
{
this.ClearAllEffects();
this.AddEffect(Enum.Effect.NoMovement, 0);
}

case 145:
Client.AddEffect(Enum.Effect.Dead, 0);
Spawns.SpawnThis(Packets.Status(Client.UID, Enum.Update.Mesh, Client.DeadMesh), Client);
break;

and thats it that should spawn the revive buttons and allow you to use both of the buttons the only thing left is to handle the revive points

ohh and one more thing to be able to use the revive here button you must use the right map status and send it to the player and you must be blessed no offense but i had some times that i was so sleepy that i forgot to use a prying stone and ended up wondering wth is wrong with the revive here case lol

good luck