Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to cast revive once?

Featured Replies

I am writing a fight class in C# and got it to cast revive on dead party members but it will spam it.

This is what I used

Quote

                                if (p.IsValid && p.IsDead)
                                {
                                    SpellManager.CastSpellByNameOn("Revive", p.Name);
                                    Usefuls.WaitIsCasting();
                                 }


Btw, huge thanks to @Sye for taking his time to show me around on how to write a fight class in C# I am very grateful

Because you don´t have a cooldown on your revive ability and usefuls.waitiscast just wait until the Cast is done. So when the target don´t accept the ressurrection immediatly he get´s spammed over and over again. Therefore just use a timer for each target you already casted revive on, so it won´t spam revive on the same target again and again.

using Timer = robotManager.Helpful.Timer;

public Spell rezz = new Spell("revive");

if (p.IsDead && ObjectManager.Me.IsAlive && !Fight.InFight && _time.IsReady)
                                    {
                                        if (ObjectManager.Me.Target != p.Guid)
                                            Interact.InteractGameObject(p.GetBaseAddress);
                                        rezz.Launch();
                                        Usefuls.WaitIsCasting();
                                        _time.Reset();

                                    }

I helped him,

Works, thanks

 

                var corpse = ObjectManager.GetObjectWoWCorpse().FirstOrDefault();
                if (corpse.IsValid)
                {
                    Lua.LuaDoString("print('corpse exists, name: ["+corpse.Name+"], guid: ["+corpse.Guid+"], baseadress: ["+corpse.GetBaseAddress+"]')");
                    SpellManager.CastSpellByNameLUA("Revive");
                    Interact.InteractGameObject(corpse.GetBaseAddress);
                }

 

13 hours ago, Sye said:

This should work (untested)

 


using System;
using System.Linq;
using wManager.Wow;
using wManager.Wow.Helpers;
using wManager.Wow.ObjectManager;
using Timer = robotManager.Helpful.Timer;




    public static class untested
{
    public static Timer _time = new Timer(5000);

    public static void Revive(string spellname, int vector)
    {
        var corpse = ObjectManager.GetObjectWoWCorpse().FirstOrDefault(o => o.Name == o.Name && o.Position.DistanceTo(ObjectManager.Me.Position) < vector);
        uint mouseover = 0x00BD07A0;
        if (_time.IsReady)
        {
            Memory.WowMemory.Memory.WriteUInt64(mouseover, corpse.Guid);
            SpellManager.CastSpellByNameOn(spellname, "mouseover");
            Usefuls.WaitIsCasting();
            ObjectManager.BlackListGetUnitAttackPlayerGuidTime.Add(corpse.Guid, DateTime.Now + TimeSpan.FromMinutes(1));
            _time.Reset();
        }
    }
}

use this to call for it in your fightclass 


untested.Revive("Spellname", 25);

 

your code is illogical, mouseover is in wrobot API you don't need to write in memory manually, why do "o.Name == o.Name" ? Why blacklist corpse in blacklist for hostile unit? (and search corpse without check if corpse is in this blacklist). 
It's nice to help, but this type of code can mislead users.

 

 

Code (not tested) with target should look like:

var revive = new Spell("Revive", false);
if (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !ObjectManager.Me.IsCast && revive.KnownSpell && revive.IsSpellUsable)
{
    var corpse = ObjectManager.GetObjectWoWCorpse().Where(c => !wManager.wManagerSetting.IsBlackListed(c.Guid)).FirstOrDefault();
    if (corpse != null && corpse.IsValid)
    {
        Interact.ClearTarget(); // or  Interact.InteractGameObject(corpse.GetBaseAddress);
        revive.Launch();
        Interact.InteractGameObject(corpse.GetBaseAddress);
        wManager.wManagerSetting.AddBlackList(corpse.Guid, 1000 * 60 * 10);
    }
}

with focus should look like:

var revive = new Spell("Revive", false);
if (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !ObjectManager.Me.IsCast && revive.KnownSpell && revive.IsSpellUsable)
{
    var corpse = ObjectManager.GetObjectWoWCorpse().Where(c => !wManager.wManagerSetting.IsBlackListed(c.Guid)).FirstOrDefault();
    if (corpse != null && corpse.IsValid)
    {
        var old = ObjectManager.Me.FocusGuid;
        ObjectManager.Me.FocusGuid = corpse.Guid;
        revive.Launch(true, true, false, "focus");
        ObjectManager.Me.FocusGuid = old;
        wManager.wManagerSetting.AddBlackList(corpse.Guid, 1000 * 60 * 10);
    }
}

 

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.