Page 1 of 1

Need Help Writing sub using strings

Posted: Tue Aug 24, 2004 3:21 pm
by Neolesh
Basically I need a sub that will do the following..

Code: Select all

Sub DefendMyBot

    /tar NPC radius 75
    /delay 2
    /assist
    /if Current target = "my bot" {
    /call KillMob
    }

/return
The problem I'm having is with

/if Current target = "my bot" {

I still haven't learned this code, I'm trying to find it in the documentation but it's slow going, still kinda slow at it.

Posted: Tue Aug 24, 2004 3:26 pm
by Night Hawk

Code: Select all

/if (${String[${Target.CleanName}].Equal["an elvis offspring"]})

Posted: Tue Aug 24, 2004 3:28 pm
by Neolesh
Oo Thank you for very quick response =)

Edit: ahh yes working perfectly :)

Posted: Wed Aug 25, 2004 6:39 pm
by dman
Just a note ${Target.CleanName} is already a string so this works just as well and less brackets to worry about.

Code: Select all

/if (${Target.CleanName.Equal["an elvis offspring"]})

Top Product Guide

Posted: Thu Oct 26, 2023 12:59 pm
by FrankJScott
Please try Google for Cool Product Tips ec9a89a

Excellent Workspace Management And Moving Solutions Info

Posted: Tue Aug 12, 2025 2:44 pm
by FrankJScott
why not just google it