Author Topic: Problem with var boolean script casting  (Read 7030 times)

0 Members and 1 Guest are viewing this topic.

Offline drmorpheusTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Activity:
    0%
  • Reputation Power: 1
  • drmorpheus has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Problem with var boolean script casting
« on: June 26, 2015, 02:03:50 PM »
0
Hi Guys i got a problem with a script, could someone trying to help me to fix this?
It's annoying,  i tried to do it in many different way but nothing change.
When i press the Hotkey it doesn't work good.

Thanks in advance to everybody

Kind Regards  Grin

Here the script:

Code: [Select]
procedure cast_spam();
var IsCasting:Boolean;
var arrow:Boolean;
begin
    arrow:=False;
    if not IsCasting then begin        
        if (arrow = False) then begin
        IsCasting:=True
        cast ('Magic_Arrow');
        WaitForTarget(500);
        if targetpresent then begin
          TargetToObject(LastAttack);
          IsCasting:=False;
          arrow:=True;
          end;
        end;
  
        if (arrow = True) then begin
        IsCasting:=True;
        cast ('Fireball');
        WaitForTarget(500);
        if targetpresent then begin
          TargetToObject(LastAttack);
          IsCasting:=False;        
          arrow:=False;
          end;
        end;
    end;
End;
   
« Last Edit: June 28, 2015, 01:00:43 AM by Crome969 »

Offline Boydon

  • Moderator
  • **
  • *****
  • Posts: 76
  • Activity:
    0%
  • Reputation Power: 3
  • Boydon has no influence.
  • Respect: +16
  • Referrals: 0
    • View Profile
Re: Problem with var boolean script casting
« Reply #1 on: June 27, 2015, 02:35:32 AM »
0
When i press the Hotkey it doesn't work good.

Can you elaborate "it doesn't work good"? What is the problem?
Member of the Stealth development team.

Offline drmorpheusTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Activity:
    0%
  • Reputation Power: 1
  • drmorpheus has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Problem with var boolean script casting
« Reply #2 on: June 27, 2015, 04:40:34 AM »
0
OK sorry,  if I  hold the bottom it should cast first magic arrow and then fireball,  but it cast not in the right way. The script cast magic arrow  many times then just a time fireball but the spell flizz many times..

Thanks in advance

Offline drmorpheusTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Activity:
    0%
  • Reputation Power: 1
  • drmorpheus has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Problem with var boolean script casting
« Reply #3 on: June 27, 2015, 06:28:13 AM »
0
fixed, just used some while and deleted  IF ;)

Offline Crome969

  • Moderator
  • *
  • *****
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Problem with var boolean script casting
« Reply #4 on: June 28, 2015, 01:01:08 AM »
0
I wrapped your code with Code-Tag. Better for reading..

Offline drmorpheusTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Activity:
    0%
  • Reputation Power: 1
  • drmorpheus has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Problem with var boolean script casting
« Reply #5 on: July 02, 2015, 05:44:29 AM »
0
thank you man,
anyway guys i tought that the script was already fixed but i commit mistake, it doesn't work..

can someone help me?

please i really need it..

Offline Crome969

  • Moderator
  • *
  • *****
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Problem with var boolean script casting
« Reply #6 on: July 02, 2015, 10:26:42 AM »
0
i never used the hotkey interface but asked Vizit0r who wroted this like 2 years ago. He doesnt remember as well. You may check on Stealth.od.ua onto forum,maybe someone posted samples how to get hotkeys working. I myself got your snippet not working, so i couldnt debug it.

Tags: