Stable Master

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 095. Note: Core 095 is no longer officially supported.
Post Reply
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

Stable Master

Post by Poi »

In stablemaster.src(AI) If i change
if(GetObjProperty(ticket, "StableMaster") != me.serial)
PrintTextAbovePrivate(me, "This doesnt seem to be one of my tickets, please take it to the stable master who issued it.", player);
MoveItemToContainer(ticket, player.backpack);
return;
elseif(!canclaim(player,GetObjProperty(ticket, "pettemplate")))
say("You have no chance of controlling that!");
return;
endif
to

if(GetObjProperty(ticket, "StableMaster") != me.serial)
say("One moment please...");
elseif(!canclaim(player,GetObjProperty(ticket, "pettemplate")))
say("You have no chance of controlling that!");
return;
endif

Would that remove the part that makes it so you can only take it to that specific stable master?
Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Post by Pierce »

I don't know your scripting, but it seems that the stablemaster serial, where the pet is stabled is stored as CProp "StableMaster" on the ticket.
If you don't won't that you can ignore that ticket cprop, or better don't save it on the ticket.

If it is on the ticket you can save script performance time if you use:

Code: Select all

if(!canclaim(player,GetObjProperty(ticket, "pettemplate"))) 
say("You have no chance of controlling that!"); 
return; 
endif
If that's what you want, you should remove the saving of the serial of the stablemaster on the ticket. Because in this case it is useless.
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

Post by Poi »

Eh ok new problemo..
Uhm, it tells me he doesnt have this pet... any ideas on how i could fix this? Maybe write a whole new simple script..

Ok i did this

Code: Select all

    if(!pet)
CreateNpcFromTemplate( pet, player.x, player.y, player.z );
    endif
and got an error(in game) it said "take care of error text = "Object does not support members" be sure to feed it!

entire function:

Code: Select all

function Load_Ticket_Data(player, ticket)
    if(!canclaim(player,GetObjProperty(ticket, "pettemplate")))
    say("You have no chance of controlling that!");
    return;
  endif
  var tempdata := 0;
  var newpet := 0;
  var pet;
  if(ticket.objtype == 0x14f0)
    tempdata := GetObjProperty(ticket, "petserial");
    say("Oh, let me find your pet for you. One moment, please.");
    sleep(1);
    var petserial := GetObjProperty(ticket, "petserial");
    mystorage := GetObjProperty(me, "Pets");
    if(petserial in mystorage)
      pet := SystemFindObjectBySerial(petserial);
    endif
    if(!pet)
CreateNpcFromTemplate( pet, player.x, player.y, player.z );
    endif
    SetObjProperty(pet, "master", player.serial);
    SetObjProperty(pet, "prevtamed", 1);
    EraseObjProperty(pet,"stabled");
    EraseObjProperty(pet,"days");
	pet.script := "tamed";
    RestartScript(pet);
    RevokePrivilege(pet, "invul");
    MoveCharacterToLocation(pet, player.x, player.y, player.z, MOVECHAR_FORCELOCATION);
    var holder := array;
    mystorage := GetObjProperty(me, "Pets");
    foreach thing in mystorage
      if(thing != pet.serial)
        holder.append(thing);
      endif
    endforeach
    mystorage := holder;
    SetObjProperty(me, "Pets", mystorage);
    EraseObjProperty(pet, "NextCounter");
    say("Take care of " + pet.name + " and be sure to feed it!");
    DestroyItem(ticket);
  else
    TakeItem(player, ticket);
  endif
endfunction
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

Post by Poi »

Bump... As to the post above, it does not creat the pet either.
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

Post by Poi »

bump, please help my shard is growing and this is becoming increasingly a problem... And school just started so i dont have as much time to script..
Post Reply