Author Topic: Orion.GetLastGump or GetGump() not suit for 1.26.4 client?  (Read 2434 times)

0 Members and 1 Guest are viewing this topic.

Offline roro4everTopic starter

  • Newbie
  • *
  • Posts: 2
  • Activity:
    0%
  • Reputation Power: 1
  • roro4ever has no influence.
  • Referrals: 0
    • View Profile
Orion.GetLastGump or GetGump() not suit for 1.26.4 client?
« on: September 04, 2023, 10:53:46 PM »
Hello, I am a newbie for OrionUO Script. The freeshard I played recently using 1.26.4 client. I wrote some scirpt for train skill, and there are no problem.
Few days ago, I downloaded a script for trian blacksmithy skill, but it stucked at some code about gump.
So I wrote some scripts for  learn and test gump statements.

But I found  some problem, first is :  How can I get gumpobject?
For example.
Code: [Select]
function test(){
var IngotType='0x1BEF';
var gump0,gump1,gump2;
  //TextWindow.Open();
  Orion.UseType(IngotType);
  Orion.Wait('useitemdelay'); 
  gump0=Orion.GetLastGump();
  gump1=Orion.GetGump('last');
  Orion.Print('Orion.GumpCount='+Orion.GumpCount); 
  if (!(gump0 == null)) {
  Orion.Print(gump0.ID);
  Orion.InfoGump();
  Orion.Wait(500);
  }   
  else Orion.Print('No get gump0');
  if (gump1==null) Orion.Print('gump1 is null');
}

The result is :

gump0 and gump1 all are null....

why? 1.26.4 or other low version Clients can't GetGump?

Offline altiric

  • Jr. Member
  • **
  • Posts: 81
  • Activity:
    0%
  • Reputation Power: 2
  • altiric has no influence.
  • Referrals: 1
    • View Profile
Re: Orion.GetLastGump or GetGump() not suit for 1.26.4 client?
« Reply #1 on: September 09, 2023, 07:33:32 PM »
Instead of Wait('useitemdelay') try Orion.WaitForGump()
It's possible useitemdelay is too short to catch the gump poping up.
You'll also need to use Orion.Print(gump0.ID()) not (gump0.ID)

Tags: